@zwave-js/cc 14.0.0-beta.4 → 14.0.0-beta.5
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.js +381 -266
- package/build/cjs/cc/AlarmSensorCC.js.map +3 -3
- package/build/cjs/cc/AssociationCC.js +669 -503
- package/build/cjs/cc/AssociationCC.js.map +3 -3
- package/build/cjs/cc/AssociationGroupInfoCC.js +633 -492
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +3 -3
- package/build/cjs/cc/BarrierOperatorCC.js +595 -429
- package/build/cjs/cc/BarrierOperatorCC.js.map +3 -3
- package/build/cjs/cc/BasicCC.js +354 -260
- package/build/cjs/cc/BasicCC.js.map +3 -3
- package/build/cjs/cc/BatteryCC.js +427 -345
- package/build/cjs/cc/BatteryCC.js.map +3 -3
- package/build/cjs/cc/BinarySensorCC.js +391 -276
- package/build/cjs/cc/BinarySensorCC.js.map +3 -3
- package/build/cjs/cc/BinarySwitchCC.js +347 -253
- package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
- package/build/cjs/cc/CRC16CC.js +160 -85
- package/build/cjs/cc/CRC16CC.js.map +3 -3
- package/build/cjs/cc/CentralSceneCC.js +459 -324
- package/build/cjs/cc/CentralSceneCC.js.map +3 -3
- package/build/cjs/cc/ClimateControlScheduleCC.js +459 -293
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +3 -3
- package/build/cjs/cc/ClockCC.js +254 -150
- package/build/cjs/cc/ClockCC.js.map +3 -3
- package/build/cjs/cc/ColorSwitchCC.js +758 -610
- package/build/cjs/cc/ColorSwitchCC.js.map +3 -3
- package/build/cjs/cc/ConfigurationCC.js +1700 -1453
- package/build/cjs/cc/ConfigurationCC.js.map +3 -3
- package/build/cjs/cc/DeviceResetLocallyCC.js +125 -49
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +3 -3
- package/build/cjs/cc/DoorLockCC.js +904 -777
- package/build/cjs/cc/DoorLockCC.js.map +3 -3
- package/build/cjs/cc/DoorLockLoggingCC.js +321 -206
- package/build/cjs/cc/DoorLockLoggingCC.js.map +3 -3
- package/build/cjs/cc/EnergyProductionCC.js +249 -160
- package/build/cjs/cc/EnergyProductionCC.js.map +3 -3
- package/build/cjs/cc/EntryControlCC.js +619 -458
- package/build/cjs/cc/EntryControlCC.js.map +3 -3
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +898 -698
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +3 -3
- package/build/cjs/cc/HailCC.js +57 -11
- package/build/cjs/cc/HailCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlModeCC.js +359 -233
- package/build/cjs/cc/HumidityControlModeCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +189 -103
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlSetpointCC.js +682 -495
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +3 -3
- package/build/cjs/cc/InclusionControllerCC.js +205 -114
- package/build/cjs/cc/InclusionControllerCC.js.map +3 -3
- package/build/cjs/cc/IndicatorCC.js +897 -736
- package/build/cjs/cc/IndicatorCC.js.map +3 -3
- package/build/cjs/cc/IrrigationCC.js +1651 -1405
- package/build/cjs/cc/IrrigationCC.js.map +3 -3
- package/build/cjs/cc/LanguageCC.js +268 -171
- package/build/cjs/cc/LanguageCC.js.map +3 -3
- package/build/cjs/cc/LockCC.js +254 -154
- package/build/cjs/cc/LockCC.js.map +3 -3
- package/build/cjs/cc/ManufacturerProprietaryCC.js +189 -129
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.js +319 -213
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +3 -3
- package/build/cjs/cc/MeterCC.js +827 -707
- package/build/cjs/cc/MeterCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelAssociationCC.js +612 -478
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelCC.js +1037 -819
- package/build/cjs/cc/MultiChannelCC.js.map +3 -3
- package/build/cjs/cc/MultiCommandCC.js +172 -97
- package/build/cjs/cc/MultiCommandCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSensorCC.js +589 -449
- package/build/cjs/cc/MultilevelSensorCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSwitchCC.js +587 -439
- package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
- package/build/cjs/cc/NoOperationCC.js +89 -27
- package/build/cjs/cc/NoOperationCC.js.map +2 -2
- package/build/cjs/cc/NodeNamingCC.js +417 -277
- package/build/cjs/cc/NodeNamingCC.js.map +3 -3
- package/build/cjs/cc/NotificationCC.js +972 -818
- package/build/cjs/cc/NotificationCC.js.map +3 -3
- package/build/cjs/cc/PowerlevelCC.js +450 -303
- package/build/cjs/cc/PowerlevelCC.js.map +3 -3
- package/build/cjs/cc/ProtectionCC.js +686 -494
- package/build/cjs/cc/ProtectionCC.js.map +3 -3
- package/build/cjs/cc/SceneActivationCC.js +165 -97
- package/build/cjs/cc/SceneActivationCC.js.map +3 -3
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +346 -243
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +3 -3
- package/build/cjs/cc/SceneControllerConfigurationCC.js +401 -298
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +3 -3
- package/build/cjs/cc/ScheduleEntryLockCC.js +1552 -1272
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +3 -3
- package/build/cjs/cc/Security2CC.js +1483 -1219
- package/build/cjs/cc/Security2CC.js.map +3 -3
- package/build/cjs/cc/SecurityCC.js +839 -619
- package/build/cjs/cc/SecurityCC.js.map +3 -3
- package/build/cjs/cc/SoundSwitchCC.js +707 -515
- package/build/cjs/cc/SoundSwitchCC.js.map +3 -3
- package/build/cjs/cc/SupervisionCC.js +327 -237
- package/build/cjs/cc/SupervisionCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanModeCC.js +386 -263
- package/build/cjs/cc/ThermostatFanModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanStateCC.js +192 -106
- package/build/cjs/cc/ThermostatFanStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatModeCC.js +425 -302
- package/build/cjs/cc/ThermostatModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatOperatingStateCC.js +188 -102
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetbackCC.js +277 -173
- package/build/cjs/cc/ThermostatSetbackCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetpointCC.js +645 -491
- package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
- package/build/cjs/cc/TimeCC.js +515 -353
- package/build/cjs/cc/TimeCC.js.map +3 -3
- package/build/cjs/cc/TimeParametersCC.js +302 -202
- package/build/cjs/cc/TimeParametersCC.js.map +3 -3
- package/build/cjs/cc/TransportServiceCC.js +433 -315
- package/build/cjs/cc/TransportServiceCC.js.map +3 -3
- package/build/cjs/cc/UserCodeCC.js +1385 -1102
- package/build/cjs/cc/UserCodeCC.js.map +3 -3
- package/build/cjs/cc/VersionCC.js +696 -562
- package/build/cjs/cc/VersionCC.js.map +3 -3
- package/build/cjs/cc/WakeUpCC.js +499 -346
- package/build/cjs/cc/WakeUpCC.js.map +3 -3
- package/build/cjs/cc/WindowCoveringCC.js +626 -478
- package/build/cjs/cc/WindowCoveringCC.js.map +3 -3
- package/build/cjs/cc/ZWaveLongRangeCC.js +57 -10
- package/build/cjs/cc/ZWaveLongRangeCC.js.map +2 -2
- package/build/cjs/cc/ZWavePlusCC.js +233 -159
- package/build/cjs/cc/ZWavePlusCC.js.map +3 -3
- package/build/cjs/cc/ZWaveProtocolCC.js +1515 -948
- package/build/cjs/cc/ZWaveProtocolCC.js.map +3 -3
- package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +4 -4
- package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +1 -1
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +395 -274
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +3 -3
- package/build/cjs/lib/CommandClassDecorators.d.ts +11 -15
- package/build/cjs/lib/CommandClassDecorators.js +19 -20
- package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
- package/build/cjs/lib/Security2/Extension.d.ts +1 -1
- package/build/cjs/lib/Security2/Extension.js +217 -126
- package/build/cjs/lib/Security2/Extension.js.map +3 -3
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +389 -291
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +678 -537
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +659 -539
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +634 -493
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +380 -302
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +449 -384
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +395 -297
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +353 -274
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.js +162 -98
- package/build/esm/cc/CRC16CC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +465 -351
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +454 -313
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.js +248 -159
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +802 -677
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +1899 -1687
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js +124 -59
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +951 -849
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +316 -218
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +240 -164
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +629 -493
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +938 -769
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HailCC.js +51 -12
- package/build/esm/cc/HailCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +357 -250
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +182 -109
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +706 -546
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/InclusionControllerCC.js +197 -119
- package/build/esm/cc/InclusionControllerCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.js +973 -835
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +1697 -1496
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +266 -184
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +247 -162
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +192 -141
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +312 -223
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +896 -795
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +631 -518
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +1106 -921
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultiCommandCC.js +166 -102
- package/build/esm/cc/MultiCommandCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +616 -497
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +621 -496
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NoOperationCC.js +82 -29
- package/build/esm/cc/NoOperationCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +413 -294
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +1097 -966
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/PowerlevelCC.js +437 -311
- package/build/esm/cc/PowerlevelCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +704 -543
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +157 -100
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +357 -269
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +434 -346
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +1596 -1357
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.js +1633 -1406
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.js +876 -687
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +689 -526
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.js +349 -272
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +388 -284
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +184 -111
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +435 -331
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +180 -107
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.js +274 -185
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +674 -543
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.js +499 -360
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +296 -211
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +464 -363
- package/build/esm/cc/TransportServiceCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +1443 -1205
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +744 -635
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +494 -364
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +655 -530
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWaveLongRangeCC.js +51 -11
- package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +223 -162
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +1443 -953
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +4 -4
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +390 -286
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/esm/lib/CommandClassDecorators.d.ts +11 -15
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
- package/build/esm/lib/CommandClassDecorators.js +24 -24
- package/build/esm/lib/CommandClassDecorators.js.map +1 -1
- package/build/esm/lib/Security2/Extension.d.ts +1 -1
- package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
- package/build/esm/lib/Security2/Extension.js +207 -123
- package/build/esm/lib/Security2/Extension.js.map +1 -1
- package/package.json +6 -6
|
@@ -40,13 +40,45 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
40
40
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
41
41
|
var import_Values = require("../lib/Values.js");
|
|
42
42
|
var import_Types = require("../lib/_Types.js");
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
44
|
+
function accept(f) {
|
|
45
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
46
|
+
return f;
|
|
47
|
+
}
|
|
48
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
49
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
50
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
51
|
+
var _, done = false;
|
|
52
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
53
|
+
var context = {};
|
|
54
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
55
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
56
|
+
context.addInitializer = function(f) {
|
|
57
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
58
|
+
extraInitializers.push(accept(f || null));
|
|
59
|
+
};
|
|
60
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
61
|
+
if (kind === "accessor") {
|
|
62
|
+
if (result === void 0) continue;
|
|
63
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
64
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
65
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
66
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
67
|
+
} else if (_ = accept(result)) {
|
|
68
|
+
if (kind === "field") initializers.unshift(_);
|
|
69
|
+
else descriptor[key] = _;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
73
|
+
done = true;
|
|
74
|
+
};
|
|
75
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
76
|
+
var useValue = arguments.length > 2;
|
|
77
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
78
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
79
|
+
}
|
|
80
|
+
return useValue ? value : void 0;
|
|
48
81
|
};
|
|
49
|
-
var HumidityControlSetpointCCReport_1, HumidityControlSetpointCCSupportedReport_1, HumidityControlSetpointCCScaleSupportedReport_1, HumidityControlSetpointCCCapabilitiesReport_1;
|
|
50
82
|
function __assertType(argName, typeName, boundHasError) {
|
|
51
83
|
const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
|
|
52
84
|
if (boundHasError()) {
|
|
@@ -84,538 +116,693 @@ function getScale(scale) {
|
|
|
84
116
|
function getSetpointUnit(scale) {
|
|
85
117
|
return getScale(scale).unit ?? "";
|
|
86
118
|
}
|
|
87
|
-
let HumidityControlSetpointCCAPI =
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const result = await this.set(propertyKey, value, preferredScale ?? 0);
|
|
113
|
-
if (this.isSinglecast() && !(0, import_safe.supervisedCommandSucceeded)(result)) {
|
|
114
|
-
this.schedulePoll({ property, propertyKey }, value);
|
|
119
|
+
let HumidityControlSetpointCCAPI = (() => {
|
|
120
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Humidity Control Setpoint"])];
|
|
121
|
+
let _classDescriptor;
|
|
122
|
+
let _classExtraInitializers = [];
|
|
123
|
+
let _classThis;
|
|
124
|
+
let _classSuper = import_API.CCAPI;
|
|
125
|
+
var HumidityControlSetpointCCAPI2 = class extends _classSuper {
|
|
126
|
+
static {
|
|
127
|
+
_classThis = this;
|
|
128
|
+
}
|
|
129
|
+
static {
|
|
130
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
131
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
132
|
+
HumidityControlSetpointCCAPI2 = _classThis = _classDescriptor.value;
|
|
133
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
134
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
135
|
+
}
|
|
136
|
+
supportsCommand(cmd) {
|
|
137
|
+
switch (cmd) {
|
|
138
|
+
case import_Types.HumidityControlSetpointCommand.Get:
|
|
139
|
+
case import_Types.HumidityControlSetpointCommand.SupportedGet:
|
|
140
|
+
case import_Types.HumidityControlSetpointCommand.CapabilitiesGet:
|
|
141
|
+
return this.isSinglecast();
|
|
142
|
+
case import_Types.HumidityControlSetpointCommand.Set:
|
|
143
|
+
return true;
|
|
115
144
|
}
|
|
116
|
-
return
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
switch (property) {
|
|
122
|
-
case "setpoint":
|
|
123
|
-
if (typeof propertyKey !== "number") {
|
|
124
|
-
throw new import_safe.ZWaveError(`${import_safe.CommandClasses[this.ccId]}: "${property}" must be further specified by a numeric property key`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
125
|
-
}
|
|
126
|
-
return (await this.get(propertyKey))?.value;
|
|
127
|
-
default:
|
|
145
|
+
return super.supportsCommand(cmd);
|
|
146
|
+
}
|
|
147
|
+
get [import_API.SET_VALUE]() {
|
|
148
|
+
return async function({ property, propertyKey }, value) {
|
|
149
|
+
if (property !== "setpoint") {
|
|
128
150
|
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
151
|
+
}
|
|
152
|
+
if (typeof propertyKey !== "number") {
|
|
153
|
+
throw new import_safe.ZWaveError(`${import_safe.CommandClasses[this.ccId]}: "${property}" must be further specified by a numeric property key`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
154
|
+
}
|
|
155
|
+
if (typeof value !== "number") {
|
|
156
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
157
|
+
}
|
|
158
|
+
const scaleValueId = HumidityControlSetpointCCValues.setpointScale(propertyKey).endpoint(this.endpoint.index);
|
|
159
|
+
const preferredScale = this.tryGetValueDB()?.getValue(scaleValueId);
|
|
160
|
+
const result = await this.set(propertyKey, value, preferredScale ?? 0);
|
|
161
|
+
if (this.isSinglecast() && !(0, import_safe.supervisedCommandSucceeded)(result)) {
|
|
162
|
+
this.schedulePoll({ property, propertyKey }, value);
|
|
163
|
+
}
|
|
164
|
+
return result;
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
get [import_API.POLL_VALUE]() {
|
|
168
|
+
return async function({ property, propertyKey }) {
|
|
169
|
+
switch (property) {
|
|
170
|
+
case "setpoint":
|
|
171
|
+
if (typeof propertyKey !== "number") {
|
|
172
|
+
throw new import_safe.ZWaveError(`${import_safe.CommandClasses[this.ccId]}: "${property}" must be further specified by a numeric property key`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
173
|
+
}
|
|
174
|
+
return (await this.get(propertyKey))?.value;
|
|
175
|
+
default:
|
|
176
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
async get(setpointType) {
|
|
181
|
+
__assertType("setpointType", "HumidityControlSetpointType", __assertType__number.bind(void 0, setpointType));
|
|
182
|
+
this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.Get);
|
|
183
|
+
const cc = new HumidityControlSetpointCCGet({
|
|
184
|
+
nodeId: this.endpoint.nodeId,
|
|
185
|
+
endpointIndex: this.endpoint.index,
|
|
186
|
+
setpointType
|
|
187
|
+
});
|
|
188
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
189
|
+
if (!response)
|
|
190
|
+
return;
|
|
191
|
+
return response.type === import_Types.HumidityControlSetpointType["N/A"] ? void 0 : {
|
|
192
|
+
value: response.value,
|
|
193
|
+
scale: response.scale
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
async set(setpointType, value, scale) {
|
|
197
|
+
__assertType("setpointType", "HumidityControlSetpointType", __assertType__number.bind(void 0, setpointType));
|
|
198
|
+
__assertType("value", "number", __assertType__number.bind(void 0, value));
|
|
199
|
+
__assertType("scale", "number", __assertType__number.bind(void 0, scale));
|
|
200
|
+
this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.Set);
|
|
201
|
+
const cc = new HumidityControlSetpointCCSet({
|
|
202
|
+
nodeId: this.endpoint.nodeId,
|
|
203
|
+
endpointIndex: this.endpoint.index,
|
|
204
|
+
setpointType,
|
|
205
|
+
value,
|
|
206
|
+
scale
|
|
207
|
+
});
|
|
208
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
209
|
+
}
|
|
210
|
+
async getCapabilities(setpointType) {
|
|
211
|
+
__assertType("setpointType", "HumidityControlSetpointType", __assertType__number.bind(void 0, setpointType));
|
|
212
|
+
this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.CapabilitiesGet);
|
|
213
|
+
const cc = new HumidityControlSetpointCCCapabilitiesGet({
|
|
214
|
+
nodeId: this.endpoint.nodeId,
|
|
215
|
+
endpointIndex: this.endpoint.index,
|
|
216
|
+
setpointType
|
|
217
|
+
});
|
|
218
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
219
|
+
if (response) {
|
|
220
|
+
return (0, import_safe3.pick)(response, [
|
|
221
|
+
"minValue",
|
|
222
|
+
"maxValue",
|
|
223
|
+
"minValueScale",
|
|
224
|
+
"maxValueScale"
|
|
225
|
+
]);
|
|
129
226
|
}
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
async get(setpointType) {
|
|
133
|
-
__assertType("setpointType", "HumidityControlSetpointType", __assertType__number.bind(void 0, setpointType));
|
|
134
|
-
this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.Get);
|
|
135
|
-
const cc = new HumidityControlSetpointCCGet({
|
|
136
|
-
nodeId: this.endpoint.nodeId,
|
|
137
|
-
endpointIndex: this.endpoint.index,
|
|
138
|
-
setpointType
|
|
139
|
-
});
|
|
140
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
141
|
-
if (!response)
|
|
142
|
-
return;
|
|
143
|
-
return response.type === import_Types.HumidityControlSetpointType["N/A"] ? void 0 : {
|
|
144
|
-
value: response.value,
|
|
145
|
-
scale: response.scale
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
async set(setpointType, value, scale) {
|
|
149
|
-
__assertType("setpointType", "HumidityControlSetpointType", __assertType__number.bind(void 0, setpointType));
|
|
150
|
-
__assertType("value", "number", __assertType__number.bind(void 0, value));
|
|
151
|
-
__assertType("scale", "number", __assertType__number.bind(void 0, scale));
|
|
152
|
-
this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.Set);
|
|
153
|
-
const cc = new HumidityControlSetpointCCSet({
|
|
154
|
-
nodeId: this.endpoint.nodeId,
|
|
155
|
-
endpointIndex: this.endpoint.index,
|
|
156
|
-
setpointType,
|
|
157
|
-
value,
|
|
158
|
-
scale
|
|
159
|
-
});
|
|
160
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
161
|
-
}
|
|
162
|
-
async getCapabilities(setpointType) {
|
|
163
|
-
__assertType("setpointType", "HumidityControlSetpointType", __assertType__number.bind(void 0, setpointType));
|
|
164
|
-
this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.CapabilitiesGet);
|
|
165
|
-
const cc = new HumidityControlSetpointCCCapabilitiesGet({
|
|
166
|
-
nodeId: this.endpoint.nodeId,
|
|
167
|
-
endpointIndex: this.endpoint.index,
|
|
168
|
-
setpointType
|
|
169
|
-
});
|
|
170
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
171
|
-
if (response) {
|
|
172
|
-
return (0, import_safe3.pick)(response, [
|
|
173
|
-
"minValue",
|
|
174
|
-
"maxValue",
|
|
175
|
-
"minValueScale",
|
|
176
|
-
"maxValueScale"
|
|
177
|
-
]);
|
|
178
227
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
return response?.supportedSetpointTypes;
|
|
188
|
-
}
|
|
189
|
-
async getSupportedScales(setpointType) {
|
|
190
|
-
__assertType("setpointType", "HumidityControlSetpointType", __assertType__number.bind(void 0, setpointType));
|
|
191
|
-
this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.SupportedGet);
|
|
192
|
-
const cc = new HumidityControlSetpointCCScaleSupportedGet({
|
|
193
|
-
nodeId: this.endpoint.nodeId,
|
|
194
|
-
endpointIndex: this.endpoint.index,
|
|
195
|
-
setpointType
|
|
196
|
-
});
|
|
197
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
198
|
-
if (response) {
|
|
199
|
-
return response.supportedScales.map((scale) => getScale(scale));
|
|
228
|
+
async getSupportedSetpointTypes() {
|
|
229
|
+
this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.SupportedGet);
|
|
230
|
+
const cc = new HumidityControlSetpointCCSupportedGet({
|
|
231
|
+
nodeId: this.endpoint.nodeId,
|
|
232
|
+
endpointIndex: this.endpoint.index
|
|
233
|
+
});
|
|
234
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
235
|
+
return response?.supportedSetpointTypes;
|
|
200
236
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
237
|
+
async getSupportedScales(setpointType) {
|
|
238
|
+
__assertType("setpointType", "HumidityControlSetpointType", __assertType__number.bind(void 0, setpointType));
|
|
239
|
+
this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.SupportedGet);
|
|
240
|
+
const cc = new HumidityControlSetpointCCScaleSupportedGet({
|
|
241
|
+
nodeId: this.endpoint.nodeId,
|
|
242
|
+
endpointIndex: this.endpoint.index,
|
|
243
|
+
setpointType
|
|
244
|
+
});
|
|
245
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
246
|
+
if (response) {
|
|
247
|
+
return response.supportedScales.map((scale) => getScale(scale));
|
|
248
|
+
}
|
|
212
249
|
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
250
|
+
};
|
|
251
|
+
return HumidityControlSetpointCCAPI2 = _classThis;
|
|
252
|
+
})();
|
|
253
|
+
let HumidityControlSetpointCC = (() => {
|
|
254
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Humidity Control Setpoint"]), (0, import_CommandClassDecorators.implementedVersion)(2), (0, import_CommandClassDecorators.ccValues)(HumidityControlSetpointCCValues)];
|
|
255
|
+
let _classDescriptor;
|
|
256
|
+
let _classExtraInitializers = [];
|
|
257
|
+
let _classThis;
|
|
258
|
+
let _classSuper = import_CommandClass.CommandClass;
|
|
259
|
+
var HumidityControlSetpointCC2 = class extends _classSuper {
|
|
260
|
+
static {
|
|
261
|
+
_classThis = this;
|
|
262
|
+
}
|
|
263
|
+
static {
|
|
264
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
265
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
266
|
+
HumidityControlSetpointCC2 = _classThis = _classDescriptor.value;
|
|
267
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
268
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
269
|
+
}
|
|
270
|
+
translatePropertyKey(ctx, property, propertyKey) {
|
|
271
|
+
if (property === "setpoint") {
|
|
272
|
+
return (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, propertyKey);
|
|
273
|
+
} else {
|
|
274
|
+
return super.translatePropertyKey(ctx, property, propertyKey);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
async interview(ctx) {
|
|
278
|
+
const node = this.getNode(ctx);
|
|
279
|
+
const endpoint = this.getEndpoint(ctx);
|
|
280
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Humidity Control Setpoint"], ctx, endpoint).withOptions({
|
|
281
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
239
282
|
});
|
|
240
|
-
} else {
|
|
241
283
|
ctx.logNode(node.id, {
|
|
242
284
|
endpoint: this.endpointIndex,
|
|
243
|
-
message:
|
|
244
|
-
|
|
285
|
+
message: `Interviewing ${this.ccName}...`,
|
|
286
|
+
direction: "none"
|
|
245
287
|
});
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
for (const type of setpointTypes) {
|
|
249
|
-
const setpointName = (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, type);
|
|
288
|
+
let setpointTypes = [];
|
|
250
289
|
ctx.logNode(node.id, {
|
|
251
290
|
endpoint: this.endpointIndex,
|
|
252
|
-
message:
|
|
291
|
+
message: "retrieving supported setpoint types...",
|
|
253
292
|
direction: "outbound"
|
|
254
293
|
});
|
|
255
|
-
const
|
|
256
|
-
if (
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
\xB7 ${t.key} ${t.unit} - ${t.label}`).join("")}`;
|
|
294
|
+
const resp = await api.getSupportedSetpointTypes();
|
|
295
|
+
if (resp) {
|
|
296
|
+
setpointTypes = [...resp];
|
|
297
|
+
const logMessage = "received supported setpoint types:\n" + setpointTypes.map((type) => (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, type)).map((name) => `\xB7 ${name}`).join("\n");
|
|
260
298
|
ctx.logNode(node.id, {
|
|
261
299
|
endpoint: this.endpointIndex,
|
|
262
300
|
message: logMessage,
|
|
263
301
|
direction: "inbound"
|
|
264
302
|
});
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
}
|
|
271
|
-
this.setMetadata(ctx, scaleValue, {
|
|
272
|
-
...scaleValue.meta,
|
|
273
|
-
states
|
|
303
|
+
} else {
|
|
304
|
+
ctx.logNode(node.id, {
|
|
305
|
+
endpoint: this.endpointIndex,
|
|
306
|
+
message: "Querying supported setpoint types timed out, skipping interview...",
|
|
307
|
+
level: "warn"
|
|
274
308
|
});
|
|
309
|
+
return;
|
|
275
310
|
}
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
const minValueUnit = getSetpointUnit(setpointCaps.minValueScale);
|
|
279
|
-
const maxValueUnit = getSetpointUnit(setpointCaps.maxValueScale);
|
|
280
|
-
const logMessage = `received capabilities for setpoint ${setpointName}:
|
|
281
|
-
minimum value: ${setpointCaps.minValue} ${minValueUnit}
|
|
282
|
-
maximum value: ${setpointCaps.maxValue} ${maxValueUnit}`;
|
|
311
|
+
for (const type of setpointTypes) {
|
|
312
|
+
const setpointName = (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, type);
|
|
283
313
|
ctx.logNode(node.id, {
|
|
284
314
|
endpoint: this.endpointIndex,
|
|
285
|
-
message:
|
|
286
|
-
direction: "
|
|
315
|
+
message: `retrieving capabilities for setpoint ${setpointName}...`,
|
|
316
|
+
direction: "outbound"
|
|
287
317
|
});
|
|
318
|
+
const setpointScaleSupported = await api.getSupportedScales(type);
|
|
319
|
+
if (setpointScaleSupported) {
|
|
320
|
+
const logMessage = `received supported scales for setpoint ${setpointName}:
|
|
321
|
+
${setpointScaleSupported.map((t) => `
|
|
322
|
+
\xB7 ${t.key} ${t.unit} - ${t.label}`).join("")}`;
|
|
323
|
+
ctx.logNode(node.id, {
|
|
324
|
+
endpoint: this.endpointIndex,
|
|
325
|
+
message: logMessage,
|
|
326
|
+
direction: "inbound"
|
|
327
|
+
});
|
|
328
|
+
const scaleValue = HumidityControlSetpointCCValues.setpointScale(type);
|
|
329
|
+
const states = {};
|
|
330
|
+
for (const scale of setpointScaleSupported) {
|
|
331
|
+
if (scale.unit)
|
|
332
|
+
states[scale.key] = scale.unit;
|
|
333
|
+
}
|
|
334
|
+
this.setMetadata(ctx, scaleValue, {
|
|
335
|
+
...scaleValue.meta,
|
|
336
|
+
states
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
const setpointCaps = await api.getCapabilities(type);
|
|
340
|
+
if (setpointCaps) {
|
|
341
|
+
const minValueUnit = getSetpointUnit(setpointCaps.minValueScale);
|
|
342
|
+
const maxValueUnit = getSetpointUnit(setpointCaps.maxValueScale);
|
|
343
|
+
const logMessage = `received capabilities for setpoint ${setpointName}:
|
|
344
|
+
minimum value: ${setpointCaps.minValue} ${minValueUnit}
|
|
345
|
+
maximum value: ${setpointCaps.maxValue} ${maxValueUnit}`;
|
|
346
|
+
ctx.logNode(node.id, {
|
|
347
|
+
endpoint: this.endpointIndex,
|
|
348
|
+
message: logMessage,
|
|
349
|
+
direction: "inbound"
|
|
350
|
+
});
|
|
351
|
+
}
|
|
288
352
|
}
|
|
353
|
+
await this.refreshValues(ctx);
|
|
354
|
+
this.setInterviewComplete(ctx, true);
|
|
289
355
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
const endpoint = this.getEndpoint(ctx);
|
|
296
|
-
const api = import_API.CCAPI.create(import_safe.CommandClasses["Humidity Control Setpoint"], ctx, endpoint).withOptions({
|
|
297
|
-
priority: import_safe.MessagePriority.NodeQuery
|
|
298
|
-
});
|
|
299
|
-
const setpointTypes = this.getValue(ctx, HumidityControlSetpointCCValues.supportedSetpointTypes) ?? [];
|
|
300
|
-
for (const type of setpointTypes) {
|
|
301
|
-
const setpointName = (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, type);
|
|
302
|
-
ctx.logNode(node.id, {
|
|
303
|
-
endpoint: this.endpointIndex,
|
|
304
|
-
message: `querying current value of setpoint ${setpointName}...`,
|
|
305
|
-
direction: "outbound"
|
|
356
|
+
async refreshValues(ctx) {
|
|
357
|
+
const node = this.getNode(ctx);
|
|
358
|
+
const endpoint = this.getEndpoint(ctx);
|
|
359
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Humidity Control Setpoint"], ctx, endpoint).withOptions({
|
|
360
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
306
361
|
});
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
const
|
|
362
|
+
const setpointTypes = this.getValue(ctx, HumidityControlSetpointCCValues.supportedSetpointTypes) ?? [];
|
|
363
|
+
for (const type of setpointTypes) {
|
|
364
|
+
const setpointName = (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, type);
|
|
310
365
|
ctx.logNode(node.id, {
|
|
311
366
|
endpoint: this.endpointIndex,
|
|
312
|
-
message:
|
|
313
|
-
direction: "
|
|
367
|
+
message: `querying current value of setpoint ${setpointName}...`,
|
|
368
|
+
direction: "outbound"
|
|
314
369
|
});
|
|
370
|
+
const setpoint = await api.get(type);
|
|
371
|
+
if (setpoint) {
|
|
372
|
+
const logMessage = `received current value of setpoint ${setpointName}: ${setpoint.value} ${getScale(setpoint.scale).unit ?? ""}`;
|
|
373
|
+
ctx.logNode(node.id, {
|
|
374
|
+
endpoint: this.endpointIndex,
|
|
375
|
+
message: logMessage,
|
|
376
|
+
direction: "inbound"
|
|
377
|
+
});
|
|
378
|
+
}
|
|
315
379
|
}
|
|
316
380
|
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
(0, import_CommandClassDecorators.
|
|
322
|
-
|
|
323
|
-
]
|
|
324
|
-
let
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
381
|
+
};
|
|
382
|
+
return HumidityControlSetpointCC2 = _classThis;
|
|
383
|
+
})();
|
|
384
|
+
let HumidityControlSetpointCCSet = (() => {
|
|
385
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.Set), (0, import_CommandClassDecorators.useSupervision)()];
|
|
386
|
+
let _classDescriptor;
|
|
387
|
+
let _classExtraInitializers = [];
|
|
388
|
+
let _classThis;
|
|
389
|
+
let _classSuper = HumidityControlSetpointCC;
|
|
390
|
+
var HumidityControlSetpointCCSet2 = class extends _classSuper {
|
|
391
|
+
static {
|
|
392
|
+
_classThis = this;
|
|
393
|
+
}
|
|
394
|
+
static {
|
|
395
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
396
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
397
|
+
HumidityControlSetpointCCSet2 = _classThis = _classDescriptor.value;
|
|
398
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
399
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
400
|
+
}
|
|
401
|
+
constructor(options) {
|
|
402
|
+
super(options);
|
|
403
|
+
this.setpointType = options.setpointType;
|
|
404
|
+
this.value = options.value;
|
|
405
|
+
this.scale = options.scale;
|
|
406
|
+
}
|
|
407
|
+
static from(_raw, _ctx) {
|
|
408
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
409
|
+
}
|
|
410
|
+
setpointType;
|
|
411
|
+
value;
|
|
412
|
+
scale;
|
|
413
|
+
serialize(ctx) {
|
|
414
|
+
this.payload = import_safe2.Bytes.concat([
|
|
415
|
+
import_safe2.Bytes.from([this.setpointType & 15]),
|
|
416
|
+
(0, import_safe.encodeFloatWithScale)(this.value, this.scale)
|
|
417
|
+
]);
|
|
418
|
+
return super.serialize(ctx);
|
|
419
|
+
}
|
|
420
|
+
toLogEntry(ctx) {
|
|
421
|
+
const scale = getScale(this.scale);
|
|
422
|
+
return {
|
|
423
|
+
...super.toLogEntry(ctx),
|
|
424
|
+
message: {
|
|
425
|
+
"setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.setpointType),
|
|
426
|
+
value: `${this.value} ${scale.unit}`
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
return HumidityControlSetpointCCSet2 = _classThis;
|
|
432
|
+
})();
|
|
433
|
+
let HumidityControlSetpointCCReport = (() => {
|
|
434
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.Report)];
|
|
435
|
+
let _classDescriptor;
|
|
436
|
+
let _classExtraInitializers = [];
|
|
437
|
+
let _classThis;
|
|
438
|
+
let _classSuper = HumidityControlSetpointCC;
|
|
439
|
+
var HumidityControlSetpointCCReport2 = class extends _classSuper {
|
|
440
|
+
static {
|
|
441
|
+
_classThis = this;
|
|
442
|
+
}
|
|
443
|
+
static {
|
|
444
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
445
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
446
|
+
HumidityControlSetpointCCReport2 = _classThis = _classDescriptor.value;
|
|
447
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
448
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
449
|
+
}
|
|
450
|
+
constructor(options) {
|
|
451
|
+
super(options);
|
|
452
|
+
this.type = options.type;
|
|
453
|
+
this.value = options.value;
|
|
454
|
+
this.scale = options.scale;
|
|
455
|
+
}
|
|
456
|
+
static from(raw, ctx) {
|
|
457
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
458
|
+
const type = raw.payload[0] & 15;
|
|
459
|
+
if (type === 0) {
|
|
460
|
+
return new this({
|
|
461
|
+
nodeId: ctx.sourceNodeId,
|
|
462
|
+
type,
|
|
463
|
+
value: 0,
|
|
464
|
+
scale: 0
|
|
465
|
+
});
|
|
351
466
|
}
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
};
|
|
355
|
-
HumidityControlSetpointCCSet = __decorate([
|
|
356
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.Set),
|
|
357
|
-
(0, import_CommandClassDecorators.useSupervision)()
|
|
358
|
-
], HumidityControlSetpointCCSet);
|
|
359
|
-
let HumidityControlSetpointCCReport = HumidityControlSetpointCCReport_1 = class HumidityControlSetpointCCReport2 extends HumidityControlSetpointCC {
|
|
360
|
-
constructor(options) {
|
|
361
|
-
super(options);
|
|
362
|
-
this.type = options.type;
|
|
363
|
-
this.value = options.value;
|
|
364
|
-
this.scale = options.scale;
|
|
365
|
-
}
|
|
366
|
-
static from(raw, ctx) {
|
|
367
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
368
|
-
const type = raw.payload[0] & 15;
|
|
369
|
-
if (type === 0) {
|
|
370
|
-
return new HumidityControlSetpointCCReport_1({
|
|
467
|
+
const { value, scale } = (0, import_safe.parseFloatWithScale)(raw.payload.subarray(1));
|
|
468
|
+
return new this({
|
|
371
469
|
nodeId: ctx.sourceNodeId,
|
|
372
470
|
type,
|
|
373
|
-
value
|
|
374
|
-
scale
|
|
471
|
+
value,
|
|
472
|
+
scale
|
|
375
473
|
});
|
|
376
474
|
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
const scale = getScale(this.scale);
|
|
389
|
-
const setpointValue = HumidityControlSetpointCCValues.setpoint(this.type);
|
|
390
|
-
const existingMetadata = this.getMetadata(ctx, setpointValue);
|
|
391
|
-
if (existingMetadata?.unit !== scale.unit) {
|
|
392
|
-
this.setMetadata(ctx, setpointValue, {
|
|
393
|
-
...existingMetadata ?? setpointValue.meta,
|
|
394
|
-
unit: scale.unit
|
|
395
|
-
});
|
|
396
|
-
}
|
|
397
|
-
this.setValue(ctx, setpointValue, this.value);
|
|
398
|
-
this.setValue(ctx, HumidityControlSetpointCCValues.setpointScale(this.type), this.scale);
|
|
399
|
-
return true;
|
|
400
|
-
}
|
|
401
|
-
type;
|
|
402
|
-
scale;
|
|
403
|
-
value;
|
|
404
|
-
toLogEntry(ctx) {
|
|
405
|
-
const scale = getScale(this.scale);
|
|
406
|
-
return {
|
|
407
|
-
...super.toLogEntry(ctx),
|
|
408
|
-
message: {
|
|
409
|
-
"setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.type),
|
|
410
|
-
value: `${this.value} ${scale.unit}`
|
|
475
|
+
persistValues(ctx) {
|
|
476
|
+
if (!super.persistValues(ctx))
|
|
477
|
+
return false;
|
|
478
|
+
const scale = getScale(this.scale);
|
|
479
|
+
const setpointValue = HumidityControlSetpointCCValues.setpoint(this.type);
|
|
480
|
+
const existingMetadata = this.getMetadata(ctx, setpointValue);
|
|
481
|
+
if (existingMetadata?.unit !== scale.unit) {
|
|
482
|
+
this.setMetadata(ctx, setpointValue, {
|
|
483
|
+
...existingMetadata ?? setpointValue.meta,
|
|
484
|
+
unit: scale.unit
|
|
485
|
+
});
|
|
411
486
|
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
487
|
+
this.setValue(ctx, setpointValue, this.value);
|
|
488
|
+
this.setValue(ctx, HumidityControlSetpointCCValues.setpointScale(this.type), this.scale);
|
|
489
|
+
return true;
|
|
490
|
+
}
|
|
491
|
+
type;
|
|
492
|
+
scale;
|
|
493
|
+
value;
|
|
494
|
+
toLogEntry(ctx) {
|
|
495
|
+
const scale = getScale(this.scale);
|
|
496
|
+
return {
|
|
497
|
+
...super.toLogEntry(ctx),
|
|
498
|
+
message: {
|
|
499
|
+
"setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.type),
|
|
500
|
+
value: `${this.value} ${scale.unit}`
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
};
|
|
505
|
+
return HumidityControlSetpointCCReport2 = _classThis;
|
|
506
|
+
})();
|
|
418
507
|
function testResponseForHumidityControlSetpointGet(sent, received) {
|
|
419
508
|
return received.type === sent.setpointType;
|
|
420
509
|
}
|
|
421
|
-
let HumidityControlSetpointCCGet =
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
510
|
+
let HumidityControlSetpointCCGet = (() => {
|
|
511
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.Get), (0, import_CommandClassDecorators.expectedCCResponse)(HumidityControlSetpointCCReport, testResponseForHumidityControlSetpointGet)];
|
|
512
|
+
let _classDescriptor;
|
|
513
|
+
let _classExtraInitializers = [];
|
|
514
|
+
let _classThis;
|
|
515
|
+
let _classSuper = HumidityControlSetpointCC;
|
|
516
|
+
var HumidityControlSetpointCCGet2 = class extends _classSuper {
|
|
517
|
+
static {
|
|
518
|
+
_classThis = this;
|
|
519
|
+
}
|
|
520
|
+
static {
|
|
521
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
522
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
523
|
+
HumidityControlSetpointCCGet2 = _classThis = _classDescriptor.value;
|
|
524
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
525
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
526
|
+
}
|
|
527
|
+
constructor(options) {
|
|
528
|
+
super(options);
|
|
529
|
+
this.setpointType = options.setpointType;
|
|
530
|
+
}
|
|
531
|
+
static from(_raw, _ctx) {
|
|
532
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
533
|
+
}
|
|
534
|
+
setpointType;
|
|
535
|
+
serialize(ctx) {
|
|
536
|
+
this.payload = import_safe2.Bytes.from([this.setpointType & 15]);
|
|
537
|
+
return super.serialize(ctx);
|
|
538
|
+
}
|
|
539
|
+
toLogEntry(ctx) {
|
|
540
|
+
return {
|
|
541
|
+
...super.toLogEntry(ctx),
|
|
542
|
+
message: {
|
|
543
|
+
"setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.setpointType)
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
return HumidityControlSetpointCCGet2 = _classThis;
|
|
549
|
+
})();
|
|
550
|
+
let HumidityControlSetpointCCSupportedReport = (() => {
|
|
551
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.SupportedReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedSetpointTypes", HumidityControlSetpointCCValues.supportedSetpointTypes)];
|
|
552
|
+
let _classDescriptor;
|
|
553
|
+
let _classExtraInitializers = [];
|
|
554
|
+
let _classThis;
|
|
555
|
+
let _classSuper = HumidityControlSetpointCC;
|
|
556
|
+
var HumidityControlSetpointCCSupportedReport2 = class extends _classSuper {
|
|
557
|
+
static {
|
|
558
|
+
_classThis = this;
|
|
559
|
+
}
|
|
560
|
+
static {
|
|
561
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
562
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
563
|
+
HumidityControlSetpointCCSupportedReport2 = _classThis = _classDescriptor.value;
|
|
564
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
565
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
566
|
+
}
|
|
567
|
+
constructor(options) {
|
|
568
|
+
super(options);
|
|
569
|
+
this.supportedSetpointTypes = options.supportedSetpointTypes;
|
|
570
|
+
}
|
|
571
|
+
static from(raw, ctx) {
|
|
572
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
573
|
+
const supportedSetpointTypes = (0, import_safe.parseBitMask)(raw.payload, import_Types.HumidityControlSetpointType["N/A"]);
|
|
574
|
+
return new this({
|
|
575
|
+
nodeId: ctx.sourceNodeId,
|
|
576
|
+
supportedSetpointTypes
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
supportedSetpointTypes;
|
|
580
|
+
toLogEntry(ctx) {
|
|
581
|
+
return {
|
|
582
|
+
...super.toLogEntry(ctx),
|
|
583
|
+
message: {
|
|
584
|
+
"supported setpoint types": this.supportedSetpointTypes.map((t) => `
|
|
466
585
|
\xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, t)}`).join("")
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
};
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
]
|
|
477
|
-
let
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
};
|
|
590
|
+
return HumidityControlSetpointCCSupportedReport2 = _classThis;
|
|
591
|
+
})();
|
|
592
|
+
let HumidityControlSetpointCCSupportedGet = (() => {
|
|
593
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.SupportedGet), (0, import_CommandClassDecorators.expectedCCResponse)(HumidityControlSetpointCCSupportedReport)];
|
|
594
|
+
let _classDescriptor;
|
|
595
|
+
let _classExtraInitializers = [];
|
|
596
|
+
let _classThis;
|
|
597
|
+
let _classSuper = HumidityControlSetpointCC;
|
|
598
|
+
var HumidityControlSetpointCCSupportedGet2 = class extends _classSuper {
|
|
599
|
+
static {
|
|
600
|
+
_classThis = this;
|
|
601
|
+
}
|
|
602
|
+
static {
|
|
603
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
604
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
605
|
+
HumidityControlSetpointCCSupportedGet2 = _classThis = _classDescriptor.value;
|
|
606
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
607
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
608
|
+
}
|
|
609
|
+
};
|
|
610
|
+
return HumidityControlSetpointCCSupportedGet2 = _classThis;
|
|
611
|
+
})();
|
|
612
|
+
let HumidityControlSetpointCCScaleSupportedReport = (() => {
|
|
613
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.ScaleSupportedReport)];
|
|
614
|
+
let _classDescriptor;
|
|
615
|
+
let _classExtraInitializers = [];
|
|
616
|
+
let _classThis;
|
|
617
|
+
let _classSuper = HumidityControlSetpointCC;
|
|
618
|
+
var HumidityControlSetpointCCScaleSupportedReport2 = class extends _classSuper {
|
|
619
|
+
static {
|
|
620
|
+
_classThis = this;
|
|
621
|
+
}
|
|
622
|
+
static {
|
|
623
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
624
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
625
|
+
HumidityControlSetpointCCScaleSupportedReport2 = _classThis = _classDescriptor.value;
|
|
626
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
627
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
628
|
+
}
|
|
629
|
+
constructor(options) {
|
|
630
|
+
super(options);
|
|
631
|
+
this.supportedScales = options.supportedScales;
|
|
632
|
+
}
|
|
633
|
+
static from(raw, ctx) {
|
|
634
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
635
|
+
const supportedScales = (0, import_safe.parseBitMask)(import_safe2.Bytes.from([raw.payload[0] & 15]), 0);
|
|
636
|
+
return new this({
|
|
637
|
+
nodeId: ctx.sourceNodeId,
|
|
638
|
+
supportedScales
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
supportedScales;
|
|
642
|
+
toLogEntry(ctx) {
|
|
643
|
+
const supportedScales = this.supportedScales.map((scale) => getScale(scale));
|
|
644
|
+
return {
|
|
645
|
+
...super.toLogEntry(ctx),
|
|
646
|
+
message: {
|
|
647
|
+
"scale supported": supportedScales.map((t) => `
|
|
503
648
|
\xB7 ${t.key} ${t.unit} - ${t.label}`).join("")
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
};
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
let
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
};
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
]
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
649
|
+
}
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
};
|
|
653
|
+
return HumidityControlSetpointCCScaleSupportedReport2 = _classThis;
|
|
654
|
+
})();
|
|
655
|
+
let HumidityControlSetpointCCScaleSupportedGet = (() => {
|
|
656
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.ScaleSupportedGet), (0, import_CommandClassDecorators.expectedCCResponse)(HumidityControlSetpointCCScaleSupportedReport)];
|
|
657
|
+
let _classDescriptor;
|
|
658
|
+
let _classExtraInitializers = [];
|
|
659
|
+
let _classThis;
|
|
660
|
+
let _classSuper = HumidityControlSetpointCC;
|
|
661
|
+
var HumidityControlSetpointCCScaleSupportedGet2 = class extends _classSuper {
|
|
662
|
+
static {
|
|
663
|
+
_classThis = this;
|
|
664
|
+
}
|
|
665
|
+
static {
|
|
666
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
667
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
668
|
+
HumidityControlSetpointCCScaleSupportedGet2 = _classThis = _classDescriptor.value;
|
|
669
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
670
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
671
|
+
}
|
|
672
|
+
constructor(options) {
|
|
673
|
+
super(options);
|
|
674
|
+
this.setpointType = options.setpointType;
|
|
675
|
+
}
|
|
676
|
+
static from(_raw, _ctx) {
|
|
677
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
678
|
+
}
|
|
679
|
+
setpointType;
|
|
680
|
+
serialize(ctx) {
|
|
681
|
+
this.payload = import_safe2.Bytes.from([this.setpointType & 15]);
|
|
682
|
+
return super.serialize(ctx);
|
|
683
|
+
}
|
|
684
|
+
toLogEntry(ctx) {
|
|
685
|
+
return {
|
|
686
|
+
...super.toLogEntry(ctx),
|
|
687
|
+
message: {
|
|
688
|
+
"setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.setpointType)
|
|
689
|
+
}
|
|
690
|
+
};
|
|
691
|
+
}
|
|
692
|
+
};
|
|
693
|
+
return HumidityControlSetpointCCScaleSupportedGet2 = _classThis;
|
|
694
|
+
})();
|
|
695
|
+
let HumidityControlSetpointCCCapabilitiesReport = (() => {
|
|
696
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.CapabilitiesReport)];
|
|
697
|
+
let _classDescriptor;
|
|
698
|
+
let _classExtraInitializers = [];
|
|
699
|
+
let _classThis;
|
|
700
|
+
let _classSuper = HumidityControlSetpointCC;
|
|
701
|
+
var HumidityControlSetpointCCCapabilitiesReport2 = class extends _classSuper {
|
|
702
|
+
static {
|
|
703
|
+
_classThis = this;
|
|
704
|
+
}
|
|
705
|
+
static {
|
|
706
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
707
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
708
|
+
HumidityControlSetpointCCCapabilitiesReport2 = _classThis = _classDescriptor.value;
|
|
709
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
710
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
711
|
+
}
|
|
712
|
+
constructor(options) {
|
|
713
|
+
super(options);
|
|
714
|
+
this.type = options.type;
|
|
715
|
+
this.minValue = options.minValue;
|
|
716
|
+
this.maxValue = options.maxValue;
|
|
717
|
+
this.minValueScale = options.minValueScale;
|
|
718
|
+
this.maxValueScale = options.maxValueScale;
|
|
719
|
+
}
|
|
720
|
+
static from(raw, ctx) {
|
|
721
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
722
|
+
const type = raw.payload[0] & 15;
|
|
723
|
+
const { value: minValue, scale: minValueScale, bytesRead } = (0, import_safe.parseFloatWithScale)(raw.payload.subarray(1));
|
|
724
|
+
const { value: maxValue, scale: maxValueScale } = (0, import_safe.parseFloatWithScale)(raw.payload.subarray(1 + bytesRead));
|
|
725
|
+
return new this({
|
|
726
|
+
nodeId: ctx.sourceNodeId,
|
|
727
|
+
type,
|
|
728
|
+
minValue,
|
|
729
|
+
minValueScale,
|
|
730
|
+
maxValue,
|
|
731
|
+
maxValueScale
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
persistValues(ctx) {
|
|
735
|
+
if (!super.persistValues(ctx))
|
|
736
|
+
return false;
|
|
737
|
+
const setpointValue = HumidityControlSetpointCCValues.setpoint(this.type);
|
|
738
|
+
this.setMetadata(ctx, setpointValue, {
|
|
739
|
+
...setpointValue.meta,
|
|
740
|
+
min: this.minValue,
|
|
741
|
+
max: this.maxValue,
|
|
742
|
+
unit: getSetpointUnit(this.minValueScale) || getSetpointUnit(this.maxValueScale)
|
|
743
|
+
});
|
|
744
|
+
return true;
|
|
745
|
+
}
|
|
746
|
+
type;
|
|
747
|
+
minValue;
|
|
748
|
+
maxValue;
|
|
749
|
+
minValueScale;
|
|
750
|
+
maxValueScale;
|
|
751
|
+
toLogEntry(ctx) {
|
|
752
|
+
const minValueScale = getScale(this.minValueScale);
|
|
753
|
+
const maxValueScale = getScale(this.maxValueScale);
|
|
754
|
+
return {
|
|
755
|
+
...super.toLogEntry(ctx),
|
|
756
|
+
message: {
|
|
757
|
+
"setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.type),
|
|
758
|
+
"min value": `${this.minValue} ${minValueScale.unit}`,
|
|
759
|
+
"max value": `${this.maxValue} ${maxValueScale.unit}`
|
|
760
|
+
}
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
};
|
|
764
|
+
return HumidityControlSetpointCCCapabilitiesReport2 = _classThis;
|
|
765
|
+
})();
|
|
766
|
+
let HumidityControlSetpointCCCapabilitiesGet = (() => {
|
|
767
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.CapabilitiesGet), (0, import_CommandClassDecorators.expectedCCResponse)(HumidityControlSetpointCCCapabilitiesReport)];
|
|
768
|
+
let _classDescriptor;
|
|
769
|
+
let _classExtraInitializers = [];
|
|
770
|
+
let _classThis;
|
|
771
|
+
let _classSuper = HumidityControlSetpointCC;
|
|
772
|
+
var HumidityControlSetpointCCCapabilitiesGet2 = class extends _classSuper {
|
|
773
|
+
static {
|
|
774
|
+
_classThis = this;
|
|
775
|
+
}
|
|
776
|
+
static {
|
|
777
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
778
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
779
|
+
HumidityControlSetpointCCCapabilitiesGet2 = _classThis = _classDescriptor.value;
|
|
780
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
781
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
782
|
+
}
|
|
783
|
+
constructor(options) {
|
|
784
|
+
super(options);
|
|
785
|
+
this.setpointType = options.setpointType;
|
|
786
|
+
}
|
|
787
|
+
static from(_raw, _ctx) {
|
|
788
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
789
|
+
}
|
|
790
|
+
setpointType;
|
|
791
|
+
serialize(ctx) {
|
|
792
|
+
this.payload = import_safe2.Bytes.from([this.setpointType & 15]);
|
|
793
|
+
return super.serialize(ctx);
|
|
794
|
+
}
|
|
795
|
+
toLogEntry(ctx) {
|
|
796
|
+
return {
|
|
797
|
+
...super.toLogEntry(ctx),
|
|
798
|
+
message: {
|
|
799
|
+
"setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.setpointType)
|
|
800
|
+
}
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
};
|
|
804
|
+
return HumidityControlSetpointCCCapabilitiesGet2 = _classThis;
|
|
805
|
+
})();
|
|
619
806
|
// Annotate the CommonJS export names for ESM import in node:
|
|
620
807
|
0 && (module.exports = {
|
|
621
808
|
HumidityControlSetpointCC,
|