@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
|
@@ -43,13 +43,45 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
43
43
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
44
44
|
var import_Values = require("../lib/Values.js");
|
|
45
45
|
var import_Types = require("../lib/_Types.js");
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
47
|
+
function accept(f) {
|
|
48
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
49
|
+
return f;
|
|
50
|
+
}
|
|
51
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
52
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
53
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
54
|
+
var _, done = false;
|
|
55
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
56
|
+
var context = {};
|
|
57
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
58
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
59
|
+
context.addInitializer = function(f) {
|
|
60
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
61
|
+
extraInitializers.push(accept(f || null));
|
|
62
|
+
};
|
|
63
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
64
|
+
if (kind === "accessor") {
|
|
65
|
+
if (result === void 0) continue;
|
|
66
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
67
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
68
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
69
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
70
|
+
} else if (_ = accept(result)) {
|
|
71
|
+
if (kind === "field") initializers.unshift(_);
|
|
72
|
+
else descriptor[key] = _;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
76
|
+
done = true;
|
|
77
|
+
};
|
|
78
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
79
|
+
var useValue = arguments.length > 2;
|
|
80
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
81
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
82
|
+
}
|
|
83
|
+
return useValue ? value : void 0;
|
|
51
84
|
};
|
|
52
|
-
var ProtectionCCReport_1, ProtectionCCSupportedReport_1, ProtectionCCExclusiveControlReport_1, ProtectionCCTimeoutReport_1;
|
|
53
85
|
function __assertType(argName, typeName, boundHasError) {
|
|
54
86
|
const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
|
|
55
87
|
if (boundHasError()) {
|
|
@@ -124,529 +156,689 @@ const ProtectionCCValues = Object.freeze({
|
|
|
124
156
|
})
|
|
125
157
|
})
|
|
126
158
|
});
|
|
127
|
-
let ProtectionCCAPI =
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
return this.version >= 2 && this.isSinglecast();
|
|
137
|
-
case import_Types.ProtectionCommand.TimeoutGet:
|
|
138
|
-
case import_Types.ProtectionCommand.TimeoutSet: {
|
|
139
|
-
return this.isSinglecast() && this.tryGetValueDB()?.getValue(ProtectionCCValues.supportsTimeout.endpoint(this.endpoint.index));
|
|
140
|
-
}
|
|
141
|
-
case import_Types.ProtectionCommand.ExclusiveControlGet:
|
|
142
|
-
case import_Types.ProtectionCommand.ExclusiveControlSet: {
|
|
143
|
-
return this.isSinglecast() && this.tryGetValueDB()?.getValue(ProtectionCCValues.supportsExclusiveControl.endpoint(this.endpoint.index));
|
|
144
|
-
}
|
|
159
|
+
let ProtectionCCAPI = (() => {
|
|
160
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses.Protection)];
|
|
161
|
+
let _classDescriptor;
|
|
162
|
+
let _classExtraInitializers = [];
|
|
163
|
+
let _classThis;
|
|
164
|
+
let _classSuper = import_API.CCAPI;
|
|
165
|
+
var ProtectionCCAPI2 = class extends _classSuper {
|
|
166
|
+
static {
|
|
167
|
+
_classThis = this;
|
|
145
168
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
169
|
+
static {
|
|
170
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
171
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
172
|
+
ProtectionCCAPI2 = _classThis = _classDescriptor.value;
|
|
173
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
174
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
175
|
+
}
|
|
176
|
+
supportsCommand(cmd) {
|
|
177
|
+
switch (cmd) {
|
|
178
|
+
case import_Types.ProtectionCommand.Get:
|
|
179
|
+
return this.isSinglecast();
|
|
180
|
+
case import_Types.ProtectionCommand.Set:
|
|
181
|
+
return true;
|
|
182
|
+
// This is mandatory
|
|
183
|
+
case import_Types.ProtectionCommand.SupportedGet:
|
|
184
|
+
return this.version >= 2 && this.isSinglecast();
|
|
185
|
+
case import_Types.ProtectionCommand.TimeoutGet:
|
|
186
|
+
case import_Types.ProtectionCommand.TimeoutSet: {
|
|
187
|
+
return this.isSinglecast() && this.tryGetValueDB()?.getValue(ProtectionCCValues.supportsTimeout.endpoint(this.endpoint.index));
|
|
160
188
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
if (typeof value !== "number") {
|
|
165
|
-
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
189
|
+
case import_Types.ProtectionCommand.ExclusiveControlGet:
|
|
190
|
+
case import_Types.ProtectionCommand.ExclusiveControlSet: {
|
|
191
|
+
return this.isSinglecast() && this.tryGetValueDB()?.getValue(ProtectionCCValues.supportsExclusiveControl.endpoint(this.endpoint.index));
|
|
166
192
|
}
|
|
167
|
-
return this.setExclusiveControl(value);
|
|
168
|
-
} else {
|
|
169
|
-
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
170
193
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
194
|
+
return super.supportsCommand(cmd);
|
|
195
|
+
}
|
|
196
|
+
get [import_API.SET_VALUE]() {
|
|
197
|
+
return async function({ property }, value) {
|
|
198
|
+
const valueDB = this.tryGetValueDB();
|
|
199
|
+
if (property === "local") {
|
|
200
|
+
if (typeof value !== "number") {
|
|
201
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
202
|
+
}
|
|
203
|
+
const rf = valueDB?.getValue(ProtectionCCValues.rfProtectionState.endpoint(this.endpoint.index));
|
|
204
|
+
return this.set(value, rf);
|
|
205
|
+
} else if (property === "rf") {
|
|
206
|
+
if (typeof value !== "number") {
|
|
207
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
208
|
+
}
|
|
209
|
+
const local = valueDB?.getValue(ProtectionCCValues.localProtectionState.endpoint(this.endpoint.index));
|
|
210
|
+
return this.set(local ?? import_Types.LocalProtectionState.Unprotected, value);
|
|
211
|
+
} else if (property === "exclusiveControlNodeId") {
|
|
212
|
+
if (typeof value !== "number") {
|
|
213
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
214
|
+
}
|
|
215
|
+
return this.setExclusiveControl(value);
|
|
216
|
+
} else {
|
|
182
217
|
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
get [import_API.POLL_VALUE]() {
|
|
222
|
+
return async function({ property }) {
|
|
223
|
+
switch (property) {
|
|
224
|
+
case "local":
|
|
225
|
+
case "rf":
|
|
226
|
+
return (await this.get())?.[property];
|
|
227
|
+
case "exclusiveControlNodeId":
|
|
228
|
+
return this.getExclusiveControl();
|
|
229
|
+
default:
|
|
230
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
235
|
+
async get() {
|
|
236
|
+
this.assertSupportsCommand(import_Types.ProtectionCommand, import_Types.ProtectionCommand.Get);
|
|
237
|
+
const cc = new ProtectionCCGet({
|
|
238
|
+
nodeId: this.endpoint.nodeId,
|
|
239
|
+
endpointIndex: this.endpoint.index
|
|
240
|
+
});
|
|
241
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
242
|
+
if (response) {
|
|
243
|
+
return (0, import_safe3.pick)(response, ["local", "rf"]);
|
|
183
244
|
}
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
187
|
-
async get() {
|
|
188
|
-
this.assertSupportsCommand(import_Types.ProtectionCommand, import_Types.ProtectionCommand.Get);
|
|
189
|
-
const cc = new ProtectionCCGet({
|
|
190
|
-
nodeId: this.endpoint.nodeId,
|
|
191
|
-
endpointIndex: this.endpoint.index
|
|
192
|
-
});
|
|
193
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
194
|
-
if (response) {
|
|
195
|
-
return (0, import_safe3.pick)(response, ["local", "rf"]);
|
|
196
245
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
209
|
-
}
|
|
210
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
211
|
-
async getSupported() {
|
|
212
|
-
this.assertSupportsCommand(import_Types.ProtectionCommand, import_Types.ProtectionCommand.SupportedGet);
|
|
213
|
-
const cc = new ProtectionCCSupportedGet({
|
|
214
|
-
nodeId: this.endpoint.nodeId,
|
|
215
|
-
endpointIndex: this.endpoint.index
|
|
216
|
-
});
|
|
217
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
218
|
-
if (response) {
|
|
219
|
-
return (0, import_safe3.pick)(response, [
|
|
220
|
-
"supportsExclusiveControl",
|
|
221
|
-
"supportsTimeout",
|
|
222
|
-
"supportedLocalStates",
|
|
223
|
-
"supportedRFStates"
|
|
224
|
-
]);
|
|
246
|
+
async set(local, rf) {
|
|
247
|
+
__assertType("local", "LocalProtectionState", __assertType__LocalProtectionState.bind(void 0, local));
|
|
248
|
+
__assertType("rf", "(optional) RFProtectionState", __assertType__optional_RFProtectionState.bind(void 0, rf));
|
|
249
|
+
this.assertSupportsCommand(import_Types.ProtectionCommand, import_Types.ProtectionCommand.Set);
|
|
250
|
+
const cc = new ProtectionCCSet({
|
|
251
|
+
nodeId: this.endpoint.nodeId,
|
|
252
|
+
endpointIndex: this.endpoint.index,
|
|
253
|
+
local,
|
|
254
|
+
rf
|
|
255
|
+
});
|
|
256
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
225
257
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
|
|
258
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
259
|
+
async getSupported() {
|
|
260
|
+
this.assertSupportsCommand(import_Types.ProtectionCommand, import_Types.ProtectionCommand.SupportedGet);
|
|
261
|
+
const cc = new ProtectionCCSupportedGet({
|
|
262
|
+
nodeId: this.endpoint.nodeId,
|
|
263
|
+
endpointIndex: this.endpoint.index
|
|
264
|
+
});
|
|
265
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
266
|
+
if (response) {
|
|
267
|
+
return (0, import_safe3.pick)(response, [
|
|
268
|
+
"supportsExclusiveControl",
|
|
269
|
+
"supportsTimeout",
|
|
270
|
+
"supportedLocalStates",
|
|
271
|
+
"supportedRFStates"
|
|
272
|
+
]);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
async getExclusiveControl() {
|
|
276
|
+
this.assertSupportsCommand(import_Types.ProtectionCommand, import_Types.ProtectionCommand.ExclusiveControlGet);
|
|
277
|
+
const cc = new ProtectionCCExclusiveControlGet({
|
|
278
|
+
nodeId: this.endpoint.nodeId,
|
|
279
|
+
endpointIndex: this.endpoint.index
|
|
280
|
+
});
|
|
281
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
282
|
+
return response?.exclusiveControlNodeId;
|
|
283
|
+
}
|
|
284
|
+
async setExclusiveControl(nodeId) {
|
|
285
|
+
__assertType("nodeId", "number", __assertType__number.bind(void 0, nodeId));
|
|
286
|
+
this.assertSupportsCommand(import_Types.ProtectionCommand, import_Types.ProtectionCommand.ExclusiveControlSet);
|
|
287
|
+
const cc = new ProtectionCCExclusiveControlSet({
|
|
288
|
+
nodeId: this.endpoint.nodeId,
|
|
289
|
+
endpointIndex: this.endpoint.index,
|
|
290
|
+
exclusiveControlNodeId: nodeId
|
|
291
|
+
});
|
|
292
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
293
|
+
}
|
|
294
|
+
async getTimeout() {
|
|
295
|
+
this.assertSupportsCommand(import_Types.ProtectionCommand, import_Types.ProtectionCommand.TimeoutGet);
|
|
296
|
+
const cc = new ProtectionCCTimeoutGet({
|
|
297
|
+
nodeId: this.endpoint.nodeId,
|
|
298
|
+
endpointIndex: this.endpoint.index
|
|
299
|
+
});
|
|
300
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
301
|
+
return response?.timeout;
|
|
302
|
+
}
|
|
303
|
+
async setTimeout(timeout) {
|
|
304
|
+
__assertType("timeout", "Timeout", __assertType__Timeout.bind(void 0, timeout));
|
|
305
|
+
this.assertSupportsCommand(import_Types.ProtectionCommand, import_Types.ProtectionCommand.TimeoutSet);
|
|
306
|
+
const cc = new ProtectionCCTimeoutSet({
|
|
307
|
+
nodeId: this.endpoint.nodeId,
|
|
308
|
+
endpointIndex: this.endpoint.index,
|
|
309
|
+
timeout
|
|
310
|
+
});
|
|
311
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
return ProtectionCCAPI2 = _classThis;
|
|
315
|
+
})();
|
|
316
|
+
let ProtectionCC = (() => {
|
|
317
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses.Protection), (0, import_CommandClassDecorators.implementedVersion)(2), (0, import_CommandClassDecorators.ccValues)(ProtectionCCValues)];
|
|
318
|
+
let _classDescriptor;
|
|
319
|
+
let _classExtraInitializers = [];
|
|
320
|
+
let _classThis;
|
|
321
|
+
let _classSuper = import_CommandClass.CommandClass;
|
|
322
|
+
var ProtectionCC2 = class extends _classSuper {
|
|
323
|
+
static {
|
|
324
|
+
_classThis = this;
|
|
325
|
+
}
|
|
326
|
+
static {
|
|
327
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
328
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
329
|
+
ProtectionCC2 = _classThis = _classDescriptor.value;
|
|
330
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
331
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
332
|
+
}
|
|
333
|
+
async interview(ctx) {
|
|
334
|
+
const node = this.getNode(ctx);
|
|
335
|
+
const endpoint = this.getEndpoint(ctx);
|
|
336
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses.Protection, ctx, endpoint).withOptions({
|
|
337
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
338
|
+
});
|
|
283
339
|
ctx.logNode(node.id, {
|
|
284
|
-
|
|
285
|
-
|
|
340
|
+
endpoint: this.endpointIndex,
|
|
341
|
+
message: `Interviewing ${this.ccName}...`,
|
|
342
|
+
direction: "none"
|
|
286
343
|
});
|
|
287
|
-
|
|
288
|
-
if (
|
|
289
|
-
|
|
344
|
+
let hadCriticalTimeout = false;
|
|
345
|
+
if (api.version >= 2) {
|
|
346
|
+
ctx.logNode(node.id, {
|
|
347
|
+
message: "querying protection capabilities...",
|
|
348
|
+
direction: "outbound"
|
|
349
|
+
});
|
|
350
|
+
const resp = await api.getSupported();
|
|
351
|
+
if (resp) {
|
|
352
|
+
const logMessage = `received protection capabilities:
|
|
290
353
|
exclusive control: ${resp.supportsExclusiveControl}
|
|
291
354
|
timeout: ${resp.supportsTimeout}
|
|
292
355
|
local protection states: ${resp.supportedLocalStates.map((local) => (0, import_safe3.getEnumMemberName)(import_Types.LocalProtectionState, local)).map((str) => `
|
|
293
356
|
\xB7 ${str}`).join("")}
|
|
294
357
|
RF protection states: ${resp.supportedRFStates.map((local) => (0, import_safe3.getEnumMemberName)(import_Types.RFProtectionState, local)).map((str) => `
|
|
295
358
|
\xB7 ${str}`).join("")}`;
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
359
|
+
ctx.logNode(node.id, {
|
|
360
|
+
message: logMessage,
|
|
361
|
+
direction: "inbound"
|
|
362
|
+
});
|
|
363
|
+
} else {
|
|
364
|
+
hadCriticalTimeout = true;
|
|
365
|
+
}
|
|
302
366
|
}
|
|
367
|
+
await this.refreshValues(ctx);
|
|
368
|
+
if (!hadCriticalTimeout)
|
|
369
|
+
this.setInterviewComplete(ctx, true);
|
|
303
370
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
this.
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
const node = this.getNode(ctx);
|
|
310
|
-
const endpoint = this.getEndpoint(ctx);
|
|
311
|
-
const api = import_API.CCAPI.create(import_safe.CommandClasses.Protection, ctx, endpoint).withOptions({
|
|
312
|
-
priority: import_safe.MessagePriority.NodeQuery
|
|
313
|
-
});
|
|
314
|
-
const supportsExclusiveControl = !!this.getValue(ctx, ProtectionCCValues.supportsExclusiveControl);
|
|
315
|
-
const supportsTimeout = !!this.getValue(ctx, ProtectionCCValues.supportsTimeout);
|
|
316
|
-
ctx.logNode(node.id, {
|
|
317
|
-
message: "querying protection status...",
|
|
318
|
-
direction: "outbound"
|
|
319
|
-
});
|
|
320
|
-
const protectionResp = await api.get();
|
|
321
|
-
if (protectionResp) {
|
|
322
|
-
let logMessage = `received protection status:
|
|
323
|
-
local: ${(0, import_safe3.getEnumMemberName)(import_Types.LocalProtectionState, protectionResp.local)}`;
|
|
324
|
-
if (protectionResp.rf != void 0) {
|
|
325
|
-
logMessage += `
|
|
326
|
-
rf ${(0, import_safe3.getEnumMemberName)(import_Types.RFProtectionState, protectionResp.rf)}`;
|
|
327
|
-
}
|
|
328
|
-
ctx.logNode(node.id, {
|
|
329
|
-
message: logMessage,
|
|
330
|
-
direction: "inbound"
|
|
371
|
+
async refreshValues(ctx) {
|
|
372
|
+
const node = this.getNode(ctx);
|
|
373
|
+
const endpoint = this.getEndpoint(ctx);
|
|
374
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses.Protection, ctx, endpoint).withOptions({
|
|
375
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
331
376
|
});
|
|
332
|
-
|
|
333
|
-
|
|
377
|
+
const supportsExclusiveControl = !!this.getValue(ctx, ProtectionCCValues.supportsExclusiveControl);
|
|
378
|
+
const supportsTimeout = !!this.getValue(ctx, ProtectionCCValues.supportsTimeout);
|
|
334
379
|
ctx.logNode(node.id, {
|
|
335
|
-
message: "querying protection
|
|
380
|
+
message: "querying protection status...",
|
|
336
381
|
direction: "outbound"
|
|
337
382
|
});
|
|
338
|
-
const
|
|
339
|
-
if (
|
|
383
|
+
const protectionResp = await api.get();
|
|
384
|
+
if (protectionResp) {
|
|
385
|
+
let logMessage = `received protection status:
|
|
386
|
+
local: ${(0, import_safe3.getEnumMemberName)(import_Types.LocalProtectionState, protectionResp.local)}`;
|
|
387
|
+
if (protectionResp.rf != void 0) {
|
|
388
|
+
logMessage += `
|
|
389
|
+
rf ${(0, import_safe3.getEnumMemberName)(import_Types.RFProtectionState, protectionResp.rf)}`;
|
|
390
|
+
}
|
|
340
391
|
ctx.logNode(node.id, {
|
|
341
|
-
message:
|
|
392
|
+
message: logMessage,
|
|
342
393
|
direction: "inbound"
|
|
343
394
|
});
|
|
344
395
|
}
|
|
345
|
-
|
|
346
|
-
if (supportsExclusiveControl) {
|
|
347
|
-
ctx.logNode(node.id, {
|
|
348
|
-
message: "querying exclusive control node...",
|
|
349
|
-
direction: "outbound"
|
|
350
|
-
});
|
|
351
|
-
const nodeId = await api.getExclusiveControl();
|
|
352
|
-
if (nodeId != void 0) {
|
|
396
|
+
if (supportsTimeout) {
|
|
353
397
|
ctx.logNode(node.id, {
|
|
354
|
-
message:
|
|
355
|
-
direction: "
|
|
398
|
+
message: "querying protection timeout...",
|
|
399
|
+
direction: "outbound"
|
|
356
400
|
});
|
|
401
|
+
const timeout = await api.getTimeout();
|
|
402
|
+
if (timeout) {
|
|
403
|
+
ctx.logNode(node.id, {
|
|
404
|
+
message: `received timeout: ${timeout.toString()}`,
|
|
405
|
+
direction: "inbound"
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
if (supportsExclusiveControl) {
|
|
410
|
+
ctx.logNode(node.id, {
|
|
411
|
+
message: "querying exclusive control node...",
|
|
412
|
+
direction: "outbound"
|
|
413
|
+
});
|
|
414
|
+
const nodeId = await api.getExclusiveControl();
|
|
415
|
+
if (nodeId != void 0) {
|
|
416
|
+
ctx.logNode(node.id, {
|
|
417
|
+
message: (nodeId !== 0 ? `Node ${(0, import_strings.padStart)(nodeId.toString(), 3, "0")}` : `no node`) + ` has exclusive control`,
|
|
418
|
+
direction: "inbound"
|
|
419
|
+
});
|
|
420
|
+
}
|
|
357
421
|
}
|
|
358
422
|
}
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
(0, import_CommandClassDecorators.
|
|
364
|
-
|
|
365
|
-
]
|
|
366
|
-
let
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
}
|
|
372
|
-
static from(_raw, _ctx) {
|
|
373
|
-
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
374
|
-
}
|
|
375
|
-
local;
|
|
376
|
-
rf;
|
|
377
|
-
serialize(ctx) {
|
|
378
|
-
this.payload = import_safe2.Bytes.from([
|
|
379
|
-
this.local & 15,
|
|
380
|
-
(this.rf ?? import_Types.RFProtectionState.Unprotected) & 15
|
|
381
|
-
]);
|
|
382
|
-
const ccVersion = (0, import_CommandClass.getEffectiveCCVersion)(ctx, this);
|
|
383
|
-
if (ccVersion < 2 && ctx.getDeviceConfig?.(this.nodeId)?.compat?.encodeCCsUsingTargetVersion) {
|
|
384
|
-
this.payload = this.payload.subarray(0, 1);
|
|
385
|
-
}
|
|
386
|
-
return super.serialize(ctx);
|
|
387
|
-
}
|
|
388
|
-
toLogEntry(ctx) {
|
|
389
|
-
const message = {
|
|
390
|
-
local: (0, import_safe3.getEnumMemberName)(import_Types.LocalProtectionState, this.local)
|
|
391
|
-
};
|
|
392
|
-
if (this.rf != void 0) {
|
|
393
|
-
message.rf = (0, import_safe3.getEnumMemberName)(import_Types.RFProtectionState, this.rf);
|
|
423
|
+
};
|
|
424
|
+
return ProtectionCC2 = _classThis;
|
|
425
|
+
})();
|
|
426
|
+
let ProtectionCCSet = (() => {
|
|
427
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.Set), (0, import_CommandClassDecorators.useSupervision)()];
|
|
428
|
+
let _classDescriptor;
|
|
429
|
+
let _classExtraInitializers = [];
|
|
430
|
+
let _classThis;
|
|
431
|
+
let _classSuper = ProtectionCC;
|
|
432
|
+
var ProtectionCCSet2 = class extends _classSuper {
|
|
433
|
+
static {
|
|
434
|
+
_classThis = this;
|
|
394
435
|
}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
ProtectionCCSet = __decorate([
|
|
402
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.Set),
|
|
403
|
-
(0, import_CommandClassDecorators.useSupervision)()
|
|
404
|
-
], ProtectionCCSet);
|
|
405
|
-
let ProtectionCCReport = ProtectionCCReport_1 = class ProtectionCCReport2 extends ProtectionCC {
|
|
406
|
-
constructor(options) {
|
|
407
|
-
super(options);
|
|
408
|
-
this.local = options.local;
|
|
409
|
-
this.rf = options.rf;
|
|
410
|
-
}
|
|
411
|
-
static from(raw, ctx) {
|
|
412
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
413
|
-
const local = raw.payload[0] & 15;
|
|
414
|
-
let rf;
|
|
415
|
-
if (raw.payload.length >= 2) {
|
|
416
|
-
rf = raw.payload[1] & 15;
|
|
417
|
-
}
|
|
418
|
-
return new ProtectionCCReport_1({
|
|
419
|
-
nodeId: ctx.sourceNodeId,
|
|
420
|
-
local,
|
|
421
|
-
rf
|
|
422
|
-
});
|
|
423
|
-
}
|
|
424
|
-
local;
|
|
425
|
-
rf;
|
|
426
|
-
toLogEntry(ctx) {
|
|
427
|
-
const message = {
|
|
428
|
-
local: (0, import_safe3.getEnumMemberName)(import_Types.LocalProtectionState, this.local)
|
|
429
|
-
};
|
|
430
|
-
if (this.rf != void 0) {
|
|
431
|
-
message.rf = (0, import_safe3.getEnumMemberName)(import_Types.RFProtectionState, this.rf);
|
|
436
|
+
static {
|
|
437
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
438
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
439
|
+
ProtectionCCSet2 = _classThis = _classDescriptor.value;
|
|
440
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
441
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
432
442
|
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
]
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.Get),
|
|
452
|
-
(0, import_CommandClassDecorators.expectedCCResponse)(ProtectionCCReport)
|
|
453
|
-
], ProtectionCCGet);
|
|
454
|
-
let ProtectionCCSupportedReport = ProtectionCCSupportedReport_1 = class ProtectionCCSupportedReport2 extends ProtectionCC {
|
|
455
|
-
constructor(options) {
|
|
456
|
-
super(options);
|
|
457
|
-
this.supportsTimeout = options.supportsTimeout;
|
|
458
|
-
this.supportsExclusiveControl = options.supportsExclusiveControl;
|
|
459
|
-
this.supportedLocalStates = options.supportedLocalStates;
|
|
460
|
-
this.supportedRFStates = options.supportedRFStates;
|
|
461
|
-
}
|
|
462
|
-
static from(raw, ctx) {
|
|
463
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 5);
|
|
464
|
-
const supportsTimeout = !!(raw.payload[0] & 1);
|
|
465
|
-
const supportsExclusiveControl = !!(raw.payload[0] & 2);
|
|
466
|
-
const supportedLocalStates = (0, import_safe.parseBitMask)(raw.payload.subarray(1, 3), import_Types.LocalProtectionState.Unprotected);
|
|
467
|
-
const supportedRFStates = (0, import_safe.parseBitMask)(raw.payload.subarray(3, 5), import_Types.RFProtectionState.Unprotected);
|
|
468
|
-
return new ProtectionCCSupportedReport_1({
|
|
469
|
-
nodeId: ctx.sourceNodeId,
|
|
470
|
-
supportsTimeout,
|
|
471
|
-
supportsExclusiveControl,
|
|
472
|
-
supportedLocalStates,
|
|
473
|
-
supportedRFStates
|
|
474
|
-
});
|
|
475
|
-
}
|
|
476
|
-
persistValues(ctx) {
|
|
477
|
-
if (!super.persistValues(ctx))
|
|
478
|
-
return false;
|
|
479
|
-
const localStateValue = ProtectionCCValues.localProtectionState;
|
|
480
|
-
this.setMetadata(ctx, localStateValue, {
|
|
481
|
-
...localStateValue.meta,
|
|
482
|
-
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.LocalProtectionState, this.supportedLocalStates)
|
|
483
|
-
});
|
|
484
|
-
const rfStateValue = ProtectionCCValues.rfProtectionState;
|
|
485
|
-
this.setMetadata(ctx, rfStateValue, {
|
|
486
|
-
...rfStateValue.meta,
|
|
487
|
-
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.RFProtectionState, this.supportedRFStates)
|
|
488
|
-
});
|
|
489
|
-
return true;
|
|
490
|
-
}
|
|
491
|
-
supportsExclusiveControl;
|
|
492
|
-
supportsTimeout;
|
|
493
|
-
supportedLocalStates;
|
|
494
|
-
supportedRFStates;
|
|
495
|
-
toLogEntry(ctx) {
|
|
496
|
-
return {
|
|
497
|
-
...super.toLogEntry(ctx),
|
|
498
|
-
message: {
|
|
499
|
-
"supports exclusive control": this.supportsExclusiveControl,
|
|
500
|
-
"supports timeout": this.supportsTimeout,
|
|
501
|
-
"local protection states": this.supportedLocalStates.map((local) => (0, import_safe3.getEnumMemberName)(import_Types.LocalProtectionState, local)).map((str) => `
|
|
502
|
-
\xB7 ${str}`).join(""),
|
|
503
|
-
"RF protection states": this.supportedRFStates.map((rf) => (0, import_safe3.getEnumMemberName)(import_Types.RFProtectionState, rf)).map((str) => `
|
|
504
|
-
\xB7 ${str}`).join("")
|
|
443
|
+
constructor(options) {
|
|
444
|
+
super(options);
|
|
445
|
+
this.local = options.local;
|
|
446
|
+
this.rf = options.rf;
|
|
447
|
+
}
|
|
448
|
+
static from(_raw, _ctx) {
|
|
449
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
450
|
+
}
|
|
451
|
+
local;
|
|
452
|
+
rf;
|
|
453
|
+
serialize(ctx) {
|
|
454
|
+
this.payload = import_safe2.Bytes.from([
|
|
455
|
+
this.local & 15,
|
|
456
|
+
(this.rf ?? import_Types.RFProtectionState.Unprotected) & 15
|
|
457
|
+
]);
|
|
458
|
+
const ccVersion = (0, import_CommandClass.getEffectiveCCVersion)(ctx, this);
|
|
459
|
+
if (ccVersion < 2 && ctx.getDeviceConfig?.(this.nodeId)?.compat?.encodeCCsUsingTargetVersion) {
|
|
460
|
+
this.payload = this.payload.subarray(0, 1);
|
|
505
461
|
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
], ProtectionCCSupportedReport.prototype, "supportsTimeout", void 0);
|
|
515
|
-
__decorate([
|
|
516
|
-
(0, import_CommandClassDecorators.ccValue)(ProtectionCCValues.supportedLocalStates)
|
|
517
|
-
], ProtectionCCSupportedReport.prototype, "supportedLocalStates", void 0);
|
|
518
|
-
__decorate([
|
|
519
|
-
(0, import_CommandClassDecorators.ccValue)(ProtectionCCValues.supportedRFStates)
|
|
520
|
-
], ProtectionCCSupportedReport.prototype, "supportedRFStates", void 0);
|
|
521
|
-
ProtectionCCSupportedReport = ProtectionCCSupportedReport_1 = __decorate([
|
|
522
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.SupportedReport)
|
|
523
|
-
], ProtectionCCSupportedReport);
|
|
524
|
-
let ProtectionCCSupportedGet = class ProtectionCCSupportedGet2 extends ProtectionCC {
|
|
525
|
-
};
|
|
526
|
-
ProtectionCCSupportedGet = __decorate([
|
|
527
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.SupportedGet),
|
|
528
|
-
(0, import_CommandClassDecorators.expectedCCResponse)(ProtectionCCSupportedReport)
|
|
529
|
-
], ProtectionCCSupportedGet);
|
|
530
|
-
let ProtectionCCExclusiveControlReport = ProtectionCCExclusiveControlReport_1 = class ProtectionCCExclusiveControlReport2 extends ProtectionCC {
|
|
531
|
-
constructor(options) {
|
|
532
|
-
super(options);
|
|
533
|
-
this.exclusiveControlNodeId = options.exclusiveControlNodeId;
|
|
534
|
-
}
|
|
535
|
-
static from(raw, ctx) {
|
|
536
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
537
|
-
const exclusiveControlNodeId = raw.payload[0];
|
|
538
|
-
return new ProtectionCCExclusiveControlReport_1({
|
|
539
|
-
nodeId: ctx.sourceNodeId,
|
|
540
|
-
exclusiveControlNodeId
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
exclusiveControlNodeId;
|
|
544
|
-
toLogEntry(ctx) {
|
|
545
|
-
return {
|
|
546
|
-
...super.toLogEntry(ctx),
|
|
547
|
-
message: {
|
|
548
|
-
"exclusive control node id": this.exclusiveControlNodeId
|
|
462
|
+
return super.serialize(ctx);
|
|
463
|
+
}
|
|
464
|
+
toLogEntry(ctx) {
|
|
465
|
+
const message = {
|
|
466
|
+
local: (0, import_safe3.getEnumMemberName)(import_Types.LocalProtectionState, this.local)
|
|
467
|
+
};
|
|
468
|
+
if (this.rf != void 0) {
|
|
469
|
+
message.rf = (0, import_safe3.getEnumMemberName)(import_Types.RFProtectionState, this.rf);
|
|
549
470
|
}
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
let
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
471
|
+
return {
|
|
472
|
+
...super.toLogEntry(ctx),
|
|
473
|
+
message
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
return ProtectionCCSet2 = _classThis;
|
|
478
|
+
})();
|
|
479
|
+
let ProtectionCCReport = (() => {
|
|
480
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("local", ProtectionCCValues.localProtectionState), (0, import_CommandClassDecorators.ccValueProperty)("rf", ProtectionCCValues.rfProtectionState)];
|
|
481
|
+
let _classDescriptor;
|
|
482
|
+
let _classExtraInitializers = [];
|
|
483
|
+
let _classThis;
|
|
484
|
+
let _classSuper = ProtectionCC;
|
|
485
|
+
var ProtectionCCReport2 = class extends _classSuper {
|
|
486
|
+
static {
|
|
487
|
+
_classThis = this;
|
|
488
|
+
}
|
|
489
|
+
static {
|
|
490
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
491
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
492
|
+
ProtectionCCReport2 = _classThis = _classDescriptor.value;
|
|
493
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
494
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
495
|
+
}
|
|
496
|
+
constructor(options) {
|
|
497
|
+
super(options);
|
|
498
|
+
this.local = options.local;
|
|
499
|
+
this.rf = options.rf;
|
|
500
|
+
}
|
|
501
|
+
static from(raw, ctx) {
|
|
502
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
503
|
+
const local = raw.payload[0] & 15;
|
|
504
|
+
let rf;
|
|
505
|
+
if (raw.payload.length >= 2) {
|
|
506
|
+
rf = raw.payload[1] & 15;
|
|
583
507
|
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
]
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
508
|
+
return new this({
|
|
509
|
+
nodeId: ctx.sourceNodeId,
|
|
510
|
+
local,
|
|
511
|
+
rf
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
local;
|
|
515
|
+
rf;
|
|
516
|
+
toLogEntry(ctx) {
|
|
517
|
+
const message = {
|
|
518
|
+
local: (0, import_safe3.getEnumMemberName)(import_Types.LocalProtectionState, this.local)
|
|
519
|
+
};
|
|
520
|
+
if (this.rf != void 0) {
|
|
521
|
+
message.rf = (0, import_safe3.getEnumMemberName)(import_Types.RFProtectionState, this.rf);
|
|
522
|
+
}
|
|
523
|
+
return {
|
|
524
|
+
...super.toLogEntry(ctx),
|
|
525
|
+
message
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
};
|
|
529
|
+
return ProtectionCCReport2 = _classThis;
|
|
530
|
+
})();
|
|
531
|
+
let ProtectionCCGet = (() => {
|
|
532
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.Get), (0, import_CommandClassDecorators.expectedCCResponse)(ProtectionCCReport)];
|
|
533
|
+
let _classDescriptor;
|
|
534
|
+
let _classExtraInitializers = [];
|
|
535
|
+
let _classThis;
|
|
536
|
+
let _classSuper = ProtectionCC;
|
|
537
|
+
var ProtectionCCGet2 = class extends _classSuper {
|
|
538
|
+
static {
|
|
539
|
+
_classThis = this;
|
|
540
|
+
}
|
|
541
|
+
static {
|
|
542
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
543
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
544
|
+
ProtectionCCGet2 = _classThis = _classDescriptor.value;
|
|
545
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
546
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
return ProtectionCCGet2 = _classThis;
|
|
550
|
+
})();
|
|
551
|
+
let ProtectionCCSupportedReport = (() => {
|
|
552
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.SupportedReport), (0, import_CommandClassDecorators.ccValueProperty)("supportsExclusiveControl", ProtectionCCValues.supportsExclusiveControl), (0, import_CommandClassDecorators.ccValueProperty)("supportsTimeout", ProtectionCCValues.supportsTimeout), (0, import_CommandClassDecorators.ccValueProperty)("supportedLocalStates", ProtectionCCValues.supportedLocalStates), (0, import_CommandClassDecorators.ccValueProperty)("supportedRFStates", ProtectionCCValues.supportedRFStates)];
|
|
553
|
+
let _classDescriptor;
|
|
554
|
+
let _classExtraInitializers = [];
|
|
555
|
+
let _classThis;
|
|
556
|
+
let _classSuper = ProtectionCC;
|
|
557
|
+
var ProtectionCCSupportedReport2 = class extends _classSuper {
|
|
558
|
+
static {
|
|
559
|
+
_classThis = this;
|
|
560
|
+
}
|
|
561
|
+
static {
|
|
562
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
563
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
564
|
+
ProtectionCCSupportedReport2 = _classThis = _classDescriptor.value;
|
|
565
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
566
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
567
|
+
}
|
|
568
|
+
constructor(options) {
|
|
569
|
+
super(options);
|
|
570
|
+
this.supportsTimeout = options.supportsTimeout;
|
|
571
|
+
this.supportsExclusiveControl = options.supportsExclusiveControl;
|
|
572
|
+
this.supportedLocalStates = options.supportedLocalStates;
|
|
573
|
+
this.supportedRFStates = options.supportedRFStates;
|
|
574
|
+
}
|
|
575
|
+
static from(raw, ctx) {
|
|
576
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 5);
|
|
577
|
+
const supportsTimeout = !!(raw.payload[0] & 1);
|
|
578
|
+
const supportsExclusiveControl = !!(raw.payload[0] & 2);
|
|
579
|
+
const supportedLocalStates = (0, import_safe.parseBitMask)(raw.payload.subarray(1, 3), import_Types.LocalProtectionState.Unprotected);
|
|
580
|
+
const supportedRFStates = (0, import_safe.parseBitMask)(raw.payload.subarray(3, 5), import_Types.RFProtectionState.Unprotected);
|
|
581
|
+
return new this({
|
|
582
|
+
nodeId: ctx.sourceNodeId,
|
|
583
|
+
supportsTimeout,
|
|
584
|
+
supportsExclusiveControl,
|
|
585
|
+
supportedLocalStates,
|
|
586
|
+
supportedRFStates
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
persistValues(ctx) {
|
|
590
|
+
if (!super.persistValues(ctx))
|
|
591
|
+
return false;
|
|
592
|
+
const localStateValue = ProtectionCCValues.localProtectionState;
|
|
593
|
+
this.setMetadata(ctx, localStateValue, {
|
|
594
|
+
...localStateValue.meta,
|
|
595
|
+
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.LocalProtectionState, this.supportedLocalStates)
|
|
596
|
+
});
|
|
597
|
+
const rfStateValue = ProtectionCCValues.rfProtectionState;
|
|
598
|
+
this.setMetadata(ctx, rfStateValue, {
|
|
599
|
+
...rfStateValue.meta,
|
|
600
|
+
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.RFProtectionState, this.supportedRFStates)
|
|
601
|
+
});
|
|
602
|
+
return true;
|
|
603
|
+
}
|
|
604
|
+
supportsExclusiveControl;
|
|
605
|
+
supportsTimeout;
|
|
606
|
+
supportedLocalStates;
|
|
607
|
+
supportedRFStates;
|
|
608
|
+
toLogEntry(ctx) {
|
|
609
|
+
return {
|
|
610
|
+
...super.toLogEntry(ctx),
|
|
611
|
+
message: {
|
|
612
|
+
"supports exclusive control": this.supportsExclusiveControl,
|
|
613
|
+
"supports timeout": this.supportsTimeout,
|
|
614
|
+
"local protection states": this.supportedLocalStates.map((local) => (0, import_safe3.getEnumMemberName)(import_Types.LocalProtectionState, local)).map((str) => `
|
|
615
|
+
\xB7 ${str}`).join(""),
|
|
616
|
+
"RF protection states": this.supportedRFStates.map((rf) => (0, import_safe3.getEnumMemberName)(import_Types.RFProtectionState, rf)).map((str) => `
|
|
617
|
+
\xB7 ${str}`).join("")
|
|
618
|
+
}
|
|
619
|
+
};
|
|
620
|
+
}
|
|
621
|
+
};
|
|
622
|
+
return ProtectionCCSupportedReport2 = _classThis;
|
|
623
|
+
})();
|
|
624
|
+
let ProtectionCCSupportedGet = (() => {
|
|
625
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.SupportedGet), (0, import_CommandClassDecorators.expectedCCResponse)(ProtectionCCSupportedReport)];
|
|
626
|
+
let _classDescriptor;
|
|
627
|
+
let _classExtraInitializers = [];
|
|
628
|
+
let _classThis;
|
|
629
|
+
let _classSuper = ProtectionCC;
|
|
630
|
+
var ProtectionCCSupportedGet2 = class extends _classSuper {
|
|
631
|
+
static {
|
|
632
|
+
_classThis = this;
|
|
633
|
+
}
|
|
634
|
+
static {
|
|
635
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
636
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
637
|
+
ProtectionCCSupportedGet2 = _classThis = _classDescriptor.value;
|
|
638
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
639
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
640
|
+
}
|
|
641
|
+
};
|
|
642
|
+
return ProtectionCCSupportedGet2 = _classThis;
|
|
643
|
+
})();
|
|
644
|
+
let ProtectionCCExclusiveControlReport = (() => {
|
|
645
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.ExclusiveControlReport), (0, import_CommandClassDecorators.ccValueProperty)("exclusiveControlNodeId", ProtectionCCValues.exclusiveControlNodeId)];
|
|
646
|
+
let _classDescriptor;
|
|
647
|
+
let _classExtraInitializers = [];
|
|
648
|
+
let _classThis;
|
|
649
|
+
let _classSuper = ProtectionCC;
|
|
650
|
+
var ProtectionCCExclusiveControlReport2 = class extends _classSuper {
|
|
651
|
+
static {
|
|
652
|
+
_classThis = this;
|
|
653
|
+
}
|
|
654
|
+
static {
|
|
655
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
656
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
657
|
+
ProtectionCCExclusiveControlReport2 = _classThis = _classDescriptor.value;
|
|
658
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
659
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
660
|
+
}
|
|
661
|
+
constructor(options) {
|
|
662
|
+
super(options);
|
|
663
|
+
this.exclusiveControlNodeId = options.exclusiveControlNodeId;
|
|
664
|
+
}
|
|
665
|
+
static from(raw, ctx) {
|
|
666
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
667
|
+
const exclusiveControlNodeId = raw.payload[0];
|
|
668
|
+
return new this({
|
|
669
|
+
nodeId: ctx.sourceNodeId,
|
|
670
|
+
exclusiveControlNodeId
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
exclusiveControlNodeId;
|
|
674
|
+
toLogEntry(ctx) {
|
|
675
|
+
return {
|
|
676
|
+
...super.toLogEntry(ctx),
|
|
677
|
+
message: {
|
|
678
|
+
"exclusive control node id": this.exclusiveControlNodeId
|
|
679
|
+
}
|
|
680
|
+
};
|
|
681
|
+
}
|
|
682
|
+
};
|
|
683
|
+
return ProtectionCCExclusiveControlReport2 = _classThis;
|
|
684
|
+
})();
|
|
685
|
+
let ProtectionCCExclusiveControlGet = (() => {
|
|
686
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.ExclusiveControlGet), (0, import_CommandClassDecorators.expectedCCResponse)(ProtectionCCExclusiveControlReport)];
|
|
687
|
+
let _classDescriptor;
|
|
688
|
+
let _classExtraInitializers = [];
|
|
689
|
+
let _classThis;
|
|
690
|
+
let _classSuper = ProtectionCC;
|
|
691
|
+
var ProtectionCCExclusiveControlGet2 = class extends _classSuper {
|
|
692
|
+
static {
|
|
693
|
+
_classThis = this;
|
|
694
|
+
}
|
|
695
|
+
static {
|
|
696
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
697
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
698
|
+
ProtectionCCExclusiveControlGet2 = _classThis = _classDescriptor.value;
|
|
699
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
700
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
701
|
+
}
|
|
702
|
+
};
|
|
703
|
+
return ProtectionCCExclusiveControlGet2 = _classThis;
|
|
704
|
+
})();
|
|
705
|
+
let ProtectionCCExclusiveControlSet = (() => {
|
|
706
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.ExclusiveControlSet), (0, import_CommandClassDecorators.expectedCCResponse)(ProtectionCCReport), (0, import_CommandClassDecorators.useSupervision)()];
|
|
707
|
+
let _classDescriptor;
|
|
708
|
+
let _classExtraInitializers = [];
|
|
709
|
+
let _classThis;
|
|
710
|
+
let _classSuper = ProtectionCC;
|
|
711
|
+
var ProtectionCCExclusiveControlSet2 = class extends _classSuper {
|
|
712
|
+
static {
|
|
713
|
+
_classThis = this;
|
|
714
|
+
}
|
|
715
|
+
static {
|
|
716
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
717
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
718
|
+
ProtectionCCExclusiveControlSet2 = _classThis = _classDescriptor.value;
|
|
719
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
720
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
721
|
+
}
|
|
722
|
+
constructor(options) {
|
|
723
|
+
super(options);
|
|
724
|
+
this.exclusiveControlNodeId = options.exclusiveControlNodeId;
|
|
725
|
+
}
|
|
726
|
+
static from(_raw, _ctx) {
|
|
727
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
728
|
+
}
|
|
729
|
+
exclusiveControlNodeId;
|
|
730
|
+
serialize(ctx) {
|
|
731
|
+
this.payload = import_safe2.Bytes.from([this.exclusiveControlNodeId]);
|
|
732
|
+
return super.serialize(ctx);
|
|
733
|
+
}
|
|
734
|
+
toLogEntry(ctx) {
|
|
735
|
+
return {
|
|
736
|
+
...super.toLogEntry(ctx),
|
|
737
|
+
message: {
|
|
738
|
+
"exclusive control node id": this.exclusiveControlNodeId
|
|
739
|
+
}
|
|
740
|
+
};
|
|
741
|
+
}
|
|
742
|
+
};
|
|
743
|
+
return ProtectionCCExclusiveControlSet2 = _classThis;
|
|
744
|
+
})();
|
|
745
|
+
let ProtectionCCTimeoutReport = (() => {
|
|
746
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.TimeoutReport), (0, import_CommandClassDecorators.ccValueProperty)("timeout", ProtectionCCValues.timeout)];
|
|
747
|
+
let _classDescriptor;
|
|
748
|
+
let _classExtraInitializers = [];
|
|
749
|
+
let _classThis;
|
|
750
|
+
let _classSuper = ProtectionCC;
|
|
751
|
+
var ProtectionCCTimeoutReport2 = class extends _classSuper {
|
|
752
|
+
static {
|
|
753
|
+
_classThis = this;
|
|
754
|
+
}
|
|
755
|
+
static {
|
|
756
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
757
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
758
|
+
ProtectionCCTimeoutReport2 = _classThis = _classDescriptor.value;
|
|
759
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
760
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
761
|
+
}
|
|
762
|
+
constructor(options) {
|
|
763
|
+
super(options);
|
|
764
|
+
this.timeout = options.timeout;
|
|
765
|
+
}
|
|
766
|
+
static from(raw, ctx) {
|
|
767
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
768
|
+
const timeout = import_safe.Timeout.parse(raw.payload[0]);
|
|
769
|
+
return new this({
|
|
770
|
+
nodeId: ctx.sourceNodeId,
|
|
771
|
+
timeout
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
timeout;
|
|
775
|
+
toLogEntry(ctx) {
|
|
776
|
+
return {
|
|
777
|
+
...super.toLogEntry(ctx),
|
|
778
|
+
message: { timeout: this.timeout.toString() }
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
};
|
|
782
|
+
return ProtectionCCTimeoutReport2 = _classThis;
|
|
783
|
+
})();
|
|
784
|
+
let ProtectionCCTimeoutGet = (() => {
|
|
785
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.TimeoutGet), (0, import_CommandClassDecorators.expectedCCResponse)(ProtectionCCTimeoutReport)];
|
|
786
|
+
let _classDescriptor;
|
|
787
|
+
let _classExtraInitializers = [];
|
|
788
|
+
let _classThis;
|
|
789
|
+
let _classSuper = ProtectionCC;
|
|
790
|
+
var ProtectionCCTimeoutGet2 = class extends _classSuper {
|
|
791
|
+
static {
|
|
792
|
+
_classThis = this;
|
|
793
|
+
}
|
|
794
|
+
static {
|
|
795
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
796
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
797
|
+
ProtectionCCTimeoutGet2 = _classThis = _classDescriptor.value;
|
|
798
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
799
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
800
|
+
}
|
|
801
|
+
};
|
|
802
|
+
return ProtectionCCTimeoutGet2 = _classThis;
|
|
803
|
+
})();
|
|
804
|
+
let ProtectionCCTimeoutSet = (() => {
|
|
805
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.TimeoutSet), (0, import_CommandClassDecorators.expectedCCResponse)(ProtectionCCReport), (0, import_CommandClassDecorators.useSupervision)()];
|
|
806
|
+
let _classDescriptor;
|
|
807
|
+
let _classExtraInitializers = [];
|
|
808
|
+
let _classThis;
|
|
809
|
+
let _classSuper = ProtectionCC;
|
|
810
|
+
var ProtectionCCTimeoutSet2 = class extends _classSuper {
|
|
811
|
+
static {
|
|
812
|
+
_classThis = this;
|
|
813
|
+
}
|
|
814
|
+
static {
|
|
815
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
816
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
817
|
+
ProtectionCCTimeoutSet2 = _classThis = _classDescriptor.value;
|
|
818
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
819
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
820
|
+
}
|
|
821
|
+
constructor(options) {
|
|
822
|
+
super(options);
|
|
823
|
+
this.timeout = options.timeout;
|
|
824
|
+
}
|
|
825
|
+
static from(_raw, _ctx) {
|
|
826
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
827
|
+
}
|
|
828
|
+
timeout;
|
|
829
|
+
serialize(ctx) {
|
|
830
|
+
this.payload = import_safe2.Bytes.from([this.timeout.serialize()]);
|
|
831
|
+
return super.serialize(ctx);
|
|
832
|
+
}
|
|
833
|
+
toLogEntry(ctx) {
|
|
834
|
+
return {
|
|
835
|
+
...super.toLogEntry(ctx),
|
|
836
|
+
message: { timeout: this.timeout.toString() }
|
|
837
|
+
};
|
|
838
|
+
}
|
|
839
|
+
};
|
|
840
|
+
return ProtectionCCTimeoutSet2 = _classThis;
|
|
841
|
+
})();
|
|
650
842
|
// Annotate the CommonJS export names for ESM import in node:
|
|
651
843
|
0 && (module.exports = {
|
|
652
844
|
ProtectionCC,
|