@zwave-js/cc 14.0.0-beta.1 → 14.0.0-beta.4
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/build/cjs/cc/AlarmSensorCC.d.ts +194 -0
- package/build/cjs/cc/AlarmSensorCC.js +395 -0
- package/build/cjs/cc/AlarmSensorCC.js.map +7 -0
- package/build/cjs/cc/AssociationCC.d.ts +253 -0
- package/build/cjs/cc/AssociationCC.js +711 -0
- package/build/cjs/cc/AssociationCC.js.map +7 -0
- package/build/cjs/cc/AssociationGroupInfoCC.d.ts +230 -0
- package/build/cjs/cc/AssociationGroupInfoCC.js +746 -0
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +7 -0
- package/build/cjs/cc/BarrierOperatorCC.d.ts +243 -0
- package/build/cjs/cc/BarrierOperatorCC.js +582 -0
- package/build/cjs/cc/BarrierOperatorCC.js.map +7 -0
- package/build/cjs/cc/BasicCC.d.ts +191 -0
- package/build/cjs/cc/BasicCC.js +384 -0
- package/build/cjs/cc/BasicCC.js.map +7 -0
- package/build/cjs/cc/BatteryCC.d.ts +406 -0
- package/build/cjs/cc/BatteryCC.js +508 -0
- package/build/cjs/cc/BatteryCC.js.map +7 -0
- package/build/cjs/cc/BinarySensorCC.d.ts +122 -0
- package/build/cjs/cc/BinarySensorCC.js +431 -0
- package/build/cjs/cc/BinarySensorCC.js.map +7 -0
- package/build/cjs/cc/BinarySwitchCC.d.ts +139 -0
- package/build/cjs/cc/BinarySwitchCC.js +378 -0
- package/build/cjs/cc/BinarySwitchCC.js.map +7 -0
- package/build/cjs/cc/CRC16CC.d.ts +29 -0
- package/build/cjs/cc/CRC16CC.js +133 -0
- package/build/cjs/cc/CRC16CC.js.map +7 -0
- package/build/cjs/cc/CentralSceneCC.d.ts +210 -0
- package/build/cjs/cc/CentralSceneCC.js +449 -0
- package/build/cjs/cc/CentralSceneCC.js.map +7 -0
- package/build/cjs/cc/ClimateControlScheduleCC.d.ts +177 -0
- package/build/cjs/cc/ClimateControlScheduleCC.js +480 -0
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +7 -0
- package/build/cjs/cc/ClockCC.d.ts +47 -0
- package/build/cjs/cc/ClockCC.js +226 -0
- package/build/cjs/cc/ClockCC.js.map +7 -0
- package/build/cjs/cc/ColorSwitchCC.d.ts +339 -0
- package/build/cjs/cc/ColorSwitchCC.js +1117 -0
- package/build/cjs/cc/ColorSwitchCC.js.map +7 -0
- package/build/cjs/cc/ConfigurationCC.d.ts +396 -0
- package/build/cjs/cc/ConfigurationCC.js +2230 -0
- package/build/cjs/cc/ConfigurationCC.js.map +7 -0
- package/build/cjs/cc/DeviceResetLocallyCC.d.ts +17 -0
- package/build/cjs/cc/DeviceResetLocallyCC.js +92 -0
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +7 -0
- package/build/cjs/cc/DoorLockCC.d.ts +837 -0
- package/build/cjs/cc/DoorLockCC.js +1239 -0
- package/build/cjs/cc/DoorLockCC.js.map +7 -0
- package/build/cjs/cc/DoorLockLoggingCC.d.ts +77 -0
- package/build/cjs/cc/DoorLockLoggingCC.js +343 -0
- package/build/cjs/cc/DoorLockLoggingCC.js.map +7 -0
- package/build/cjs/cc/EnergyProductionCC.d.ts +77 -0
- package/build/cjs/cc/EnergyProductionCC.js +240 -0
- package/build/cjs/cc/EnergyProductionCC.js.map +7 -0
- package/build/cjs/cc/EntryControlCC.d.ts +231 -0
- package/build/cjs/cc/EntryControlCC.js +593 -0
- package/build/cjs/cc/EntryControlCC.js.map +7 -0
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +359 -0
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +1122 -0
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +7 -0
- package/build/cjs/cc/HailCC.d.ts +6 -0
- package/build/cjs/cc/HailCC.js +45 -0
- package/build/cjs/cc/HailCC.js.map +7 -0
- package/build/cjs/cc/HumidityControlModeCC.d.ts +111 -0
- package/build/cjs/cc/HumidityControlModeCC.js +323 -0
- package/build/cjs/cc/HumidityControlModeCC.js.map +7 -0
- package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +60 -0
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +164 -0
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +7 -0
- package/build/cjs/cc/HumidityControlSetpointCC.d.ts +209 -0
- package/build/cjs/cc/HumidityControlSetpointCC.js +634 -0
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +7 -0
- package/build/cjs/cc/InclusionControllerCC.d.ts +42 -0
- package/build/cjs/cc/InclusionControllerCC.js +160 -0
- package/build/cjs/cc/InclusionControllerCC.js.map +7 -0
- package/build/cjs/cc/IndicatorCC.d.ts +338 -0
- package/build/cjs/cc/IndicatorCC.js +1234 -0
- package/build/cjs/cc/IndicatorCC.js.map +7 -0
- package/build/cjs/cc/IrrigationCC.d.ts +1496 -0
- package/build/cjs/cc/IrrigationCC.js +1978 -0
- package/build/cjs/cc/IrrigationCC.js.map +7 -0
- package/build/cjs/cc/LanguageCC.d.ts +101 -0
- package/build/cjs/cc/LanguageCC.js +267 -0
- package/build/cjs/cc/LanguageCC.js.map +7 -0
- package/build/cjs/cc/LockCC.d.ts +73 -0
- package/build/cjs/cc/LockCC.js +222 -0
- package/build/cjs/cc/LockCC.js.map +7 -0
- package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +32 -0
- package/build/cjs/cc/ManufacturerProprietaryCC.js +209 -0
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +7 -0
- package/build/cjs/cc/ManufacturerSpecificCC.d.ts +171 -0
- package/build/cjs/cc/ManufacturerSpecificCC.js +334 -0
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +7 -0
- package/build/cjs/cc/MeterCC.d.ts +318 -0
- package/build/cjs/cc/MeterCC.js +1235 -0
- package/build/cjs/cc/MeterCC.js.map +7 -0
- package/build/cjs/cc/MultiChannelAssociationCC.d.ts +241 -0
- package/build/cjs/cc/MultiChannelAssociationCC.js +956 -0
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +7 -0
- package/build/cjs/cc/MultiChannelCC.d.ts +394 -0
- package/build/cjs/cc/MultiChannelCC.js +1050 -0
- package/build/cjs/cc/MultiChannelCC.js.map +7 -0
- package/build/cjs/cc/MultiCommandCC.d.ts +27 -0
- package/build/cjs/cc/MultiCommandCC.js +159 -0
- package/build/cjs/cc/MultiCommandCC.js.map +7 -0
- package/build/cjs/cc/MultilevelSensorCC.d.ts +185 -0
- package/build/cjs/cc/MultilevelSensorCC.js +716 -0
- package/build/cjs/cc/MultilevelSensorCC.js.map +7 -0
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +357 -0
- package/build/cjs/cc/MultilevelSwitchCC.js +780 -0
- package/build/cjs/cc/MultilevelSwitchCC.js.map +7 -0
- package/build/cjs/cc/NoOperationCC.d.ts +9 -0
- package/build/cjs/cc/NoOperationCC.js +64 -0
- package/build/cjs/cc/NoOperationCC.js.map +7 -0
- package/build/cjs/cc/NodeNamingCC.d.ts +118 -0
- package/build/cjs/cc/NodeNamingCC.js +364 -0
- package/build/cjs/cc/NodeNamingCC.js.map +7 -0
- package/build/cjs/cc/NotificationCC.d.ts +479 -0
- package/build/cjs/cc/NotificationCC.js +1245 -0
- package/build/cjs/cc/NotificationCC.js.map +7 -0
- package/build/cjs/cc/PowerlevelCC.d.ts +82 -0
- package/build/cjs/cc/PowerlevelCC.js +510 -0
- package/build/cjs/cc/PowerlevelCC.js.map +7 -0
- package/build/cjs/cc/ProtectionCC.d.ts +325 -0
- package/build/cjs/cc/ProtectionCC.js +667 -0
- package/build/cjs/cc/ProtectionCC.js.map +7 -0
- package/build/cjs/cc/SceneActivationCC.d.ts +89 -0
- package/build/cjs/cc/SceneActivationCC.js +193 -0
- package/build/cjs/cc/SceneActivationCC.js.map +7 -0
- package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +120 -0
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +370 -0
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +7 -0
- package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +129 -0
- package/build/cjs/cc/SceneControllerConfigurationCC.js +423 -0
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +7 -0
- package/build/cjs/cc/ScheduleEntryLockCC.d.ts +434 -0
- package/build/cjs/cc/ScheduleEntryLockCC.js +1763 -0
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +7 -0
- package/build/cjs/cc/Security2CC.d.ts +251 -0
- package/build/cjs/cc/Security2CC.js +1589 -0
- package/build/cjs/cc/Security2CC.js.map +7 -0
- package/build/cjs/cc/SecurityCC.d.ts +128 -0
- package/build/cjs/cc/SecurityCC.js +757 -0
- package/build/cjs/cc/SecurityCC.js.map +7 -0
- package/build/cjs/cc/SoundSwitchCC.d.ts +232 -0
- package/build/cjs/cc/SoundSwitchCC.js +661 -0
- package/build/cjs/cc/SoundSwitchCC.js.map +7 -0
- package/build/cjs/cc/SupervisionCC.d.ts +104 -0
- package/build/cjs/cc/SupervisionCC.js +308 -0
- package/build/cjs/cc/SupervisionCC.js.map +7 -0
- package/build/cjs/cc/ThermostatFanModeCC.d.ts +141 -0
- package/build/cjs/cc/ThermostatFanModeCC.js +372 -0
- package/build/cjs/cc/ThermostatFanModeCC.js.map +7 -0
- package/build/cjs/cc/ThermostatFanStateCC.d.ts +60 -0
- package/build/cjs/cc/ThermostatFanStateCC.js +166 -0
- package/build/cjs/cc/ThermostatFanStateCC.js.map +7 -0
- package/build/cjs/cc/ThermostatModeCC.d.ts +150 -0
- package/build/cjs/cc/ThermostatModeCC.js +436 -0
- package/build/cjs/cc/ThermostatModeCC.js.map +7 -0
- package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +61 -0
- package/build/cjs/cc/ThermostatOperatingStateCC.js +162 -0
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +7 -0
- package/build/cjs/cc/ThermostatSetbackCC.d.ts +46 -0
- package/build/cjs/cc/ThermostatSetbackCC.js +262 -0
- package/build/cjs/cc/ThermostatSetbackCC.js.map +7 -0
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +197 -0
- package/build/cjs/cc/ThermostatSetpointCC.js +638 -0
- package/build/cjs/cc/ThermostatSetpointCC.js.map +7 -0
- package/build/cjs/cc/TimeCC.d.ts +88 -0
- package/build/cjs/cc/TimeCC.js +473 -0
- package/build/cjs/cc/TimeCC.js.map +7 -0
- package/build/cjs/cc/TimeParametersCC.d.ts +72 -0
- package/build/cjs/cc/TimeParametersCC.js +313 -0
- package/build/cjs/cc/TimeParametersCC.js.map +7 -0
- package/build/cjs/cc/TransportServiceCC.d.ts +107 -0
- package/build/cjs/cc/TransportServiceCC.js +404 -0
- package/build/cjs/cc/TransportServiceCC.js.map +7 -0
- package/build/cjs/cc/UserCodeCC.d.ts +683 -0
- package/build/cjs/cc/UserCodeCC.js +1620 -0
- package/build/cjs/cc/UserCodeCC.js.map +7 -0
- package/build/cjs/cc/VersionCC.d.ts +469 -0
- package/build/cjs/cc/VersionCC.js +828 -0
- package/build/cjs/cc/VersionCC.js.map +7 -0
- package/build/cjs/cc/WakeUpCC.d.ts +150 -0
- package/build/cjs/cc/WakeUpCC.js +456 -0
- package/build/cjs/cc/WakeUpCC.js.map +7 -0
- package/build/cjs/cc/WindowCoveringCC.d.ts +315 -0
- package/build/cjs/cc/WindowCoveringCC.js +776 -0
- package/build/cjs/cc/WindowCoveringCC.js.map +7 -0
- package/build/cjs/cc/ZWaveLongRangeCC.d.ts +4 -0
- package/build/cjs/cc/ZWaveLongRangeCC.js +43 -0
- package/build/cjs/cc/ZWaveLongRangeCC.js.map +7 -0
- package/build/cjs/cc/ZWavePlusCC.d.ts +163 -0
- package/build/cjs/cc/ZWavePlusCC.js +288 -0
- package/build/cjs/cc/ZWavePlusCC.js.map +7 -0
- package/build/cjs/cc/ZWaveProtocolCC.d.ts +344 -0
- package/build/cjs/cc/ZWaveProtocolCC.js +1071 -0
- package/build/cjs/cc/ZWaveProtocolCC.js.map +7 -0
- package/build/cjs/cc/index.d.ts +132 -0
- package/build/cjs/cc/index.js +1180 -0
- package/build/cjs/cc/index.js.map +7 -0
- package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +64 -0
- package/build/cjs/cc/manufacturerProprietary/Decorators.js +76 -0
- package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +7 -0
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +79 -0
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +412 -0
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +7 -0
- package/build/cjs/index.d.ts +15 -0
- package/build/cjs/index.js +77 -0
- package/build/cjs/index.js.map +7 -0
- package/build/cjs/index_safe.d.ts +3 -0
- package/build/cjs/index_safe.js +25 -0
- package/build/cjs/index_safe.js.map +7 -0
- package/build/cjs/lib/API.d.ts +271 -0
- package/build/cjs/lib/API.js +413 -0
- package/build/cjs/lib/API.js.map +7 -0
- package/build/cjs/lib/CommandClass.d.ts +234 -0
- package/build/cjs/lib/CommandClass.js +692 -0
- package/build/cjs/lib/CommandClass.js.map +7 -0
- package/build/cjs/lib/CommandClassDecorators.d.ts +112 -0
- package/build/cjs/lib/CommandClassDecorators.js +182 -0
- package/build/cjs/lib/CommandClassDecorators.js.map +7 -0
- package/build/cjs/lib/EncapsulatingCommandClass.d.ts +22 -0
- package/build/cjs/lib/EncapsulatingCommandClass.js +71 -0
- package/build/cjs/lib/EncapsulatingCommandClass.js.map +7 -0
- package/build/cjs/lib/ICommandClassContainer.js +17 -0
- package/build/cjs/lib/ICommandClassContainer.js.map +7 -0
- package/build/cjs/lib/NotificationEventPayload.d.ts +10 -0
- package/build/cjs/lib/NotificationEventPayload.js +31 -0
- package/build/cjs/lib/NotificationEventPayload.js.map +7 -0
- package/build/cjs/lib/Security2/Extension.js +333 -0
- package/build/cjs/lib/Security2/Extension.js.map +7 -0
- package/build/cjs/lib/Security2/shared.js +69 -0
- package/build/cjs/lib/Security2/shared.js.map +7 -0
- package/build/cjs/lib/SetValueResult.js +65 -0
- package/build/cjs/lib/SetValueResult.js.map +7 -0
- package/build/cjs/lib/Values.d.ts +223 -0
- package/build/cjs/lib/Values.js +191 -0
- package/build/cjs/lib/Values.js.map +7 -0
- package/build/cjs/lib/_Types.js +1676 -0
- package/build/cjs/lib/_Types.js.map +7 -0
- package/build/cjs/lib/serializers.d.ts +34 -0
- package/build/cjs/lib/serializers.js +110 -0
- package/build/cjs/lib/serializers.js.map +7 -0
- package/build/cjs/lib/utils.d.ts +17 -0
- package/build/cjs/lib/utils.js +678 -0
- package/build/cjs/lib/utils.js.map +7 -0
- package/build/cjs/package.json +3 -0
- package/build/esm/cc/AlarmSensorCC.d.ts +194 -0
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -0
- package/build/esm/cc/AlarmSensorCC.js +392 -0
- package/build/esm/cc/AlarmSensorCC.js.map +1 -0
- package/build/esm/cc/AssociationCC.d.ts +253 -0
- package/build/esm/cc/AssociationCC.d.ts.map +1 -0
- package/build/esm/cc/AssociationCC.js +706 -0
- package/build/esm/cc/AssociationCC.js.map +1 -0
- package/build/esm/cc/AssociationGroupInfoCC.d.ts +230 -0
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -0
- package/build/esm/cc/AssociationGroupInfoCC.js +769 -0
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -0
- package/build/esm/cc/BarrierOperatorCC.d.ts +243 -0
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -0
- package/build/esm/cc/BarrierOperatorCC.js +610 -0
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -0
- package/build/esm/cc/BasicCC.d.ts +191 -0
- package/build/esm/cc/BasicCC.d.ts.map +1 -0
- package/build/esm/cc/BasicCC.js +390 -0
- package/build/esm/cc/BasicCC.js.map +1 -0
- package/build/esm/cc/BatteryCC.d.ts +406 -0
- package/build/esm/cc/BatteryCC.d.ts.map +1 -0
- package/build/esm/cc/BatteryCC.js +513 -0
- package/build/esm/cc/BatteryCC.js.map +1 -0
- package/build/esm/cc/BinarySensorCC.d.ts +122 -0
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -0
- package/build/esm/cc/BinarySensorCC.js +417 -0
- package/build/esm/cc/BinarySensorCC.js.map +1 -0
- package/build/esm/cc/BinarySwitchCC.d.ts +139 -0
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -0
- package/build/esm/cc/BinarySwitchCC.js +362 -0
- package/build/esm/cc/BinarySwitchCC.js.map +1 -0
- package/build/esm/cc/CRC16CC.d.ts +29 -0
- package/build/esm/cc/CRC16CC.d.ts.map +1 -0
- package/build/esm/cc/CRC16CC.js +123 -0
- package/build/esm/cc/CRC16CC.js.map +1 -0
- package/build/esm/cc/CentralSceneCC.d.ts +210 -0
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -0
- package/build/esm/cc/CentralSceneCC.js +427 -0
- package/build/esm/cc/CentralSceneCC.js.map +1 -0
- package/build/esm/cc/ClimateControlScheduleCC.d.ts +177 -0
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -0
- package/build/esm/cc/ClimateControlScheduleCC.js +466 -0
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -0
- package/build/esm/cc/ClockCC.d.ts +47 -0
- package/build/esm/cc/ClockCC.d.ts.map +1 -0
- package/build/esm/cc/ClockCC.js +205 -0
- package/build/esm/cc/ClockCC.js.map +1 -0
- package/build/esm/cc/ColorSwitchCC.d.ts +339 -0
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -0
- package/build/esm/cc/ColorSwitchCC.js +1149 -0
- package/build/esm/cc/ColorSwitchCC.js.map +1 -0
- package/build/esm/cc/ConfigurationCC.d.ts +396 -0
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -0
- package/build/esm/cc/ConfigurationCC.js +2454 -0
- package/build/esm/cc/ConfigurationCC.js.map +1 -0
- package/build/esm/cc/DeviceResetLocallyCC.d.ts +17 -0
- package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -0
- package/build/esm/cc/DeviceResetLocallyCC.js +73 -0
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -0
- package/build/esm/cc/DoorLockCC.d.ts +837 -0
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -0
- package/build/esm/cc/DoorLockCC.js +1270 -0
- package/build/esm/cc/DoorLockCC.js.map +1 -0
- package/build/esm/cc/DoorLockLoggingCC.d.ts +77 -0
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -0
- package/build/esm/cc/DoorLockLoggingCC.js +316 -0
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -0
- package/build/esm/cc/EnergyProductionCC.d.ts +77 -0
- package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -0
- package/build/esm/cc/EnergyProductionCC.js +213 -0
- package/build/esm/cc/EnergyProductionCC.js.map +1 -0
- package/build/esm/cc/EntryControlCC.d.ts +231 -0
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -0
- package/build/esm/cc/EntryControlCC.js +581 -0
- package/build/esm/cc/EntryControlCC.js.map +1 -0
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +359 -0
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -0
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +1142 -0
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -0
- package/build/esm/cc/HailCC.d.ts +6 -0
- package/build/esm/cc/HailCC.d.ts.map +1 -0
- package/build/esm/cc/HailCC.js +21 -0
- package/build/esm/cc/HailCC.js.map +1 -0
- package/build/esm/cc/HumidityControlModeCC.d.ts +111 -0
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -0
- package/build/esm/cc/HumidityControlModeCC.js +305 -0
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -0
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +60 -0
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -0
- package/build/esm/cc/HumidityControlOperatingStateCC.js +137 -0
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -0
- package/build/esm/cc/HumidityControlSetpointCC.d.ts +209 -0
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -0
- package/build/esm/cc/HumidityControlSetpointCC.js +645 -0
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -0
- package/build/esm/cc/InclusionControllerCC.d.ts +42 -0
- package/build/esm/cc/InclusionControllerCC.d.ts.map +1 -0
- package/build/esm/cc/InclusionControllerCC.js +133 -0
- package/build/esm/cc/InclusionControllerCC.js.map +1 -0
- package/build/esm/cc/IndicatorCC.d.ts +338 -0
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -0
- package/build/esm/cc/IndicatorCC.js +1317 -0
- package/build/esm/cc/IndicatorCC.js.map +1 -0
- package/build/esm/cc/IrrigationCC.d.ts +1496 -0
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -0
- package/build/esm/cc/IrrigationCC.js +2038 -0
- package/build/esm/cc/IrrigationCC.js.map +1 -0
- package/build/esm/cc/LanguageCC.d.ts +101 -0
- package/build/esm/cc/LanguageCC.d.ts.map +1 -0
- package/build/esm/cc/LanguageCC.js +243 -0
- package/build/esm/cc/LanguageCC.js.map +1 -0
- package/build/esm/cc/LockCC.d.ts +73 -0
- package/build/esm/cc/LockCC.d.ts.map +1 -0
- package/build/esm/cc/LockCC.js +197 -0
- package/build/esm/cc/LockCC.js.map +1 -0
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts +32 -0
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -0
- package/build/esm/cc/ManufacturerProprietaryCC.js +201 -0
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -0
- package/build/esm/cc/ManufacturerSpecificCC.d.ts +171 -0
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -0
- package/build/esm/cc/ManufacturerSpecificCC.js +315 -0
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -0
- package/build/esm/cc/MeterCC.d.ts +318 -0
- package/build/esm/cc/MeterCC.d.ts.map +1 -0
- package/build/esm/cc/MeterCC.js +1308 -0
- package/build/esm/cc/MeterCC.js.map +1 -0
- package/build/esm/cc/MultiChannelAssociationCC.d.ts +241 -0
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -0
- package/build/esm/cc/MultiChannelAssociationCC.js +981 -0
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -0
- package/build/esm/cc/MultiChannelCC.d.ts +394 -0
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -0
- package/build/esm/cc/MultiChannelCC.js +1127 -0
- package/build/esm/cc/MultiChannelCC.js.map +1 -0
- package/build/esm/cc/MultiCommandCC.d.ts +27 -0
- package/build/esm/cc/MultiCommandCC.d.ts.map +1 -0
- package/build/esm/cc/MultiCommandCC.js +142 -0
- package/build/esm/cc/MultiCommandCC.js.map +1 -0
- package/build/esm/cc/MultilevelSensorCC.d.ts +185 -0
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -0
- package/build/esm/cc/MultilevelSensorCC.js +753 -0
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -0
- package/build/esm/cc/MultilevelSwitchCC.d.ts +357 -0
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -0
- package/build/esm/cc/MultilevelSwitchCC.js +810 -0
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -0
- package/build/esm/cc/NoOperationCC.d.ts +9 -0
- package/build/esm/cc/NoOperationCC.d.ts.map +1 -0
- package/build/esm/cc/NoOperationCC.js +39 -0
- package/build/esm/cc/NoOperationCC.js.map +1 -0
- package/build/esm/cc/NodeNamingCC.d.ts +118 -0
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -0
- package/build/esm/cc/NodeNamingCC.js +345 -0
- package/build/esm/cc/NodeNamingCC.js.map +1 -0
- package/build/esm/cc/NotificationCC.d.ts +479 -0
- package/build/esm/cc/NotificationCC.d.ts.map +1 -0
- package/build/esm/cc/NotificationCC.js +1350 -0
- package/build/esm/cc/NotificationCC.js.map +1 -0
- package/build/esm/cc/PowerlevelCC.d.ts +82 -0
- package/build/esm/cc/PowerlevelCC.d.ts.map +1 -0
- package/build/esm/cc/PowerlevelCC.js +485 -0
- package/build/esm/cc/PowerlevelCC.js.map +1 -0
- package/build/esm/cc/ProtectionCC.d.ts +325 -0
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -0
- package/build/esm/cc/ProtectionCC.js +669 -0
- package/build/esm/cc/ProtectionCC.js.map +1 -0
- package/build/esm/cc/SceneActivationCC.d.ts +89 -0
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -0
- package/build/esm/cc/SceneActivationCC.js +166 -0
- package/build/esm/cc/SceneActivationCC.js.map +1 -0
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +120 -0
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -0
- package/build/esm/cc/SceneActuatorConfigurationCC.js +374 -0
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -0
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts +129 -0
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -0
- package/build/esm/cc/SceneControllerConfigurationCC.js +446 -0
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -0
- package/build/esm/cc/ScheduleEntryLockCC.d.ts +434 -0
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -0
- package/build/esm/cc/ScheduleEntryLockCC.js +1826 -0
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -0
- package/build/esm/cc/Security2CC.d.ts +251 -0
- package/build/esm/cc/Security2CC.d.ts.map +1 -0
- package/build/esm/cc/Security2CC.js +1814 -0
- package/build/esm/cc/Security2CC.js.map +1 -0
- package/build/esm/cc/SecurityCC.d.ts +128 -0
- package/build/esm/cc/SecurityCC.d.ts.map +1 -0
- package/build/esm/cc/SecurityCC.js +800 -0
- package/build/esm/cc/SecurityCC.js.map +1 -0
- package/build/esm/cc/SoundSwitchCC.d.ts +232 -0
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -0
- package/build/esm/cc/SoundSwitchCC.js +633 -0
- package/build/esm/cc/SoundSwitchCC.js.map +1 -0
- package/build/esm/cc/SupervisionCC.d.ts +104 -0
- package/build/esm/cc/SupervisionCC.d.ts.map +1 -0
- package/build/esm/cc/SupervisionCC.js +319 -0
- package/build/esm/cc/SupervisionCC.js.map +1 -0
- package/build/esm/cc/ThermostatFanModeCC.d.ts +141 -0
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatFanModeCC.js +359 -0
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -0
- package/build/esm/cc/ThermostatFanStateCC.d.ts +60 -0
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatFanStateCC.js +139 -0
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -0
- package/build/esm/cc/ThermostatModeCC.d.ts +150 -0
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatModeCC.js +426 -0
- package/build/esm/cc/ThermostatModeCC.js.map +1 -0
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts +61 -0
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatOperatingStateCC.js +135 -0
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -0
- package/build/esm/cc/ThermostatSetbackCC.d.ts +46 -0
- package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatSetbackCC.js +244 -0
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -0
- package/build/esm/cc/ThermostatSetpointCC.d.ts +197 -0
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatSetpointCC.js +655 -0
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -0
- package/build/esm/cc/TimeCC.d.ts +88 -0
- package/build/esm/cc/TimeCC.d.ts.map +1 -0
- package/build/esm/cc/TimeCC.js +451 -0
- package/build/esm/cc/TimeCC.js.map +1 -0
- package/build/esm/cc/TimeParametersCC.d.ts +72 -0
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -0
- package/build/esm/cc/TimeParametersCC.js +300 -0
- package/build/esm/cc/TimeParametersCC.js.map +1 -0
- package/build/esm/cc/TransportServiceCC.d.ts +107 -0
- package/build/esm/cc/TransportServiceCC.d.ts.map +1 -0
- package/build/esm/cc/TransportServiceCC.js +422 -0
- package/build/esm/cc/TransportServiceCC.js.map +1 -0
- package/build/esm/cc/UserCodeCC.d.ts +683 -0
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -0
- package/build/esm/cc/UserCodeCC.js +1695 -0
- package/build/esm/cc/UserCodeCC.js.map +1 -0
- package/build/esm/cc/VersionCC.d.ts +469 -0
- package/build/esm/cc/VersionCC.d.ts.map +1 -0
- package/build/esm/cc/VersionCC.js +862 -0
- package/build/esm/cc/VersionCC.js.map +1 -0
- package/build/esm/cc/WakeUpCC.d.ts +150 -0
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -0
- package/build/esm/cc/WakeUpCC.js +438 -0
- package/build/esm/cc/WakeUpCC.js.map +1 -0
- package/build/esm/cc/WindowCoveringCC.d.ts +315 -0
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -0
- package/build/esm/cc/WindowCoveringCC.js +780 -0
- package/build/esm/cc/WindowCoveringCC.js.map +1 -0
- package/build/esm/cc/ZWaveLongRangeCC.d.ts +4 -0
- package/build/esm/cc/ZWaveLongRangeCC.d.ts.map +1 -0
- package/build/esm/cc/ZWaveLongRangeCC.js +17 -0
- package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -0
- package/build/esm/cc/ZWavePlusCC.d.ts +163 -0
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -0
- package/build/esm/cc/ZWavePlusCC.js +267 -0
- package/build/esm/cc/ZWavePlusCC.js.map +1 -0
- package/build/esm/cc/ZWaveProtocolCC.d.ts +344 -0
- package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -0
- package/build/esm/cc/ZWaveProtocolCC.js +1030 -0
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -0
- package/build/esm/cc/index.d.ts +132 -0
- package/build/esm/cc/index.d.ts.map +1 -0
- package/build/esm/cc/index.js +71 -0
- package/build/esm/cc/index.js.map +1 -0
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +64 -0
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -0
- package/build/esm/cc/manufacturerProprietary/Decorators.js +79 -0
- package/build/esm/cc/manufacturerProprietary/Decorators.js.map +1 -0
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +79 -0
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -0
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +385 -0
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -0
- package/build/esm/index.d.ts +15 -0
- package/build/esm/index.d.ts.map +1 -0
- package/build/esm/index.js +14 -0
- package/build/esm/index.js.map +1 -0
- package/build/esm/index_safe.d.ts +3 -0
- package/build/esm/index_safe.d.ts.map +1 -0
- package/build/esm/index_safe.js +4 -0
- package/build/esm/index_safe.js.map +1 -0
- package/build/esm/lib/API.d.ts +271 -0
- package/build/esm/lib/API.d.ts.map +1 -0
- package/build/esm/lib/API.js +448 -0
- package/build/esm/lib/API.js.map +1 -0
- package/build/esm/lib/CommandClass.d.ts +234 -0
- package/build/esm/lib/CommandClass.d.ts.map +1 -0
- package/build/esm/lib/CommandClass.js +781 -0
- package/build/esm/lib/CommandClass.js.map +1 -0
- package/build/esm/lib/CommandClassDecorators.d.ts +112 -0
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -0
- package/build/esm/lib/CommandClassDecorators.js +229 -0
- package/build/esm/lib/CommandClassDecorators.js.map +1 -0
- package/build/esm/lib/EncapsulatingCommandClass.d.ts +22 -0
- package/build/esm/lib/EncapsulatingCommandClass.d.ts.map +1 -0
- package/build/esm/lib/EncapsulatingCommandClass.js +56 -0
- package/build/esm/lib/EncapsulatingCommandClass.js.map +1 -0
- package/build/esm/lib/ICommandClassContainer.d.ts +2 -0
- package/build/esm/lib/ICommandClassContainer.d.ts.map +1 -0
- package/build/esm/lib/ICommandClassContainer.js +2 -0
- package/build/esm/lib/ICommandClassContainer.js.map +1 -0
- package/build/esm/lib/NotificationEventPayload.d.ts +10 -0
- package/build/esm/lib/NotificationEventPayload.d.ts.map +1 -0
- package/build/esm/lib/NotificationEventPayload.js +7 -0
- package/build/esm/lib/NotificationEventPayload.js.map +1 -0
- package/build/esm/lib/Security2/Extension.d.ts +106 -0
- package/build/esm/lib/Security2/Extension.d.ts.map +1 -0
- package/build/esm/lib/Security2/Extension.js +296 -0
- package/build/esm/lib/Security2/Extension.js.map +1 -0
- package/build/esm/lib/Security2/shared.d.ts +37 -0
- package/build/esm/lib/Security2/shared.d.ts.map +1 -0
- package/build/esm/lib/Security2/shared.js +40 -0
- package/build/esm/lib/Security2/shared.js.map +1 -0
- package/build/esm/lib/SetValueResult.d.ts +55 -0
- package/build/esm/lib/SetValueResult.d.ts.map +1 -0
- package/build/esm/lib/SetValueResult.js +53 -0
- package/build/esm/lib/SetValueResult.js.map +1 -0
- package/build/esm/lib/Values.d.ts +223 -0
- package/build/esm/lib/Values.d.ts.map +1 -0
- package/build/esm/lib/Values.js +169 -0
- package/build/esm/lib/Values.js.map +1 -0
- package/build/esm/lib/_Types.d.ts +1461 -0
- package/build/esm/lib/_Types.d.ts.map +1 -0
- package/build/esm/lib/_Types.js +1432 -0
- package/build/esm/lib/_Types.js.map +1 -0
- package/build/esm/lib/serializers.d.ts +34 -0
- package/build/esm/lib/serializers.d.ts.map +1 -0
- package/build/esm/lib/serializers.js +98 -0
- package/build/esm/lib/serializers.js.map +1 -0
- package/build/esm/lib/utils.d.ts +17 -0
- package/build/esm/lib/utils.d.ts.map +1 -0
- package/build/esm/lib/utils.js +847 -0
- package/build/esm/lib/utils.js.map +1 -0
- package/build/esm/package.json +3 -0
- package/package.json +28 -23
- package/build/cc/AlarmSensorCC.d.ts +0 -194
- package/build/cc/AlarmSensorCC.d.ts.map +0 -1
- package/build/cc/AlarmSensorCC.js +0 -395
- package/build/cc/AlarmSensorCC.js.map +0 -1
- package/build/cc/AssociationCC.d.ts +0 -253
- package/build/cc/AssociationCC.d.ts.map +0 -1
- package/build/cc/AssociationCC.js +0 -732
- package/build/cc/AssociationCC.js.map +0 -1
- package/build/cc/AssociationGroupInfoCC.d.ts +0 -230
- package/build/cc/AssociationGroupInfoCC.d.ts.map +0 -1
- package/build/cc/AssociationGroupInfoCC.js +0 -772
- package/build/cc/AssociationGroupInfoCC.js.map +0 -1
- package/build/cc/BarrierOperatorCC.d.ts +0 -243
- package/build/cc/BarrierOperatorCC.d.ts.map +0 -1
- package/build/cc/BarrierOperatorCC.js +0 -613
- package/build/cc/BarrierOperatorCC.js.map +0 -1
- package/build/cc/BasicCC.d.ts +0 -191
- package/build/cc/BasicCC.d.ts.map +0 -1
- package/build/cc/BasicCC.js +0 -393
- package/build/cc/BasicCC.js.map +0 -1
- package/build/cc/BatteryCC.d.ts +0 -406
- package/build/cc/BatteryCC.d.ts.map +0 -1
- package/build/cc/BatteryCC.js +0 -516
- package/build/cc/BatteryCC.js.map +0 -1
- package/build/cc/BinarySensorCC.d.ts +0 -122
- package/build/cc/BinarySensorCC.d.ts.map +0 -1
- package/build/cc/BinarySensorCC.js +0 -420
- package/build/cc/BinarySensorCC.js.map +0 -1
- package/build/cc/BinarySwitchCC.d.ts +0 -139
- package/build/cc/BinarySwitchCC.d.ts.map +0 -1
- package/build/cc/BinarySwitchCC.js +0 -365
- package/build/cc/BinarySwitchCC.js.map +0 -1
- package/build/cc/CRC16CC.d.ts +0 -29
- package/build/cc/CRC16CC.d.ts.map +0 -1
- package/build/cc/CRC16CC.js +0 -126
- package/build/cc/CRC16CC.js.map +0 -1
- package/build/cc/CentralSceneCC.d.ts +0 -210
- package/build/cc/CentralSceneCC.d.ts.map +0 -1
- package/build/cc/CentralSceneCC.js +0 -453
- package/build/cc/CentralSceneCC.js.map +0 -1
- package/build/cc/ClimateControlScheduleCC.d.ts +0 -177
- package/build/cc/ClimateControlScheduleCC.d.ts.map +0 -1
- package/build/cc/ClimateControlScheduleCC.js +0 -469
- package/build/cc/ClimateControlScheduleCC.js.map +0 -1
- package/build/cc/ClockCC.d.ts +0 -47
- package/build/cc/ClockCC.d.ts.map +0 -1
- package/build/cc/ClockCC.js +0 -208
- package/build/cc/ClockCC.js.map +0 -1
- package/build/cc/ColorSwitchCC.d.ts +0 -339
- package/build/cc/ColorSwitchCC.d.ts.map +0 -1
- package/build/cc/ColorSwitchCC.js +0 -1152
- package/build/cc/ColorSwitchCC.js.map +0 -1
- package/build/cc/ConfigurationCC.d.ts +0 -396
- package/build/cc/ConfigurationCC.d.ts.map +0 -1
- package/build/cc/ConfigurationCC.js +0 -2458
- package/build/cc/ConfigurationCC.js.map +0 -1
- package/build/cc/DeviceResetLocallyCC.d.ts +0 -17
- package/build/cc/DeviceResetLocallyCC.d.ts.map +0 -1
- package/build/cc/DeviceResetLocallyCC.js +0 -76
- package/build/cc/DeviceResetLocallyCC.js.map +0 -1
- package/build/cc/DoorLockCC.d.ts +0 -837
- package/build/cc/DoorLockCC.d.ts.map +0 -1
- package/build/cc/DoorLockCC.js +0 -1273
- package/build/cc/DoorLockCC.js.map +0 -1
- package/build/cc/DoorLockLoggingCC.d.ts +0 -77
- package/build/cc/DoorLockLoggingCC.d.ts.map +0 -1
- package/build/cc/DoorLockLoggingCC.js +0 -319
- package/build/cc/DoorLockLoggingCC.js.map +0 -1
- package/build/cc/EnergyProductionCC.d.ts +0 -77
- package/build/cc/EnergyProductionCC.d.ts.map +0 -1
- package/build/cc/EnergyProductionCC.js +0 -216
- package/build/cc/EnergyProductionCC.js.map +0 -1
- package/build/cc/EntryControlCC.d.ts +0 -231
- package/build/cc/EntryControlCC.d.ts.map +0 -1
- package/build/cc/EntryControlCC.js +0 -607
- package/build/cc/EntryControlCC.js.map +0 -1
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts +0 -359
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts.map +0 -1
- package/build/cc/FirmwareUpdateMetaDataCC.js +0 -1145
- package/build/cc/FirmwareUpdateMetaDataCC.js.map +0 -1
- package/build/cc/HailCC.d.ts +0 -6
- package/build/cc/HailCC.d.ts.map +0 -1
- package/build/cc/HailCC.js +0 -24
- package/build/cc/HailCC.js.map +0 -1
- package/build/cc/HumidityControlModeCC.d.ts +0 -111
- package/build/cc/HumidityControlModeCC.d.ts.map +0 -1
- package/build/cc/HumidityControlModeCC.js +0 -308
- package/build/cc/HumidityControlModeCC.js.map +0 -1
- package/build/cc/HumidityControlOperatingStateCC.d.ts +0 -60
- package/build/cc/HumidityControlOperatingStateCC.d.ts.map +0 -1
- package/build/cc/HumidityControlOperatingStateCC.js +0 -140
- package/build/cc/HumidityControlOperatingStateCC.js.map +0 -1
- package/build/cc/HumidityControlSetpointCC.d.ts +0 -209
- package/build/cc/HumidityControlSetpointCC.d.ts.map +0 -1
- package/build/cc/HumidityControlSetpointCC.js +0 -648
- package/build/cc/HumidityControlSetpointCC.js.map +0 -1
- package/build/cc/InclusionControllerCC.d.ts +0 -42
- package/build/cc/InclusionControllerCC.d.ts.map +0 -1
- package/build/cc/InclusionControllerCC.js +0 -136
- package/build/cc/InclusionControllerCC.js.map +0 -1
- package/build/cc/IndicatorCC.d.ts +0 -338
- package/build/cc/IndicatorCC.d.ts.map +0 -1
- package/build/cc/IndicatorCC.js +0 -1320
- package/build/cc/IndicatorCC.js.map +0 -1
- package/build/cc/IrrigationCC.d.ts +0 -1496
- package/build/cc/IrrigationCC.d.ts.map +0 -1
- package/build/cc/IrrigationCC.js +0 -2041
- package/build/cc/IrrigationCC.js.map +0 -1
- package/build/cc/LanguageCC.d.ts +0 -101
- package/build/cc/LanguageCC.d.ts.map +0 -1
- package/build/cc/LanguageCC.js +0 -246
- package/build/cc/LanguageCC.js.map +0 -1
- package/build/cc/LockCC.d.ts +0 -73
- package/build/cc/LockCC.d.ts.map +0 -1
- package/build/cc/LockCC.js +0 -200
- package/build/cc/LockCC.js.map +0 -1
- package/build/cc/ManufacturerProprietaryCC.d.ts +0 -32
- package/build/cc/ManufacturerProprietaryCC.d.ts.map +0 -1
- package/build/cc/ManufacturerProprietaryCC.js +0 -204
- package/build/cc/ManufacturerProprietaryCC.js.map +0 -1
- package/build/cc/ManufacturerSpecificCC.d.ts +0 -171
- package/build/cc/ManufacturerSpecificCC.d.ts.map +0 -1
- package/build/cc/ManufacturerSpecificCC.js +0 -318
- package/build/cc/ManufacturerSpecificCC.js.map +0 -1
- package/build/cc/MeterCC.d.ts +0 -318
- package/build/cc/MeterCC.d.ts.map +0 -1
- package/build/cc/MeterCC.js +0 -1312
- package/build/cc/MeterCC.js.map +0 -1
- package/build/cc/MultiChannelAssociationCC.d.ts +0 -241
- package/build/cc/MultiChannelAssociationCC.d.ts.map +0 -1
- package/build/cc/MultiChannelAssociationCC.js +0 -1007
- package/build/cc/MultiChannelAssociationCC.js.map +0 -1
- package/build/cc/MultiChannelCC.d.ts +0 -394
- package/build/cc/MultiChannelCC.d.ts.map +0 -1
- package/build/cc/MultiChannelCC.js +0 -1130
- package/build/cc/MultiChannelCC.js.map +0 -1
- package/build/cc/MultiCommandCC.d.ts +0 -27
- package/build/cc/MultiCommandCC.d.ts.map +0 -1
- package/build/cc/MultiCommandCC.js +0 -145
- package/build/cc/MultiCommandCC.js.map +0 -1
- package/build/cc/MultilevelSensorCC.d.ts +0 -185
- package/build/cc/MultilevelSensorCC.d.ts.map +0 -1
- package/build/cc/MultilevelSensorCC.js +0 -756
- package/build/cc/MultilevelSensorCC.js.map +0 -1
- package/build/cc/MultilevelSwitchCC.d.ts +0 -357
- package/build/cc/MultilevelSwitchCC.d.ts.map +0 -1
- package/build/cc/MultilevelSwitchCC.js +0 -813
- package/build/cc/MultilevelSwitchCC.js.map +0 -1
- package/build/cc/NoOperationCC.d.ts +0 -9
- package/build/cc/NoOperationCC.d.ts.map +0 -1
- package/build/cc/NoOperationCC.js +0 -42
- package/build/cc/NoOperationCC.js.map +0 -1
- package/build/cc/NodeNamingCC.d.ts +0 -118
- package/build/cc/NodeNamingCC.d.ts.map +0 -1
- package/build/cc/NodeNamingCC.js +0 -348
- package/build/cc/NodeNamingCC.js.map +0 -1
- package/build/cc/NotificationCC.d.ts +0 -479
- package/build/cc/NotificationCC.d.ts.map +0 -1
- package/build/cc/NotificationCC.js +0 -1379
- package/build/cc/NotificationCC.js.map +0 -1
- package/build/cc/PowerlevelCC.d.ts +0 -82
- package/build/cc/PowerlevelCC.d.ts.map +0 -1
- package/build/cc/PowerlevelCC.js +0 -488
- package/build/cc/PowerlevelCC.js.map +0 -1
- package/build/cc/ProtectionCC.d.ts +0 -325
- package/build/cc/ProtectionCC.d.ts.map +0 -1
- package/build/cc/ProtectionCC.js +0 -672
- package/build/cc/ProtectionCC.js.map +0 -1
- package/build/cc/SceneActivationCC.d.ts +0 -89
- package/build/cc/SceneActivationCC.d.ts.map +0 -1
- package/build/cc/SceneActivationCC.js +0 -169
- package/build/cc/SceneActivationCC.js.map +0 -1
- package/build/cc/SceneActuatorConfigurationCC.d.ts +0 -120
- package/build/cc/SceneActuatorConfigurationCC.d.ts.map +0 -1
- package/build/cc/SceneActuatorConfigurationCC.js +0 -377
- package/build/cc/SceneActuatorConfigurationCC.js.map +0 -1
- package/build/cc/SceneControllerConfigurationCC.d.ts +0 -129
- package/build/cc/SceneControllerConfigurationCC.d.ts.map +0 -1
- package/build/cc/SceneControllerConfigurationCC.js +0 -449
- package/build/cc/SceneControllerConfigurationCC.js.map +0 -1
- package/build/cc/ScheduleEntryLockCC.d.ts +0 -434
- package/build/cc/ScheduleEntryLockCC.d.ts.map +0 -1
- package/build/cc/ScheduleEntryLockCC.js +0 -1829
- package/build/cc/ScheduleEntryLockCC.js.map +0 -1
- package/build/cc/Security2CC.d.ts +0 -251
- package/build/cc/Security2CC.d.ts.map +0 -1
- package/build/cc/Security2CC.js +0 -1817
- package/build/cc/Security2CC.js.map +0 -1
- package/build/cc/SecurityCC.d.ts +0 -128
- package/build/cc/SecurityCC.d.ts.map +0 -1
- package/build/cc/SecurityCC.js +0 -803
- package/build/cc/SecurityCC.js.map +0 -1
- package/build/cc/SoundSwitchCC.d.ts +0 -232
- package/build/cc/SoundSwitchCC.d.ts.map +0 -1
- package/build/cc/SoundSwitchCC.js +0 -636
- package/build/cc/SoundSwitchCC.js.map +0 -1
- package/build/cc/SupervisionCC.d.ts +0 -104
- package/build/cc/SupervisionCC.d.ts.map +0 -1
- package/build/cc/SupervisionCC.js +0 -322
- package/build/cc/SupervisionCC.js.map +0 -1
- package/build/cc/ThermostatFanModeCC.d.ts +0 -141
- package/build/cc/ThermostatFanModeCC.d.ts.map +0 -1
- package/build/cc/ThermostatFanModeCC.js +0 -362
- package/build/cc/ThermostatFanModeCC.js.map +0 -1
- package/build/cc/ThermostatFanStateCC.d.ts +0 -60
- package/build/cc/ThermostatFanStateCC.d.ts.map +0 -1
- package/build/cc/ThermostatFanStateCC.js +0 -142
- package/build/cc/ThermostatFanStateCC.js.map +0 -1
- package/build/cc/ThermostatModeCC.d.ts +0 -150
- package/build/cc/ThermostatModeCC.d.ts.map +0 -1
- package/build/cc/ThermostatModeCC.js +0 -429
- package/build/cc/ThermostatModeCC.js.map +0 -1
- package/build/cc/ThermostatOperatingStateCC.d.ts +0 -61
- package/build/cc/ThermostatOperatingStateCC.d.ts.map +0 -1
- package/build/cc/ThermostatOperatingStateCC.js +0 -138
- package/build/cc/ThermostatOperatingStateCC.js.map +0 -1
- package/build/cc/ThermostatSetbackCC.d.ts +0 -46
- package/build/cc/ThermostatSetbackCC.d.ts.map +0 -1
- package/build/cc/ThermostatSetbackCC.js +0 -247
- package/build/cc/ThermostatSetbackCC.js.map +0 -1
- package/build/cc/ThermostatSetpointCC.d.ts +0 -197
- package/build/cc/ThermostatSetpointCC.d.ts.map +0 -1
- package/build/cc/ThermostatSetpointCC.js +0 -658
- package/build/cc/ThermostatSetpointCC.js.map +0 -1
- package/build/cc/TimeCC.d.ts +0 -88
- package/build/cc/TimeCC.d.ts.map +0 -1
- package/build/cc/TimeCC.js +0 -454
- package/build/cc/TimeCC.js.map +0 -1
- package/build/cc/TimeParametersCC.d.ts +0 -72
- package/build/cc/TimeParametersCC.d.ts.map +0 -1
- package/build/cc/TimeParametersCC.js +0 -303
- package/build/cc/TimeParametersCC.js.map +0 -1
- package/build/cc/TransportServiceCC.d.ts +0 -107
- package/build/cc/TransportServiceCC.d.ts.map +0 -1
- package/build/cc/TransportServiceCC.js +0 -426
- package/build/cc/TransportServiceCC.js.map +0 -1
- package/build/cc/UserCodeCC.d.ts +0 -683
- package/build/cc/UserCodeCC.d.ts.map +0 -1
- package/build/cc/UserCodeCC.js +0 -1699
- package/build/cc/UserCodeCC.js.map +0 -1
- package/build/cc/VersionCC.d.ts +0 -469
- package/build/cc/VersionCC.d.ts.map +0 -1
- package/build/cc/VersionCC.js +0 -865
- package/build/cc/VersionCC.js.map +0 -1
- package/build/cc/WakeUpCC.d.ts +0 -150
- package/build/cc/WakeUpCC.d.ts.map +0 -1
- package/build/cc/WakeUpCC.js +0 -441
- package/build/cc/WakeUpCC.js.map +0 -1
- package/build/cc/WindowCoveringCC.d.ts +0 -315
- package/build/cc/WindowCoveringCC.d.ts.map +0 -1
- package/build/cc/WindowCoveringCC.js +0 -783
- package/build/cc/WindowCoveringCC.js.map +0 -1
- package/build/cc/ZWaveLongRangeCC.d.ts +0 -4
- package/build/cc/ZWaveLongRangeCC.d.ts.map +0 -1
- package/build/cc/ZWaveLongRangeCC.js +0 -20
- package/build/cc/ZWaveLongRangeCC.js.map +0 -1
- package/build/cc/ZWavePlusCC.d.ts +0 -163
- package/build/cc/ZWavePlusCC.d.ts.map +0 -1
- package/build/cc/ZWavePlusCC.js +0 -270
- package/build/cc/ZWavePlusCC.js.map +0 -1
- package/build/cc/ZWaveProtocolCC.d.ts +0 -344
- package/build/cc/ZWaveProtocolCC.d.ts.map +0 -1
- package/build/cc/ZWaveProtocolCC.js +0 -1033
- package/build/cc/ZWaveProtocolCC.js.map +0 -1
- package/build/cc/index.d.ts +0 -132
- package/build/cc/index.d.ts.map +0 -1
- package/build/cc/index.js +0 -627
- package/build/cc/index.js.map +0 -1
- package/build/cc/manufacturerProprietary/Decorators.d.ts +0 -64
- package/build/cc/manufacturerProprietary/Decorators.d.ts.map +0 -1
- package/build/cc/manufacturerProprietary/Decorators.js +0 -83
- package/build/cc/manufacturerProprietary/Decorators.js.map +0 -1
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts +0 -79
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts.map +0 -1
- package/build/cc/manufacturerProprietary/FibaroCC.js +0 -392
- package/build/cc/manufacturerProprietary/FibaroCC.js.map +0 -1
- package/build/index.d.ts +0 -15
- package/build/index.d.ts.map +0 -1
- package/build/index.js +0 -52
- package/build/index.js.map +0 -1
- package/build/index_safe.d.ts +0 -3
- package/build/index_safe.d.ts.map +0 -1
- package/build/index_safe.js +0 -20
- package/build/index_safe.js.map +0 -1
- package/build/lib/API.d.ts +0 -271
- package/build/lib/API.d.ts.map +0 -1
- package/build/lib/API.js +0 -458
- package/build/lib/API.js.map +0 -1
- package/build/lib/CommandClass.d.ts +0 -234
- package/build/lib/CommandClass.d.ts.map +0 -1
- package/build/lib/CommandClass.js +0 -788
- package/build/lib/CommandClass.js.map +0 -1
- package/build/lib/CommandClassDecorators.d.ts +0 -112
- package/build/lib/CommandClassDecorators.d.ts.map +0 -1
- package/build/lib/CommandClassDecorators.js +0 -243
- package/build/lib/CommandClassDecorators.js.map +0 -1
- package/build/lib/EncapsulatingCommandClass.d.ts +0 -22
- package/build/lib/EncapsulatingCommandClass.d.ts.map +0 -1
- package/build/lib/EncapsulatingCommandClass.js +0 -61
- package/build/lib/EncapsulatingCommandClass.js.map +0 -1
- package/build/lib/ICommandClassContainer.d.ts.map +0 -1
- package/build/lib/ICommandClassContainer.js +0 -3
- package/build/lib/ICommandClassContainer.js.map +0 -1
- package/build/lib/NotificationEventPayload.d.ts +0 -10
- package/build/lib/NotificationEventPayload.d.ts.map +0 -1
- package/build/lib/NotificationEventPayload.js +0 -10
- package/build/lib/NotificationEventPayload.js.map +0 -1
- package/build/lib/Security2/Extension.d.ts.map +0 -1
- package/build/lib/Security2/Extension.js +0 -303
- package/build/lib/Security2/Extension.js.map +0 -1
- package/build/lib/Security2/shared.d.ts.map +0 -1
- package/build/lib/Security2/shared.js +0 -43
- package/build/lib/Security2/shared.js.map +0 -1
- package/build/lib/SetValueResult.d.ts.map +0 -1
- package/build/lib/SetValueResult.js +0 -60
- package/build/lib/SetValueResult.js.map +0 -1
- package/build/lib/Values.d.ts +0 -223
- package/build/lib/Values.d.ts.map +0 -1
- package/build/lib/Values.js +0 -172
- package/build/lib/Values.js.map +0 -1
- package/build/lib/_Types.d.ts.map +0 -1
- package/build/lib/_Types.js +0 -1443
- package/build/lib/_Types.js.map +0 -1
- package/build/lib/serializers.d.ts +0 -34
- package/build/lib/serializers.d.ts.map +0 -1
- package/build/lib/serializers.js +0 -107
- package/build/lib/serializers.js.map +0 -1
- package/build/lib/utils.d.ts +0 -17
- package/build/lib/utils.d.ts.map +0 -1
- package/build/lib/utils.js +0 -860
- package/build/lib/utils.js.map +0 -1
- /package/build/{lib → cjs/lib}/ICommandClassContainer.d.ts +0 -0
- /package/build/{lib → cjs/lib}/Security2/Extension.d.ts +0 -0
- /package/build/{lib → cjs/lib}/Security2/shared.d.ts +0 -0
- /package/build/{lib → cjs/lib}/SetValueResult.d.ts +0 -0
- /package/build/{lib → cjs/lib}/_Types.d.ts +0 -0
package/build/cc/MeterCC.js
DELETED
|
@@ -1,1312 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var MeterCCReport_1, MeterCCGet_1, MeterCCSupportedReport_1, MeterCCReset_1;
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.MeterCCReset = exports.MeterCCSupportedGet = exports.MeterCCSupportedReport = exports.MeterCCGet = exports.MeterCCReport = exports.MeterCC = exports.MeterCCAPI = exports.MeterCCValues = void 0;
|
|
11
|
-
exports.isAccumulatedValue = isAccumulatedValue;
|
|
12
|
-
function __assertType(argName, typeName, boundHasError) {
|
|
13
|
-
const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
|
|
14
|
-
if (boundHasError()) {
|
|
15
|
-
throw new ZWaveError(typeName ? `${argName} is not a ${typeName}` : `${argName} has the wrong type`, ZWaveErrorCodes.Argument_Invalid);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
const __assertType__optional_MeterCCGetOptions = $o => {
|
|
19
|
-
function _number($o) {
|
|
20
|
-
return typeof $o !== "number" ? {} : null;
|
|
21
|
-
}
|
|
22
|
-
function su__2__3__4_eu($o) {
|
|
23
|
-
return ![0, 1, 2].includes($o) ? {} : null;
|
|
24
|
-
}
|
|
25
|
-
function _0($o) {
|
|
26
|
-
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
27
|
-
return {};
|
|
28
|
-
if ("scale" in $o && $o["scale"] !== undefined) {
|
|
29
|
-
const error = _number($o["scale"]);
|
|
30
|
-
if (error)
|
|
31
|
-
return error;
|
|
32
|
-
}
|
|
33
|
-
if ("rateType" in $o && $o["rateType"] !== undefined) {
|
|
34
|
-
const error = su__2__3__4_eu($o["rateType"]);
|
|
35
|
-
if (error)
|
|
36
|
-
return error;
|
|
37
|
-
}
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
function optional__0($o) {
|
|
41
|
-
if ($o !== undefined) {
|
|
42
|
-
const error = _0($o);
|
|
43
|
-
if (error)
|
|
44
|
-
return error;
|
|
45
|
-
}
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
return optional__0($o);
|
|
49
|
-
};
|
|
50
|
-
const __assertType__MeterCCReportOptions = $o => {
|
|
51
|
-
function _number($o) {
|
|
52
|
-
return typeof $o !== "number" ? {} : null;
|
|
53
|
-
}
|
|
54
|
-
function _undefined($o) {
|
|
55
|
-
return $o !== undefined ? {} : null;
|
|
56
|
-
}
|
|
57
|
-
function su__undefined__number_eu($o) {
|
|
58
|
-
const conditions = [_undefined, _number];
|
|
59
|
-
for (const condition of conditions) {
|
|
60
|
-
const error = condition($o);
|
|
61
|
-
if (!error)
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
return {};
|
|
65
|
-
}
|
|
66
|
-
function su__5__6__7_eu($o) {
|
|
67
|
-
return ![0, 1, 2].includes($o) ? {} : null;
|
|
68
|
-
}
|
|
69
|
-
function _null($o) {
|
|
70
|
-
return $o !== null ? {} : null;
|
|
71
|
-
}
|
|
72
|
-
function su__null__number_eu($o) {
|
|
73
|
-
const conditions = [_null, _number];
|
|
74
|
-
for (const condition of conditions) {
|
|
75
|
-
const error = condition($o);
|
|
76
|
-
if (!error)
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
return {};
|
|
80
|
-
}
|
|
81
|
-
function _0($o) {
|
|
82
|
-
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
83
|
-
return {};
|
|
84
|
-
if ("type" in $o && $o["type"] !== undefined) {
|
|
85
|
-
const error = _number($o["type"]);
|
|
86
|
-
if (error)
|
|
87
|
-
return error;
|
|
88
|
-
}
|
|
89
|
-
else
|
|
90
|
-
return {};
|
|
91
|
-
if ("scale" in $o && $o["scale"] !== undefined) {
|
|
92
|
-
const error = _number($o["scale"]);
|
|
93
|
-
if (error)
|
|
94
|
-
return error;
|
|
95
|
-
}
|
|
96
|
-
else
|
|
97
|
-
return {};
|
|
98
|
-
if ("value" in $o && $o["value"] !== undefined) {
|
|
99
|
-
const error = _number($o["value"]);
|
|
100
|
-
if (error)
|
|
101
|
-
return error;
|
|
102
|
-
}
|
|
103
|
-
else
|
|
104
|
-
return {};
|
|
105
|
-
if ("previousValue" in $o && $o["previousValue"] !== undefined) {
|
|
106
|
-
const error = su__undefined__number_eu($o["previousValue"]);
|
|
107
|
-
if (error)
|
|
108
|
-
return error;
|
|
109
|
-
}
|
|
110
|
-
if ("rateType" in $o && $o["rateType"] !== undefined) {
|
|
111
|
-
const error = su__5__6__7_eu($o["rateType"]);
|
|
112
|
-
if (error)
|
|
113
|
-
return error;
|
|
114
|
-
}
|
|
115
|
-
if ("deltaTime" in $o && $o["deltaTime"] !== undefined) {
|
|
116
|
-
const error = su__null__number_eu($o["deltaTime"]);
|
|
117
|
-
if (error)
|
|
118
|
-
return error;
|
|
119
|
-
}
|
|
120
|
-
return null;
|
|
121
|
-
}
|
|
122
|
-
return _0($o);
|
|
123
|
-
};
|
|
124
|
-
const __assertType__optional_boolean = $o => {
|
|
125
|
-
function _boolean($o) {
|
|
126
|
-
return typeof $o !== "boolean" ? {} : null;
|
|
127
|
-
}
|
|
128
|
-
function optional__boolean($o) {
|
|
129
|
-
if ($o !== undefined) {
|
|
130
|
-
const error = _boolean($o);
|
|
131
|
-
if (error)
|
|
132
|
-
return error;
|
|
133
|
-
}
|
|
134
|
-
return null;
|
|
135
|
-
}
|
|
136
|
-
return optional__boolean($o);
|
|
137
|
-
};
|
|
138
|
-
const __assertType__MeterCCSupportedReportOptions = $o => {
|
|
139
|
-
function _number($o) {
|
|
140
|
-
return typeof $o !== "number" ? {} : null;
|
|
141
|
-
}
|
|
142
|
-
function _boolean($o) {
|
|
143
|
-
return typeof $o !== "boolean" ? {} : null;
|
|
144
|
-
}
|
|
145
|
-
function sa__number_ea_3($o) {
|
|
146
|
-
if (!Array.isArray($o))
|
|
147
|
-
return {};
|
|
148
|
-
for (let i = 0; i < $o.length; i++) {
|
|
149
|
-
const error = _number($o[i]);
|
|
150
|
-
if (error)
|
|
151
|
-
return error;
|
|
152
|
-
}
|
|
153
|
-
return null;
|
|
154
|
-
}
|
|
155
|
-
function su__5__6__7_eu($o) {
|
|
156
|
-
return ![0, 1, 2].includes($o) ? {} : null;
|
|
157
|
-
}
|
|
158
|
-
function sa_su__5__6__7_eu_ea_4($o) {
|
|
159
|
-
if (!Array.isArray($o))
|
|
160
|
-
return {};
|
|
161
|
-
for (let i = 0; i < $o.length; i++) {
|
|
162
|
-
const error = su__5__6__7_eu($o[i]);
|
|
163
|
-
if (error)
|
|
164
|
-
return error;
|
|
165
|
-
}
|
|
166
|
-
return null;
|
|
167
|
-
}
|
|
168
|
-
function _0($o) {
|
|
169
|
-
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
170
|
-
return {};
|
|
171
|
-
if ("type" in $o && $o["type"] !== undefined) {
|
|
172
|
-
const error = _number($o["type"]);
|
|
173
|
-
if (error)
|
|
174
|
-
return error;
|
|
175
|
-
}
|
|
176
|
-
else
|
|
177
|
-
return {};
|
|
178
|
-
if ("supportsReset" in $o && $o["supportsReset"] !== undefined) {
|
|
179
|
-
const error = _boolean($o["supportsReset"]);
|
|
180
|
-
if (error)
|
|
181
|
-
return error;
|
|
182
|
-
}
|
|
183
|
-
else
|
|
184
|
-
return {};
|
|
185
|
-
if ("supportedScales" in $o && $o["supportedScales"] !== undefined) {
|
|
186
|
-
const error = sa__number_ea_3($o["supportedScales"]);
|
|
187
|
-
if (error)
|
|
188
|
-
return error;
|
|
189
|
-
}
|
|
190
|
-
else
|
|
191
|
-
return {};
|
|
192
|
-
if ("supportedRateTypes" in $o && $o["supportedRateTypes"] !== undefined) {
|
|
193
|
-
const error = sa_su__5__6__7_eu_ea_4($o["supportedRateTypes"]);
|
|
194
|
-
if (error)
|
|
195
|
-
return error;
|
|
196
|
-
}
|
|
197
|
-
else
|
|
198
|
-
return {};
|
|
199
|
-
return null;
|
|
200
|
-
}
|
|
201
|
-
return _0($o);
|
|
202
|
-
};
|
|
203
|
-
const __assertType__optional_MeterCCResetOptions = $o => {
|
|
204
|
-
function _number($o) {
|
|
205
|
-
return typeof $o !== "number" ? {} : null;
|
|
206
|
-
}
|
|
207
|
-
function su__4__5__6_eu($o) {
|
|
208
|
-
return ![0, 1, 2].includes($o) ? {} : null;
|
|
209
|
-
}
|
|
210
|
-
function _1($o) {
|
|
211
|
-
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
212
|
-
return {};
|
|
213
|
-
if ("type" in $o && $o["type"] !== undefined) {
|
|
214
|
-
const error = _number($o["type"]);
|
|
215
|
-
if (error)
|
|
216
|
-
return error;
|
|
217
|
-
}
|
|
218
|
-
else
|
|
219
|
-
return {};
|
|
220
|
-
if ("scale" in $o && $o["scale"] !== undefined) {
|
|
221
|
-
const error = _number($o["scale"]);
|
|
222
|
-
if (error)
|
|
223
|
-
return error;
|
|
224
|
-
}
|
|
225
|
-
else
|
|
226
|
-
return {};
|
|
227
|
-
if ("rateType" in $o && $o["rateType"] !== undefined) {
|
|
228
|
-
const error = su__4__5__6_eu($o["rateType"]);
|
|
229
|
-
if (error)
|
|
230
|
-
return error;
|
|
231
|
-
}
|
|
232
|
-
else
|
|
233
|
-
return {};
|
|
234
|
-
if ("targetValue" in $o && $o["targetValue"] !== undefined) {
|
|
235
|
-
const error = _number($o["targetValue"]);
|
|
236
|
-
if (error)
|
|
237
|
-
return error;
|
|
238
|
-
}
|
|
239
|
-
else
|
|
240
|
-
return {};
|
|
241
|
-
return null;
|
|
242
|
-
}
|
|
243
|
-
function _undefined($o) {
|
|
244
|
-
return $o !== undefined ? {} : null;
|
|
245
|
-
}
|
|
246
|
-
function _2($o) {
|
|
247
|
-
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
248
|
-
return {};
|
|
249
|
-
if ("type" in $o && $o["type"] !== undefined) {
|
|
250
|
-
const error = _undefined($o["type"]);
|
|
251
|
-
if (error)
|
|
252
|
-
return error;
|
|
253
|
-
}
|
|
254
|
-
if ("scale" in $o && $o["scale"] !== undefined) {
|
|
255
|
-
const error = _undefined($o["scale"]);
|
|
256
|
-
if (error)
|
|
257
|
-
return error;
|
|
258
|
-
}
|
|
259
|
-
if ("rateType" in $o && $o["rateType"] !== undefined) {
|
|
260
|
-
const error = _undefined($o["rateType"]);
|
|
261
|
-
if (error)
|
|
262
|
-
return error;
|
|
263
|
-
}
|
|
264
|
-
if ("targetValue" in $o && $o["targetValue"] !== undefined) {
|
|
265
|
-
const error = _undefined($o["targetValue"]);
|
|
266
|
-
if (error)
|
|
267
|
-
return error;
|
|
268
|
-
}
|
|
269
|
-
return null;
|
|
270
|
-
}
|
|
271
|
-
function su__1__2_eu($o) {
|
|
272
|
-
const conditions = [_1, _2];
|
|
273
|
-
for (const condition of conditions) {
|
|
274
|
-
const error = condition($o);
|
|
275
|
-
if (!error)
|
|
276
|
-
return null;
|
|
277
|
-
}
|
|
278
|
-
return {};
|
|
279
|
-
}
|
|
280
|
-
function optional_su__1__2_eu($o) {
|
|
281
|
-
if ($o !== undefined) {
|
|
282
|
-
const error = su__1__2_eu($o);
|
|
283
|
-
if (error)
|
|
284
|
-
return error;
|
|
285
|
-
}
|
|
286
|
-
return null;
|
|
287
|
-
}
|
|
288
|
-
return optional_su__1__2_eu($o);
|
|
289
|
-
};
|
|
290
|
-
const core_1 = require("@zwave-js/core");
|
|
291
|
-
const safe_1 = require("@zwave-js/core/safe");
|
|
292
|
-
const safe_2 = require("@zwave-js/shared/safe");
|
|
293
|
-
const safe_3 = require("@zwave-js/shared/safe");
|
|
294
|
-
const API_1 = require("../lib/API");
|
|
295
|
-
const CommandClass_1 = require("../lib/CommandClass");
|
|
296
|
-
const CommandClassDecorators_1 = require("../lib/CommandClassDecorators");
|
|
297
|
-
const Values_1 = require("../lib/Values");
|
|
298
|
-
const _Types_1 = require("../lib/_Types");
|
|
299
|
-
exports.MeterCCValues = Object.freeze({
|
|
300
|
-
...Values_1.V.defineStaticCCValues(safe_1.CommandClasses.Meter, {
|
|
301
|
-
...Values_1.V.staticProperty("type", undefined, { internal: true }),
|
|
302
|
-
...Values_1.V.staticProperty("supportsReset", undefined, { internal: true }),
|
|
303
|
-
...Values_1.V.staticProperty("supportedScales", undefined, { internal: true }),
|
|
304
|
-
...Values_1.V.staticProperty("supportedRateTypes", undefined, {
|
|
305
|
-
internal: true,
|
|
306
|
-
}),
|
|
307
|
-
...Values_1.V.staticPropertyWithName("resetAll", "reset", {
|
|
308
|
-
...safe_1.ValueMetadata.WriteOnlyBoolean,
|
|
309
|
-
label: `Reset accumulated values`,
|
|
310
|
-
states: {
|
|
311
|
-
true: "Reset",
|
|
312
|
-
},
|
|
313
|
-
}),
|
|
314
|
-
}),
|
|
315
|
-
...Values_1.V.defineDynamicCCValues(safe_1.CommandClasses.Meter, {
|
|
316
|
-
...Values_1.V.dynamicPropertyAndKeyWithName("resetSingle", "reset", toPropertyKey, ({ property, propertyKey }) => property === "reset" && typeof propertyKey === "number", (meterType, rateType, scale) => ({
|
|
317
|
-
...safe_1.ValueMetadata.WriteOnlyBoolean,
|
|
318
|
-
// This is only a placeholder label. A config manager is needed to
|
|
319
|
-
// determine the actual label.
|
|
320
|
-
label: `Reset (${rateType === _Types_1.RateType.Consumed
|
|
321
|
-
? "Consumption, "
|
|
322
|
-
: rateType === _Types_1.RateType.Produced
|
|
323
|
-
? "Production, "
|
|
324
|
-
: ""}${(0, safe_3.num2hex)(scale)})`,
|
|
325
|
-
states: {
|
|
326
|
-
true: "Reset",
|
|
327
|
-
},
|
|
328
|
-
ccSpecific: {
|
|
329
|
-
meterType,
|
|
330
|
-
rateType,
|
|
331
|
-
scale,
|
|
332
|
-
},
|
|
333
|
-
})),
|
|
334
|
-
...Values_1.V.dynamicPropertyAndKeyWithName("value", "value", toPropertyKey, ({ property, propertyKey }) => property === "value" && typeof propertyKey === "number", (meterType, rateType, scale) => ({
|
|
335
|
-
...safe_1.ValueMetadata.ReadOnlyNumber,
|
|
336
|
-
// Label and unit can only be determined with a config manager
|
|
337
|
-
ccSpecific: {
|
|
338
|
-
meterType,
|
|
339
|
-
rateType,
|
|
340
|
-
scale,
|
|
341
|
-
},
|
|
342
|
-
})),
|
|
343
|
-
}),
|
|
344
|
-
});
|
|
345
|
-
function toPropertyKey(meterType, rateType, scale) {
|
|
346
|
-
return (meterType << 16) | (scale << 8) | rateType;
|
|
347
|
-
}
|
|
348
|
-
function splitPropertyKey(key) {
|
|
349
|
-
return {
|
|
350
|
-
rateType: key & 0xff,
|
|
351
|
-
scale: (key >>> 8) & 0xff,
|
|
352
|
-
meterType: key >>> 16,
|
|
353
|
-
};
|
|
354
|
-
}
|
|
355
|
-
function getValueLabel(meterType, scale, rateType, suffix) {
|
|
356
|
-
let ret = (0, core_1.getMeterName)(meterType);
|
|
357
|
-
const scaleLabel = ((0, core_1.getMeterScale)(meterType, scale) ?? (0, core_1.getUnknownMeterScale)(scale)).label;
|
|
358
|
-
switch (rateType) {
|
|
359
|
-
case _Types_1.RateType.Consumed:
|
|
360
|
-
ret += ` Consumption [${scaleLabel}]`;
|
|
361
|
-
break;
|
|
362
|
-
case _Types_1.RateType.Produced:
|
|
363
|
-
ret += ` Production [${scaleLabel}]`;
|
|
364
|
-
break;
|
|
365
|
-
default:
|
|
366
|
-
ret += ` [${scaleLabel}]`;
|
|
367
|
-
}
|
|
368
|
-
if (suffix) {
|
|
369
|
-
ret += ` (${suffix})`;
|
|
370
|
-
}
|
|
371
|
-
return ret;
|
|
372
|
-
}
|
|
373
|
-
function parseMeterValueAndInfo(data, offset) {
|
|
374
|
-
(0, safe_1.validatePayload)(data.length >= offset + 1);
|
|
375
|
-
const type = data[offset] & 0b0_00_11111;
|
|
376
|
-
const rateType = (data[offset] & 0b0_11_00000) >>> 5;
|
|
377
|
-
const scale1Bit2 = (data[offset] & 0b1_00_00000) >>> 7;
|
|
378
|
-
const { scale: scale1Bits10, value, bytesRead, } = (0, safe_1.parseFloatWithScale)(data.subarray(offset + 1));
|
|
379
|
-
return {
|
|
380
|
-
type,
|
|
381
|
-
rateType,
|
|
382
|
-
// The scale is composed of two fields
|
|
383
|
-
scale1: (scale1Bit2 << 2) | scale1Bits10,
|
|
384
|
-
value,
|
|
385
|
-
// We've read one byte more than the float contains
|
|
386
|
-
bytesRead: bytesRead + 1,
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
function encodeMeterValueAndInfo(type, rateType, scale, value) {
|
|
390
|
-
// We need at least 2 bytes
|
|
391
|
-
const scale1 = scale >= 7 ? 7 : scale & 0b111;
|
|
392
|
-
const scale1Bits10 = scale1 & 0b11;
|
|
393
|
-
const scale1Bit2 = scale1 >>> 2;
|
|
394
|
-
const scale2 = scale >= 7 ? scale - 7 : undefined;
|
|
395
|
-
const typeByte = (type & 0b0_00_11111)
|
|
396
|
-
| ((rateType & 0b11) << 5)
|
|
397
|
-
| (scale1Bit2 << 7);
|
|
398
|
-
const floatParams = (0, core_1.getFloatParameters)(value);
|
|
399
|
-
const valueBytes = (0, core_1.encodeFloatWithScale)(value, scale1Bits10, floatParams);
|
|
400
|
-
return {
|
|
401
|
-
data: safe_2.Bytes.concat([safe_2.Bytes.from([typeByte]), valueBytes]),
|
|
402
|
-
floatParams: (0, safe_3.pick)(floatParams, ["precision", "size"]),
|
|
403
|
-
scale2,
|
|
404
|
-
};
|
|
405
|
-
}
|
|
406
|
-
function parseScale(scale1, data, scale2Offset) {
|
|
407
|
-
if (scale1 === 7) {
|
|
408
|
-
(0, safe_1.validatePayload)(data.length >= scale2Offset + 1);
|
|
409
|
-
const scale2 = data[scale2Offset];
|
|
410
|
-
return scale1 + scale2;
|
|
411
|
-
}
|
|
412
|
-
else {
|
|
413
|
-
return scale1;
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
function isAccumulatedValue(meterType, scale) {
|
|
417
|
-
// FIXME: We should probably move the meter definitions into code
|
|
418
|
-
switch (meterType) {
|
|
419
|
-
case 0x01: // Electric
|
|
420
|
-
return (
|
|
421
|
-
// kVarh
|
|
422
|
-
// Pulse count
|
|
423
|
-
scale === 0x00 // kWh
|
|
424
|
-
|| scale === 0x01 // kVAh
|
|
425
|
-
|| scale === 0x03
|
|
426
|
-
|| scale === 0x08);
|
|
427
|
-
case 0x02: // Gas
|
|
428
|
-
return (
|
|
429
|
-
// Pulse count
|
|
430
|
-
// ft³
|
|
431
|
-
scale === 0x00 // m³
|
|
432
|
-
|| scale === 0x01
|
|
433
|
-
|| scale === 0x03);
|
|
434
|
-
case 0x03: // Water
|
|
435
|
-
return (
|
|
436
|
-
// Pulse count
|
|
437
|
-
// US gallons
|
|
438
|
-
scale === 0x00 // m³
|
|
439
|
-
|| scale === 0x01 // ft³
|
|
440
|
-
|| scale === 0x02
|
|
441
|
-
|| scale === 0x03);
|
|
442
|
-
case 0x04: // Heating
|
|
443
|
-
return scale === 0x00; // kWh
|
|
444
|
-
case 0x05: // Cooling
|
|
445
|
-
return scale === 0x00; // kWh
|
|
446
|
-
}
|
|
447
|
-
return false;
|
|
448
|
-
}
|
|
449
|
-
let MeterCCAPI = class MeterCCAPI extends API_1.PhysicalCCAPI {
|
|
450
|
-
supportsCommand(cmd) {
|
|
451
|
-
switch (cmd) {
|
|
452
|
-
case _Types_1.MeterCommand.Get:
|
|
453
|
-
case _Types_1.MeterCommand.Report:
|
|
454
|
-
return true; // This is mandatory
|
|
455
|
-
case _Types_1.MeterCommand.SupportedGet:
|
|
456
|
-
case _Types_1.MeterCommand.SupportedReport:
|
|
457
|
-
return this.version >= 2;
|
|
458
|
-
case _Types_1.MeterCommand.Reset: {
|
|
459
|
-
const ret = this.tryGetValueDB()?.getValue({
|
|
460
|
-
commandClass: (0, CommandClassDecorators_1.getCommandClass)(this),
|
|
461
|
-
endpoint: this.endpoint.index,
|
|
462
|
-
property: "supportsReset",
|
|
463
|
-
});
|
|
464
|
-
return ret === true;
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
return super.supportsCommand(cmd);
|
|
468
|
-
}
|
|
469
|
-
get [API_1.POLL_VALUE]() {
|
|
470
|
-
return async function ({ property, propertyKey }) {
|
|
471
|
-
switch (property) {
|
|
472
|
-
case "value":
|
|
473
|
-
case "previousValue":
|
|
474
|
-
case "deltaTime": {
|
|
475
|
-
if (propertyKey == undefined) {
|
|
476
|
-
(0, API_1.throwMissingPropertyKey)(this.ccId, property);
|
|
477
|
-
}
|
|
478
|
-
else if (typeof propertyKey !== "number") {
|
|
479
|
-
(0, API_1.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
|
|
480
|
-
}
|
|
481
|
-
const { rateType, scale } = splitPropertyKey(propertyKey);
|
|
482
|
-
return (await this.get({
|
|
483
|
-
rateType,
|
|
484
|
-
scale,
|
|
485
|
-
}))?.[property];
|
|
486
|
-
}
|
|
487
|
-
default:
|
|
488
|
-
(0, API_1.throwUnsupportedProperty)(this.ccId, property);
|
|
489
|
-
}
|
|
490
|
-
};
|
|
491
|
-
}
|
|
492
|
-
async get(options) {
|
|
493
|
-
__assertType("options", "(optional) MeterCCGetOptions", __assertType__optional_MeterCCGetOptions.bind(void 0, options));
|
|
494
|
-
this.assertSupportsCommand(_Types_1.MeterCommand, _Types_1.MeterCommand.Get);
|
|
495
|
-
const cc = new MeterCCGet({
|
|
496
|
-
nodeId: this.endpoint.nodeId,
|
|
497
|
-
endpointIndex: this.endpoint.index,
|
|
498
|
-
...options,
|
|
499
|
-
});
|
|
500
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
501
|
-
if (response) {
|
|
502
|
-
return {
|
|
503
|
-
type: response.type,
|
|
504
|
-
scale: (0, core_1.getMeterScale)(response.type, response.scale)
|
|
505
|
-
?? (0, core_1.getUnknownMeterScale)(response.scale),
|
|
506
|
-
...(0, safe_3.pick)(response, [
|
|
507
|
-
"value",
|
|
508
|
-
"previousValue",
|
|
509
|
-
"rateType",
|
|
510
|
-
"deltaTime",
|
|
511
|
-
]),
|
|
512
|
-
};
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
async sendReport(options) {
|
|
516
|
-
__assertType("options", "MeterCCReportOptions", __assertType__MeterCCReportOptions.bind(void 0, options));
|
|
517
|
-
this.assertSupportsCommand(_Types_1.MeterCommand, _Types_1.MeterCommand.Report);
|
|
518
|
-
const cc = new MeterCCReport({
|
|
519
|
-
nodeId: this.endpoint.nodeId,
|
|
520
|
-
endpointIndex: this.endpoint.index,
|
|
521
|
-
...options,
|
|
522
|
-
});
|
|
523
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
524
|
-
}
|
|
525
|
-
async getAll(accumulatedOnly = false) {
|
|
526
|
-
__assertType("accumulatedOnly", "(optional) boolean", __assertType__optional_boolean.bind(void 0, accumulatedOnly));
|
|
527
|
-
const valueDB = this.tryGetValueDB();
|
|
528
|
-
if (this.version >= 2) {
|
|
529
|
-
const meterType = valueDB?.getValue(exports.MeterCCValues.type.endpoint(this.endpoint.index));
|
|
530
|
-
const supportedScales = valueDB?.getValue(exports.MeterCCValues.supportedScales.endpoint(this.endpoint.index)) ?? [];
|
|
531
|
-
const supportedRateTypes = valueDB?.getValue(exports.MeterCCValues.supportedRateTypes.endpoint(this.endpoint.index)) ?? [];
|
|
532
|
-
const rateTypes = supportedRateTypes.length
|
|
533
|
-
? supportedRateTypes
|
|
534
|
-
: [undefined];
|
|
535
|
-
const ret = [];
|
|
536
|
-
for (const rateType of rateTypes) {
|
|
537
|
-
for (const scale of supportedScales) {
|
|
538
|
-
// Skip non-accumulated values if requested
|
|
539
|
-
if (accumulatedOnly
|
|
540
|
-
&& meterType != undefined
|
|
541
|
-
&& !isAccumulatedValue(meterType, scale)) {
|
|
542
|
-
continue;
|
|
543
|
-
}
|
|
544
|
-
const response = await this.get({
|
|
545
|
-
scale,
|
|
546
|
-
rateType,
|
|
547
|
-
});
|
|
548
|
-
if (response)
|
|
549
|
-
ret.push(response);
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
return ret;
|
|
553
|
-
}
|
|
554
|
-
else {
|
|
555
|
-
const response = await this.get();
|
|
556
|
-
return response ? [response] : [];
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
560
|
-
async getSupported() {
|
|
561
|
-
this.assertSupportsCommand(_Types_1.MeterCommand, _Types_1.MeterCommand.SupportedGet);
|
|
562
|
-
const cc = new MeterCCSupportedGet({
|
|
563
|
-
nodeId: this.endpoint.nodeId,
|
|
564
|
-
endpointIndex: this.endpoint.index,
|
|
565
|
-
});
|
|
566
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
567
|
-
if (response) {
|
|
568
|
-
return (0, safe_3.pick)(response, [
|
|
569
|
-
"type",
|
|
570
|
-
"supportsReset",
|
|
571
|
-
"supportedScales",
|
|
572
|
-
"supportedRateTypes",
|
|
573
|
-
]);
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
async sendSupportedReport(options) {
|
|
577
|
-
__assertType("options", "MeterCCSupportedReportOptions", __assertType__MeterCCSupportedReportOptions.bind(void 0, options));
|
|
578
|
-
this.assertSupportsCommand(_Types_1.MeterCommand, _Types_1.MeterCommand.SupportedReport);
|
|
579
|
-
const cc = new MeterCCSupportedReport({
|
|
580
|
-
nodeId: this.endpoint.nodeId,
|
|
581
|
-
endpointIndex: this.endpoint.index,
|
|
582
|
-
...options,
|
|
583
|
-
});
|
|
584
|
-
await this.host.sendCommand(cc, this.commandOptions);
|
|
585
|
-
}
|
|
586
|
-
async reset(options) {
|
|
587
|
-
__assertType("options", "(optional) MeterCCResetOptions", __assertType__optional_MeterCCResetOptions.bind(void 0, options));
|
|
588
|
-
this.assertSupportsCommand(_Types_1.MeterCommand, _Types_1.MeterCommand.Reset);
|
|
589
|
-
const cc = new MeterCCReset({
|
|
590
|
-
nodeId: this.endpoint.nodeId,
|
|
591
|
-
endpointIndex: this.endpoint.index,
|
|
592
|
-
...options,
|
|
593
|
-
});
|
|
594
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
595
|
-
}
|
|
596
|
-
get [API_1.SET_VALUE]() {
|
|
597
|
-
return async function ({ property, propertyKey }, value) {
|
|
598
|
-
if (property !== "reset") {
|
|
599
|
-
(0, API_1.throwUnsupportedProperty)(this.ccId, property);
|
|
600
|
-
}
|
|
601
|
-
else if (propertyKey != undefined
|
|
602
|
-
&& typeof propertyKey !== "number") {
|
|
603
|
-
(0, API_1.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
|
|
604
|
-
}
|
|
605
|
-
else if (value !== true) {
|
|
606
|
-
(0, API_1.throwWrongValueType)(this.ccId, property, "true", value === false ? "false" : typeof value);
|
|
607
|
-
}
|
|
608
|
-
if (typeof propertyKey === "number") {
|
|
609
|
-
const { meterType, scale, rateType } = splitPropertyKey(propertyKey);
|
|
610
|
-
return this.reset({
|
|
611
|
-
type: meterType,
|
|
612
|
-
scale,
|
|
613
|
-
rateType,
|
|
614
|
-
targetValue: 0,
|
|
615
|
-
});
|
|
616
|
-
}
|
|
617
|
-
else {
|
|
618
|
-
return this.reset();
|
|
619
|
-
}
|
|
620
|
-
return undefined;
|
|
621
|
-
};
|
|
622
|
-
}
|
|
623
|
-
[API_1.SET_VALUE_HOOKS] = ({ property, propertyKey }, _value, _options) => {
|
|
624
|
-
if (property !== "reset")
|
|
625
|
-
return;
|
|
626
|
-
if (typeof propertyKey === "number") {
|
|
627
|
-
// Reset single
|
|
628
|
-
const { meterType, rateType, scale } = splitPropertyKey(propertyKey);
|
|
629
|
-
const readingValueId = exports.MeterCCValues.value(meterType, rateType, scale).endpoint(this.endpoint.index);
|
|
630
|
-
return {
|
|
631
|
-
optimisticallyUpdateRelatedValues: (supervisedAndSuccessful) => {
|
|
632
|
-
if (!supervisedAndSuccessful)
|
|
633
|
-
return;
|
|
634
|
-
// After resetting a single reading with supervision, store zero
|
|
635
|
-
// in the corresponding value
|
|
636
|
-
const valueDB = this.tryGetValueDB();
|
|
637
|
-
if (!valueDB)
|
|
638
|
-
return;
|
|
639
|
-
if (isAccumulatedValue(meterType, scale)) {
|
|
640
|
-
valueDB.setValue({
|
|
641
|
-
commandClass: this.ccId,
|
|
642
|
-
endpoint: this.endpoint.index,
|
|
643
|
-
property,
|
|
644
|
-
propertyKey,
|
|
645
|
-
}, 0);
|
|
646
|
-
}
|
|
647
|
-
},
|
|
648
|
-
verifyChanges: () => {
|
|
649
|
-
this.schedulePoll(readingValueId, 0, { transition: "fast" });
|
|
650
|
-
},
|
|
651
|
-
};
|
|
652
|
-
}
|
|
653
|
-
else {
|
|
654
|
-
// Reset all
|
|
655
|
-
const valueDB = this.tryGetValueDB();
|
|
656
|
-
if (!valueDB)
|
|
657
|
-
return;
|
|
658
|
-
const accumulatedValues = valueDB.findValues((vid) => vid.commandClass === this.ccId
|
|
659
|
-
&& vid.endpoint === this.endpoint.index
|
|
660
|
-
&& exports.MeterCCValues.value.is(vid)).filter(({ propertyKey }) => {
|
|
661
|
-
if (typeof propertyKey !== "number")
|
|
662
|
-
return false;
|
|
663
|
-
const { meterType, scale } = splitPropertyKey(propertyKey);
|
|
664
|
-
return isAccumulatedValue(meterType, scale);
|
|
665
|
-
});
|
|
666
|
-
return {
|
|
667
|
-
optimisticallyUpdateRelatedValues: (supervisedAndSuccessful) => {
|
|
668
|
-
if (!supervisedAndSuccessful)
|
|
669
|
-
return;
|
|
670
|
-
// After setting the reset all value with supervision,
|
|
671
|
-
// reset all accumulated values, since we know they are now zero.
|
|
672
|
-
for (const value of accumulatedValues) {
|
|
673
|
-
valueDB.setValue(value, 0);
|
|
674
|
-
}
|
|
675
|
-
},
|
|
676
|
-
verifyChanges: () => {
|
|
677
|
-
// Poll all accumulated values, unless they were updated by the device
|
|
678
|
-
for (const valueID of accumulatedValues) {
|
|
679
|
-
this.schedulePoll(valueID, 0, { transition: "fast" });
|
|
680
|
-
}
|
|
681
|
-
},
|
|
682
|
-
};
|
|
683
|
-
}
|
|
684
|
-
};
|
|
685
|
-
};
|
|
686
|
-
exports.MeterCCAPI = MeterCCAPI;
|
|
687
|
-
exports.MeterCCAPI = MeterCCAPI = __decorate([
|
|
688
|
-
(0, CommandClassDecorators_1.API)(safe_1.CommandClasses.Meter)
|
|
689
|
-
], MeterCCAPI);
|
|
690
|
-
let MeterCC = class MeterCC extends CommandClass_1.CommandClass {
|
|
691
|
-
async interview(ctx) {
|
|
692
|
-
const node = this.getNode(ctx);
|
|
693
|
-
const endpoint = this.getEndpoint(ctx);
|
|
694
|
-
const api = API_1.CCAPI.create(safe_1.CommandClasses.Meter, ctx, endpoint).withOptions({
|
|
695
|
-
priority: safe_1.MessagePriority.NodeQuery,
|
|
696
|
-
});
|
|
697
|
-
ctx.logNode(node.id, {
|
|
698
|
-
endpoint: this.endpointIndex,
|
|
699
|
-
message: `Interviewing ${this.ccName}...`,
|
|
700
|
-
direction: "none",
|
|
701
|
-
});
|
|
702
|
-
if (api.version >= 2) {
|
|
703
|
-
ctx.logNode(node.id, {
|
|
704
|
-
endpoint: this.endpointIndex,
|
|
705
|
-
message: "querying meter support...",
|
|
706
|
-
direction: "outbound",
|
|
707
|
-
});
|
|
708
|
-
const suppResp = await api.getSupported();
|
|
709
|
-
if (suppResp) {
|
|
710
|
-
const logMessage = `received meter support:
|
|
711
|
-
type: ${(0, core_1.getMeterName)(suppResp.type)}
|
|
712
|
-
supported scales: ${suppResp.supportedScales
|
|
713
|
-
.map((s) => ((0, core_1.getMeterScale)(suppResp.type, s)
|
|
714
|
-
?? (0, core_1.getUnknownMeterScale)(s)).label)
|
|
715
|
-
.map((label) => `\n· ${label}`)
|
|
716
|
-
.join("")}
|
|
717
|
-
supported rate types: ${suppResp.supportedRateTypes
|
|
718
|
-
.map((rt) => (0, safe_3.getEnumMemberName)(_Types_1.RateType, rt))
|
|
719
|
-
.map((label) => `\n· ${label}`)
|
|
720
|
-
.join("")}
|
|
721
|
-
supports reset: ${suppResp.supportsReset}`;
|
|
722
|
-
ctx.logNode(node.id, {
|
|
723
|
-
endpoint: this.endpointIndex,
|
|
724
|
-
message: logMessage,
|
|
725
|
-
direction: "inbound",
|
|
726
|
-
});
|
|
727
|
-
}
|
|
728
|
-
else {
|
|
729
|
-
ctx.logNode(node.id, {
|
|
730
|
-
endpoint: this.endpointIndex,
|
|
731
|
-
message: "Querying meter support timed out, skipping interview...",
|
|
732
|
-
level: "warn",
|
|
733
|
-
});
|
|
734
|
-
return;
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
// Query current meter values
|
|
738
|
-
await this.refreshValues(ctx);
|
|
739
|
-
// Remember that the interview is complete
|
|
740
|
-
this.setInterviewComplete(ctx, true);
|
|
741
|
-
}
|
|
742
|
-
async refreshValues(ctx) {
|
|
743
|
-
const node = this.getNode(ctx);
|
|
744
|
-
const endpoint = this.getEndpoint(ctx);
|
|
745
|
-
const api = API_1.CCAPI.create(safe_1.CommandClasses.Meter, ctx, endpoint).withOptions({
|
|
746
|
-
priority: safe_1.MessagePriority.NodeQuery,
|
|
747
|
-
});
|
|
748
|
-
if (api.version === 1) {
|
|
749
|
-
ctx.logNode(node.id, {
|
|
750
|
-
endpoint: this.endpointIndex,
|
|
751
|
-
message: `querying default meter value...`,
|
|
752
|
-
direction: "outbound",
|
|
753
|
-
});
|
|
754
|
-
await api.get();
|
|
755
|
-
}
|
|
756
|
-
else {
|
|
757
|
-
const type = this.getValue(ctx, exports.MeterCCValues.type)
|
|
758
|
-
?? 0;
|
|
759
|
-
const supportedScales = this.getValue(ctx, exports.MeterCCValues.supportedScales) ?? [];
|
|
760
|
-
const supportedRateTypes = this.getValue(ctx, exports.MeterCCValues.supportedRateTypes) ?? [];
|
|
761
|
-
const rateTypes = supportedRateTypes.length
|
|
762
|
-
? supportedRateTypes
|
|
763
|
-
: [undefined];
|
|
764
|
-
for (const rateType of rateTypes) {
|
|
765
|
-
for (const scale of supportedScales) {
|
|
766
|
-
ctx.logNode(node.id, {
|
|
767
|
-
endpoint: this.endpointIndex,
|
|
768
|
-
message: `querying meter value (type = ${(0, core_1.getMeterName)(type)}, scale = ${((0, core_1.getMeterScale)(type, scale)
|
|
769
|
-
?? (0, core_1.getUnknownMeterScale)(scale)).label}${rateType != undefined
|
|
770
|
-
? `, rate type = ${(0, safe_3.getEnumMemberName)(_Types_1.RateType, rateType)}`
|
|
771
|
-
: ""})...`,
|
|
772
|
-
direction: "outbound",
|
|
773
|
-
});
|
|
774
|
-
await api.get({ scale, rateType });
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
}
|
|
779
|
-
shouldRefreshValues(ctx) {
|
|
780
|
-
// Poll the device when all of the supported values were last updated longer than 6 hours ago.
|
|
781
|
-
// This may lead to some values not being updated, but the user may have disabled some unnecessary
|
|
782
|
-
// reports to reduce traffic.
|
|
783
|
-
const valueDB = ctx.tryGetValueDB(this.nodeId);
|
|
784
|
-
if (!valueDB)
|
|
785
|
-
return true;
|
|
786
|
-
const values = this.getDefinedValueIDs(ctx).filter((v) => exports.MeterCCValues.value.is(v));
|
|
787
|
-
return values.every((v) => {
|
|
788
|
-
const lastUpdated = valueDB.getTimestamp(v);
|
|
789
|
-
return (lastUpdated == undefined
|
|
790
|
-
|| Date.now() - lastUpdated > core_1.timespan.hours(6));
|
|
791
|
-
});
|
|
792
|
-
}
|
|
793
|
-
/**
|
|
794
|
-
* Returns which type this meter has.
|
|
795
|
-
* This only works AFTER the interview process
|
|
796
|
-
*/
|
|
797
|
-
static getMeterTypeCached(ctx, endpoint) {
|
|
798
|
-
return ctx
|
|
799
|
-
.getValueDB(endpoint.nodeId)
|
|
800
|
-
.getValue(exports.MeterCCValues.type.endpoint(endpoint.index));
|
|
801
|
-
}
|
|
802
|
-
/**
|
|
803
|
-
* Returns which scales are supported by this meter.
|
|
804
|
-
* This only works AFTER the interview process
|
|
805
|
-
*/
|
|
806
|
-
static getSupportedScalesCached(ctx, endpoint) {
|
|
807
|
-
return ctx
|
|
808
|
-
.getValueDB(endpoint.nodeId)
|
|
809
|
-
.getValue(exports.MeterCCValues.supportedScales.endpoint(endpoint.index));
|
|
810
|
-
}
|
|
811
|
-
/**
|
|
812
|
-
* Returns whether reset is supported by this meter.
|
|
813
|
-
* This only works AFTER the interview process
|
|
814
|
-
*/
|
|
815
|
-
static supportsResetCached(ctx, endpoint) {
|
|
816
|
-
return ctx
|
|
817
|
-
.getValueDB(endpoint.nodeId)
|
|
818
|
-
.getValue(exports.MeterCCValues.supportsReset.endpoint(endpoint.index));
|
|
819
|
-
}
|
|
820
|
-
/**
|
|
821
|
-
* Returns which rate types are supported by this meter.
|
|
822
|
-
* This only works AFTER the interview process
|
|
823
|
-
*/
|
|
824
|
-
static getSupportedRateTypesCached(ctx, endpoint) {
|
|
825
|
-
return ctx
|
|
826
|
-
.getValueDB(endpoint.nodeId)
|
|
827
|
-
.getValue(exports.MeterCCValues.supportedRateTypes.endpoint(endpoint.index));
|
|
828
|
-
}
|
|
829
|
-
translatePropertyKey(ctx, property, propertyKey) {
|
|
830
|
-
if (property === "value" && typeof propertyKey === "number") {
|
|
831
|
-
const { meterType, rateType, scale } = splitPropertyKey(propertyKey);
|
|
832
|
-
let ret;
|
|
833
|
-
if (meterType !== 0) {
|
|
834
|
-
ret = `${(0, core_1.getMeterName)(meterType)}_${((0, core_1.getMeterScale)(meterType, scale)
|
|
835
|
-
?? (0, core_1.getUnknownMeterScale)(scale)).label}`;
|
|
836
|
-
}
|
|
837
|
-
else {
|
|
838
|
-
ret = "default";
|
|
839
|
-
}
|
|
840
|
-
if (rateType !== _Types_1.RateType.Unspecified) {
|
|
841
|
-
ret += "_" + (0, safe_3.getEnumMemberName)(_Types_1.RateType, rateType);
|
|
842
|
-
}
|
|
843
|
-
return ret;
|
|
844
|
-
}
|
|
845
|
-
else if (property === "reset" && typeof propertyKey === "number") {
|
|
846
|
-
return (0, core_1.getMeterName)(propertyKey);
|
|
847
|
-
}
|
|
848
|
-
return super.translatePropertyKey(ctx, property, propertyKey);
|
|
849
|
-
}
|
|
850
|
-
};
|
|
851
|
-
exports.MeterCC = MeterCC;
|
|
852
|
-
exports.MeterCC = MeterCC = __decorate([
|
|
853
|
-
(0, CommandClassDecorators_1.commandClass)(safe_1.CommandClasses.Meter),
|
|
854
|
-
(0, CommandClassDecorators_1.implementedVersion)(6),
|
|
855
|
-
(0, CommandClassDecorators_1.ccValues)(exports.MeterCCValues)
|
|
856
|
-
], MeterCC);
|
|
857
|
-
let MeterCCReport = MeterCCReport_1 = class MeterCCReport extends MeterCC {
|
|
858
|
-
constructor(options) {
|
|
859
|
-
super(options);
|
|
860
|
-
this.type = options.type;
|
|
861
|
-
this.scale = options.scale;
|
|
862
|
-
this.value = options.value;
|
|
863
|
-
this.previousValue = options.previousValue;
|
|
864
|
-
this.rateType = options.rateType ?? _Types_1.RateType.Unspecified;
|
|
865
|
-
this.deltaTime = options.deltaTime ?? safe_1.UNKNOWN_STATE;
|
|
866
|
-
}
|
|
867
|
-
static from(raw, ctx) {
|
|
868
|
-
const { type, rateType, scale1, value, bytesRead } = parseMeterValueAndInfo(raw.payload, 0);
|
|
869
|
-
let offset = bytesRead;
|
|
870
|
-
const floatSize = bytesRead - 2;
|
|
871
|
-
let deltaTime;
|
|
872
|
-
let previousValue;
|
|
873
|
-
if (raw.payload.length >= offset + 2) {
|
|
874
|
-
deltaTime = raw.payload.readUInt16BE(offset);
|
|
875
|
-
offset += 2;
|
|
876
|
-
if (deltaTime === 0xffff) {
|
|
877
|
-
deltaTime = safe_1.UNKNOWN_STATE;
|
|
878
|
-
}
|
|
879
|
-
if (
|
|
880
|
-
// Previous value is included only if delta time is not 0
|
|
881
|
-
deltaTime !== 0
|
|
882
|
-
&& raw.payload.length >= offset + floatSize) {
|
|
883
|
-
const { value: prevValue } = (0, safe_1.parseFloatWithScale)(
|
|
884
|
-
// This float is split in the payload
|
|
885
|
-
safe_2.Bytes.concat([
|
|
886
|
-
safe_2.Bytes.from([raw.payload[1]]),
|
|
887
|
-
raw.payload.subarray(offset),
|
|
888
|
-
]));
|
|
889
|
-
offset += floatSize;
|
|
890
|
-
previousValue = prevValue;
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
else {
|
|
894
|
-
// 0 means that no previous value is included
|
|
895
|
-
deltaTime = 0;
|
|
896
|
-
}
|
|
897
|
-
const scale = parseScale(scale1, raw.payload, offset);
|
|
898
|
-
return new MeterCCReport_1({
|
|
899
|
-
nodeId: ctx.sourceNodeId,
|
|
900
|
-
type,
|
|
901
|
-
rateType,
|
|
902
|
-
value,
|
|
903
|
-
deltaTime,
|
|
904
|
-
previousValue,
|
|
905
|
-
scale,
|
|
906
|
-
});
|
|
907
|
-
}
|
|
908
|
-
persistValues(ctx) {
|
|
909
|
-
if (!super.persistValues(ctx))
|
|
910
|
-
return false;
|
|
911
|
-
const ccVersion = (0, CommandClass_1.getEffectiveCCVersion)(ctx, this);
|
|
912
|
-
const meter = (0, core_1.getMeter)(this.type);
|
|
913
|
-
const scale = (0, core_1.getMeterScale)(this.type, this.scale)
|
|
914
|
-
?? (0, core_1.getUnknownMeterScale)(this.scale);
|
|
915
|
-
// Filter out unknown meter types and scales, unless the strict validation is disabled
|
|
916
|
-
const measurementValidation = !ctx.getDeviceConfig?.(this.nodeId)?.compat?.disableStrictMeasurementValidation;
|
|
917
|
-
if (measurementValidation) {
|
|
918
|
-
safe_1.validatePayload.withReason(`Unknown meter type ${(0, safe_3.num2hex)(this.type)} or corrupted data`)(!!meter);
|
|
919
|
-
safe_1.validatePayload.withReason(`Unknown meter scale ${(0, safe_3.num2hex)(this.scale)} or corrupted data`)(scale.label !== (0, core_1.getUnknownMeterScale)(this.scale).label);
|
|
920
|
-
// Filter out unsupported meter types, scales and rate types if possible
|
|
921
|
-
if (ccVersion >= 2) {
|
|
922
|
-
const expectedType = this.getValue(ctx, exports.MeterCCValues.type);
|
|
923
|
-
if (expectedType != undefined) {
|
|
924
|
-
safe_1.validatePayload.withReason("Unexpected meter type or corrupted data")(this.type === expectedType);
|
|
925
|
-
}
|
|
926
|
-
const supportedScales = this.getValue(ctx, exports.MeterCCValues.supportedScales);
|
|
927
|
-
if (supportedScales?.length) {
|
|
928
|
-
safe_1.validatePayload.withReason(`Unsupported meter scale ${scale.label} or corrupted data`)(supportedScales.includes(this.scale));
|
|
929
|
-
}
|
|
930
|
-
const supportedRateTypes = this.getValue(ctx, exports.MeterCCValues.supportedRateTypes);
|
|
931
|
-
if (supportedRateTypes?.length) {
|
|
932
|
-
safe_1.validatePayload.withReason(`Unsupported rate type ${(0, safe_3.getEnumMemberName)(_Types_1.RateType, this.rateType)} or corrupted data`)(supportedRateTypes.includes(this.rateType));
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
const valueValue = exports.MeterCCValues.value(this.type, this.rateType, this.scale);
|
|
937
|
-
this.setMetadata(ctx, valueValue, {
|
|
938
|
-
...valueValue.meta,
|
|
939
|
-
label: getValueLabel(this.type, this.scale, this.rateType),
|
|
940
|
-
unit: scale.unit,
|
|
941
|
-
ccSpecific: {
|
|
942
|
-
meterType: this.type,
|
|
943
|
-
scale: this.scale,
|
|
944
|
-
rateType: this.rateType,
|
|
945
|
-
},
|
|
946
|
-
});
|
|
947
|
-
this.setValue(ctx, valueValue, this.value);
|
|
948
|
-
return true;
|
|
949
|
-
}
|
|
950
|
-
type;
|
|
951
|
-
scale;
|
|
952
|
-
value;
|
|
953
|
-
previousValue;
|
|
954
|
-
rateType;
|
|
955
|
-
deltaTime;
|
|
956
|
-
serialize(ctx) {
|
|
957
|
-
const { data: typeAndValue, floatParams, scale2 } = encodeMeterValueAndInfo(this.type, this.rateType, this.scale, this.value);
|
|
958
|
-
const deltaTime = this.deltaTime ?? 0xffff;
|
|
959
|
-
const deltaTimeBytes = new safe_2.Bytes(2);
|
|
960
|
-
deltaTimeBytes.writeUInt16BE(deltaTime, 0);
|
|
961
|
-
this.payload = safe_2.Bytes.concat([
|
|
962
|
-
typeAndValue,
|
|
963
|
-
deltaTimeBytes,
|
|
964
|
-
]);
|
|
965
|
-
if (this.deltaTime !== 0 && this.previousValue != undefined) {
|
|
966
|
-
// Encode the float, but only keep the value bytes
|
|
967
|
-
const prevValueBytes = (0, core_1.encodeFloatWithScale)(this.previousValue, 0, // we discard the scale anyways
|
|
968
|
-
floatParams).subarray(1);
|
|
969
|
-
this.payload = safe_2.Bytes.concat([
|
|
970
|
-
this.payload,
|
|
971
|
-
prevValueBytes,
|
|
972
|
-
]);
|
|
973
|
-
}
|
|
974
|
-
if (scale2 != undefined) {
|
|
975
|
-
this.payload = safe_2.Bytes.concat([
|
|
976
|
-
this.payload,
|
|
977
|
-
safe_2.Bytes.from([scale2]),
|
|
978
|
-
]);
|
|
979
|
-
}
|
|
980
|
-
return super.serialize(ctx);
|
|
981
|
-
}
|
|
982
|
-
toLogEntry(ctx) {
|
|
983
|
-
const scale = (0, core_1.getMeterScale)(this.type, this.scale)
|
|
984
|
-
?? (0, core_1.getUnknownMeterScale)(this.scale);
|
|
985
|
-
const message = {
|
|
986
|
-
"meter type": (0, core_1.getMeterName)(this.type),
|
|
987
|
-
scale: scale.label,
|
|
988
|
-
"rate type": (0, safe_3.getEnumMemberName)(_Types_1.RateType, this.rateType),
|
|
989
|
-
value: this.value,
|
|
990
|
-
};
|
|
991
|
-
if (this.deltaTime !== safe_1.UNKNOWN_STATE) {
|
|
992
|
-
message["time delta"] = `${this.deltaTime} seconds`;
|
|
993
|
-
}
|
|
994
|
-
if (this.previousValue != undefined) {
|
|
995
|
-
message["prev. value"] = this.previousValue;
|
|
996
|
-
}
|
|
997
|
-
return {
|
|
998
|
-
...super.toLogEntry(ctx),
|
|
999
|
-
message,
|
|
1000
|
-
};
|
|
1001
|
-
}
|
|
1002
|
-
};
|
|
1003
|
-
exports.MeterCCReport = MeterCCReport;
|
|
1004
|
-
exports.MeterCCReport = MeterCCReport = MeterCCReport_1 = __decorate([
|
|
1005
|
-
(0, CommandClassDecorators_1.CCCommand)(_Types_1.MeterCommand.Report)
|
|
1006
|
-
], MeterCCReport);
|
|
1007
|
-
function testResponseForMeterGet(sent, received) {
|
|
1008
|
-
// We expect a Meter Report that matches the requested scale and rate type
|
|
1009
|
-
// (if they were requested)
|
|
1010
|
-
return ((sent.scale == undefined || sent.scale === received.scale)
|
|
1011
|
-
&& (sent.rateType == undefined || sent.rateType == received.rateType));
|
|
1012
|
-
}
|
|
1013
|
-
let MeterCCGet = MeterCCGet_1 = class MeterCCGet extends MeterCC {
|
|
1014
|
-
constructor(options) {
|
|
1015
|
-
super(options);
|
|
1016
|
-
this.rateType = options.rateType;
|
|
1017
|
-
this.scale = options.scale;
|
|
1018
|
-
}
|
|
1019
|
-
static from(raw, ctx) {
|
|
1020
|
-
let rateType;
|
|
1021
|
-
let scale;
|
|
1022
|
-
if (raw.payload.length >= 1) {
|
|
1023
|
-
rateType = (raw.payload[0] & 0b11_000_000) >>> 6;
|
|
1024
|
-
scale = (raw.payload[0] & 0b00_111_000) >>> 3;
|
|
1025
|
-
if (scale === 7) {
|
|
1026
|
-
(0, safe_1.validatePayload)(raw.payload.length >= 2);
|
|
1027
|
-
scale += raw.payload[1];
|
|
1028
|
-
}
|
|
1029
|
-
}
|
|
1030
|
-
return new MeterCCGet_1({
|
|
1031
|
-
nodeId: ctx.sourceNodeId,
|
|
1032
|
-
rateType,
|
|
1033
|
-
scale,
|
|
1034
|
-
});
|
|
1035
|
-
}
|
|
1036
|
-
rateType;
|
|
1037
|
-
scale;
|
|
1038
|
-
serialize(ctx) {
|
|
1039
|
-
let scale1;
|
|
1040
|
-
let scale2;
|
|
1041
|
-
let bufferLength = 0;
|
|
1042
|
-
const ccVersion = (0, CommandClass_1.getEffectiveCCVersion)(ctx, this);
|
|
1043
|
-
if (this.scale == undefined) {
|
|
1044
|
-
scale1 = 0;
|
|
1045
|
-
}
|
|
1046
|
-
else if (ccVersion >= 4 && this.scale >= 7) {
|
|
1047
|
-
scale1 = 7;
|
|
1048
|
-
scale2 = this.scale >>> 3;
|
|
1049
|
-
bufferLength = 2;
|
|
1050
|
-
}
|
|
1051
|
-
else if (ccVersion >= 3) {
|
|
1052
|
-
scale1 = this.scale & 0b111;
|
|
1053
|
-
bufferLength = 1;
|
|
1054
|
-
}
|
|
1055
|
-
else if (ccVersion >= 2) {
|
|
1056
|
-
scale1 = this.scale & 0b11;
|
|
1057
|
-
bufferLength = 1;
|
|
1058
|
-
}
|
|
1059
|
-
else {
|
|
1060
|
-
scale1 = 0;
|
|
1061
|
-
}
|
|
1062
|
-
let rateTypeFlags = 0;
|
|
1063
|
-
if (ccVersion >= 4 && this.rateType != undefined) {
|
|
1064
|
-
rateTypeFlags = this.rateType & 0b11;
|
|
1065
|
-
bufferLength = Math.max(bufferLength, 1);
|
|
1066
|
-
}
|
|
1067
|
-
this.payload = safe_2.Bytes.alloc(bufferLength, 0);
|
|
1068
|
-
this.payload[0] = (rateTypeFlags << 6) | (scale1 << 3);
|
|
1069
|
-
if (scale2)
|
|
1070
|
-
this.payload[1] = scale2;
|
|
1071
|
-
return super.serialize(ctx);
|
|
1072
|
-
}
|
|
1073
|
-
toLogEntry(ctx) {
|
|
1074
|
-
const message = {};
|
|
1075
|
-
if (this.rateType != undefined) {
|
|
1076
|
-
message["rate type"] = (0, safe_3.getEnumMemberName)(_Types_1.RateType, this.rateType);
|
|
1077
|
-
}
|
|
1078
|
-
if (this.scale != undefined) {
|
|
1079
|
-
if (ctx) {
|
|
1080
|
-
// Try to lookup the meter type to translate the scale
|
|
1081
|
-
const type = this.getValue(ctx, exports.MeterCCValues.type);
|
|
1082
|
-
if (type != undefined) {
|
|
1083
|
-
message.scale = ((0, core_1.getMeterScale)(type, this.scale)
|
|
1084
|
-
?? (0, core_1.getUnknownMeterScale)(this.scale)).label;
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
else {
|
|
1088
|
-
message.scale = this.scale;
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
return {
|
|
1092
|
-
...super.toLogEntry(ctx),
|
|
1093
|
-
message,
|
|
1094
|
-
};
|
|
1095
|
-
}
|
|
1096
|
-
};
|
|
1097
|
-
exports.MeterCCGet = MeterCCGet;
|
|
1098
|
-
exports.MeterCCGet = MeterCCGet = MeterCCGet_1 = __decorate([
|
|
1099
|
-
(0, CommandClassDecorators_1.CCCommand)(_Types_1.MeterCommand.Get),
|
|
1100
|
-
(0, CommandClassDecorators_1.expectedCCResponse)(MeterCCReport, testResponseForMeterGet)
|
|
1101
|
-
], MeterCCGet);
|
|
1102
|
-
let MeterCCSupportedReport = MeterCCSupportedReport_1 = class MeterCCSupportedReport extends MeterCC {
|
|
1103
|
-
constructor(options) {
|
|
1104
|
-
super(options);
|
|
1105
|
-
this.type = options.type;
|
|
1106
|
-
this.supportsReset = options.supportsReset;
|
|
1107
|
-
this.supportedScales = options.supportedScales;
|
|
1108
|
-
this.supportedRateTypes = options.supportedRateTypes;
|
|
1109
|
-
}
|
|
1110
|
-
static from(raw, ctx) {
|
|
1111
|
-
(0, safe_1.validatePayload)(raw.payload.length >= 2);
|
|
1112
|
-
const type = raw.payload[0] & 0b0_00_11111;
|
|
1113
|
-
const supportsReset = !!(raw.payload[0] & 0b1_00_00000);
|
|
1114
|
-
const hasMoreScales = !!(raw.payload[1] & 0b1_0000000);
|
|
1115
|
-
let supportedScales;
|
|
1116
|
-
if (hasMoreScales) {
|
|
1117
|
-
// The bitmask is spread out
|
|
1118
|
-
(0, safe_1.validatePayload)(raw.payload.length >= 3);
|
|
1119
|
-
const extraBytes = raw.payload[2];
|
|
1120
|
-
(0, safe_1.validatePayload)(raw.payload.length >= 3 + extraBytes);
|
|
1121
|
-
// The bitmask is the original payload byte plus all following bytes
|
|
1122
|
-
// Since the first byte only has 7 bits, we need to reduce all following bits by 1
|
|
1123
|
-
supportedScales = (0, safe_1.parseBitMask)(safe_2.Bytes.concat([
|
|
1124
|
-
safe_2.Bytes.from([raw.payload[1] & 0b0_1111111]),
|
|
1125
|
-
raw.payload.subarray(3, 3 + extraBytes),
|
|
1126
|
-
]), 0).map((scale) => (scale >= 8 ? scale - 1 : scale));
|
|
1127
|
-
}
|
|
1128
|
-
else {
|
|
1129
|
-
// only 7 bits in the bitmask. Bit 7 is 0, so no need to mask it out
|
|
1130
|
-
supportedScales = (0, safe_1.parseBitMask)(safe_2.Bytes.from([raw.payload[1]]), 0);
|
|
1131
|
-
}
|
|
1132
|
-
// This is only present in V4+
|
|
1133
|
-
const supportedRateTypes = (0, safe_1.parseBitMask)(safe_2.Bytes.from([(raw.payload[0] & 0b0_11_00000) >>> 5]), 1);
|
|
1134
|
-
return new MeterCCSupportedReport_1({
|
|
1135
|
-
nodeId: ctx.sourceNodeId,
|
|
1136
|
-
type,
|
|
1137
|
-
supportsReset,
|
|
1138
|
-
supportedScales,
|
|
1139
|
-
supportedRateTypes,
|
|
1140
|
-
});
|
|
1141
|
-
}
|
|
1142
|
-
type;
|
|
1143
|
-
supportsReset;
|
|
1144
|
-
supportedScales;
|
|
1145
|
-
supportedRateTypes;
|
|
1146
|
-
persistValues(ctx) {
|
|
1147
|
-
if (!super.persistValues(ctx))
|
|
1148
|
-
return false;
|
|
1149
|
-
if (!this.supportsReset)
|
|
1150
|
-
return true;
|
|
1151
|
-
const ccVersion = (0, CommandClass_1.getEffectiveCCVersion)(ctx, this);
|
|
1152
|
-
// Create reset values
|
|
1153
|
-
if (ccVersion < 6) {
|
|
1154
|
-
this.ensureMetadata(ctx, exports.MeterCCValues.resetAll);
|
|
1155
|
-
}
|
|
1156
|
-
else {
|
|
1157
|
-
for (const scale of this.supportedScales) {
|
|
1158
|
-
// Only accumulated values can be reset
|
|
1159
|
-
if (!isAccumulatedValue(this.type, scale))
|
|
1160
|
-
continue;
|
|
1161
|
-
for (const rateType of this.supportedRateTypes) {
|
|
1162
|
-
const resetSingleValue = exports.MeterCCValues.resetSingle(this.type, rateType, scale);
|
|
1163
|
-
this.ensureMetadata(ctx, resetSingleValue, {
|
|
1164
|
-
...resetSingleValue.meta,
|
|
1165
|
-
label: `Reset ${getValueLabel(this.type, scale, rateType)}`,
|
|
1166
|
-
});
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
return true;
|
|
1171
|
-
}
|
|
1172
|
-
serialize(ctx) {
|
|
1173
|
-
const typeByte = (this.type & 0b0_00_11111)
|
|
1174
|
-
| (this.supportedRateTypes.includes(_Types_1.RateType.Consumed)
|
|
1175
|
-
? 0b0_01_00000
|
|
1176
|
-
: 0)
|
|
1177
|
-
| (this.supportedRateTypes.includes(_Types_1.RateType.Produced)
|
|
1178
|
-
? 0b0_10_00000
|
|
1179
|
-
: 0)
|
|
1180
|
-
| (this.supportsReset ? 0b1_00_00000 : 0);
|
|
1181
|
-
const supportedScales = (0, core_1.encodeBitMask)(this.supportedScales, undefined,
|
|
1182
|
-
// The first byte only has 7 bits for the bitmask,
|
|
1183
|
-
// so we add a fake bit for the value -1 and later shift
|
|
1184
|
-
// the first byte one to the right
|
|
1185
|
-
-1);
|
|
1186
|
-
const scalesByte1 = (supportedScales[0] >>> 1)
|
|
1187
|
-
| (supportedScales.length > 1 ? 0b1000_0000 : 0);
|
|
1188
|
-
this.payload = safe_2.Bytes.from([
|
|
1189
|
-
typeByte,
|
|
1190
|
-
scalesByte1,
|
|
1191
|
-
]);
|
|
1192
|
-
if (supportedScales.length > 1) {
|
|
1193
|
-
this.payload = safe_2.Bytes.concat([
|
|
1194
|
-
this.payload,
|
|
1195
|
-
safe_2.Bytes.from([supportedScales.length - 1]),
|
|
1196
|
-
safe_2.Bytes.from(supportedScales.subarray(1)),
|
|
1197
|
-
]);
|
|
1198
|
-
}
|
|
1199
|
-
return super.serialize(ctx);
|
|
1200
|
-
}
|
|
1201
|
-
toLogEntry(ctx) {
|
|
1202
|
-
const message = {
|
|
1203
|
-
"meter type": (0, core_1.getMeterName)(this.type),
|
|
1204
|
-
"supports reset": this.supportsReset,
|
|
1205
|
-
"supported scales": `${this.supportedScales
|
|
1206
|
-
.map((scale) => `
|
|
1207
|
-
· ${((0, core_1.getMeterScale)(this.type, scale) ?? (0, core_1.getUnknownMeterScale)(scale)).label}`)
|
|
1208
|
-
.join("")}`,
|
|
1209
|
-
"supported rate types": this.supportedRateTypes
|
|
1210
|
-
.map((rt) => (0, safe_3.getEnumMemberName)(_Types_1.RateType, rt))
|
|
1211
|
-
.join(", "),
|
|
1212
|
-
};
|
|
1213
|
-
return {
|
|
1214
|
-
...super.toLogEntry(ctx),
|
|
1215
|
-
message,
|
|
1216
|
-
};
|
|
1217
|
-
}
|
|
1218
|
-
};
|
|
1219
|
-
exports.MeterCCSupportedReport = MeterCCSupportedReport;
|
|
1220
|
-
__decorate([
|
|
1221
|
-
(0, CommandClassDecorators_1.ccValue)(exports.MeterCCValues.type)
|
|
1222
|
-
], MeterCCSupportedReport.prototype, "type", void 0);
|
|
1223
|
-
__decorate([
|
|
1224
|
-
(0, CommandClassDecorators_1.ccValue)(exports.MeterCCValues.supportsReset)
|
|
1225
|
-
], MeterCCSupportedReport.prototype, "supportsReset", void 0);
|
|
1226
|
-
__decorate([
|
|
1227
|
-
(0, CommandClassDecorators_1.ccValue)(exports.MeterCCValues.supportedScales)
|
|
1228
|
-
], MeterCCSupportedReport.prototype, "supportedScales", void 0);
|
|
1229
|
-
__decorate([
|
|
1230
|
-
(0, CommandClassDecorators_1.ccValue)(exports.MeterCCValues.supportedRateTypes)
|
|
1231
|
-
], MeterCCSupportedReport.prototype, "supportedRateTypes", void 0);
|
|
1232
|
-
exports.MeterCCSupportedReport = MeterCCSupportedReport = MeterCCSupportedReport_1 = __decorate([
|
|
1233
|
-
(0, CommandClassDecorators_1.CCCommand)(_Types_1.MeterCommand.SupportedReport)
|
|
1234
|
-
], MeterCCSupportedReport);
|
|
1235
|
-
let MeterCCSupportedGet = class MeterCCSupportedGet extends MeterCC {
|
|
1236
|
-
};
|
|
1237
|
-
exports.MeterCCSupportedGet = MeterCCSupportedGet;
|
|
1238
|
-
exports.MeterCCSupportedGet = MeterCCSupportedGet = __decorate([
|
|
1239
|
-
(0, CommandClassDecorators_1.CCCommand)(_Types_1.MeterCommand.SupportedGet),
|
|
1240
|
-
(0, CommandClassDecorators_1.expectedCCResponse)(MeterCCSupportedReport)
|
|
1241
|
-
], MeterCCSupportedGet);
|
|
1242
|
-
let MeterCCReset = MeterCCReset_1 = class MeterCCReset extends MeterCC {
|
|
1243
|
-
constructor(options) {
|
|
1244
|
-
super(options);
|
|
1245
|
-
this.type = options.type;
|
|
1246
|
-
this.scale = options.scale;
|
|
1247
|
-
this.rateType = options.rateType;
|
|
1248
|
-
this.targetValue = options.targetValue;
|
|
1249
|
-
}
|
|
1250
|
-
static from(raw, ctx) {
|
|
1251
|
-
if (raw.payload.length === 0) {
|
|
1252
|
-
return new MeterCCReset_1({
|
|
1253
|
-
nodeId: ctx.sourceNodeId,
|
|
1254
|
-
});
|
|
1255
|
-
}
|
|
1256
|
-
const { type, rateType, scale1, value: targetValue, bytesRead: scale2Offset, } = parseMeterValueAndInfo(raw.payload, 0);
|
|
1257
|
-
const scale = parseScale(scale1, raw.payload, scale2Offset);
|
|
1258
|
-
return new MeterCCReset_1({
|
|
1259
|
-
nodeId: ctx.sourceNodeId,
|
|
1260
|
-
type,
|
|
1261
|
-
rateType,
|
|
1262
|
-
targetValue,
|
|
1263
|
-
scale,
|
|
1264
|
-
});
|
|
1265
|
-
}
|
|
1266
|
-
type;
|
|
1267
|
-
scale;
|
|
1268
|
-
rateType;
|
|
1269
|
-
targetValue;
|
|
1270
|
-
serialize(ctx) {
|
|
1271
|
-
if (this.type != undefined
|
|
1272
|
-
&& this.scale != undefined
|
|
1273
|
-
&& this.rateType != undefined
|
|
1274
|
-
&& this.targetValue != undefined) {
|
|
1275
|
-
const { data: typeAndValue, scale2 } = encodeMeterValueAndInfo(this.type, this.rateType, this.scale, this.targetValue);
|
|
1276
|
-
this.payload = typeAndValue;
|
|
1277
|
-
if (scale2 != undefined) {
|
|
1278
|
-
this.payload = safe_2.Bytes.concat([
|
|
1279
|
-
this.payload,
|
|
1280
|
-
safe_2.Bytes.from([scale2]),
|
|
1281
|
-
]);
|
|
1282
|
-
}
|
|
1283
|
-
}
|
|
1284
|
-
return super.serialize(ctx);
|
|
1285
|
-
}
|
|
1286
|
-
toLogEntry(ctx) {
|
|
1287
|
-
const message = {};
|
|
1288
|
-
if (this.type != undefined) {
|
|
1289
|
-
message.type = (0, core_1.getMeterName)(this.type);
|
|
1290
|
-
}
|
|
1291
|
-
if (this.rateType != undefined) {
|
|
1292
|
-
message["rate type"] = (0, safe_3.getEnumMemberName)(_Types_1.RateType, this.rateType);
|
|
1293
|
-
}
|
|
1294
|
-
if (this.type != undefined && this.scale != undefined) {
|
|
1295
|
-
message.scale = ((0, core_1.getMeterScale)(this.type, this.scale)
|
|
1296
|
-
?? (0, core_1.getUnknownMeterScale)(this.scale)).label;
|
|
1297
|
-
}
|
|
1298
|
-
if (this.targetValue != undefined) {
|
|
1299
|
-
message["target value"] = this.targetValue;
|
|
1300
|
-
}
|
|
1301
|
-
return {
|
|
1302
|
-
...super.toLogEntry(ctx),
|
|
1303
|
-
message,
|
|
1304
|
-
};
|
|
1305
|
-
}
|
|
1306
|
-
};
|
|
1307
|
-
exports.MeterCCReset = MeterCCReset;
|
|
1308
|
-
exports.MeterCCReset = MeterCCReset = MeterCCReset_1 = __decorate([
|
|
1309
|
-
(0, CommandClassDecorators_1.CCCommand)(_Types_1.MeterCommand.Reset),
|
|
1310
|
-
(0, CommandClassDecorators_1.useSupervision)()
|
|
1311
|
-
], MeterCCReset);
|
|
1312
|
-
//# sourceMappingURL=MeterCC.js.map
|