@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
|
@@ -35,13 +35,45 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
35
35
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
36
36
|
var import_Values = require("../lib/Values.js");
|
|
37
37
|
var import_Types = require("../lib/_Types.js");
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
39
|
+
function accept(f) {
|
|
40
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
41
|
+
return f;
|
|
42
|
+
}
|
|
43
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
44
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
45
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
46
|
+
var _, done = false;
|
|
47
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
48
|
+
var context = {};
|
|
49
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
50
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
51
|
+
context.addInitializer = function(f) {
|
|
52
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
53
|
+
extraInitializers.push(accept(f || null));
|
|
54
|
+
};
|
|
55
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
56
|
+
if (kind === "accessor") {
|
|
57
|
+
if (result === void 0) continue;
|
|
58
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
59
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
60
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
61
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
62
|
+
} else if (_ = accept(result)) {
|
|
63
|
+
if (kind === "field") initializers.unshift(_);
|
|
64
|
+
else descriptor[key] = _;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
68
|
+
done = true;
|
|
69
|
+
};
|
|
70
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
71
|
+
var useValue = arguments.length > 2;
|
|
72
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
73
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
74
|
+
}
|
|
75
|
+
return useValue ? value : void 0;
|
|
43
76
|
};
|
|
44
|
-
var AlarmSensorCCReport_1, AlarmSensorCCSupportedReport_1;
|
|
45
77
|
function __assertType(argName, typeName, boundHasError) {
|
|
46
78
|
const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
|
|
47
79
|
if (boundHasError()) {
|
|
@@ -101,287 +133,370 @@ const AlarmSensorCCValues = Object.freeze({
|
|
|
101
133
|
})
|
|
102
134
|
})
|
|
103
135
|
});
|
|
104
|
-
let AlarmSensorCCAPI =
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
return
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
};
|
|
141
|
-
AlarmSensorCCAPI = __decorate([
|
|
142
|
-
(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Alarm Sensor"])
|
|
143
|
-
], AlarmSensorCCAPI);
|
|
144
|
-
let AlarmSensorCC = class AlarmSensorCC2 extends import_CommandClass.CommandClass {
|
|
145
|
-
async interview(ctx) {
|
|
146
|
-
const node = this.getNode(ctx);
|
|
147
|
-
const endpoint = this.getEndpoint(ctx);
|
|
148
|
-
if (endpoint.supportsCC(import_safe.CommandClasses.Notification)) {
|
|
149
|
-
ctx.logNode(node.id, {
|
|
150
|
-
endpoint: this.endpointIndex,
|
|
151
|
-
message: `${this.constructor.name}: skipping interview because Notification CC is supported...`,
|
|
152
|
-
direction: "none"
|
|
136
|
+
let AlarmSensorCCAPI = (() => {
|
|
137
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Alarm Sensor"])];
|
|
138
|
+
let _classDescriptor;
|
|
139
|
+
let _classExtraInitializers = [];
|
|
140
|
+
let _classThis;
|
|
141
|
+
let _classSuper = import_API.PhysicalCCAPI;
|
|
142
|
+
var AlarmSensorCCAPI2 = class extends _classSuper {
|
|
143
|
+
static {
|
|
144
|
+
_classThis = this;
|
|
145
|
+
}
|
|
146
|
+
static {
|
|
147
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
148
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
149
|
+
AlarmSensorCCAPI2 = _classThis = _classDescriptor.value;
|
|
150
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
151
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
152
|
+
}
|
|
153
|
+
supportsCommand(cmd) {
|
|
154
|
+
switch (cmd) {
|
|
155
|
+
case import_Types.AlarmSensorCommand.Get:
|
|
156
|
+
case import_Types.AlarmSensorCommand.SupportedGet:
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
return super.supportsCommand(cmd);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Retrieves the current value from this sensor
|
|
163
|
+
* @param sensorType The (optional) sensor type to retrieve the value for
|
|
164
|
+
*/
|
|
165
|
+
async get(sensorType) {
|
|
166
|
+
__assertType("sensorType", "(optional) AlarmSensorType", __assertType__optional_AlarmSensorType.bind(void 0, sensorType));
|
|
167
|
+
this.assertSupportsCommand(import_Types.AlarmSensorCommand, import_Types.AlarmSensorCommand.Get);
|
|
168
|
+
const cc = new AlarmSensorCCGet({
|
|
169
|
+
nodeId: this.endpoint.nodeId,
|
|
170
|
+
endpointIndex: this.endpoint.index,
|
|
171
|
+
sensorType
|
|
153
172
|
});
|
|
154
|
-
this.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
174
|
+
if (response)
|
|
175
|
+
return (0, import_safe3.pick)(response, ["state", "severity", "duration"]);
|
|
176
|
+
}
|
|
177
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
178
|
+
async getSupportedSensorTypes() {
|
|
179
|
+
this.assertSupportsCommand(import_Types.AlarmSensorCommand, import_Types.AlarmSensorCommand.SupportedGet);
|
|
180
|
+
const cc = new AlarmSensorCCSupportedGet({
|
|
181
|
+
nodeId: this.endpoint.nodeId,
|
|
182
|
+
endpointIndex: this.endpoint.index
|
|
183
|
+
});
|
|
184
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
185
|
+
if (response)
|
|
186
|
+
return response.supportedSensorTypes;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
return AlarmSensorCCAPI2 = _classThis;
|
|
190
|
+
})();
|
|
191
|
+
let AlarmSensorCC = (() => {
|
|
192
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Alarm Sensor"]), (0, import_CommandClassDecorators.implementedVersion)(1), (0, import_CommandClassDecorators.ccValues)(AlarmSensorCCValues)];
|
|
193
|
+
let _classDescriptor;
|
|
194
|
+
let _classExtraInitializers = [];
|
|
195
|
+
let _classThis;
|
|
196
|
+
let _classSuper = import_CommandClass.CommandClass;
|
|
197
|
+
var AlarmSensorCC2 = class extends _classSuper {
|
|
198
|
+
static {
|
|
199
|
+
_classThis = this;
|
|
200
|
+
}
|
|
201
|
+
static {
|
|
202
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
203
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
204
|
+
AlarmSensorCC2 = _classThis = _classDescriptor.value;
|
|
205
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
206
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
207
|
+
}
|
|
208
|
+
async interview(ctx) {
|
|
209
|
+
const node = this.getNode(ctx);
|
|
210
|
+
const endpoint = this.getEndpoint(ctx);
|
|
211
|
+
if (endpoint.supportsCC(import_safe.CommandClasses.Notification)) {
|
|
212
|
+
ctx.logNode(node.id, {
|
|
213
|
+
endpoint: this.endpointIndex,
|
|
214
|
+
message: `${this.constructor.name}: skipping interview because Notification CC is supported...`,
|
|
215
|
+
direction: "none"
|
|
216
|
+
});
|
|
217
|
+
this.setInterviewComplete(ctx, true);
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Alarm Sensor"], ctx, endpoint).withOptions({
|
|
221
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
178
222
|
});
|
|
179
|
-
} else {
|
|
180
223
|
ctx.logNode(node.id, {
|
|
181
224
|
endpoint: this.endpointIndex,
|
|
182
|
-
message:
|
|
183
|
-
|
|
225
|
+
message: `Interviewing ${this.ccName}...`,
|
|
226
|
+
direction: "none"
|
|
184
227
|
});
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
await this.refreshValues(ctx);
|
|
188
|
-
this.setInterviewComplete(ctx, true);
|
|
189
|
-
}
|
|
190
|
-
async refreshValues(ctx) {
|
|
191
|
-
const node = this.getNode(ctx);
|
|
192
|
-
const endpoint = this.getEndpoint(ctx);
|
|
193
|
-
const api = import_API.CCAPI.create(import_safe.CommandClasses["Alarm Sensor"], ctx, endpoint).withOptions({
|
|
194
|
-
priority: import_safe.MessagePriority.NodeQuery
|
|
195
|
-
});
|
|
196
|
-
const supportedSensorTypes = this.getValue(ctx, AlarmSensorCCValues.supportedSensorTypes) ?? [];
|
|
197
|
-
for (const type of supportedSensorTypes) {
|
|
198
|
-
if (!(0, import_safe3.isEnumMember)(import_Types.AlarmSensorType, type))
|
|
199
|
-
continue;
|
|
200
|
-
const sensorName = (0, import_safe3.getEnumMemberName)(import_Types.AlarmSensorType, type);
|
|
201
228
|
ctx.logNode(node.id, {
|
|
202
229
|
endpoint: this.endpointIndex,
|
|
203
|
-
message:
|
|
230
|
+
message: "querying supported sensor types...",
|
|
204
231
|
direction: "outbound"
|
|
205
232
|
});
|
|
206
|
-
const
|
|
207
|
-
if (
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
if (currentValue.severity != void 0) {
|
|
211
|
-
message += `
|
|
212
|
-
severity: ${currentValue.severity}`;
|
|
213
|
-
}
|
|
214
|
-
if (currentValue.duration != void 0) {
|
|
215
|
-
message += `
|
|
216
|
-
duration: ${currentValue.duration}`;
|
|
217
|
-
}
|
|
233
|
+
const supportedSensorTypes = await api.getSupportedSensorTypes();
|
|
234
|
+
if (supportedSensorTypes) {
|
|
235
|
+
const logMessage = `received supported sensor types: ${supportedSensorTypes.map((type) => (0, import_safe3.getEnumMemberName)(import_Types.AlarmSensorType, type)).map((name) => `
|
|
236
|
+
\xB7 ${name}`).join("")}`;
|
|
218
237
|
ctx.logNode(node.id, {
|
|
219
238
|
endpoint: this.endpointIndex,
|
|
220
|
-
message,
|
|
239
|
+
message: logMessage,
|
|
221
240
|
direction: "inbound"
|
|
222
241
|
});
|
|
242
|
+
} else {
|
|
243
|
+
ctx.logNode(node.id, {
|
|
244
|
+
endpoint: this.endpointIndex,
|
|
245
|
+
message: "Querying supported sensor types timed out, skipping interview...",
|
|
246
|
+
level: "warn"
|
|
247
|
+
});
|
|
248
|
+
return;
|
|
223
249
|
}
|
|
250
|
+
await this.refreshValues(ctx);
|
|
251
|
+
this.setInterviewComplete(ctx, true);
|
|
224
252
|
}
|
|
225
|
-
|
|
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
|
-
let severity;
|
|
261
|
-
if (raw.payload[2] > 0 && raw.payload[2] <= 100) {
|
|
262
|
-
severity = raw.payload[2];
|
|
263
|
-
}
|
|
264
|
-
const duration = raw.payload.readUInt16BE(3) || void 0;
|
|
265
|
-
return new AlarmSensorCCReport_1({
|
|
266
|
-
// Alarm Sensor reports may be forwarded by a different node, in this case
|
|
267
|
-
// (and only then!) the payload contains the original node ID
|
|
268
|
-
nodeId: sourceNodeId || ctx.sourceNodeId,
|
|
269
|
-
sensorType,
|
|
270
|
-
state,
|
|
271
|
-
severity,
|
|
272
|
-
duration
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
sensorType;
|
|
276
|
-
state;
|
|
277
|
-
severity;
|
|
278
|
-
duration;
|
|
279
|
-
toLogEntry(ctx) {
|
|
280
|
-
const message = {
|
|
281
|
-
"sensor type": (0, import_safe3.getEnumMemberName)(import_Types.AlarmSensorType, this.sensorType),
|
|
282
|
-
"alarm state": this.state
|
|
283
|
-
};
|
|
284
|
-
if (this.severity != void 0) {
|
|
285
|
-
message.severity = this.severity;
|
|
253
|
+
async refreshValues(ctx) {
|
|
254
|
+
const node = this.getNode(ctx);
|
|
255
|
+
const endpoint = this.getEndpoint(ctx);
|
|
256
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Alarm Sensor"], ctx, endpoint).withOptions({
|
|
257
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
258
|
+
});
|
|
259
|
+
const supportedSensorTypes = this.getValue(ctx, AlarmSensorCCValues.supportedSensorTypes) ?? [];
|
|
260
|
+
for (const type of supportedSensorTypes) {
|
|
261
|
+
if (!(0, import_safe3.isEnumMember)(import_Types.AlarmSensorType, type))
|
|
262
|
+
continue;
|
|
263
|
+
const sensorName = (0, import_safe3.getEnumMemberName)(import_Types.AlarmSensorType, type);
|
|
264
|
+
ctx.logNode(node.id, {
|
|
265
|
+
endpoint: this.endpointIndex,
|
|
266
|
+
message: `querying current value for ${sensorName}...`,
|
|
267
|
+
direction: "outbound"
|
|
268
|
+
});
|
|
269
|
+
const currentValue = await api.get(type);
|
|
270
|
+
if (currentValue) {
|
|
271
|
+
let message = `received current value for ${sensorName}:
|
|
272
|
+
state: ${currentValue.state}`;
|
|
273
|
+
if (currentValue.severity != void 0) {
|
|
274
|
+
message += `
|
|
275
|
+
severity: ${currentValue.severity}`;
|
|
276
|
+
}
|
|
277
|
+
if (currentValue.duration != void 0) {
|
|
278
|
+
message += `
|
|
279
|
+
duration: ${currentValue.duration}`;
|
|
280
|
+
}
|
|
281
|
+
ctx.logNode(node.id, {
|
|
282
|
+
endpoint: this.endpointIndex,
|
|
283
|
+
message,
|
|
284
|
+
direction: "inbound"
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
}
|
|
286
288
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
+
/**
|
|
290
|
+
* Returns which sensor types are supported.
|
|
291
|
+
* This only works AFTER the interview process
|
|
292
|
+
*/
|
|
293
|
+
static getSupportedSensorTypesCached(ctx, endpoint) {
|
|
294
|
+
return ctx.getValueDB(endpoint.nodeId).getValue(AlarmSensorCCValues.supportedSensorTypes.endpoint(endpoint.index));
|
|
289
295
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
296
|
+
createMetadataForSensorType(ctx, sensorType) {
|
|
297
|
+
const stateValue = AlarmSensorCCValues.state(sensorType);
|
|
298
|
+
const severityValue = AlarmSensorCCValues.severity(sensorType);
|
|
299
|
+
const durationValue = AlarmSensorCCValues.duration(sensorType);
|
|
300
|
+
this.ensureMetadata(ctx, stateValue);
|
|
301
|
+
this.ensureMetadata(ctx, severityValue);
|
|
302
|
+
this.ensureMetadata(ctx, durationValue);
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
return AlarmSensorCC2 = _classThis;
|
|
306
|
+
})();
|
|
307
|
+
let AlarmSensorCCReport = (() => {
|
|
308
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.AlarmSensorCommand.Report)];
|
|
309
|
+
let _classDescriptor;
|
|
310
|
+
let _classExtraInitializers = [];
|
|
311
|
+
let _classThis;
|
|
312
|
+
let _classSuper = AlarmSensorCC;
|
|
313
|
+
var AlarmSensorCCReport2 = class extends _classSuper {
|
|
314
|
+
static {
|
|
315
|
+
_classThis = this;
|
|
316
|
+
}
|
|
317
|
+
static {
|
|
318
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
319
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
320
|
+
AlarmSensorCCReport2 = _classThis = _classDescriptor.value;
|
|
321
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
322
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
323
|
+
}
|
|
324
|
+
constructor(options) {
|
|
325
|
+
super(options);
|
|
326
|
+
this.sensorType = options.sensorType;
|
|
327
|
+
this.state = options.state;
|
|
328
|
+
this.severity = options.severity;
|
|
329
|
+
this.duration = options.duration;
|
|
330
|
+
}
|
|
331
|
+
static from(raw, ctx) {
|
|
332
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 5, raw.payload[1] !== 255);
|
|
333
|
+
const sourceNodeId = raw.payload[0];
|
|
334
|
+
const sensorType = raw.payload[1];
|
|
335
|
+
const state = raw.payload[2] > 0;
|
|
336
|
+
let severity;
|
|
337
|
+
if (raw.payload[2] > 0 && raw.payload[2] <= 100) {
|
|
338
|
+
severity = raw.payload[2];
|
|
339
|
+
}
|
|
340
|
+
const duration = raw.payload.readUInt16BE(3) || void 0;
|
|
341
|
+
return new this({
|
|
342
|
+
// Alarm Sensor reports may be forwarded by a different node, in this case
|
|
343
|
+
// (and only then!) the payload contains the original node ID
|
|
344
|
+
nodeId: sourceNodeId || ctx.sourceNodeId,
|
|
345
|
+
sensorType,
|
|
346
|
+
state,
|
|
347
|
+
severity,
|
|
348
|
+
duration
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
sensorType;
|
|
352
|
+
state;
|
|
353
|
+
severity;
|
|
354
|
+
duration;
|
|
355
|
+
toLogEntry(ctx) {
|
|
356
|
+
const message = {
|
|
357
|
+
"sensor type": (0, import_safe3.getEnumMemberName)(import_Types.AlarmSensorType, this.sensorType),
|
|
358
|
+
"alarm state": this.state
|
|
359
|
+
};
|
|
360
|
+
if (this.severity != void 0) {
|
|
361
|
+
message.severity = this.severity;
|
|
362
|
+
}
|
|
363
|
+
if (this.duration != void 0) {
|
|
364
|
+
message.duration = `${this.duration} seconds`;
|
|
365
|
+
}
|
|
366
|
+
return {
|
|
367
|
+
...super.toLogEntry(ctx),
|
|
368
|
+
message
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
persistValues(ctx) {
|
|
372
|
+
if (!super.persistValues(ctx))
|
|
373
|
+
return false;
|
|
374
|
+
this.createMetadataForSensorType(ctx, this.sensorType);
|
|
375
|
+
const stateValue = AlarmSensorCCValues.state(this.sensorType);
|
|
376
|
+
const severityValue = AlarmSensorCCValues.severity(this.sensorType);
|
|
377
|
+
const durationValue = AlarmSensorCCValues.duration(this.sensorType);
|
|
378
|
+
this.setValue(ctx, stateValue, this.state);
|
|
379
|
+
this.setValue(ctx, severityValue, this.severity);
|
|
380
|
+
this.setValue(ctx, durationValue, this.duration);
|
|
381
|
+
return true;
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
return AlarmSensorCCReport2 = _classThis;
|
|
385
|
+
})();
|
|
311
386
|
function testResponseForAlarmSensorGet(sent, received) {
|
|
312
387
|
return sent.sensorType === import_Types.AlarmSensorType.Any || received.sensorType === sent.sensorType;
|
|
313
388
|
}
|
|
314
|
-
let AlarmSensorCCGet =
|
|
315
|
-
|
|
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
|
-
supportedSensorTypes;
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
389
|
+
let AlarmSensorCCGet = (() => {
|
|
390
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.AlarmSensorCommand.Get), (0, import_CommandClassDecorators.expectedCCResponse)(AlarmSensorCCReport, testResponseForAlarmSensorGet)];
|
|
391
|
+
let _classDescriptor;
|
|
392
|
+
let _classExtraInitializers = [];
|
|
393
|
+
let _classThis;
|
|
394
|
+
let _classSuper = AlarmSensorCC;
|
|
395
|
+
var AlarmSensorCCGet2 = 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
|
+
AlarmSensorCCGet2 = _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.sensorType = options.sensorType ?? import_Types.AlarmSensorType.Any;
|
|
409
|
+
}
|
|
410
|
+
static from(_raw, _ctx) {
|
|
411
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
412
|
+
}
|
|
413
|
+
sensorType;
|
|
414
|
+
serialize(ctx) {
|
|
415
|
+
this.payload = import_safe2.Bytes.from([this.sensorType]);
|
|
416
|
+
return super.serialize(ctx);
|
|
417
|
+
}
|
|
418
|
+
toLogEntry(ctx) {
|
|
419
|
+
return {
|
|
420
|
+
...super.toLogEntry(ctx),
|
|
421
|
+
message: {
|
|
422
|
+
"sensor type": (0, import_safe3.getEnumMemberName)(import_Types.AlarmSensorType, this.sensorType)
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
return AlarmSensorCCGet2 = _classThis;
|
|
428
|
+
})();
|
|
429
|
+
let AlarmSensorCCSupportedReport = (() => {
|
|
430
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.AlarmSensorCommand.SupportedReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedSensorTypes", AlarmSensorCCValues.supportedSensorTypes)];
|
|
431
|
+
let _classDescriptor;
|
|
432
|
+
let _classExtraInitializers = [];
|
|
433
|
+
let _classThis;
|
|
434
|
+
let _classSuper = AlarmSensorCC;
|
|
435
|
+
var AlarmSensorCCSupportedReport2 = class extends _classSuper {
|
|
436
|
+
static {
|
|
437
|
+
_classThis = this;
|
|
438
|
+
}
|
|
439
|
+
static {
|
|
440
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
441
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
442
|
+
AlarmSensorCCSupportedReport2 = _classThis = _classDescriptor.value;
|
|
443
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
444
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
445
|
+
}
|
|
446
|
+
constructor(options) {
|
|
447
|
+
super(options);
|
|
448
|
+
this.supportedSensorTypes = options.supportedSensorTypes;
|
|
449
|
+
}
|
|
450
|
+
static from(raw, ctx) {
|
|
451
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
452
|
+
const bitMaskLength = raw.payload[0];
|
|
453
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1 + bitMaskLength);
|
|
454
|
+
const supportedSensorTypes = (0, import_safe.parseBitMask)(raw.payload.subarray(1, 1 + bitMaskLength), import_Types.AlarmSensorType["General Purpose"]);
|
|
455
|
+
return new this({
|
|
456
|
+
nodeId: ctx.sourceNodeId,
|
|
457
|
+
supportedSensorTypes
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
supportedSensorTypes;
|
|
461
|
+
persistValues(ctx) {
|
|
462
|
+
if (!super.persistValues(ctx))
|
|
463
|
+
return false;
|
|
464
|
+
for (const type of this.supportedSensorTypes) {
|
|
465
|
+
this.createMetadataForSensorType(ctx, type);
|
|
369
466
|
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
};
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
467
|
+
return true;
|
|
468
|
+
}
|
|
469
|
+
toLogEntry(ctx) {
|
|
470
|
+
return {
|
|
471
|
+
...super.toLogEntry(ctx),
|
|
472
|
+
message: {
|
|
473
|
+
"supported sensor types": this.supportedSensorTypes.map((t) => (0, import_safe3.getEnumMemberName)(import_Types.AlarmSensorType, t)).join(", ")
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
};
|
|
478
|
+
return AlarmSensorCCSupportedReport2 = _classThis;
|
|
479
|
+
})();
|
|
480
|
+
let AlarmSensorCCSupportedGet = (() => {
|
|
481
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.AlarmSensorCommand.SupportedGet), (0, import_CommandClassDecorators.expectedCCResponse)(AlarmSensorCCSupportedReport)];
|
|
482
|
+
let _classDescriptor;
|
|
483
|
+
let _classExtraInitializers = [];
|
|
484
|
+
let _classThis;
|
|
485
|
+
let _classSuper = AlarmSensorCC;
|
|
486
|
+
var AlarmSensorCCSupportedGet2 = class extends _classSuper {
|
|
487
|
+
static {
|
|
488
|
+
_classThis = this;
|
|
489
|
+
}
|
|
490
|
+
static {
|
|
491
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
492
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
493
|
+
AlarmSensorCCSupportedGet2 = _classThis = _classDescriptor.value;
|
|
494
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
495
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
return AlarmSensorCCSupportedGet2 = _classThis;
|
|
499
|
+
})();
|
|
385
500
|
// Annotate the CommonJS export names for ESM import in node:
|
|
386
501
|
0 && (module.exports = {
|
|
387
502
|
AlarmSensorCC,
|