@zwave-js/cc 14.0.0-beta.4 → 14.0.0
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
package/build/cjs/cc/WakeUpCC.js
CHANGED
|
@@ -39,13 +39,45 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
39
39
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
40
40
|
var import_Values = require("../lib/Values.js");
|
|
41
41
|
var import_Types = require("../lib/_Types.js");
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
43
|
+
function accept(f) {
|
|
44
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
45
|
+
return f;
|
|
46
|
+
}
|
|
47
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
48
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
49
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
50
|
+
var _, done = false;
|
|
51
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
52
|
+
var context = {};
|
|
53
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
54
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
55
|
+
context.addInitializer = function(f) {
|
|
56
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
57
|
+
extraInitializers.push(accept(f || null));
|
|
58
|
+
};
|
|
59
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
60
|
+
if (kind === "accessor") {
|
|
61
|
+
if (result === void 0) continue;
|
|
62
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
63
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
64
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
65
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
66
|
+
} else if (_ = accept(result)) {
|
|
67
|
+
if (kind === "field") initializers.unshift(_);
|
|
68
|
+
else descriptor[key] = _;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
72
|
+
done = true;
|
|
73
|
+
};
|
|
74
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
75
|
+
var useValue = arguments.length > 2;
|
|
76
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
77
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
78
|
+
}
|
|
79
|
+
return useValue ? value : void 0;
|
|
47
80
|
};
|
|
48
|
-
var WakeUpCCIntervalSet_1, WakeUpCCIntervalReport_1, WakeUpCCIntervalCapabilitiesReport_1;
|
|
49
81
|
function __assertType(argName, typeName, boundHasError) {
|
|
50
82
|
const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
|
|
51
83
|
if (boundHasError()) {
|
|
@@ -79,367 +111,488 @@ const WakeUpCCValues = Object.freeze({
|
|
|
79
111
|
})
|
|
80
112
|
})
|
|
81
113
|
});
|
|
82
|
-
let WakeUpCCAPI =
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
114
|
+
let WakeUpCCAPI = (() => {
|
|
115
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Wake Up"])];
|
|
116
|
+
let _classDescriptor;
|
|
117
|
+
let _classExtraInitializers = [];
|
|
118
|
+
let _classThis;
|
|
119
|
+
let _classSuper = import_API.CCAPI;
|
|
120
|
+
var WakeUpCCAPI2 = class extends _classSuper {
|
|
121
|
+
static {
|
|
122
|
+
_classThis = this;
|
|
123
|
+
}
|
|
124
|
+
static {
|
|
125
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
126
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
127
|
+
WakeUpCCAPI2 = _classThis = _classDescriptor.value;
|
|
128
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
129
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
130
|
+
}
|
|
131
|
+
supportsCommand(cmd) {
|
|
132
|
+
switch (cmd) {
|
|
133
|
+
case import_Types.WakeUpCommand.IntervalGet:
|
|
134
|
+
return this.isSinglecast();
|
|
135
|
+
case import_Types.WakeUpCommand.IntervalSet:
|
|
136
|
+
case import_Types.WakeUpCommand.NoMoreInformation:
|
|
137
|
+
return true;
|
|
138
|
+
// This is mandatory
|
|
139
|
+
case import_Types.WakeUpCommand.IntervalCapabilitiesGet:
|
|
140
|
+
return this.version >= 2 && this.isSinglecast();
|
|
107
141
|
}
|
|
108
|
-
return
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
switch (property) {
|
|
114
|
-
case "wakeUpInterval":
|
|
115
|
-
return (await this.getInterval())?.[property];
|
|
116
|
-
default:
|
|
142
|
+
return super.supportsCommand(cmd);
|
|
143
|
+
}
|
|
144
|
+
get [import_API.SET_VALUE]() {
|
|
145
|
+
return async function({ property }, value) {
|
|
146
|
+
if (property !== "wakeUpInterval") {
|
|
117
147
|
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
148
|
+
}
|
|
149
|
+
if (typeof value !== "number") {
|
|
150
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
151
|
+
}
|
|
152
|
+
const result = await this.setInterval(value, this.host.ownNodeId ?? 1);
|
|
153
|
+
if (this.isSinglecast() && !(0, import_safe.supervisedCommandSucceeded)(result)) {
|
|
154
|
+
this.schedulePoll({ property }, value, { transition: "fast" });
|
|
155
|
+
}
|
|
156
|
+
return result;
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
get [import_API.POLL_VALUE]() {
|
|
160
|
+
return async function({ property }) {
|
|
161
|
+
switch (property) {
|
|
162
|
+
case "wakeUpInterval":
|
|
163
|
+
return (await this.getInterval())?.[property];
|
|
164
|
+
default:
|
|
165
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
170
|
+
async getInterval() {
|
|
171
|
+
this.assertSupportsCommand(import_Types.WakeUpCommand, import_Types.WakeUpCommand.IntervalGet);
|
|
172
|
+
const cc = new WakeUpCCIntervalGet({
|
|
173
|
+
nodeId: this.endpoint.nodeId,
|
|
174
|
+
endpointIndex: this.endpoint.index
|
|
175
|
+
});
|
|
176
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
177
|
+
if (response) {
|
|
178
|
+
return (0, import_safe3.pick)(response, ["wakeUpInterval", "controllerNodeId"]);
|
|
118
179
|
}
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
122
|
-
async getInterval() {
|
|
123
|
-
this.assertSupportsCommand(import_Types.WakeUpCommand, import_Types.WakeUpCommand.IntervalGet);
|
|
124
|
-
const cc = new WakeUpCCIntervalGet({
|
|
125
|
-
nodeId: this.endpoint.nodeId,
|
|
126
|
-
endpointIndex: this.endpoint.index
|
|
127
|
-
});
|
|
128
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
129
|
-
if (response) {
|
|
130
|
-
return (0, import_safe3.pick)(response, ["wakeUpInterval", "controllerNodeId"]);
|
|
131
180
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
181
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
182
|
+
async getIntervalCapabilities() {
|
|
183
|
+
this.assertSupportsCommand(import_Types.WakeUpCommand, import_Types.WakeUpCommand.IntervalCapabilitiesGet);
|
|
184
|
+
const cc = new WakeUpCCIntervalCapabilitiesGet({
|
|
185
|
+
nodeId: this.endpoint.nodeId,
|
|
186
|
+
endpointIndex: this.endpoint.index
|
|
187
|
+
});
|
|
188
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
189
|
+
if (response) {
|
|
190
|
+
return (0, import_safe3.pick)(response, [
|
|
191
|
+
"defaultWakeUpInterval",
|
|
192
|
+
"minWakeUpInterval",
|
|
193
|
+
"maxWakeUpInterval",
|
|
194
|
+
"wakeUpIntervalSteps",
|
|
195
|
+
"wakeUpOnDemandSupported"
|
|
196
|
+
]);
|
|
197
|
+
}
|
|
149
198
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
],
|
|
184
|
-
let
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
199
|
+
async setInterval(wakeUpInterval, controllerNodeId) {
|
|
200
|
+
__assertType("wakeUpInterval", "number", __assertType__number.bind(void 0, wakeUpInterval));
|
|
201
|
+
__assertType("controllerNodeId", "number", __assertType__number.bind(void 0, controllerNodeId));
|
|
202
|
+
this.assertSupportsCommand(import_Types.WakeUpCommand, import_Types.WakeUpCommand.IntervalSet);
|
|
203
|
+
const cc = new WakeUpCCIntervalSet({
|
|
204
|
+
nodeId: this.endpoint.nodeId,
|
|
205
|
+
endpointIndex: this.endpoint.index,
|
|
206
|
+
wakeUpInterval,
|
|
207
|
+
controllerNodeId
|
|
208
|
+
});
|
|
209
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
210
|
+
}
|
|
211
|
+
async sendNoMoreInformation() {
|
|
212
|
+
this.assertSupportsCommand(import_Types.WakeUpCommand, import_Types.WakeUpCommand.NoMoreInformation);
|
|
213
|
+
const cc = new WakeUpCCNoMoreInformation({
|
|
214
|
+
nodeId: this.endpoint.nodeId,
|
|
215
|
+
endpointIndex: this.endpoint.index
|
|
216
|
+
});
|
|
217
|
+
await this.host.sendCommand(cc, {
|
|
218
|
+
...this.commandOptions,
|
|
219
|
+
// This command must be sent as part of the wake up queue
|
|
220
|
+
priority: import_safe.MessagePriority.WakeUp,
|
|
221
|
+
// Don't try to resend this - if we get no response, the node is most likely asleep
|
|
222
|
+
maxSendAttempts: 1,
|
|
223
|
+
// Also we don't want to wait for an ACK because this can lock up the network for seconds
|
|
224
|
+
// if the target node is asleep and doesn't respond to the command
|
|
225
|
+
transmitOptions: import_safe.TransmitOptions.DEFAULT_NOACK
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
return WakeUpCCAPI2 = _classThis;
|
|
230
|
+
})();
|
|
231
|
+
let WakeUpCC = (() => {
|
|
232
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Wake Up"]), (0, import_CommandClassDecorators.implementedVersion)(3), (0, import_CommandClassDecorators.ccValues)(WakeUpCCValues)];
|
|
233
|
+
let _classDescriptor;
|
|
234
|
+
let _classExtraInitializers = [];
|
|
235
|
+
let _classThis;
|
|
236
|
+
let _classSuper = import_CommandClass.CommandClass;
|
|
237
|
+
var WakeUpCC2 = class extends _classSuper {
|
|
238
|
+
static {
|
|
239
|
+
_classThis = this;
|
|
240
|
+
}
|
|
241
|
+
static {
|
|
242
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
243
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
244
|
+
WakeUpCC2 = _classThis = _classDescriptor.value;
|
|
245
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
246
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
247
|
+
}
|
|
248
|
+
async interview(ctx) {
|
|
249
|
+
const node = this.getNode(ctx);
|
|
250
|
+
const endpoint = this.getEndpoint(ctx);
|
|
251
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Wake Up"], ctx, endpoint).withOptions({
|
|
252
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
253
|
+
});
|
|
254
|
+
ctx.logNode(node.id, {
|
|
255
|
+
endpoint: this.endpointIndex,
|
|
256
|
+
message: `Interviewing ${this.ccName}...`,
|
|
257
|
+
direction: "none"
|
|
258
|
+
});
|
|
259
|
+
if (node.id === ctx.ownNodeId) {
|
|
260
|
+
ctx.logNode(node.id, `skipping wakeup configuration for the controller`);
|
|
261
|
+
} else if (node.isFrequentListening) {
|
|
262
|
+
ctx.logNode(node.id, `skipping wakeup configuration for frequent listening device`);
|
|
263
|
+
} else {
|
|
264
|
+
let desiredInterval;
|
|
265
|
+
let currentControllerNodeId;
|
|
266
|
+
let minInterval;
|
|
267
|
+
let maxInterval;
|
|
268
|
+
if (api.version >= 2) {
|
|
269
|
+
ctx.logNode(node.id, {
|
|
270
|
+
endpoint: this.endpointIndex,
|
|
271
|
+
message: "retrieving wakeup capabilities from the device...",
|
|
272
|
+
direction: "outbound"
|
|
273
|
+
});
|
|
274
|
+
const wakeupCaps = await api.getIntervalCapabilities();
|
|
275
|
+
if (wakeupCaps) {
|
|
276
|
+
const logMessage = `received wakeup capabilities:
|
|
214
277
|
default wakeup interval: ${wakeupCaps.defaultWakeUpInterval} seconds
|
|
215
278
|
minimum wakeup interval: ${wakeupCaps.minWakeUpInterval} seconds
|
|
216
279
|
maximum wakeup interval: ${wakeupCaps.maxWakeUpInterval} seconds
|
|
217
280
|
wakeup interval steps: ${wakeupCaps.wakeUpIntervalSteps} seconds
|
|
218
281
|
wakeup on demand supported: ${wakeupCaps.wakeUpOnDemandSupported}`;
|
|
282
|
+
ctx.logNode(node.id, {
|
|
283
|
+
endpoint: this.endpointIndex,
|
|
284
|
+
message: logMessage,
|
|
285
|
+
direction: "inbound"
|
|
286
|
+
});
|
|
287
|
+
minInterval = wakeupCaps.minWakeUpInterval;
|
|
288
|
+
maxInterval = wakeupCaps.maxWakeUpInterval;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
ctx.logNode(node.id, {
|
|
292
|
+
endpoint: this.endpointIndex,
|
|
293
|
+
message: "retrieving wakeup interval from the device...",
|
|
294
|
+
direction: "outbound"
|
|
295
|
+
});
|
|
296
|
+
const wakeupResp = await api.getInterval();
|
|
297
|
+
if (wakeupResp) {
|
|
298
|
+
const logMessage = `received wakeup configuration:
|
|
299
|
+
wakeup interval: ${wakeupResp.wakeUpInterval} seconds
|
|
300
|
+
controller node: ${wakeupResp.controllerNodeId}`;
|
|
219
301
|
ctx.logNode(node.id, {
|
|
220
302
|
endpoint: this.endpointIndex,
|
|
221
303
|
message: logMessage,
|
|
222
304
|
direction: "inbound"
|
|
223
305
|
});
|
|
224
|
-
|
|
225
|
-
|
|
306
|
+
desiredInterval = wakeupResp.wakeUpInterval;
|
|
307
|
+
currentControllerNodeId = wakeupResp.controllerNodeId;
|
|
308
|
+
} else {
|
|
309
|
+
desiredInterval = 3600 * 6;
|
|
310
|
+
currentControllerNodeId = 0;
|
|
311
|
+
}
|
|
312
|
+
const ownNodeId = ctx.ownNodeId;
|
|
313
|
+
if (currentControllerNodeId !== ownNodeId) {
|
|
314
|
+
if (desiredInterval !== 0 && minInterval != void 0 && maxInterval != void 0) {
|
|
315
|
+
desiredInterval = (0, import_math.clamp)(desiredInterval, minInterval, maxInterval);
|
|
316
|
+
}
|
|
317
|
+
ctx.logNode(node.id, {
|
|
318
|
+
endpoint: this.endpointIndex,
|
|
319
|
+
message: "configuring wakeup destination node",
|
|
320
|
+
direction: "outbound"
|
|
321
|
+
});
|
|
322
|
+
await api.setInterval(desiredInterval, ownNodeId);
|
|
323
|
+
this.setValue(ctx, WakeUpCCValues.controllerNodeId, ownNodeId);
|
|
324
|
+
ctx.logNode(node.id, "wakeup destination node changed!");
|
|
226
325
|
}
|
|
227
326
|
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
327
|
+
this.setInterviewComplete(ctx, true);
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
return WakeUpCC2 = _classThis;
|
|
331
|
+
})();
|
|
332
|
+
let WakeUpCCIntervalSet = (() => {
|
|
333
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.WakeUpCommand.IntervalSet), (0, import_CommandClassDecorators.useSupervision)()];
|
|
334
|
+
let _classDescriptor;
|
|
335
|
+
let _classExtraInitializers = [];
|
|
336
|
+
let _classThis;
|
|
337
|
+
let _classSuper = WakeUpCC;
|
|
338
|
+
var WakeUpCCIntervalSet2 = class extends _classSuper {
|
|
339
|
+
static {
|
|
340
|
+
_classThis = this;
|
|
341
|
+
}
|
|
342
|
+
static {
|
|
343
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
344
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
345
|
+
WakeUpCCIntervalSet2 = _classThis = _classDescriptor.value;
|
|
346
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
347
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
348
|
+
}
|
|
349
|
+
constructor(options) {
|
|
350
|
+
super(options);
|
|
351
|
+
this.wakeUpInterval = options.wakeUpInterval;
|
|
352
|
+
this.controllerNodeId = options.controllerNodeId;
|
|
353
|
+
}
|
|
354
|
+
static from(raw, ctx) {
|
|
355
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 4);
|
|
356
|
+
const wakeUpInterval = raw.payload.readUIntBE(0, 3);
|
|
357
|
+
const controllerNodeId = raw.payload[3];
|
|
358
|
+
return new this({
|
|
359
|
+
nodeId: ctx.sourceNodeId,
|
|
360
|
+
wakeUpInterval,
|
|
361
|
+
controllerNodeId
|
|
232
362
|
});
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
363
|
+
}
|
|
364
|
+
wakeUpInterval;
|
|
365
|
+
controllerNodeId;
|
|
366
|
+
serialize(ctx) {
|
|
367
|
+
this.payload = import_safe2.Bytes.from([
|
|
368
|
+
0,
|
|
369
|
+
0,
|
|
370
|
+
0,
|
|
371
|
+
// placeholder
|
|
372
|
+
this.controllerNodeId
|
|
373
|
+
]);
|
|
374
|
+
this.payload.writeUIntBE(this.wakeUpInterval, 0, 3);
|
|
375
|
+
return super.serialize(ctx);
|
|
376
|
+
}
|
|
377
|
+
toLogEntry(ctx) {
|
|
378
|
+
return {
|
|
379
|
+
...super.toLogEntry(ctx),
|
|
380
|
+
message: {
|
|
381
|
+
"wake-up interval": `${this.wakeUpInterval} seconds`,
|
|
382
|
+
"controller node id": this.controllerNodeId
|
|
253
383
|
}
|
|
254
|
-
|
|
255
|
-
endpoint: this.endpointIndex,
|
|
256
|
-
message: "configuring wakeup destination node",
|
|
257
|
-
direction: "outbound"
|
|
258
|
-
});
|
|
259
|
-
await api.setInterval(desiredInterval, ownNodeId);
|
|
260
|
-
this.setValue(ctx, WakeUpCCValues.controllerNodeId, ownNodeId);
|
|
261
|
-
ctx.logNode(node.id, "wakeup destination node changed!");
|
|
262
|
-
}
|
|
384
|
+
};
|
|
263
385
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
(0, import_CommandClassDecorators.
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
let
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
let
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
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
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
let
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
max: this.maxWakeUpInterval,
|
|
408
|
-
steps: this.wakeUpIntervalSteps,
|
|
409
|
-
default: this.defaultWakeUpInterval
|
|
410
|
-
});
|
|
411
|
-
return true;
|
|
412
|
-
}
|
|
413
|
-
minWakeUpInterval;
|
|
414
|
-
maxWakeUpInterval;
|
|
415
|
-
defaultWakeUpInterval;
|
|
416
|
-
wakeUpIntervalSteps;
|
|
417
|
-
wakeUpOnDemandSupported;
|
|
418
|
-
toLogEntry(ctx) {
|
|
419
|
-
return {
|
|
420
|
-
...super.toLogEntry(ctx),
|
|
421
|
-
message: {
|
|
422
|
-
"default interval": `${this.defaultWakeUpInterval} seconds`,
|
|
423
|
-
"minimum interval": `${this.minWakeUpInterval} seconds`,
|
|
424
|
-
"maximum interval": `${this.maxWakeUpInterval} seconds`,
|
|
425
|
-
"interval steps": `${this.wakeUpIntervalSteps} seconds`,
|
|
426
|
-
"wake up on demand supported": `${this.wakeUpOnDemandSupported}`
|
|
386
|
+
};
|
|
387
|
+
return WakeUpCCIntervalSet2 = _classThis;
|
|
388
|
+
})();
|
|
389
|
+
let WakeUpCCIntervalReport = (() => {
|
|
390
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.WakeUpCommand.IntervalReport), (0, import_CommandClassDecorators.ccValueProperty)("wakeUpInterval", WakeUpCCValues.wakeUpInterval), (0, import_CommandClassDecorators.ccValueProperty)("controllerNodeId", WakeUpCCValues.controllerNodeId)];
|
|
391
|
+
let _classDescriptor;
|
|
392
|
+
let _classExtraInitializers = [];
|
|
393
|
+
let _classThis;
|
|
394
|
+
let _classSuper = WakeUpCC;
|
|
395
|
+
var WakeUpCCIntervalReport2 = class extends _classSuper {
|
|
396
|
+
static {
|
|
397
|
+
_classThis = this;
|
|
398
|
+
}
|
|
399
|
+
static {
|
|
400
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
401
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
402
|
+
WakeUpCCIntervalReport2 = _classThis = _classDescriptor.value;
|
|
403
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
404
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
405
|
+
}
|
|
406
|
+
constructor(options) {
|
|
407
|
+
super(options);
|
|
408
|
+
this.wakeUpInterval = options.wakeUpInterval;
|
|
409
|
+
this.controllerNodeId = options.controllerNodeId;
|
|
410
|
+
}
|
|
411
|
+
static from(raw, ctx) {
|
|
412
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 4);
|
|
413
|
+
const wakeUpInterval = raw.payload.readUIntBE(0, 3);
|
|
414
|
+
const controllerNodeId = raw.payload[3];
|
|
415
|
+
return new this({
|
|
416
|
+
nodeId: ctx.sourceNodeId,
|
|
417
|
+
wakeUpInterval,
|
|
418
|
+
controllerNodeId
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
wakeUpInterval;
|
|
422
|
+
controllerNodeId;
|
|
423
|
+
toLogEntry(ctx) {
|
|
424
|
+
return {
|
|
425
|
+
...super.toLogEntry(ctx),
|
|
426
|
+
message: {
|
|
427
|
+
"wake-up interval": `${this.wakeUpInterval} seconds`,
|
|
428
|
+
"controller node id": this.controllerNodeId
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
return WakeUpCCIntervalReport2 = _classThis;
|
|
434
|
+
})();
|
|
435
|
+
let WakeUpCCIntervalGet = (() => {
|
|
436
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.WakeUpCommand.IntervalGet), (0, import_CommandClassDecorators.expectedCCResponse)(WakeUpCCIntervalReport)];
|
|
437
|
+
let _classDescriptor;
|
|
438
|
+
let _classExtraInitializers = [];
|
|
439
|
+
let _classThis;
|
|
440
|
+
let _classSuper = WakeUpCC;
|
|
441
|
+
var WakeUpCCIntervalGet2 = class extends _classSuper {
|
|
442
|
+
static {
|
|
443
|
+
_classThis = this;
|
|
444
|
+
}
|
|
445
|
+
static {
|
|
446
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
447
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
448
|
+
WakeUpCCIntervalGet2 = _classThis = _classDescriptor.value;
|
|
449
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
450
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
return WakeUpCCIntervalGet2 = _classThis;
|
|
454
|
+
})();
|
|
455
|
+
let WakeUpCCWakeUpNotification = (() => {
|
|
456
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.WakeUpCommand.WakeUpNotification)];
|
|
457
|
+
let _classDescriptor;
|
|
458
|
+
let _classExtraInitializers = [];
|
|
459
|
+
let _classThis;
|
|
460
|
+
let _classSuper = WakeUpCC;
|
|
461
|
+
var WakeUpCCWakeUpNotification2 = class extends _classSuper {
|
|
462
|
+
static {
|
|
463
|
+
_classThis = this;
|
|
464
|
+
}
|
|
465
|
+
static {
|
|
466
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
467
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
468
|
+
WakeUpCCWakeUpNotification2 = _classThis = _classDescriptor.value;
|
|
469
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
470
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
return WakeUpCCWakeUpNotification2 = _classThis;
|
|
474
|
+
})();
|
|
475
|
+
let WakeUpCCNoMoreInformation = (() => {
|
|
476
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.WakeUpCommand.NoMoreInformation)];
|
|
477
|
+
let _classDescriptor;
|
|
478
|
+
let _classExtraInitializers = [];
|
|
479
|
+
let _classThis;
|
|
480
|
+
let _classSuper = WakeUpCC;
|
|
481
|
+
var WakeUpCCNoMoreInformation2 = class extends _classSuper {
|
|
482
|
+
static {
|
|
483
|
+
_classThis = this;
|
|
484
|
+
}
|
|
485
|
+
static {
|
|
486
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
487
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
488
|
+
WakeUpCCNoMoreInformation2 = _classThis = _classDescriptor.value;
|
|
489
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
490
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
return WakeUpCCNoMoreInformation2 = _classThis;
|
|
494
|
+
})();
|
|
495
|
+
let WakeUpCCIntervalCapabilitiesReport = (() => {
|
|
496
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.WakeUpCommand.IntervalCapabilitiesReport), (0, import_CommandClassDecorators.ccValueProperty)("wakeUpOnDemandSupported", WakeUpCCValues.wakeUpOnDemandSupported)];
|
|
497
|
+
let _classDescriptor;
|
|
498
|
+
let _classExtraInitializers = [];
|
|
499
|
+
let _classThis;
|
|
500
|
+
let _classSuper = WakeUpCC;
|
|
501
|
+
var WakeUpCCIntervalCapabilitiesReport2 = class extends _classSuper {
|
|
502
|
+
static {
|
|
503
|
+
_classThis = this;
|
|
504
|
+
}
|
|
505
|
+
static {
|
|
506
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
507
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
508
|
+
WakeUpCCIntervalCapabilitiesReport2 = _classThis = _classDescriptor.value;
|
|
509
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
510
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
511
|
+
}
|
|
512
|
+
constructor(options) {
|
|
513
|
+
super(options);
|
|
514
|
+
this.minWakeUpInterval = options.minWakeUpInterval;
|
|
515
|
+
this.maxWakeUpInterval = options.maxWakeUpInterval;
|
|
516
|
+
this.defaultWakeUpInterval = options.defaultWakeUpInterval;
|
|
517
|
+
this.wakeUpIntervalSteps = options.wakeUpIntervalSteps;
|
|
518
|
+
this.wakeUpOnDemandSupported = options.wakeUpOnDemandSupported;
|
|
519
|
+
}
|
|
520
|
+
static from(raw, ctx) {
|
|
521
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 12);
|
|
522
|
+
const minWakeUpInterval = raw.payload.readUIntBE(0, 3);
|
|
523
|
+
const maxWakeUpInterval = raw.payload.readUIntBE(3, 3);
|
|
524
|
+
const defaultWakeUpInterval = raw.payload.readUIntBE(6, 3);
|
|
525
|
+
const wakeUpIntervalSteps = raw.payload.readUIntBE(9, 3);
|
|
526
|
+
let wakeUpOnDemandSupported = false;
|
|
527
|
+
if (raw.payload.length >= 13) {
|
|
528
|
+
wakeUpOnDemandSupported = !!(raw.payload[12] & 1);
|
|
427
529
|
}
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
530
|
+
return new this({
|
|
531
|
+
nodeId: ctx.sourceNodeId,
|
|
532
|
+
minWakeUpInterval,
|
|
533
|
+
maxWakeUpInterval,
|
|
534
|
+
defaultWakeUpInterval,
|
|
535
|
+
wakeUpIntervalSteps,
|
|
536
|
+
wakeUpOnDemandSupported
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
persistValues(ctx) {
|
|
540
|
+
if (!super.persistValues(ctx))
|
|
541
|
+
return false;
|
|
542
|
+
const valueDB = this.getValueDB(ctx);
|
|
543
|
+
valueDB.setMetadata({
|
|
544
|
+
commandClass: this.ccId,
|
|
545
|
+
endpoint: this.endpointIndex,
|
|
546
|
+
property: "wakeUpInterval"
|
|
547
|
+
}, {
|
|
548
|
+
...import_safe.ValueMetadata.WriteOnlyUInt24,
|
|
549
|
+
min: this.minWakeUpInterval,
|
|
550
|
+
max: this.maxWakeUpInterval,
|
|
551
|
+
steps: this.wakeUpIntervalSteps,
|
|
552
|
+
default: this.defaultWakeUpInterval
|
|
553
|
+
});
|
|
554
|
+
return true;
|
|
555
|
+
}
|
|
556
|
+
minWakeUpInterval;
|
|
557
|
+
maxWakeUpInterval;
|
|
558
|
+
defaultWakeUpInterval;
|
|
559
|
+
wakeUpIntervalSteps;
|
|
560
|
+
wakeUpOnDemandSupported;
|
|
561
|
+
toLogEntry(ctx) {
|
|
562
|
+
return {
|
|
563
|
+
...super.toLogEntry(ctx),
|
|
564
|
+
message: {
|
|
565
|
+
"default interval": `${this.defaultWakeUpInterval} seconds`,
|
|
566
|
+
"minimum interval": `${this.minWakeUpInterval} seconds`,
|
|
567
|
+
"maximum interval": `${this.maxWakeUpInterval} seconds`,
|
|
568
|
+
"interval steps": `${this.wakeUpIntervalSteps} seconds`,
|
|
569
|
+
"wake up on demand supported": `${this.wakeUpOnDemandSupported}`
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
};
|
|
574
|
+
return WakeUpCCIntervalCapabilitiesReport2 = _classThis;
|
|
575
|
+
})();
|
|
576
|
+
let WakeUpCCIntervalCapabilitiesGet = (() => {
|
|
577
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.WakeUpCommand.IntervalCapabilitiesGet), (0, import_CommandClassDecorators.expectedCCResponse)(WakeUpCCIntervalCapabilitiesReport)];
|
|
578
|
+
let _classDescriptor;
|
|
579
|
+
let _classExtraInitializers = [];
|
|
580
|
+
let _classThis;
|
|
581
|
+
let _classSuper = WakeUpCC;
|
|
582
|
+
var WakeUpCCIntervalCapabilitiesGet2 = class extends _classSuper {
|
|
583
|
+
static {
|
|
584
|
+
_classThis = this;
|
|
585
|
+
}
|
|
586
|
+
static {
|
|
587
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
588
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
589
|
+
WakeUpCCIntervalCapabilitiesGet2 = _classThis = _classDescriptor.value;
|
|
590
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
591
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
592
|
+
}
|
|
593
|
+
};
|
|
594
|
+
return WakeUpCCIntervalCapabilitiesGet2 = _classThis;
|
|
595
|
+
})();
|
|
443
596
|
// Annotate the CommonJS export names for ESM import in node:
|
|
444
597
|
0 && (module.exports = {
|
|
445
598
|
WakeUpCC,
|