iobroker.eos-admin 9.0.17 → 9.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NEXOWATT_EOS_BUILD_INFO.json +12 -14
- package/README.md +5 -3
- package/START_HIER_9.0.18.md +47 -0
- package/adminWww/.vite/manifest.json +39 -39
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +107 -107
- package/adminWww/assets/{AdapterUpdateDialog-Cpo3dAfY.js → AdapterUpdateDialog-ByJk9Cxj.js} +1 -1
- package/adminWww/assets/{Adapters-n2ukPDdC.js → Adapters-V2JtEPZX.js} +1 -1
- package/adminWww/assets/{ConfigManager-BVZ6_Ebo.js → ConfigManager-BKcdyJnN.js} +1 -1
- package/adminWww/assets/{Enums-CQ6yHG2W.js → Enums-ChbfAWzp.js} +1 -1
- package/adminWww/assets/{Fields-CaJqzoW-.js → Fields-DzaVXEvg.js} +1 -1
- package/adminWww/assets/{Files-DfvpKGa3.js → Files-CRpIXj4X.js} +1 -1
- package/adminWww/assets/{Hosts-3xLBsdG6.js → Hosts-rOgfd2wo.js} +1 -1
- package/adminWww/assets/{Instances-B7hKEhyw.js → Instances-BxLhJ6Pb.js} +1 -1
- package/adminWww/assets/{Intro-BV4kYZdT.js → Intro-BOql527d.js} +1 -1
- package/adminWww/assets/{Logs-DpL9eY69.js → Logs-WUUDY7a4.js} +1 -1
- package/adminWww/assets/{Objects-dN06jhQk.js → Objects-DYaZkCK7.js} +1 -1
- package/adminWww/assets/{Overview-Lip63_ej.js → Overview-C6hiiPbm.js} +1 -1
- package/adminWww/assets/{State-BSO2X_xN.js → State-AH43l7fG.js} +1 -1
- package/adminWww/assets/{UsedResources-DvqzszKI.js → UsedResources-jhsRMH4X.js} +1 -1
- package/adminWww/assets/{Users-Csqd1xA-.js → Users-D9wyLyJ1.js} +1 -1
- package/adminWww/assets/{bootstrap-C3HM8kNL.js → bootstrap-gVLo1K_2.js} +3 -3
- package/adminWww/assets/{hostInit-DdxBUeXQ.js → hostInit-Dt_M-NAC.js} +1 -1
- package/adminWww/assets/{icons-material-D1Tb_725.js → icons-material-DuVW_EUA.js} +1 -1
- package/adminWww/assets/{index-BOujTMyH.js → index-B1cnPkSO.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-BZyrUVAo.js → installSVGRenderer-GvgHjubR.js} +1 -1
- package/adminWww/assets/{mf-entry-bootstrap-0-3418586b.js → mf-entry-bootstrap-0-6b32b635.js} +2 -2
- package/adminWww/index.html +23 -23
- package/adminWww/mf-manifest.json +1 -1
- package/adminWww/mf-stats.json +1 -1
- package/adminWww/remoteEntry-eos-9.0.18.js +12 -0
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosDeviceEmsPlan.js +739 -0
- package/build/lib/eosDeviceEmsPlan.js.map +1 -0
- package/build/lib/eosDeviceEmsService.js +377 -0
- package/build/lib/eosDeviceEmsService.js.map +1 -0
- package/build/lib/eosModuleHost.js +53 -2
- package/build/lib/eosModuleHost.js.map +1 -1
- package/build/lib/eosModuleHttp.js +1 -1
- package/build/lib/eosModuleHttp.js.map +1 -1
- package/build/lib/web.js +15 -0
- package/build/lib/web.js.map +1 -1
- package/docs/reports/unified-9.0.18/ALIAS_V1_COVERAGE.json +5056 -0
- package/docs/reports/unified-9.0.18/ALIAS_V1_VERTRAG.md +257 -0
- package/docs/reports/unified-9.0.18/ANFORDERUNGEN.md +55 -0
- package/docs/reports/unified-9.0.18/CUSTOMER_TARIFF_REVIEW.md +33 -0
- package/docs/reports/unified-9.0.18/GERAETE_EMS_EINRICHTUNG.md +86 -0
- package/docs/reports/unified-9.0.18/INSTALLER_LIFECYCLE_REVIEW.md +29 -0
- package/docs/reports/unified-9.0.18/KUNDENTARIF_EINRICHTUNG.md +27 -0
- package/docs/reports/unified-9.0.18/PRUEFBERICHT.md +87 -0
- package/docs/reports/unified-9.0.18/UNABHAENGIGER_REVIEW.md +63 -0
- package/docs/reports/unified-9.0.18/raw/INDEX.json +331 -0
- package/docs/reports/unified-9.0.18/raw/audit-full.log +345 -0
- package/docs/reports/unified-9.0.18/raw/audit-full.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/audit-runtime.log +23 -0
- package/docs/reports/unified-9.0.18/raw/audit-runtime.result.json +15 -0
- package/docs/reports/unified-9.0.18/raw/backend-final.log +5 -0
- package/docs/reports/unified-9.0.18/raw/backend-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/frontend-build.log +152 -0
- package/docs/reports/unified-9.0.18/raw/frontend-build.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/installer-build.log +26 -0
- package/docs/reports/unified-9.0.18/raw/installer-build.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/keygen-source.json +6 -0
- package/docs/reports/unified-9.0.18/raw/lint-final.log +5 -0
- package/docs/reports/unified-9.0.18/raw/lint-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/modules-build.log +5 -0
- package/docs/reports/unified-9.0.18/raw/modules-build.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/node22-tests-final.log +9859 -0
- package/docs/reports/unified-9.0.18/raw/node22-tests-final.result.json +13 -0
- package/docs/reports/unified-9.0.18/raw/node22-typecheck-final.log +7 -0
- package/docs/reports/unified-9.0.18/raw/node22-typecheck-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.18/raw/node24-tests-final.log +1663 -0
- package/docs/reports/unified-9.0.18/raw/node24-tests-final.result.json +13 -0
- package/docs/reports/unified-9.0.18/raw/node24-typecheck-final.log +5 -0
- package/docs/reports/unified-9.0.18/raw/node24-typecheck-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.18/raw/sbom-runtime.log +7 -0
- package/docs/reports/unified-9.0.18/raw/sbom-runtime.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/sbom-vendor-check.log +1 -0
- package/docs/reports/unified-9.0.18/raw/sbom-vendor-check.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-docs-check.log +6 -0
- package/docs/reports/unified-9.0.18/raw/ui-docs-check.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-runtime-final.log +7 -0
- package/docs/reports/unified-9.0.18/raw/ui-runtime-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-runtime-sync.log +6 -0
- package/docs/reports/unified-9.0.18/raw/ui-runtime-sync.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-sbom-check.log +6 -0
- package/docs/reports/unified-9.0.18/raw/ui-sbom-check.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-sbom-final.log +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-sbom-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-secret-final.log +6 -0
- package/docs/reports/unified-9.0.18/raw/ui-secret-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-security-final.log +8 -0
- package/docs/reports/unified-9.0.18/raw/ui-security-final.result.json +14 -0
- package/io-package.json +8 -8
- package/modules/devices/admin/alias-contract-v1.json +189 -0
- package/modules/devices/admin/ems-assignment.d.ts +10 -0
- package/modules/devices/admin/ems-assignment.js +194 -0
- package/modules/devices/admin/host-bridge.js +47 -0
- package/modules/devices/admin/index.html +19 -1
- package/modules/devices/admin/index_m.js +73 -1
- package/modules/devices/admin/style.css +15 -0
- package/modules/devices/checks/emsAssignment.check.js +128 -0
- package/modules/devices/eslint.hosted.config.mjs +1 -1
- package/modules/devices/index.js +11 -0
- package/modules/devices/lib/alias-contract-v1.json +189 -0
- package/modules/devices/lib/aliasContract.js +7 -1
- package/modules/devices/lib/device-alias-semantics-v1.json +1605 -0
- package/modules/devices/lib/deviceAliasSemantics.js +109 -0
- package/modules/devices/lib/deviceRuntime.js +3 -0
- package/modules/devices/test/aliasContractV1.test.js +1 -1
- package/modules/devices/test/deviceAliasSemantics.test.js +163 -0
- package/modules/devices/test/emsAssignmentUi.test.js +190 -0
- package/modules/devices/tsconfig.alias-semantics.json +17 -0
- package/modules/devices/tsconfig.ems-ui.json +9 -0
- package/package.json +9 -7
- package/release-manifests/unified/build-environment.cdx.json +6 -6
- package/release-manifests/unified/files.json +194 -85
- package/release-manifests/unified/frontend.cdx.json +6 -6
- package/release-manifests/unified/installer.cdx.json +6 -6
- package/release-manifests/unified/obsolete-admin-assets.json +84 -0
- package/release-manifests/unified/runtime.cdx.json +23 -23
- package/release-manifests/unified/validation.json +15 -15
- package/tools/eos-release-check.cjs +1 -1
- package/tools/eos-release-manifest.cjs +5 -5
- package/ui/docs/security/eslint-reviewed-findings.json +32 -18
- package/ui/ems/datapoints.js +22 -1
- package/ui/ems/modules/tariff-provider.js +232 -54
- package/ui/io-package.json +5 -1
- package/ui/lib/customer-tariff.js +241 -0
- package/ui/lib/installer-lifecycle.js +87 -0
- package/ui/main.js +203 -117
- package/ui/package.json +8 -4
- package/ui/www/customer-tariff.css +21 -0
- package/ui/www/customer-tariff.js +333 -0
- package/ui/www/ems-apps.js +16 -6
- package/ui/www/manifest.webmanifest +2 -2
- package/ui/www/settings.html +45 -0
- package/adminWww/remoteEntry-eos-9.0.17.js +0 -12
package/modules/devices/index.js
CHANGED
|
@@ -78,6 +78,17 @@ function validateConfig(input = {}) {
|
|
|
78
78
|
if (typeof device.templateId !== 'string' || !device.templateId || device.templateId.length > 160) throw failure('EOS_DEVICES_CONFIG_TEMPLATE');
|
|
79
79
|
if (!PROTOCOLS.includes(device.protocol)) throw failure('EOS_DEVICES_CONFIG_PROTOCOL');
|
|
80
80
|
if (device.enabled !== undefined && typeof device.enabled !== 'boolean') throw failure('EOS_DEVICES_CONFIG_ENABLED');
|
|
81
|
+
if (device.ems !== undefined) {
|
|
82
|
+
if (!record(device.ems) || Object.keys(device.ems).some(key => !['mode', 'scope', 'flowSlot', 'group'].includes(key))) throw failure('EOS_DEVICES_EMS_INTENT');
|
|
83
|
+
const intent = device.ems;
|
|
84
|
+
if (typeof intent.mode !== 'string' || !['auto', 'monitor', 'manual', 'singleStorage', 'storageFarm', 'gridMeter', 'generationMeter', 'consumptionMeter', 'pvInverter'].includes(intent.mode)) throw failure('EOS_DEVICES_EMS_INTENT');
|
|
85
|
+
if (intent.scope !== undefined && (typeof intent.scope !== 'string' || !['M0', 'M1'].includes(intent.scope))) throw failure('EOS_DEVICES_EMS_SCOPE');
|
|
86
|
+
if (intent.group !== undefined && (typeof intent.group !== 'string' || !/^[A-Za-z0-9_-]{1,80}$/.test(intent.group))) throw failure('EOS_DEVICES_EMS_GROUP');
|
|
87
|
+
if (intent.flowSlot !== undefined && (typeof intent.flowSlot !== 'number' || !Number.isInteger(intent.flowSlot) || intent.flowSlot < 0 || intent.flowSlot > 10)) throw failure('EOS_DEVICES_EMS_SLOT');
|
|
88
|
+
if (['generationMeter', 'pvInverter'].includes(intent.mode) && (typeof intent.flowSlot !== 'number' || intent.flowSlot < 0 || intent.flowSlot > 5)) throw failure('EOS_DEVICES_EMS_SLOT');
|
|
89
|
+
if (intent.mode === 'consumptionMeter' && (typeof intent.flowSlot !== 'number' || intent.flowSlot < 1 || intent.flowSlot > 10)) throw failure('EOS_DEVICES_EMS_SLOT');
|
|
90
|
+
if (['singleStorage', 'storageFarm', 'gridMeter'].includes(intent.mode) && intent.scope === undefined) throw failure('EOS_DEVICES_EMS_SCOPE');
|
|
91
|
+
}
|
|
81
92
|
if (device.connection !== undefined && !record(device.connection)) throw failure('EOS_DEVICES_CONFIG_CONNECTION');
|
|
82
93
|
const connection = device.connection || {};
|
|
83
94
|
if (connection.insecureTls === true || connection.insecureTLS === true || connection.allowInsecureTls === true || connection.rejectUnauthorized === false) throw failure('EOS_DEVICES_TLS_VERIFICATION_REQUIRED');
|
|
@@ -809,6 +809,69 @@
|
|
|
809
809
|
"role": "level.power",
|
|
810
810
|
"unit": "W",
|
|
811
811
|
"capability": "write.napSetpointW"
|
|
812
|
+
},
|
|
813
|
+
"r.essActivePower": {
|
|
814
|
+
"type": "number",
|
|
815
|
+
"role": "value.power",
|
|
816
|
+
"unit": "W",
|
|
817
|
+
"capability": "read.essActivePower",
|
|
818
|
+
"description": "ESS AC converter active power (+ output / - input)"
|
|
819
|
+
},
|
|
820
|
+
"r.nvpPower": {
|
|
821
|
+
"type": "number",
|
|
822
|
+
"role": "value.power",
|
|
823
|
+
"unit": "W",
|
|
824
|
+
"capability": "read.nvpPower",
|
|
825
|
+
"description": "Device grid-meter power (+ import / - export; assign M0/M1 explicitly)"
|
|
826
|
+
},
|
|
827
|
+
"r.consumptionTotal": {
|
|
828
|
+
"type": "number",
|
|
829
|
+
"role": "value.power",
|
|
830
|
+
"unit": "W",
|
|
831
|
+
"capability": "read.consumptionTotal",
|
|
832
|
+
"description": "Device reported total consumption power"
|
|
833
|
+
},
|
|
834
|
+
"r.minPowerSetpointW": {
|
|
835
|
+
"type": "number",
|
|
836
|
+
"role": "value.power",
|
|
837
|
+
"unit": "W",
|
|
838
|
+
"capability": "read.minPowerSetpointW",
|
|
839
|
+
"description": "Minimum admissible signed active-power target (charge is negative)"
|
|
840
|
+
},
|
|
841
|
+
"r.maxPowerSetpointW": {
|
|
842
|
+
"type": "number",
|
|
843
|
+
"role": "value.power",
|
|
844
|
+
"unit": "W",
|
|
845
|
+
"capability": "read.maxPowerSetpointW",
|
|
846
|
+
"description": "Maximum admissible signed active-power target (discharge is positive)"
|
|
847
|
+
},
|
|
848
|
+
"r.powerSetpointReadbackW": {
|
|
849
|
+
"type": "number",
|
|
850
|
+
"role": "value.power",
|
|
851
|
+
"unit": "W",
|
|
852
|
+
"capability": "read.powerSetpointReadbackW",
|
|
853
|
+
"description": "Device-read active-power target (not measured physical delivery)"
|
|
854
|
+
},
|
|
855
|
+
"r.pvPowerDc": {
|
|
856
|
+
"type": "number",
|
|
857
|
+
"role": "value.power",
|
|
858
|
+
"unit": "W",
|
|
859
|
+
"capability": "read.pvPowerDc",
|
|
860
|
+
"description": "PV generation measured on DC side"
|
|
861
|
+
},
|
|
862
|
+
"r.pvPowerAc": {
|
|
863
|
+
"type": "number",
|
|
864
|
+
"role": "value.power",
|
|
865
|
+
"unit": "W",
|
|
866
|
+
"capability": "read.pvPowerAc",
|
|
867
|
+
"description": "PV generation measured on AC side"
|
|
868
|
+
},
|
|
869
|
+
"r.pvPowerTotal": {
|
|
870
|
+
"type": "number",
|
|
871
|
+
"role": "value.power",
|
|
872
|
+
"unit": "W",
|
|
873
|
+
"capability": "read.pvPowerTotal",
|
|
874
|
+
"description": "Device reported total PV generation (do not add AC/DC values again)"
|
|
812
875
|
}
|
|
813
876
|
}
|
|
814
877
|
},
|
|
@@ -923,6 +986,69 @@
|
|
|
923
986
|
"type": "number",
|
|
924
987
|
"role": "level",
|
|
925
988
|
"capability": "write.controlMode"
|
|
989
|
+
},
|
|
990
|
+
"r.essActivePower": {
|
|
991
|
+
"type": "number",
|
|
992
|
+
"role": "value.power",
|
|
993
|
+
"unit": "W",
|
|
994
|
+
"capability": "read.essActivePower",
|
|
995
|
+
"description": "ESS AC converter active power (+ output / - input)"
|
|
996
|
+
},
|
|
997
|
+
"r.nvpPower": {
|
|
998
|
+
"type": "number",
|
|
999
|
+
"role": "value.power",
|
|
1000
|
+
"unit": "W",
|
|
1001
|
+
"capability": "read.nvpPower",
|
|
1002
|
+
"description": "Device grid-meter power (+ import / - export; assign M0/M1 explicitly)"
|
|
1003
|
+
},
|
|
1004
|
+
"r.consumptionTotal": {
|
|
1005
|
+
"type": "number",
|
|
1006
|
+
"role": "value.power",
|
|
1007
|
+
"unit": "W",
|
|
1008
|
+
"capability": "read.consumptionTotal",
|
|
1009
|
+
"description": "Device reported total consumption power"
|
|
1010
|
+
},
|
|
1011
|
+
"r.minPowerSetpointW": {
|
|
1012
|
+
"type": "number",
|
|
1013
|
+
"role": "value.power",
|
|
1014
|
+
"unit": "W",
|
|
1015
|
+
"capability": "read.minPowerSetpointW",
|
|
1016
|
+
"description": "Minimum admissible signed active-power target (charge is negative)"
|
|
1017
|
+
},
|
|
1018
|
+
"r.maxPowerSetpointW": {
|
|
1019
|
+
"type": "number",
|
|
1020
|
+
"role": "value.power",
|
|
1021
|
+
"unit": "W",
|
|
1022
|
+
"capability": "read.maxPowerSetpointW",
|
|
1023
|
+
"description": "Maximum admissible signed active-power target (discharge is positive)"
|
|
1024
|
+
},
|
|
1025
|
+
"r.powerSetpointReadbackW": {
|
|
1026
|
+
"type": "number",
|
|
1027
|
+
"role": "value.power",
|
|
1028
|
+
"unit": "W",
|
|
1029
|
+
"capability": "read.powerSetpointReadbackW",
|
|
1030
|
+
"description": "Device-read active-power target (not measured physical delivery)"
|
|
1031
|
+
},
|
|
1032
|
+
"r.pvPowerDc": {
|
|
1033
|
+
"type": "number",
|
|
1034
|
+
"role": "value.power",
|
|
1035
|
+
"unit": "W",
|
|
1036
|
+
"capability": "read.pvPowerDc",
|
|
1037
|
+
"description": "PV generation measured on DC side"
|
|
1038
|
+
},
|
|
1039
|
+
"r.pvPowerAc": {
|
|
1040
|
+
"type": "number",
|
|
1041
|
+
"role": "value.power",
|
|
1042
|
+
"unit": "W",
|
|
1043
|
+
"capability": "read.pvPowerAc",
|
|
1044
|
+
"description": "PV generation measured on AC side"
|
|
1045
|
+
},
|
|
1046
|
+
"r.pvPowerTotal": {
|
|
1047
|
+
"type": "number",
|
|
1048
|
+
"role": "value.power",
|
|
1049
|
+
"unit": "W",
|
|
1050
|
+
"capability": "read.pvPowerTotal",
|
|
1051
|
+
"description": "Device reported total PV generation (do not add AC/DC values again)"
|
|
926
1052
|
}
|
|
927
1053
|
}
|
|
928
1054
|
},
|
|
@@ -1023,6 +1149,69 @@
|
|
|
1023
1149
|
"role": "value.power",
|
|
1024
1150
|
"unit": "W",
|
|
1025
1151
|
"capability": "read.allowedDischargePower"
|
|
1152
|
+
},
|
|
1153
|
+
"r.essActivePower": {
|
|
1154
|
+
"type": "number",
|
|
1155
|
+
"role": "value.power",
|
|
1156
|
+
"unit": "W",
|
|
1157
|
+
"capability": "read.essActivePower",
|
|
1158
|
+
"description": "ESS AC converter active power (+ output / - input)"
|
|
1159
|
+
},
|
|
1160
|
+
"r.nvpPower": {
|
|
1161
|
+
"type": "number",
|
|
1162
|
+
"role": "value.power",
|
|
1163
|
+
"unit": "W",
|
|
1164
|
+
"capability": "read.nvpPower",
|
|
1165
|
+
"description": "Device grid-meter power (+ import / - export; assign M0/M1 explicitly)"
|
|
1166
|
+
},
|
|
1167
|
+
"r.consumptionTotal": {
|
|
1168
|
+
"type": "number",
|
|
1169
|
+
"role": "value.power",
|
|
1170
|
+
"unit": "W",
|
|
1171
|
+
"capability": "read.consumptionTotal",
|
|
1172
|
+
"description": "Device reported total consumption power"
|
|
1173
|
+
},
|
|
1174
|
+
"r.minPowerSetpointW": {
|
|
1175
|
+
"type": "number",
|
|
1176
|
+
"role": "value.power",
|
|
1177
|
+
"unit": "W",
|
|
1178
|
+
"capability": "read.minPowerSetpointW",
|
|
1179
|
+
"description": "Minimum admissible signed active-power target (charge is negative)"
|
|
1180
|
+
},
|
|
1181
|
+
"r.maxPowerSetpointW": {
|
|
1182
|
+
"type": "number",
|
|
1183
|
+
"role": "value.power",
|
|
1184
|
+
"unit": "W",
|
|
1185
|
+
"capability": "read.maxPowerSetpointW",
|
|
1186
|
+
"description": "Maximum admissible signed active-power target (discharge is positive)"
|
|
1187
|
+
},
|
|
1188
|
+
"r.powerSetpointReadbackW": {
|
|
1189
|
+
"type": "number",
|
|
1190
|
+
"role": "value.power",
|
|
1191
|
+
"unit": "W",
|
|
1192
|
+
"capability": "read.powerSetpointReadbackW",
|
|
1193
|
+
"description": "Device-read active-power target (not measured physical delivery)"
|
|
1194
|
+
},
|
|
1195
|
+
"r.pvPowerDc": {
|
|
1196
|
+
"type": "number",
|
|
1197
|
+
"role": "value.power",
|
|
1198
|
+
"unit": "W",
|
|
1199
|
+
"capability": "read.pvPowerDc",
|
|
1200
|
+
"description": "PV generation measured on DC side"
|
|
1201
|
+
},
|
|
1202
|
+
"r.pvPowerAc": {
|
|
1203
|
+
"type": "number",
|
|
1204
|
+
"role": "value.power",
|
|
1205
|
+
"unit": "W",
|
|
1206
|
+
"capability": "read.pvPowerAc",
|
|
1207
|
+
"description": "PV generation measured on AC side"
|
|
1208
|
+
},
|
|
1209
|
+
"r.pvPowerTotal": {
|
|
1210
|
+
"type": "number",
|
|
1211
|
+
"role": "value.power",
|
|
1212
|
+
"unit": "W",
|
|
1213
|
+
"capability": "read.pvPowerTotal",
|
|
1214
|
+
"description": "Device reported total PV generation (do not add AC/DC values again)"
|
|
1026
1215
|
}
|
|
1027
1216
|
}
|
|
1028
1217
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const contract = require('./alias-contract-v1.json');
|
|
4
|
+
const { buildSemanticAliasDefinitions } = require('./deviceAliasSemantics');
|
|
4
5
|
|
|
5
6
|
const STANDARD_NAMESPACE = String(contract.namespace || 'v1');
|
|
6
7
|
const SCHEMA_VERSION = Number(contract.schemaVersion || 1);
|
|
@@ -400,8 +401,11 @@ function buildStandardAliasDefinitions(options) {
|
|
|
400
401
|
const deviceClass = getDeviceClass(template, cfg);
|
|
401
402
|
const standardDefs = [];
|
|
402
403
|
const seen = new Set();
|
|
404
|
+
const semantic = buildSemanticAliasDefinitions({ baseId, template, getDpById });
|
|
403
405
|
|
|
404
|
-
|
|
406
|
+
// The additive semantic profile is source-bound and read-only. Existing v1
|
|
407
|
+
// paths keep priority; no historic alias or customer mapping is rewritten.
|
|
408
|
+
for (const def of (legacyDefs || []).concat(semantic.definitions)) {
|
|
405
409
|
const path = legacyAliasPath(def && def.relId);
|
|
406
410
|
if (!path || path.startsWith(`${STANDARD_NAMESPACE}.`) || path.startsWith('meta.')) continue;
|
|
407
411
|
const normalized = cloneStandardDefinition(def, {
|
|
@@ -443,6 +447,7 @@ function buildStandardAliasDefinitions(options) {
|
|
|
443
447
|
definitions: standardDefs,
|
|
444
448
|
capabilities: Array.from(capabilities).sort(),
|
|
445
449
|
missingRequired,
|
|
450
|
+
semanticCoverage: semantic.coverage,
|
|
446
451
|
};
|
|
447
452
|
}
|
|
448
453
|
|
|
@@ -459,6 +464,7 @@ function buildManifest(info, template, cfg) {
|
|
|
459
464
|
model: String((template && template.model) || ''),
|
|
460
465
|
capabilities: Array.isArray(safeInfo.capabilities) ? safeInfo.capabilities.slice().sort() : [],
|
|
461
466
|
missingRequired: Array.isArray(safeInfo.missingRequired) ? safeInfo.missingRequired.slice().sort() : [],
|
|
467
|
+
semanticCoverage: safeInfo.semanticCoverage || {},
|
|
462
468
|
};
|
|
463
469
|
}
|
|
464
470
|
|