@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
|
@@ -38,13 +38,45 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
38
38
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
39
39
|
var import_Values = require("../lib/Values.js");
|
|
40
40
|
var import_Types = require("../lib/_Types.js");
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
42
|
+
function accept(f) {
|
|
43
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
44
|
+
return f;
|
|
45
|
+
}
|
|
46
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
47
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
48
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
49
|
+
var _, done = false;
|
|
50
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
51
|
+
var context = {};
|
|
52
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
53
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
54
|
+
context.addInitializer = function(f) {
|
|
55
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
56
|
+
extraInitializers.push(accept(f || null));
|
|
57
|
+
};
|
|
58
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
59
|
+
if (kind === "accessor") {
|
|
60
|
+
if (result === void 0) continue;
|
|
61
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
62
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
63
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
64
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
65
|
+
} else if (_ = accept(result)) {
|
|
66
|
+
if (kind === "field") initializers.unshift(_);
|
|
67
|
+
else descriptor[key] = _;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
71
|
+
done = true;
|
|
72
|
+
};
|
|
73
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
74
|
+
var useValue = arguments.length > 2;
|
|
75
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
76
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
77
|
+
}
|
|
78
|
+
return useValue ? value : void 0;
|
|
46
79
|
};
|
|
47
|
-
var ThermostatSetpointCCSet_1, ThermostatSetpointCCReport_1, ThermostatSetpointCCGet_1, ThermostatSetpointCCCapabilitiesReport_1, ThermostatSetpointCCCapabilitiesGet_1, ThermostatSetpointCCSupportedReport_1;
|
|
48
80
|
function __assertType(argName, typeName, boundHasError) {
|
|
49
81
|
const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
|
|
50
82
|
if (boundHasError()) {
|
|
@@ -93,202 +125,261 @@ const ThermostatSetpointCCValues = Object.freeze({
|
|
|
93
125
|
...import_Values.V.dynamicPropertyAndKeyWithName("setpointScale", "setpointScale", (setpointType) => setpointType, ({ property, propertyKey }) => property === "setpointScale" && typeof propertyKey === "number", void 0, { internal: true })
|
|
94
126
|
})
|
|
95
127
|
});
|
|
96
|
-
let ThermostatSetpointCCAPI =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
if (this.isSinglecast() && !(0, import_safe.supervisedCommandSucceeded)(result)) {
|
|
124
|
-
this.schedulePoll({ property, propertyKey }, value);
|
|
128
|
+
let ThermostatSetpointCCAPI = (() => {
|
|
129
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Thermostat Setpoint"])];
|
|
130
|
+
let _classDescriptor;
|
|
131
|
+
let _classExtraInitializers = [];
|
|
132
|
+
let _classThis;
|
|
133
|
+
let _classSuper = import_API.CCAPI;
|
|
134
|
+
var ThermostatSetpointCCAPI2 = class extends _classSuper {
|
|
135
|
+
static {
|
|
136
|
+
_classThis = this;
|
|
137
|
+
}
|
|
138
|
+
static {
|
|
139
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
140
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
141
|
+
ThermostatSetpointCCAPI2 = _classThis = _classDescriptor.value;
|
|
142
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
143
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
144
|
+
}
|
|
145
|
+
supportsCommand(cmd) {
|
|
146
|
+
switch (cmd) {
|
|
147
|
+
case import_Types.ThermostatSetpointCommand.Get:
|
|
148
|
+
case import_Types.ThermostatSetpointCommand.SupportedGet:
|
|
149
|
+
return this.isSinglecast();
|
|
150
|
+
case import_Types.ThermostatSetpointCommand.Set:
|
|
151
|
+
return true;
|
|
152
|
+
// This is mandatory
|
|
153
|
+
case import_Types.ThermostatSetpointCommand.CapabilitiesGet:
|
|
154
|
+
return this.version >= 3 && this.isSinglecast();
|
|
125
155
|
}
|
|
126
|
-
return
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
switch (property) {
|
|
132
|
-
case "setpoint":
|
|
133
|
-
if (typeof propertyKey !== "number") {
|
|
134
|
-
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);
|
|
135
|
-
}
|
|
136
|
-
return (await this.get(propertyKey))?.value;
|
|
137
|
-
default:
|
|
156
|
+
return super.supportsCommand(cmd);
|
|
157
|
+
}
|
|
158
|
+
get [import_API.SET_VALUE]() {
|
|
159
|
+
return async function({ property, propertyKey }, value) {
|
|
160
|
+
if (property !== "setpoint") {
|
|
138
161
|
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
162
|
+
}
|
|
163
|
+
if (typeof propertyKey !== "number") {
|
|
164
|
+
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);
|
|
165
|
+
}
|
|
166
|
+
if (typeof value !== "number") {
|
|
167
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
168
|
+
}
|
|
169
|
+
const preferredScale = this.tryGetValueDB()?.getValue(ThermostatSetpointCCValues.setpointScale(propertyKey).endpoint(this.endpoint.index));
|
|
170
|
+
const result = await this.set(propertyKey, value, preferredScale ?? 0);
|
|
171
|
+
if (this.isSinglecast() && !(0, import_safe.supervisedCommandSucceeded)(result)) {
|
|
172
|
+
this.schedulePoll({ property, propertyKey }, value);
|
|
173
|
+
}
|
|
174
|
+
return result;
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
get [import_API.POLL_VALUE]() {
|
|
178
|
+
return async function({ property, propertyKey }) {
|
|
179
|
+
switch (property) {
|
|
180
|
+
case "setpoint":
|
|
181
|
+
if (typeof propertyKey !== "number") {
|
|
182
|
+
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);
|
|
183
|
+
}
|
|
184
|
+
return (await this.get(propertyKey))?.value;
|
|
185
|
+
default:
|
|
186
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
async get(setpointType) {
|
|
191
|
+
__assertType("setpointType", "ThermostatSetpointType", __assertType__number.bind(void 0, setpointType));
|
|
192
|
+
this.assertSupportsCommand(import_Types.ThermostatSetpointCommand, import_Types.ThermostatSetpointCommand.Get);
|
|
193
|
+
const cc = new ThermostatSetpointCCGet({
|
|
194
|
+
nodeId: this.endpoint.nodeId,
|
|
195
|
+
endpointIndex: this.endpoint.index,
|
|
196
|
+
setpointType
|
|
197
|
+
});
|
|
198
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
199
|
+
if (!response)
|
|
200
|
+
return;
|
|
201
|
+
if (response.type !== import_Types.ThermostatSetpointType["N/A"]) {
|
|
202
|
+
const scale = getScale(response.scale);
|
|
203
|
+
return {
|
|
204
|
+
value: response.value,
|
|
205
|
+
scale
|
|
206
|
+
};
|
|
139
207
|
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
if (!response)
|
|
152
|
-
return;
|
|
153
|
-
if (response.type !== import_Types.ThermostatSetpointType["N/A"]) {
|
|
154
|
-
const scale = getScale(response.scale);
|
|
155
|
-
return {
|
|
156
|
-
value: response.value,
|
|
208
|
+
}
|
|
209
|
+
async set(setpointType, value, scale) {
|
|
210
|
+
__assertType("setpointType", "ThermostatSetpointType", __assertType__number.bind(void 0, setpointType));
|
|
211
|
+
__assertType("value", "number", __assertType__number.bind(void 0, value));
|
|
212
|
+
__assertType("scale", "number", __assertType__number.bind(void 0, scale));
|
|
213
|
+
this.assertSupportsCommand(import_Types.ThermostatSetpointCommand, import_Types.ThermostatSetpointCommand.Set);
|
|
214
|
+
const cc = new ThermostatSetpointCCSet({
|
|
215
|
+
nodeId: this.endpoint.nodeId,
|
|
216
|
+
endpointIndex: this.endpoint.index,
|
|
217
|
+
setpointType,
|
|
218
|
+
value,
|
|
157
219
|
scale
|
|
158
|
-
};
|
|
220
|
+
});
|
|
221
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
159
222
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
this.assertSupportsCommand(import_Types.ThermostatSetpointCommand, import_Types.ThermostatSetpointCommand.CapabilitiesGet);
|
|
178
|
-
const cc = new ThermostatSetpointCCCapabilitiesGet({
|
|
179
|
-
nodeId: this.endpoint.nodeId,
|
|
180
|
-
endpointIndex: this.endpoint.index,
|
|
181
|
-
setpointType
|
|
182
|
-
});
|
|
183
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
184
|
-
if (response) {
|
|
185
|
-
return (0, import_safe3.pick)(response, [
|
|
186
|
-
"minValue",
|
|
187
|
-
"maxValue",
|
|
188
|
-
"minValueScale",
|
|
189
|
-
"maxValueScale"
|
|
190
|
-
]);
|
|
223
|
+
async getCapabilities(setpointType) {
|
|
224
|
+
__assertType("setpointType", "ThermostatSetpointType", __assertType__number.bind(void 0, setpointType));
|
|
225
|
+
this.assertSupportsCommand(import_Types.ThermostatSetpointCommand, import_Types.ThermostatSetpointCommand.CapabilitiesGet);
|
|
226
|
+
const cc = new ThermostatSetpointCCCapabilitiesGet({
|
|
227
|
+
nodeId: this.endpoint.nodeId,
|
|
228
|
+
endpointIndex: this.endpoint.index,
|
|
229
|
+
setpointType
|
|
230
|
+
});
|
|
231
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
232
|
+
if (response) {
|
|
233
|
+
return (0, import_safe3.pick)(response, [
|
|
234
|
+
"minValue",
|
|
235
|
+
"maxValue",
|
|
236
|
+
"minValueScale",
|
|
237
|
+
"maxValueScale"
|
|
238
|
+
]);
|
|
239
|
+
}
|
|
191
240
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
return response?.supportedSetpointTypes;
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
ThermostatSetpointCCAPI = __decorate([
|
|
209
|
-
(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Thermostat Setpoint"])
|
|
210
|
-
], ThermostatSetpointCCAPI);
|
|
211
|
-
let ThermostatSetpointCC = class ThermostatSetpointCC2 extends import_CommandClass.CommandClass {
|
|
212
|
-
translatePropertyKey(ctx, property, propertyKey) {
|
|
213
|
-
if (property === "setpoint") {
|
|
214
|
-
return (0, import_safe3.getEnumMemberName)(import_Types.ThermostatSetpointType, propertyKey);
|
|
215
|
-
} else {
|
|
216
|
-
return super.translatePropertyKey(ctx, property, propertyKey);
|
|
241
|
+
/**
|
|
242
|
+
* Requests the supported setpoint types from the node. Due to inconsistencies it is NOT recommended
|
|
243
|
+
* to use this method on nodes with CC versions 1 and 2. Instead rely on the information determined
|
|
244
|
+
* during node interview.
|
|
245
|
+
*/
|
|
246
|
+
async getSupportedSetpointTypes() {
|
|
247
|
+
this.assertSupportsCommand(import_Types.ThermostatSetpointCommand, import_Types.ThermostatSetpointCommand.SupportedGet);
|
|
248
|
+
const cc = new ThermostatSetpointCCSupportedGet({
|
|
249
|
+
nodeId: this.endpoint.nodeId,
|
|
250
|
+
endpointIndex: this.endpoint.index
|
|
251
|
+
});
|
|
252
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
253
|
+
return response?.supportedSetpointTypes;
|
|
217
254
|
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
logMessage = `received current value of setpoint ${setpointName}: ${setpoint.value} ${setpoint.scale.unit ?? ""}`;
|
|
244
|
-
} else {
|
|
245
|
-
logMessage = `setpoint ${setpointName} is not supported`;
|
|
246
|
-
}
|
|
247
|
-
ctx.logNode(node.id, {
|
|
248
|
-
endpoint: this.endpointIndex,
|
|
249
|
-
message: logMessage,
|
|
250
|
-
direction: "inbound"
|
|
251
|
-
});
|
|
255
|
+
};
|
|
256
|
+
return ThermostatSetpointCCAPI2 = _classThis;
|
|
257
|
+
})();
|
|
258
|
+
let ThermostatSetpointCC = (() => {
|
|
259
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Thermostat Setpoint"]), (0, import_CommandClassDecorators.implementedVersion)(3), (0, import_CommandClassDecorators.ccValues)(ThermostatSetpointCCValues)];
|
|
260
|
+
let _classDescriptor;
|
|
261
|
+
let _classExtraInitializers = [];
|
|
262
|
+
let _classThis;
|
|
263
|
+
let _classSuper = import_CommandClass.CommandClass;
|
|
264
|
+
var ThermostatSetpointCC2 = class extends _classSuper {
|
|
265
|
+
static {
|
|
266
|
+
_classThis = this;
|
|
267
|
+
}
|
|
268
|
+
static {
|
|
269
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
270
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
271
|
+
ThermostatSetpointCC2 = _classThis = _classDescriptor.value;
|
|
272
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
273
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
274
|
+
}
|
|
275
|
+
translatePropertyKey(ctx, property, propertyKey) {
|
|
276
|
+
if (property === "setpoint") {
|
|
277
|
+
return (0, import_safe3.getEnumMemberName)(import_Types.ThermostatSetpointType, propertyKey);
|
|
278
|
+
} else {
|
|
279
|
+
return super.translatePropertyKey(ctx, property, propertyKey);
|
|
252
280
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
281
|
+
}
|
|
282
|
+
async interview(ctx) {
|
|
283
|
+
const node = this.getNode(ctx);
|
|
284
|
+
const endpoint = this.getEndpoint(ctx);
|
|
285
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Thermostat Setpoint"], ctx, endpoint).withOptions({
|
|
286
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
287
|
+
});
|
|
256
288
|
ctx.logNode(node.id, {
|
|
257
289
|
endpoint: this.endpointIndex,
|
|
258
|
-
message:
|
|
259
|
-
direction: "
|
|
290
|
+
message: `Interviewing ${this.ccName}...`,
|
|
291
|
+
direction: "none"
|
|
260
292
|
});
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
293
|
+
if (api.version <= 2) {
|
|
294
|
+
const supportedSetpointTypes = [];
|
|
295
|
+
for (let type = import_Types.ThermostatSetpointType.Heating; type <= import_Types.ThermostatSetpointType["Full Power"]; type++) {
|
|
296
|
+
const setpointName = (0, import_safe3.getEnumMemberName)(import_Types.ThermostatSetpointType, type);
|
|
297
|
+
ctx.logNode(node.id, {
|
|
298
|
+
endpoint: this.endpointIndex,
|
|
299
|
+
message: `querying current value of setpoint ${setpointName}...`,
|
|
300
|
+
direction: "outbound"
|
|
301
|
+
});
|
|
302
|
+
const setpoint = await api.get(type);
|
|
303
|
+
let logMessage;
|
|
304
|
+
if (setpoint) {
|
|
305
|
+
supportedSetpointTypes.push(type);
|
|
306
|
+
logMessage = `received current value of setpoint ${setpointName}: ${setpoint.value} ${setpoint.scale.unit ?? ""}`;
|
|
307
|
+
} else {
|
|
308
|
+
logMessage = `setpoint ${setpointName} is not supported`;
|
|
309
|
+
}
|
|
310
|
+
ctx.logNode(node.id, {
|
|
311
|
+
endpoint: this.endpointIndex,
|
|
312
|
+
message: logMessage,
|
|
313
|
+
direction: "inbound"
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
this.setValue(ctx, ThermostatSetpointCCValues.supportedSetpointTypes, supportedSetpointTypes);
|
|
270
317
|
} else {
|
|
318
|
+
let setpointTypes = [];
|
|
271
319
|
ctx.logNode(node.id, {
|
|
272
320
|
endpoint: this.endpointIndex,
|
|
273
|
-
message: "
|
|
274
|
-
|
|
321
|
+
message: "retrieving supported setpoint types...",
|
|
322
|
+
direction: "outbound"
|
|
275
323
|
});
|
|
276
|
-
|
|
324
|
+
const resp = await api.getSupportedSetpointTypes();
|
|
325
|
+
if (resp) {
|
|
326
|
+
setpointTypes = [...resp];
|
|
327
|
+
const logMessage = "received supported setpoint types:\n" + setpointTypes.map((type) => (0, import_safe3.getEnumMemberName)(import_Types.ThermostatSetpointType, type)).map((name) => `\xB7 ${name}`).join("\n");
|
|
328
|
+
ctx.logNode(node.id, {
|
|
329
|
+
endpoint: this.endpointIndex,
|
|
330
|
+
message: logMessage,
|
|
331
|
+
direction: "inbound"
|
|
332
|
+
});
|
|
333
|
+
} else {
|
|
334
|
+
ctx.logNode(node.id, {
|
|
335
|
+
endpoint: this.endpointIndex,
|
|
336
|
+
message: "Querying supported setpoint types timed out, skipping interview...",
|
|
337
|
+
level: "warn"
|
|
338
|
+
});
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
for (const type of setpointTypes) {
|
|
342
|
+
const setpointName = (0, import_safe3.getEnumMemberName)(import_Types.ThermostatSetpointType, type);
|
|
343
|
+
ctx.logNode(node.id, {
|
|
344
|
+
endpoint: this.endpointIndex,
|
|
345
|
+
message: `retrieving capabilities for setpoint ${setpointName}...`,
|
|
346
|
+
direction: "outbound"
|
|
347
|
+
});
|
|
348
|
+
const setpointCaps = await api.getCapabilities(type);
|
|
349
|
+
if (setpointCaps) {
|
|
350
|
+
const minValueUnit = getSetpointUnit(setpointCaps.minValueScale);
|
|
351
|
+
const maxValueUnit = getSetpointUnit(setpointCaps.maxValueScale);
|
|
352
|
+
const logMessage = `received capabilities for setpoint ${setpointName}:
|
|
353
|
+
minimum value: ${setpointCaps.minValue} ${minValueUnit}
|
|
354
|
+
maximum value: ${setpointCaps.maxValue} ${maxValueUnit}`;
|
|
355
|
+
ctx.logNode(node.id, {
|
|
356
|
+
endpoint: this.endpointIndex,
|
|
357
|
+
message: logMessage,
|
|
358
|
+
direction: "inbound"
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
await this.refreshValues(ctx);
|
|
277
363
|
}
|
|
364
|
+
this.setInterviewComplete(ctx, true);
|
|
365
|
+
}
|
|
366
|
+
async refreshValues(ctx) {
|
|
367
|
+
const node = this.getNode(ctx);
|
|
368
|
+
const endpoint = this.getEndpoint(ctx);
|
|
369
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Thermostat Setpoint"], ctx, endpoint).withOptions({
|
|
370
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
371
|
+
});
|
|
372
|
+
const setpointTypes = this.getValue(ctx, ThermostatSetpointCCValues.supportedSetpointTypes) ?? [];
|
|
278
373
|
for (const type of setpointTypes) {
|
|
279
374
|
const setpointName = (0, import_safe3.getEnumMemberName)(import_Types.ThermostatSetpointType, type);
|
|
280
375
|
ctx.logNode(node.id, {
|
|
281
376
|
endpoint: this.endpointIndex,
|
|
282
|
-
message: `
|
|
377
|
+
message: `querying current value of setpoint ${setpointName}...`,
|
|
283
378
|
direction: "outbound"
|
|
284
379
|
});
|
|
285
|
-
const
|
|
286
|
-
if (
|
|
287
|
-
const
|
|
288
|
-
const maxValueUnit = getSetpointUnit(setpointCaps.maxValueScale);
|
|
289
|
-
const logMessage = `received capabilities for setpoint ${setpointName}:
|
|
290
|
-
minimum value: ${setpointCaps.minValue} ${minValueUnit}
|
|
291
|
-
maximum value: ${setpointCaps.maxValue} ${maxValueUnit}`;
|
|
380
|
+
const setpoint = await api.get(type);
|
|
381
|
+
if (setpoint) {
|
|
382
|
+
const logMessage = `received current value of setpoint ${setpointName}: ${setpoint.value} ${setpoint.scale.unit ?? ""}`;
|
|
292
383
|
ctx.logNode(node.id, {
|
|
293
384
|
endpoint: this.endpointIndex,
|
|
294
385
|
message: logMessage,
|
|
@@ -296,332 +387,395 @@ maximum value: ${setpointCaps.maxValue} ${maxValueUnit}`;
|
|
|
296
387
|
});
|
|
297
388
|
}
|
|
298
389
|
}
|
|
299
|
-
await this.refreshValues(ctx);
|
|
300
390
|
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
391
|
+
};
|
|
392
|
+
return ThermostatSetpointCC2 = _classThis;
|
|
393
|
+
})();
|
|
394
|
+
let ThermostatSetpointCCSet = (() => {
|
|
395
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatSetpointCommand.Set), (0, import_CommandClassDecorators.useSupervision)()];
|
|
396
|
+
let _classDescriptor;
|
|
397
|
+
let _classExtraInitializers = [];
|
|
398
|
+
let _classThis;
|
|
399
|
+
let _classSuper = ThermostatSetpointCC;
|
|
400
|
+
var ThermostatSetpointCCSet2 = class extends _classSuper {
|
|
401
|
+
static {
|
|
402
|
+
_classThis = this;
|
|
403
|
+
}
|
|
404
|
+
static {
|
|
405
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
406
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
407
|
+
ThermostatSetpointCCSet2 = _classThis = _classDescriptor.value;
|
|
408
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
409
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
410
|
+
}
|
|
411
|
+
constructor(options) {
|
|
412
|
+
super(options);
|
|
413
|
+
this.setpointType = options.setpointType;
|
|
414
|
+
this.value = options.value;
|
|
415
|
+
this.scale = options.scale;
|
|
416
|
+
}
|
|
417
|
+
static from(raw, ctx) {
|
|
418
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
419
|
+
const setpointType = raw.payload[0] & 15;
|
|
420
|
+
const { value, scale } = (0, import_safe.parseFloatWithScale)(raw.payload.subarray(1));
|
|
421
|
+
return new this({
|
|
422
|
+
nodeId: ctx.sourceNodeId,
|
|
423
|
+
setpointType,
|
|
424
|
+
value,
|
|
425
|
+
scale
|
|
316
426
|
});
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
427
|
+
}
|
|
428
|
+
setpointType;
|
|
429
|
+
value;
|
|
430
|
+
scale;
|
|
431
|
+
serialize(ctx) {
|
|
432
|
+
const override = ctx.getDeviceConfig?.(this.nodeId)?.compat?.overrideFloatEncoding;
|
|
433
|
+
this.payload = import_safe2.Bytes.concat([
|
|
434
|
+
import_safe2.Bytes.from([this.setpointType & 15]),
|
|
435
|
+
(0, import_safe.encodeFloatWithScale)(this.value, this.scale, override)
|
|
436
|
+
]);
|
|
437
|
+
return super.serialize(ctx);
|
|
438
|
+
}
|
|
439
|
+
toLogEntry(ctx) {
|
|
440
|
+
const scale = getScale(this.scale);
|
|
441
|
+
return {
|
|
442
|
+
...super.toLogEntry(ctx),
|
|
443
|
+
message: {
|
|
444
|
+
"setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.ThermostatSetpointType, this.setpointType),
|
|
445
|
+
value: `${this.value} ${scale.unit}`
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
return ThermostatSetpointCCSet2 = _classThis;
|
|
451
|
+
})();
|
|
452
|
+
let ThermostatSetpointCCReport = (() => {
|
|
453
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatSetpointCommand.Report)];
|
|
454
|
+
let _classDescriptor;
|
|
455
|
+
let _classExtraInitializers = [];
|
|
456
|
+
let _classThis;
|
|
457
|
+
let _classSuper = ThermostatSetpointCC;
|
|
458
|
+
var ThermostatSetpointCCReport2 = class extends _classSuper {
|
|
459
|
+
static {
|
|
460
|
+
_classThis = this;
|
|
461
|
+
}
|
|
462
|
+
static {
|
|
463
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
464
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
465
|
+
ThermostatSetpointCCReport2 = _classThis = _classDescriptor.value;
|
|
466
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
467
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
468
|
+
}
|
|
469
|
+
constructor(options) {
|
|
470
|
+
super(options);
|
|
471
|
+
this.type = options.type;
|
|
472
|
+
this.value = options.value;
|
|
473
|
+
this.scale = options.scale;
|
|
474
|
+
}
|
|
475
|
+
static from(raw, ctx) {
|
|
476
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
477
|
+
const type = raw.payload[0] & 15;
|
|
478
|
+
if (type === 0) {
|
|
479
|
+
return new this({
|
|
480
|
+
nodeId: ctx.sourceNodeId,
|
|
481
|
+
type,
|
|
482
|
+
value: 0,
|
|
483
|
+
scale: 0
|
|
324
484
|
});
|
|
325
485
|
}
|
|
486
|
+
const { value, scale } = (0, import_safe.parseFloatWithScale)(raw.payload.subarray(1));
|
|
487
|
+
return new this({
|
|
488
|
+
nodeId: ctx.sourceNodeId,
|
|
489
|
+
type,
|
|
490
|
+
value,
|
|
491
|
+
scale
|
|
492
|
+
});
|
|
326
493
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
this.value = options.value;
|
|
339
|
-
this.scale = options.scale;
|
|
340
|
-
}
|
|
341
|
-
static from(raw, ctx) {
|
|
342
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
343
|
-
const setpointType = raw.payload[0] & 15;
|
|
344
|
-
const { value, scale } = (0, import_safe.parseFloatWithScale)(raw.payload.subarray(1));
|
|
345
|
-
return new ThermostatSetpointCCSet_1({
|
|
346
|
-
nodeId: ctx.sourceNodeId,
|
|
347
|
-
setpointType,
|
|
348
|
-
value,
|
|
349
|
-
scale
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
setpointType;
|
|
353
|
-
value;
|
|
354
|
-
scale;
|
|
355
|
-
serialize(ctx) {
|
|
356
|
-
const override = ctx.getDeviceConfig?.(this.nodeId)?.compat?.overrideFloatEncoding;
|
|
357
|
-
this.payload = import_safe2.Bytes.concat([
|
|
358
|
-
import_safe2.Bytes.from([this.setpointType & 15]),
|
|
359
|
-
(0, import_safe.encodeFloatWithScale)(this.value, this.scale, override)
|
|
360
|
-
]);
|
|
361
|
-
return super.serialize(ctx);
|
|
362
|
-
}
|
|
363
|
-
toLogEntry(ctx) {
|
|
364
|
-
const scale = getScale(this.scale);
|
|
365
|
-
return {
|
|
366
|
-
...super.toLogEntry(ctx),
|
|
367
|
-
message: {
|
|
368
|
-
"setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.ThermostatSetpointType, this.setpointType),
|
|
369
|
-
value: `${this.value} ${scale.unit}`
|
|
494
|
+
persistValues(ctx) {
|
|
495
|
+
if (!super.persistValues(ctx))
|
|
496
|
+
return false;
|
|
497
|
+
const scale = getScale(this.scale);
|
|
498
|
+
const setpointValue = ThermostatSetpointCCValues.setpoint(this.type);
|
|
499
|
+
const existingMetadata = this.getMetadata(ctx, setpointValue);
|
|
500
|
+
if (existingMetadata?.unit !== scale.unit) {
|
|
501
|
+
this.setMetadata(ctx, setpointValue, {
|
|
502
|
+
...existingMetadata ?? setpointValue.meta,
|
|
503
|
+
unit: scale.unit
|
|
504
|
+
});
|
|
370
505
|
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
506
|
+
this.setValue(ctx, setpointValue, this.value);
|
|
507
|
+
this.setValue(ctx, ThermostatSetpointCCValues.setpointScale(this.type), scale.key);
|
|
508
|
+
return true;
|
|
509
|
+
}
|
|
510
|
+
type;
|
|
511
|
+
scale;
|
|
512
|
+
value;
|
|
513
|
+
serialize(ctx) {
|
|
514
|
+
this.payload = import_safe2.Bytes.concat([
|
|
515
|
+
import_safe2.Bytes.from([this.type & 15]),
|
|
516
|
+
(0, import_safe.encodeFloatWithScale)(this.value, this.scale)
|
|
517
|
+
]);
|
|
518
|
+
return super.serialize(ctx);
|
|
519
|
+
}
|
|
520
|
+
toLogEntry(ctx) {
|
|
521
|
+
const scale = getScale(this.scale);
|
|
522
|
+
return {
|
|
523
|
+
...super.toLogEntry(ctx),
|
|
524
|
+
message: {
|
|
525
|
+
"setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.ThermostatSetpointType, this.type),
|
|
526
|
+
value: `${this.value} ${scale.unit}`
|
|
527
|
+
}
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
};
|
|
531
|
+
return ThermostatSetpointCCReport2 = _classThis;
|
|
532
|
+
})();
|
|
533
|
+
function testResponseForThermostatSetpointGet(sent, received) {
|
|
534
|
+
return received.type === sent.setpointType;
|
|
535
|
+
}
|
|
536
|
+
let ThermostatSetpointCCGet = (() => {
|
|
537
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatSetpointCommand.Get), (0, import_CommandClassDecorators.expectedCCResponse)(ThermostatSetpointCCReport, testResponseForThermostatSetpointGet)];
|
|
538
|
+
let _classDescriptor;
|
|
539
|
+
let _classExtraInitializers = [];
|
|
540
|
+
let _classThis;
|
|
541
|
+
let _classSuper = ThermostatSetpointCC;
|
|
542
|
+
var ThermostatSetpointCCGet2 = class extends _classSuper {
|
|
543
|
+
static {
|
|
544
|
+
_classThis = this;
|
|
545
|
+
}
|
|
546
|
+
static {
|
|
547
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
548
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
549
|
+
ThermostatSetpointCCGet2 = _classThis = _classDescriptor.value;
|
|
550
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
551
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
552
|
+
}
|
|
553
|
+
constructor(options) {
|
|
554
|
+
super(options);
|
|
555
|
+
this.setpointType = options.setpointType;
|
|
556
|
+
}
|
|
557
|
+
static from(raw, ctx) {
|
|
558
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
559
|
+
const setpointType = raw.payload[0] & 15;
|
|
560
|
+
return new this({
|
|
561
|
+
nodeId: ctx.sourceNodeId,
|
|
562
|
+
setpointType
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
setpointType;
|
|
566
|
+
serialize(ctx) {
|
|
567
|
+
this.payload = import_safe2.Bytes.from([this.setpointType & 15]);
|
|
568
|
+
return super.serialize(ctx);
|
|
569
|
+
}
|
|
570
|
+
toLogEntry(ctx) {
|
|
571
|
+
return {
|
|
572
|
+
...super.toLogEntry(ctx),
|
|
573
|
+
message: {
|
|
574
|
+
"setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.ThermostatSetpointType, this.setpointType)
|
|
575
|
+
}
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
return ThermostatSetpointCCGet2 = _classThis;
|
|
580
|
+
})();
|
|
581
|
+
let ThermostatSetpointCCCapabilitiesReport = (() => {
|
|
582
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatSetpointCommand.CapabilitiesReport)];
|
|
583
|
+
let _classDescriptor;
|
|
584
|
+
let _classExtraInitializers = [];
|
|
585
|
+
let _classThis;
|
|
586
|
+
let _classSuper = ThermostatSetpointCC;
|
|
587
|
+
var ThermostatSetpointCCCapabilitiesReport2 = class extends _classSuper {
|
|
588
|
+
static {
|
|
589
|
+
_classThis = this;
|
|
590
|
+
}
|
|
591
|
+
static {
|
|
592
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
593
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
594
|
+
ThermostatSetpointCCCapabilitiesReport2 = _classThis = _classDescriptor.value;
|
|
595
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
596
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
597
|
+
}
|
|
598
|
+
constructor(options) {
|
|
599
|
+
super(options);
|
|
600
|
+
this.type = options.type;
|
|
601
|
+
this.minValue = options.minValue;
|
|
602
|
+
this.minValueScale = options.minValueScale;
|
|
603
|
+
this.maxValue = options.maxValue;
|
|
604
|
+
this.maxValueScale = options.maxValueScale;
|
|
605
|
+
}
|
|
606
|
+
static from(raw, ctx) {
|
|
607
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
608
|
+
const type = raw.payload[0];
|
|
609
|
+
const { value: minValue, scale: minValueScale, bytesRead } = (0, import_safe.parseFloatWithScale)(raw.payload.subarray(1));
|
|
610
|
+
const { value: maxValue, scale: maxValueScale } = (0, import_safe.parseFloatWithScale)(raw.payload.subarray(1 + bytesRead));
|
|
611
|
+
return new this({
|
|
390
612
|
nodeId: ctx.sourceNodeId,
|
|
391
613
|
type,
|
|
392
|
-
|
|
393
|
-
|
|
614
|
+
minValue,
|
|
615
|
+
minValueScale,
|
|
616
|
+
maxValue,
|
|
617
|
+
maxValueScale
|
|
394
618
|
});
|
|
395
619
|
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
type
|
|
400
|
-
value,
|
|
401
|
-
scale
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
persistValues(ctx) {
|
|
405
|
-
if (!super.persistValues(ctx))
|
|
406
|
-
return false;
|
|
407
|
-
const scale = getScale(this.scale);
|
|
408
|
-
const setpointValue = ThermostatSetpointCCValues.setpoint(this.type);
|
|
409
|
-
const existingMetadata = this.getMetadata(ctx, setpointValue);
|
|
410
|
-
if (existingMetadata?.unit !== scale.unit) {
|
|
620
|
+
persistValues(ctx) {
|
|
621
|
+
if (!super.persistValues(ctx))
|
|
622
|
+
return false;
|
|
623
|
+
const setpointValue = ThermostatSetpointCCValues.setpoint(this.type);
|
|
411
624
|
this.setMetadata(ctx, setpointValue, {
|
|
412
|
-
...
|
|
413
|
-
|
|
625
|
+
...setpointValue.meta,
|
|
626
|
+
min: this.minValue,
|
|
627
|
+
max: this.maxValue,
|
|
628
|
+
unit: getSetpointUnit(this.minValueScale) || getSetpointUnit(this.maxValueScale)
|
|
414
629
|
});
|
|
630
|
+
return true;
|
|
415
631
|
}
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
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
|
-
let
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
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
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
max: this.maxValue,
|
|
509
|
-
unit: getSetpointUnit(this.minValueScale) || getSetpointUnit(this.maxValueScale)
|
|
510
|
-
});
|
|
511
|
-
return true;
|
|
512
|
-
}
|
|
513
|
-
type;
|
|
514
|
-
minValue;
|
|
515
|
-
maxValue;
|
|
516
|
-
minValueScale;
|
|
517
|
-
maxValueScale;
|
|
518
|
-
serialize(ctx) {
|
|
519
|
-
const min = (0, import_safe.encodeFloatWithScale)(this.minValue, this.minValueScale);
|
|
520
|
-
const max = (0, import_safe.encodeFloatWithScale)(this.maxValue, this.maxValueScale);
|
|
521
|
-
this.payload = import_safe2.Bytes.concat([import_safe2.Bytes.from([this.type]), min, max]);
|
|
522
|
-
return super.serialize(ctx);
|
|
523
|
-
}
|
|
524
|
-
toLogEntry(ctx) {
|
|
525
|
-
const minValueScale = getScale(this.minValueScale);
|
|
526
|
-
const maxValueScale = getScale(this.maxValueScale);
|
|
527
|
-
return {
|
|
528
|
-
...super.toLogEntry(ctx),
|
|
529
|
-
message: {
|
|
530
|
-
"setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.ThermostatSetpointType, this.type),
|
|
531
|
-
"min value": `${this.minValue} ${minValueScale.unit}`,
|
|
532
|
-
"max value": `${this.maxValue} ${maxValueScale.unit}`
|
|
533
|
-
}
|
|
534
|
-
};
|
|
535
|
-
}
|
|
536
|
-
};
|
|
537
|
-
ThermostatSetpointCCCapabilitiesReport = ThermostatSetpointCCCapabilitiesReport_1 = __decorate([
|
|
538
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatSetpointCommand.CapabilitiesReport)
|
|
539
|
-
], ThermostatSetpointCCCapabilitiesReport);
|
|
540
|
-
let ThermostatSetpointCCCapabilitiesGet = ThermostatSetpointCCCapabilitiesGet_1 = class ThermostatSetpointCCCapabilitiesGet2 extends ThermostatSetpointCC {
|
|
541
|
-
constructor(options) {
|
|
542
|
-
super(options);
|
|
543
|
-
this.setpointType = options.setpointType;
|
|
544
|
-
}
|
|
545
|
-
static from(raw, ctx) {
|
|
546
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
547
|
-
const setpointType = raw.payload[0] & 15;
|
|
548
|
-
return new ThermostatSetpointCCCapabilitiesGet_1({
|
|
549
|
-
nodeId: ctx.sourceNodeId,
|
|
550
|
-
setpointType
|
|
551
|
-
});
|
|
552
|
-
}
|
|
553
|
-
setpointType;
|
|
554
|
-
serialize(ctx) {
|
|
555
|
-
this.payload = import_safe2.Bytes.from([this.setpointType & 15]);
|
|
556
|
-
return super.serialize(ctx);
|
|
557
|
-
}
|
|
558
|
-
toLogEntry(ctx) {
|
|
559
|
-
return {
|
|
560
|
-
...super.toLogEntry(ctx),
|
|
561
|
-
message: {
|
|
562
|
-
"setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.ThermostatSetpointType, this.setpointType)
|
|
632
|
+
type;
|
|
633
|
+
minValue;
|
|
634
|
+
maxValue;
|
|
635
|
+
minValueScale;
|
|
636
|
+
maxValueScale;
|
|
637
|
+
serialize(ctx) {
|
|
638
|
+
const min = (0, import_safe.encodeFloatWithScale)(this.minValue, this.minValueScale);
|
|
639
|
+
const max = (0, import_safe.encodeFloatWithScale)(this.maxValue, this.maxValueScale);
|
|
640
|
+
this.payload = import_safe2.Bytes.concat([import_safe2.Bytes.from([this.type]), min, max]);
|
|
641
|
+
return super.serialize(ctx);
|
|
642
|
+
}
|
|
643
|
+
toLogEntry(ctx) {
|
|
644
|
+
const minValueScale = getScale(this.minValueScale);
|
|
645
|
+
const maxValueScale = getScale(this.maxValueScale);
|
|
646
|
+
return {
|
|
647
|
+
...super.toLogEntry(ctx),
|
|
648
|
+
message: {
|
|
649
|
+
"setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.ThermostatSetpointType, this.type),
|
|
650
|
+
"min value": `${this.minValue} ${minValueScale.unit}`,
|
|
651
|
+
"max value": `${this.maxValue} ${maxValueScale.unit}`
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
};
|
|
656
|
+
return ThermostatSetpointCCCapabilitiesReport2 = _classThis;
|
|
657
|
+
})();
|
|
658
|
+
let ThermostatSetpointCCCapabilitiesGet = (() => {
|
|
659
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatSetpointCommand.CapabilitiesGet), (0, import_CommandClassDecorators.expectedCCResponse)(ThermostatSetpointCCCapabilitiesReport)];
|
|
660
|
+
let _classDescriptor;
|
|
661
|
+
let _classExtraInitializers = [];
|
|
662
|
+
let _classThis;
|
|
663
|
+
let _classSuper = ThermostatSetpointCC;
|
|
664
|
+
var ThermostatSetpointCCCapabilitiesGet2 = class extends _classSuper {
|
|
665
|
+
static {
|
|
666
|
+
_classThis = this;
|
|
667
|
+
}
|
|
668
|
+
static {
|
|
669
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
670
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
671
|
+
ThermostatSetpointCCCapabilitiesGet2 = _classThis = _classDescriptor.value;
|
|
672
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
673
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
674
|
+
}
|
|
675
|
+
constructor(options) {
|
|
676
|
+
super(options);
|
|
677
|
+
this.setpointType = options.setpointType;
|
|
678
|
+
}
|
|
679
|
+
static from(raw, ctx) {
|
|
680
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
681
|
+
const setpointType = raw.payload[0] & 15;
|
|
682
|
+
return new this({
|
|
683
|
+
nodeId: ctx.sourceNodeId,
|
|
684
|
+
setpointType
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
setpointType;
|
|
688
|
+
serialize(ctx) {
|
|
689
|
+
this.payload = import_safe2.Bytes.from([this.setpointType & 15]);
|
|
690
|
+
return super.serialize(ctx);
|
|
691
|
+
}
|
|
692
|
+
toLogEntry(ctx) {
|
|
693
|
+
return {
|
|
694
|
+
...super.toLogEntry(ctx),
|
|
695
|
+
message: {
|
|
696
|
+
"setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.ThermostatSetpointType, this.setpointType)
|
|
697
|
+
}
|
|
698
|
+
};
|
|
699
|
+
}
|
|
700
|
+
};
|
|
701
|
+
return ThermostatSetpointCCCapabilitiesGet2 = _classThis;
|
|
702
|
+
})();
|
|
703
|
+
let ThermostatSetpointCCSupportedReport = (() => {
|
|
704
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatSetpointCommand.SupportedReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedSetpointTypes", ThermostatSetpointCCValues.supportedSetpointTypes)];
|
|
705
|
+
let _classDescriptor;
|
|
706
|
+
let _classExtraInitializers = [];
|
|
707
|
+
let _classThis;
|
|
708
|
+
let _classSuper = ThermostatSetpointCC;
|
|
709
|
+
var ThermostatSetpointCCSupportedReport2 = class extends _classSuper {
|
|
710
|
+
static {
|
|
711
|
+
_classThis = this;
|
|
712
|
+
}
|
|
713
|
+
static {
|
|
714
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
715
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
716
|
+
ThermostatSetpointCCSupportedReport2 = _classThis = _classDescriptor.value;
|
|
717
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
718
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
719
|
+
}
|
|
720
|
+
constructor(options) {
|
|
721
|
+
super(options);
|
|
722
|
+
if (options.supportedSetpointTypes.length === 0) {
|
|
723
|
+
throw new import_safe.ZWaveError(`At least one setpoint type must be supported`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
563
724
|
}
|
|
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
|
-
this.payload = (0, import_safe.encodeBitMask)(
|
|
592
|
-
// Encode as interpretation A
|
|
593
|
-
this.supportedSetpointTypes.map((t) => thermostatSetpointTypeMap.indexOf(t)).filter((t) => t !== -1),
|
|
594
|
-
void 0,
|
|
595
|
-
import_Types.ThermostatSetpointType["N/A"]
|
|
596
|
-
);
|
|
597
|
-
return super.serialize(ctx);
|
|
598
|
-
}
|
|
599
|
-
toLogEntry(ctx) {
|
|
600
|
-
return {
|
|
601
|
-
...super.toLogEntry(ctx),
|
|
602
|
-
message: {
|
|
603
|
-
"supported setpoint types": this.supportedSetpointTypes.map((t) => `
|
|
725
|
+
this.supportedSetpointTypes = options.supportedSetpointTypes;
|
|
726
|
+
}
|
|
727
|
+
static from(raw, ctx) {
|
|
728
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
729
|
+
const bitMask = raw.payload;
|
|
730
|
+
const supported = (0, import_safe.parseBitMask)(bitMask, import_Types.ThermostatSetpointType["N/A"]);
|
|
731
|
+
const supportedSetpointTypes = supported.map((i) => thermostatSetpointTypeMap[i]);
|
|
732
|
+
return new this({
|
|
733
|
+
nodeId: ctx.sourceNodeId,
|
|
734
|
+
supportedSetpointTypes
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
supportedSetpointTypes;
|
|
738
|
+
serialize(ctx) {
|
|
739
|
+
this.payload = (0, import_safe.encodeBitMask)(
|
|
740
|
+
// Encode as interpretation A
|
|
741
|
+
this.supportedSetpointTypes.map((t) => thermostatSetpointTypeMap.indexOf(t)).filter((t) => t !== -1),
|
|
742
|
+
void 0,
|
|
743
|
+
import_Types.ThermostatSetpointType["N/A"]
|
|
744
|
+
);
|
|
745
|
+
return super.serialize(ctx);
|
|
746
|
+
}
|
|
747
|
+
toLogEntry(ctx) {
|
|
748
|
+
return {
|
|
749
|
+
...super.toLogEntry(ctx),
|
|
750
|
+
message: {
|
|
751
|
+
"supported setpoint types": this.supportedSetpointTypes.map((t) => `
|
|
604
752
|
\xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.ThermostatSetpointType, t)}`).join("")
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
};
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
]
|
|
615
|
-
let
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
753
|
+
}
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
};
|
|
757
|
+
return ThermostatSetpointCCSupportedReport2 = _classThis;
|
|
758
|
+
})();
|
|
759
|
+
let ThermostatSetpointCCSupportedGet = (() => {
|
|
760
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatSetpointCommand.SupportedGet), (0, import_CommandClassDecorators.expectedCCResponse)(ThermostatSetpointCCSupportedReport)];
|
|
761
|
+
let _classDescriptor;
|
|
762
|
+
let _classExtraInitializers = [];
|
|
763
|
+
let _classThis;
|
|
764
|
+
let _classSuper = ThermostatSetpointCC;
|
|
765
|
+
var ThermostatSetpointCCSupportedGet2 = class extends _classSuper {
|
|
766
|
+
static {
|
|
767
|
+
_classThis = this;
|
|
768
|
+
}
|
|
769
|
+
static {
|
|
770
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
771
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
772
|
+
ThermostatSetpointCCSupportedGet2 = _classThis = _classDescriptor.value;
|
|
773
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
774
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
775
|
+
}
|
|
776
|
+
};
|
|
777
|
+
return ThermostatSetpointCCSupportedGet2 = _classThis;
|
|
778
|
+
})();
|
|
625
779
|
// Annotate the CommonJS export names for ESM import in node:
|
|
626
780
|
0 && (module.exports = {
|
|
627
781
|
ThermostatSetpointCC,
|