@zwave-js/cc 14.0.0-beta.4 → 14.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.js +381 -266
- package/build/cjs/cc/AlarmSensorCC.js.map +3 -3
- package/build/cjs/cc/AssociationCC.js +669 -503
- package/build/cjs/cc/AssociationCC.js.map +3 -3
- package/build/cjs/cc/AssociationGroupInfoCC.js +633 -492
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +3 -3
- package/build/cjs/cc/BarrierOperatorCC.js +595 -429
- package/build/cjs/cc/BarrierOperatorCC.js.map +3 -3
- package/build/cjs/cc/BasicCC.js +354 -260
- package/build/cjs/cc/BasicCC.js.map +3 -3
- package/build/cjs/cc/BatteryCC.js +427 -345
- package/build/cjs/cc/BatteryCC.js.map +3 -3
- package/build/cjs/cc/BinarySensorCC.js +391 -276
- package/build/cjs/cc/BinarySensorCC.js.map +3 -3
- package/build/cjs/cc/BinarySwitchCC.js +347 -253
- package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
- package/build/cjs/cc/CRC16CC.js +160 -85
- package/build/cjs/cc/CRC16CC.js.map +3 -3
- package/build/cjs/cc/CentralSceneCC.js +459 -324
- package/build/cjs/cc/CentralSceneCC.js.map +3 -3
- package/build/cjs/cc/ClimateControlScheduleCC.js +459 -293
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +3 -3
- package/build/cjs/cc/ClockCC.js +254 -150
- package/build/cjs/cc/ClockCC.js.map +3 -3
- package/build/cjs/cc/ColorSwitchCC.js +758 -610
- package/build/cjs/cc/ColorSwitchCC.js.map +3 -3
- package/build/cjs/cc/ConfigurationCC.js +1700 -1453
- package/build/cjs/cc/ConfigurationCC.js.map +3 -3
- package/build/cjs/cc/DeviceResetLocallyCC.js +125 -49
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +3 -3
- package/build/cjs/cc/DoorLockCC.js +904 -777
- package/build/cjs/cc/DoorLockCC.js.map +3 -3
- package/build/cjs/cc/DoorLockLoggingCC.js +321 -206
- package/build/cjs/cc/DoorLockLoggingCC.js.map +3 -3
- package/build/cjs/cc/EnergyProductionCC.js +249 -160
- package/build/cjs/cc/EnergyProductionCC.js.map +3 -3
- package/build/cjs/cc/EntryControlCC.js +619 -458
- package/build/cjs/cc/EntryControlCC.js.map +3 -3
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +898 -698
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +3 -3
- package/build/cjs/cc/HailCC.js +57 -11
- package/build/cjs/cc/HailCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlModeCC.js +359 -233
- package/build/cjs/cc/HumidityControlModeCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +189 -103
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlSetpointCC.js +682 -495
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +3 -3
- package/build/cjs/cc/InclusionControllerCC.js +205 -114
- package/build/cjs/cc/InclusionControllerCC.js.map +3 -3
- package/build/cjs/cc/IndicatorCC.js +897 -736
- package/build/cjs/cc/IndicatorCC.js.map +3 -3
- package/build/cjs/cc/IrrigationCC.js +1651 -1405
- package/build/cjs/cc/IrrigationCC.js.map +3 -3
- package/build/cjs/cc/LanguageCC.js +268 -171
- package/build/cjs/cc/LanguageCC.js.map +3 -3
- package/build/cjs/cc/LockCC.js +254 -154
- package/build/cjs/cc/LockCC.js.map +3 -3
- package/build/cjs/cc/ManufacturerProprietaryCC.js +189 -129
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.js +319 -213
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +3 -3
- package/build/cjs/cc/MeterCC.js +827 -707
- package/build/cjs/cc/MeterCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelAssociationCC.js +612 -478
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelCC.js +1037 -819
- package/build/cjs/cc/MultiChannelCC.js.map +3 -3
- package/build/cjs/cc/MultiCommandCC.js +172 -97
- package/build/cjs/cc/MultiCommandCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSensorCC.js +589 -449
- package/build/cjs/cc/MultilevelSensorCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSwitchCC.js +587 -439
- package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
- package/build/cjs/cc/NoOperationCC.js +89 -27
- package/build/cjs/cc/NoOperationCC.js.map +2 -2
- package/build/cjs/cc/NodeNamingCC.js +417 -277
- package/build/cjs/cc/NodeNamingCC.js.map +3 -3
- package/build/cjs/cc/NotificationCC.js +972 -818
- package/build/cjs/cc/NotificationCC.js.map +3 -3
- package/build/cjs/cc/PowerlevelCC.js +450 -303
- package/build/cjs/cc/PowerlevelCC.js.map +3 -3
- package/build/cjs/cc/ProtectionCC.js +686 -494
- package/build/cjs/cc/ProtectionCC.js.map +3 -3
- package/build/cjs/cc/SceneActivationCC.js +165 -97
- package/build/cjs/cc/SceneActivationCC.js.map +3 -3
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +346 -243
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +3 -3
- package/build/cjs/cc/SceneControllerConfigurationCC.js +401 -298
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +3 -3
- package/build/cjs/cc/ScheduleEntryLockCC.js +1552 -1272
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +3 -3
- package/build/cjs/cc/Security2CC.js +1483 -1219
- package/build/cjs/cc/Security2CC.js.map +3 -3
- package/build/cjs/cc/SecurityCC.js +839 -619
- package/build/cjs/cc/SecurityCC.js.map +3 -3
- package/build/cjs/cc/SoundSwitchCC.js +707 -515
- package/build/cjs/cc/SoundSwitchCC.js.map +3 -3
- package/build/cjs/cc/SupervisionCC.js +327 -237
- package/build/cjs/cc/SupervisionCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanModeCC.js +386 -263
- package/build/cjs/cc/ThermostatFanModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanStateCC.js +192 -106
- package/build/cjs/cc/ThermostatFanStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatModeCC.js +425 -302
- package/build/cjs/cc/ThermostatModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatOperatingStateCC.js +188 -102
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetbackCC.js +277 -173
- package/build/cjs/cc/ThermostatSetbackCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetpointCC.js +645 -491
- package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
- package/build/cjs/cc/TimeCC.js +515 -353
- package/build/cjs/cc/TimeCC.js.map +3 -3
- package/build/cjs/cc/TimeParametersCC.js +302 -202
- package/build/cjs/cc/TimeParametersCC.js.map +3 -3
- package/build/cjs/cc/TransportServiceCC.js +433 -315
- package/build/cjs/cc/TransportServiceCC.js.map +3 -3
- package/build/cjs/cc/UserCodeCC.js +1385 -1102
- package/build/cjs/cc/UserCodeCC.js.map +3 -3
- package/build/cjs/cc/VersionCC.js +696 -562
- package/build/cjs/cc/VersionCC.js.map +3 -3
- package/build/cjs/cc/WakeUpCC.js +499 -346
- package/build/cjs/cc/WakeUpCC.js.map +3 -3
- package/build/cjs/cc/WindowCoveringCC.js +626 -478
- package/build/cjs/cc/WindowCoveringCC.js.map +3 -3
- package/build/cjs/cc/ZWaveLongRangeCC.js +57 -10
- package/build/cjs/cc/ZWaveLongRangeCC.js.map +2 -2
- package/build/cjs/cc/ZWavePlusCC.js +233 -159
- package/build/cjs/cc/ZWavePlusCC.js.map +3 -3
- package/build/cjs/cc/ZWaveProtocolCC.js +1515 -948
- package/build/cjs/cc/ZWaveProtocolCC.js.map +3 -3
- package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +4 -4
- package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +1 -1
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +395 -274
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +3 -3
- package/build/cjs/lib/CommandClassDecorators.d.ts +11 -15
- package/build/cjs/lib/CommandClassDecorators.js +19 -20
- package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
- package/build/cjs/lib/Security2/Extension.d.ts +1 -1
- package/build/cjs/lib/Security2/Extension.js +217 -126
- package/build/cjs/lib/Security2/Extension.js.map +3 -3
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +389 -291
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +678 -537
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +659 -539
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +634 -493
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +380 -302
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +449 -384
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +395 -297
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +353 -274
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.js +162 -98
- package/build/esm/cc/CRC16CC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +465 -351
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +454 -313
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.js +248 -159
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +802 -677
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +1899 -1687
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js +124 -59
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +951 -849
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +316 -218
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +240 -164
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +629 -493
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +938 -769
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HailCC.js +51 -12
- package/build/esm/cc/HailCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +357 -250
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +182 -109
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +706 -546
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/InclusionControllerCC.js +197 -119
- package/build/esm/cc/InclusionControllerCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.js +973 -835
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +1697 -1496
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +266 -184
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +247 -162
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +192 -141
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +312 -223
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +896 -795
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +631 -518
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +1106 -921
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultiCommandCC.js +166 -102
- package/build/esm/cc/MultiCommandCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +616 -497
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +621 -496
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NoOperationCC.js +82 -29
- package/build/esm/cc/NoOperationCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +413 -294
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +1097 -966
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/PowerlevelCC.js +437 -311
- package/build/esm/cc/PowerlevelCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +704 -543
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +157 -100
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +357 -269
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +434 -346
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +1596 -1357
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.js +1633 -1406
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.js +876 -687
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +689 -526
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.js +349 -272
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +388 -284
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +184 -111
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +435 -331
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +180 -107
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.js +274 -185
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +674 -543
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.js +499 -360
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +296 -211
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +464 -363
- package/build/esm/cc/TransportServiceCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +1443 -1205
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +744 -635
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +494 -364
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +655 -530
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWaveLongRangeCC.js +51 -11
- package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +223 -162
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +1443 -953
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +4 -4
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +390 -286
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/esm/lib/CommandClassDecorators.d.ts +11 -15
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
- package/build/esm/lib/CommandClassDecorators.js +24 -24
- package/build/esm/lib/CommandClassDecorators.js.map +1 -1
- package/build/esm/lib/Security2/Extension.d.ts +1 -1
- package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
- package/build/esm/lib/Security2/Extension.js +207 -123
- package/build/esm/lib/Security2/Extension.js.map +1 -1
- package/package.json +6 -6
|
@@ -39,13 +39,45 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
39
39
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
40
40
|
var import_Values = require("../lib/Values.js");
|
|
41
41
|
var import_Types = require("../lib/_Types.js");
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
43
|
+
function accept(f) {
|
|
44
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
45
|
+
return f;
|
|
46
|
+
}
|
|
47
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
48
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
49
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
50
|
+
var _, done = false;
|
|
51
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
52
|
+
var context = {};
|
|
53
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
54
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
55
|
+
context.addInitializer = function(f) {
|
|
56
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
57
|
+
extraInitializers.push(accept(f || null));
|
|
58
|
+
};
|
|
59
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
60
|
+
if (kind === "accessor") {
|
|
61
|
+
if (result === void 0) continue;
|
|
62
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
63
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
64
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
65
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
66
|
+
} else if (_ = accept(result)) {
|
|
67
|
+
if (kind === "field") initializers.unshift(_);
|
|
68
|
+
else descriptor[key] = _;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
72
|
+
done = true;
|
|
73
|
+
};
|
|
74
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
75
|
+
var useValue = arguments.length > 2;
|
|
76
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
77
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
78
|
+
}
|
|
79
|
+
return useValue ? value : void 0;
|
|
47
80
|
};
|
|
48
|
-
var BarrierOperatorCCReport_1, BarrierOperatorCCSignalingCapabilitiesReport_1, BarrierOperatorCCEventSignalingReport_1;
|
|
49
81
|
function __assertType(argName, typeName, boundHasError) {
|
|
50
82
|
const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
|
|
51
83
|
if (boundHasError()) {
|
|
@@ -115,456 +147,590 @@ const BarrierOperatorCCValues = Object.freeze({
|
|
|
115
147
|
}))
|
|
116
148
|
})
|
|
117
149
|
});
|
|
118
|
-
let BarrierOperatorCCAPI =
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
return super.supportsCommand(cmd);
|
|
129
|
-
}
|
|
130
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
131
|
-
async get() {
|
|
132
|
-
this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.Get);
|
|
133
|
-
const cc = new BarrierOperatorCCGet({
|
|
134
|
-
nodeId: this.endpoint.nodeId,
|
|
135
|
-
endpointIndex: this.endpoint.index
|
|
136
|
-
});
|
|
137
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
138
|
-
if (response) {
|
|
139
|
-
return (0, import_safe3.pick)(response, ["currentState", "position"]);
|
|
150
|
+
let BarrierOperatorCCAPI = (() => {
|
|
151
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Barrier Operator"])];
|
|
152
|
+
let _classDescriptor;
|
|
153
|
+
let _classExtraInitializers = [];
|
|
154
|
+
let _classThis;
|
|
155
|
+
let _classSuper = import_API.CCAPI;
|
|
156
|
+
var BarrierOperatorCCAPI2 = class extends _classSuper {
|
|
157
|
+
static {
|
|
158
|
+
_classThis = this;
|
|
140
159
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
endpointIndex: this.endpoint.index
|
|
157
|
-
});
|
|
158
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
159
|
-
return response?.supportedSubsystemTypes;
|
|
160
|
-
}
|
|
161
|
-
async getEventSignaling(subsystemType) {
|
|
162
|
-
__assertType("subsystemType", "SubsystemType", __assertType__SubsystemType.bind(void 0, subsystemType));
|
|
163
|
-
this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.EventSignalingGet);
|
|
164
|
-
const cc = new BarrierOperatorCCEventSignalingGet({
|
|
165
|
-
nodeId: this.endpoint.nodeId,
|
|
166
|
-
endpointIndex: this.endpoint.index,
|
|
167
|
-
subsystemType
|
|
168
|
-
});
|
|
169
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
170
|
-
return response?.subsystemState;
|
|
171
|
-
}
|
|
172
|
-
async setEventSignaling(subsystemType, subsystemState) {
|
|
173
|
-
__assertType("subsystemType", "SubsystemType", __assertType__SubsystemType.bind(void 0, subsystemType));
|
|
174
|
-
__assertType("subsystemState", "SubsystemState", __assertType__SubsystemState.bind(void 0, subsystemState));
|
|
175
|
-
this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.EventSignalingSet);
|
|
176
|
-
const cc = new BarrierOperatorCCEventSignalingSet({
|
|
177
|
-
nodeId: this.endpoint.nodeId,
|
|
178
|
-
endpointIndex: this.endpoint.index,
|
|
179
|
-
subsystemType,
|
|
180
|
-
subsystemState
|
|
181
|
-
});
|
|
182
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
183
|
-
}
|
|
184
|
-
get [import_API.SET_VALUE]() {
|
|
185
|
-
return async function({ property, propertyKey }, value) {
|
|
186
|
-
if (property === "targetState") {
|
|
187
|
-
if (typeof value !== "number") {
|
|
188
|
-
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
189
|
-
}
|
|
190
|
-
const targetValue = value === import_Types.BarrierState.Closed ? import_Types.BarrierState.Closed : import_Types.BarrierState.Open;
|
|
191
|
-
return this.set(targetValue);
|
|
192
|
-
} else if (property === "signalingState") {
|
|
193
|
-
if (propertyKey == void 0) {
|
|
194
|
-
(0, import_API.throwMissingPropertyKey)(this.ccId, property);
|
|
195
|
-
} else if (typeof propertyKey !== "number") {
|
|
196
|
-
(0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
|
|
197
|
-
}
|
|
198
|
-
if (typeof value !== "number") {
|
|
199
|
-
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
200
|
-
}
|
|
201
|
-
return this.setEventSignaling(propertyKey, value);
|
|
202
|
-
} else {
|
|
203
|
-
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
160
|
+
static {
|
|
161
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
162
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
163
|
+
BarrierOperatorCCAPI2 = _classThis = _classDescriptor.value;
|
|
164
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
165
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
166
|
+
}
|
|
167
|
+
supportsCommand(cmd) {
|
|
168
|
+
switch (cmd) {
|
|
169
|
+
case import_Types.BarrierOperatorCommand.Get:
|
|
170
|
+
case import_Types.BarrierOperatorCommand.Set:
|
|
171
|
+
case import_Types.BarrierOperatorCommand.SignalingCapabilitiesGet:
|
|
172
|
+
case import_Types.BarrierOperatorCommand.EventSignalingGet:
|
|
173
|
+
case import_Types.BarrierOperatorCommand.EventSignalingSet:
|
|
174
|
+
return true;
|
|
204
175
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
176
|
+
return super.supportsCommand(cmd);
|
|
177
|
+
}
|
|
178
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
179
|
+
async get() {
|
|
180
|
+
this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.Get);
|
|
181
|
+
const cc = new BarrierOperatorCCGet({
|
|
182
|
+
nodeId: this.endpoint.nodeId,
|
|
183
|
+
endpointIndex: this.endpoint.index
|
|
184
|
+
});
|
|
185
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
186
|
+
if (response) {
|
|
187
|
+
return (0, import_safe3.pick)(response, ["currentState", "position"]);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
async set(targetState) {
|
|
191
|
+
__assertType("targetState", void 0, __assertType__su__1__2_eu.bind(void 0, targetState));
|
|
192
|
+
this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.Set);
|
|
193
|
+
const cc = new BarrierOperatorCCSet({
|
|
194
|
+
nodeId: this.endpoint.nodeId,
|
|
195
|
+
endpointIndex: this.endpoint.index,
|
|
196
|
+
targetState
|
|
197
|
+
});
|
|
198
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
199
|
+
}
|
|
200
|
+
async getSignalingCapabilities() {
|
|
201
|
+
this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.SignalingCapabilitiesGet);
|
|
202
|
+
const cc = new BarrierOperatorCCSignalingCapabilitiesGet({
|
|
203
|
+
nodeId: this.endpoint.nodeId,
|
|
204
|
+
endpointIndex: this.endpoint.index
|
|
205
|
+
});
|
|
206
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
207
|
+
return response?.supportedSubsystemTypes;
|
|
208
|
+
}
|
|
209
|
+
async getEventSignaling(subsystemType) {
|
|
210
|
+
__assertType("subsystemType", "SubsystemType", __assertType__SubsystemType.bind(void 0, subsystemType));
|
|
211
|
+
this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.EventSignalingGet);
|
|
212
|
+
const cc = new BarrierOperatorCCEventSignalingGet({
|
|
213
|
+
nodeId: this.endpoint.nodeId,
|
|
214
|
+
endpointIndex: this.endpoint.index,
|
|
215
|
+
subsystemType
|
|
216
|
+
});
|
|
217
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
218
|
+
return response?.subsystemState;
|
|
219
|
+
}
|
|
220
|
+
async setEventSignaling(subsystemType, subsystemState) {
|
|
221
|
+
__assertType("subsystemType", "SubsystemType", __assertType__SubsystemType.bind(void 0, subsystemType));
|
|
222
|
+
__assertType("subsystemState", "SubsystemState", __assertType__SubsystemState.bind(void 0, subsystemState));
|
|
223
|
+
this.assertSupportsCommand(import_Types.BarrierOperatorCommand, import_Types.BarrierOperatorCommand.EventSignalingSet);
|
|
224
|
+
const cc = new BarrierOperatorCCEventSignalingSet({
|
|
225
|
+
nodeId: this.endpoint.nodeId,
|
|
226
|
+
endpointIndex: this.endpoint.index,
|
|
227
|
+
subsystemType,
|
|
228
|
+
subsystemState
|
|
229
|
+
});
|
|
230
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
231
|
+
}
|
|
232
|
+
get [import_API.SET_VALUE]() {
|
|
233
|
+
return async function({ property, propertyKey }, value) {
|
|
234
|
+
if (property === "targetState") {
|
|
235
|
+
if (typeof value !== "number") {
|
|
236
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
228
237
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
const affectedNodes = this.endpoint.node.physicalNodes.filter((node) => node.getEndpoint(this.endpoint.index)?.supportsCC(this.ccId));
|
|
237
|
-
for (const node of affectedNodes) {
|
|
238
|
-
this.host.tryGetValueDB(node.id)?.setValue(currentStateValueId, targetValue);
|
|
239
|
-
}
|
|
238
|
+
const targetValue = value === import_Types.BarrierState.Closed ? import_Types.BarrierState.Closed : import_Types.BarrierState.Open;
|
|
239
|
+
return this.set(targetValue);
|
|
240
|
+
} else if (property === "signalingState") {
|
|
241
|
+
if (propertyKey == void 0) {
|
|
242
|
+
(0, import_API.throwMissingPropertyKey)(this.ccId, property);
|
|
243
|
+
} else if (typeof propertyKey !== "number") {
|
|
244
|
+
(0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
|
|
240
245
|
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
if (this.isSinglecast()) {
|
|
244
|
-
this.schedulePoll(currentStateValueId, targetValue);
|
|
245
|
-
} else {
|
|
246
|
+
if (typeof value !== "number") {
|
|
247
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
246
248
|
}
|
|
249
|
+
return this.setEventSignaling(propertyKey, value);
|
|
250
|
+
} else {
|
|
251
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
247
252
|
}
|
|
248
253
|
};
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
254
|
+
}
|
|
255
|
+
[import_API.SET_VALUE_HOOKS] = ({ property, propertyKey }, value, _options) => {
|
|
256
|
+
const valueId = {
|
|
257
|
+
commandClass: this.ccId,
|
|
258
|
+
property,
|
|
259
|
+
propertyKey
|
|
260
|
+
};
|
|
261
|
+
if (BarrierOperatorCCValues.targetState.is(valueId)) {
|
|
262
|
+
const currentStateValueId = BarrierOperatorCCValues.currentState.endpoint(this.endpoint.index);
|
|
263
|
+
const targetValue = value === import_Types.BarrierState.Closed ? import_Types.BarrierState.Closed : import_Types.BarrierState.Open;
|
|
264
|
+
return {
|
|
265
|
+
// Barrier Operator commands may take some time to be executed.
|
|
266
|
+
// Therefore we try to supervise the command execution and delay the
|
|
267
|
+
// optimistic update until the final result is received.
|
|
268
|
+
supervisionDelayedUpdates: true,
|
|
269
|
+
supervisionOnSuccess: () => {
|
|
270
|
+
this.tryGetValueDB()?.setValue(currentStateValueId, targetValue);
|
|
271
|
+
},
|
|
272
|
+
supervisionOnFailure: async () => {
|
|
273
|
+
try {
|
|
274
|
+
await this.get();
|
|
275
|
+
} catch {
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
optimisticallyUpdateRelatedValues: (supervisedAndSuccessful) => {
|
|
279
|
+
if (!supervisedAndSuccessful)
|
|
280
|
+
return;
|
|
281
|
+
if (this.isSinglecast()) {
|
|
282
|
+
this.tryGetValueDB()?.setValue(currentStateValueId, targetValue);
|
|
283
|
+
} else if (this.isMulticast()) {
|
|
284
|
+
const affectedNodes = this.endpoint.node.physicalNodes.filter((node) => node.getEndpoint(this.endpoint.index)?.supportsCC(this.ccId));
|
|
285
|
+
for (const node of affectedNodes) {
|
|
286
|
+
this.host.tryGetValueDB(node.id)?.setValue(currentStateValueId, targetValue);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
verifyChanges: () => {
|
|
291
|
+
if (this.isSinglecast()) {
|
|
292
|
+
this.schedulePoll(currentStateValueId, targetValue);
|
|
293
|
+
} else {
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
} else if (BarrierOperatorCCValues.signalingState.is(valueId)) {
|
|
298
|
+
const subsystemType = propertyKey;
|
|
299
|
+
const signalingStateValueId = BarrierOperatorCCValues.signalingState(subsystemType).endpoint(this.endpoint.index);
|
|
300
|
+
return {
|
|
301
|
+
verifyChanges: () => {
|
|
302
|
+
if (this.isSinglecast()) {
|
|
303
|
+
this.schedulePoll(signalingStateValueId, value, {
|
|
304
|
+
// Signaling state changes are fast
|
|
305
|
+
transition: "fast"
|
|
306
|
+
});
|
|
307
|
+
}
|
|
259
308
|
}
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
get [import_API.POLL_VALUE]() {
|
|
313
|
+
return async function({ property, propertyKey }) {
|
|
314
|
+
switch (property) {
|
|
315
|
+
case "currentState":
|
|
316
|
+
case "position":
|
|
317
|
+
return (await this.get())?.[property];
|
|
318
|
+
case "signalingState":
|
|
319
|
+
if (propertyKey == void 0) {
|
|
320
|
+
(0, import_API.throwMissingPropertyKey)(this.ccId, property);
|
|
321
|
+
} else if (typeof propertyKey !== "number") {
|
|
322
|
+
(0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
|
|
323
|
+
}
|
|
324
|
+
return this.getEventSignaling(propertyKey);
|
|
325
|
+
default:
|
|
326
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
260
327
|
}
|
|
261
328
|
};
|
|
262
329
|
}
|
|
263
330
|
};
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
message: `Interviewing ${this.ccName}...`,
|
|
296
|
-
direction: "none"
|
|
297
|
-
});
|
|
298
|
-
this.ensureMetadata(ctx, BarrierOperatorCCValues.targetState);
|
|
299
|
-
ctx.logNode(node.id, {
|
|
300
|
-
message: "Querying signaling capabilities...",
|
|
301
|
-
direction: "outbound"
|
|
302
|
-
});
|
|
303
|
-
const resp = await api.getSignalingCapabilities();
|
|
304
|
-
if (resp) {
|
|
331
|
+
return BarrierOperatorCCAPI2 = _classThis;
|
|
332
|
+
})();
|
|
333
|
+
let BarrierOperatorCC = (() => {
|
|
334
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Barrier Operator"]), (0, import_CommandClassDecorators.implementedVersion)(1), (0, import_CommandClassDecorators.ccValues)(BarrierOperatorCCValues)];
|
|
335
|
+
let _classDescriptor;
|
|
336
|
+
let _classExtraInitializers = [];
|
|
337
|
+
let _classThis;
|
|
338
|
+
let _classSuper = import_CommandClass.CommandClass;
|
|
339
|
+
var BarrierOperatorCC2 = class extends _classSuper {
|
|
340
|
+
static {
|
|
341
|
+
_classThis = this;
|
|
342
|
+
}
|
|
343
|
+
static {
|
|
344
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
345
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
346
|
+
BarrierOperatorCC2 = _classThis = _classDescriptor.value;
|
|
347
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
348
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
349
|
+
}
|
|
350
|
+
async interview(ctx) {
|
|
351
|
+
const node = this.getNode(ctx);
|
|
352
|
+
const endpoint = this.getEndpoint(ctx);
|
|
353
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Barrier Operator"], ctx, endpoint).withOptions({
|
|
354
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
355
|
+
});
|
|
356
|
+
ctx.logNode(node.id, {
|
|
357
|
+
endpoint: this.endpointIndex,
|
|
358
|
+
message: `Interviewing ${this.ccName}...`,
|
|
359
|
+
direction: "none"
|
|
360
|
+
});
|
|
361
|
+
this.ensureMetadata(ctx, BarrierOperatorCCValues.targetState);
|
|
305
362
|
ctx.logNode(node.id, {
|
|
306
|
-
message:
|
|
363
|
+
message: "Querying signaling capabilities...",
|
|
364
|
+
direction: "outbound"
|
|
365
|
+
});
|
|
366
|
+
const resp = await api.getSignalingCapabilities();
|
|
367
|
+
if (resp) {
|
|
368
|
+
ctx.logNode(node.id, {
|
|
369
|
+
message: `Received supported subsystem types: ${resp.map((t) => `
|
|
307
370
|
\xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, t)}`).join("")}`,
|
|
308
|
-
|
|
371
|
+
direction: "inbound"
|
|
372
|
+
});
|
|
373
|
+
for (const subsystemType of resp) {
|
|
374
|
+
if (!(0, import_safe3.isEnumMember)(import_Types.SubsystemType, subsystemType))
|
|
375
|
+
continue;
|
|
376
|
+
ctx.logNode(node.id, {
|
|
377
|
+
message: `Enabling subsystem ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, subsystemType)}...`,
|
|
378
|
+
direction: "outbound"
|
|
379
|
+
});
|
|
380
|
+
await api.setEventSignaling(subsystemType, import_Types.SubsystemState.On).catch(import_safe3.noop);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
await this.refreshValues(ctx);
|
|
384
|
+
this.setInterviewComplete(ctx, true);
|
|
385
|
+
}
|
|
386
|
+
async refreshValues(ctx) {
|
|
387
|
+
const node = this.getNode(ctx);
|
|
388
|
+
const endpoint = this.getEndpoint(ctx);
|
|
389
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Barrier Operator"], ctx, endpoint).withOptions({
|
|
390
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
309
391
|
});
|
|
310
|
-
|
|
392
|
+
const supportedSubsystems = this.getValue(ctx, BarrierOperatorCCValues.supportedSubsystemTypes) ?? [];
|
|
393
|
+
for (const subsystemType of supportedSubsystems) {
|
|
311
394
|
if (!(0, import_safe3.isEnumMember)(import_Types.SubsystemType, subsystemType))
|
|
312
395
|
continue;
|
|
313
396
|
ctx.logNode(node.id, {
|
|
314
|
-
message: `
|
|
397
|
+
message: `Querying event signaling state for subsystem ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, subsystemType)}...`,
|
|
315
398
|
direction: "outbound"
|
|
316
399
|
});
|
|
317
|
-
await api.
|
|
400
|
+
const state = await api.getEventSignaling(subsystemType);
|
|
401
|
+
if (state != void 0) {
|
|
402
|
+
ctx.logNode(node.id, {
|
|
403
|
+
message: `Subsystem ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, subsystemType)} has state ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemState, state)}`,
|
|
404
|
+
direction: "inbound"
|
|
405
|
+
});
|
|
406
|
+
}
|
|
318
407
|
}
|
|
319
|
-
}
|
|
320
|
-
await this.refreshValues(ctx);
|
|
321
|
-
this.setInterviewComplete(ctx, true);
|
|
322
|
-
}
|
|
323
|
-
async refreshValues(ctx) {
|
|
324
|
-
const node = this.getNode(ctx);
|
|
325
|
-
const endpoint = this.getEndpoint(ctx);
|
|
326
|
-
const api = import_API.CCAPI.create(import_safe.CommandClasses["Barrier Operator"], ctx, endpoint).withOptions({
|
|
327
|
-
priority: import_safe.MessagePriority.NodeQuery
|
|
328
|
-
});
|
|
329
|
-
const supportedSubsystems = this.getValue(ctx, BarrierOperatorCCValues.supportedSubsystemTypes) ?? [];
|
|
330
|
-
for (const subsystemType of supportedSubsystems) {
|
|
331
|
-
if (!(0, import_safe3.isEnumMember)(import_Types.SubsystemType, subsystemType))
|
|
332
|
-
continue;
|
|
333
408
|
ctx.logNode(node.id, {
|
|
334
|
-
message:
|
|
409
|
+
message: "querying current barrier state...",
|
|
335
410
|
direction: "outbound"
|
|
336
411
|
});
|
|
337
|
-
|
|
338
|
-
if (state != void 0) {
|
|
339
|
-
ctx.logNode(node.id, {
|
|
340
|
-
message: `Subsystem ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, subsystemType)} has state ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemState, state)}`,
|
|
341
|
-
direction: "inbound"
|
|
342
|
-
});
|
|
343
|
-
}
|
|
412
|
+
await api.get();
|
|
344
413
|
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
"barrier position": (0, import_safe.maybeUnknownToString)(this.position),
|
|
419
|
-
"barrier state": this.currentState != void 0 ? (0, import_safe3.getEnumMemberName)(import_Types.BarrierState, this.currentState) : "unknown"
|
|
420
|
-
}
|
|
421
|
-
};
|
|
422
|
-
}
|
|
423
|
-
};
|
|
424
|
-
__decorate([
|
|
425
|
-
(0, import_CommandClassDecorators.ccValue)(BarrierOperatorCCValues.currentState)
|
|
426
|
-
], BarrierOperatorCCReport.prototype, "currentState", void 0);
|
|
427
|
-
__decorate([
|
|
428
|
-
(0, import_CommandClassDecorators.ccValue)(BarrierOperatorCCValues.position)
|
|
429
|
-
], BarrierOperatorCCReport.prototype, "position", void 0);
|
|
430
|
-
BarrierOperatorCCReport = BarrierOperatorCCReport_1 = __decorate([
|
|
431
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.Report)
|
|
432
|
-
], BarrierOperatorCCReport);
|
|
433
|
-
let BarrierOperatorCCGet = class BarrierOperatorCCGet2 extends BarrierOperatorCC {
|
|
434
|
-
};
|
|
435
|
-
BarrierOperatorCCGet = __decorate([
|
|
436
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.Get),
|
|
437
|
-
(0, import_CommandClassDecorators.expectedCCResponse)(BarrierOperatorCCReport)
|
|
438
|
-
], BarrierOperatorCCGet);
|
|
439
|
-
let BarrierOperatorCCSignalingCapabilitiesReport = BarrierOperatorCCSignalingCapabilitiesReport_1 = class BarrierOperatorCCSignalingCapabilitiesReport2 extends BarrierOperatorCC {
|
|
440
|
-
constructor(options) {
|
|
441
|
-
super(options);
|
|
442
|
-
this.supportedSubsystemTypes = options.supportedSubsystemTypes;
|
|
443
|
-
}
|
|
444
|
-
static from(raw, ctx) {
|
|
445
|
-
const supportedSubsystemTypes = (0, import_safe.parseBitMask)(raw.payload, import_Types.SubsystemType.Audible);
|
|
446
|
-
return new BarrierOperatorCCSignalingCapabilitiesReport_1({
|
|
447
|
-
nodeId: ctx.sourceNodeId,
|
|
448
|
-
supportedSubsystemTypes
|
|
449
|
-
});
|
|
450
|
-
}
|
|
451
|
-
supportedSubsystemTypes;
|
|
452
|
-
toLogEntry(ctx) {
|
|
453
|
-
return {
|
|
454
|
-
...super.toLogEntry(ctx),
|
|
455
|
-
message: {
|
|
456
|
-
"supported types": this.supportedSubsystemTypes.map((t) => `
|
|
457
|
-
\xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, t)}`).join("")
|
|
458
|
-
}
|
|
459
|
-
};
|
|
460
|
-
}
|
|
461
|
-
};
|
|
462
|
-
__decorate([
|
|
463
|
-
(0, import_CommandClassDecorators.ccValue)(BarrierOperatorCCValues.supportedSubsystemTypes)
|
|
464
|
-
], BarrierOperatorCCSignalingCapabilitiesReport.prototype, "supportedSubsystemTypes", void 0);
|
|
465
|
-
BarrierOperatorCCSignalingCapabilitiesReport = BarrierOperatorCCSignalingCapabilitiesReport_1 = __decorate([
|
|
466
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.SignalingCapabilitiesReport)
|
|
467
|
-
], BarrierOperatorCCSignalingCapabilitiesReport);
|
|
468
|
-
let BarrierOperatorCCSignalingCapabilitiesGet = class BarrierOperatorCCSignalingCapabilitiesGet2 extends BarrierOperatorCC {
|
|
469
|
-
};
|
|
470
|
-
BarrierOperatorCCSignalingCapabilitiesGet = __decorate([
|
|
471
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.SignalingCapabilitiesGet),
|
|
472
|
-
(0, import_CommandClassDecorators.expectedCCResponse)(BarrierOperatorCCSignalingCapabilitiesReport)
|
|
473
|
-
], BarrierOperatorCCSignalingCapabilitiesGet);
|
|
474
|
-
let BarrierOperatorCCEventSignalingSet = class BarrierOperatorCCEventSignalingSet2 extends BarrierOperatorCC {
|
|
475
|
-
constructor(options) {
|
|
476
|
-
super(options);
|
|
477
|
-
this.subsystemType = options.subsystemType;
|
|
478
|
-
this.subsystemState = options.subsystemState;
|
|
479
|
-
}
|
|
480
|
-
static from(_raw, _ctx) {
|
|
481
|
-
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
482
|
-
}
|
|
483
|
-
subsystemType;
|
|
484
|
-
subsystemState;
|
|
485
|
-
serialize(ctx) {
|
|
486
|
-
this.payload = import_safe2.Bytes.from([this.subsystemType, this.subsystemState]);
|
|
487
|
-
return super.serialize(ctx);
|
|
488
|
-
}
|
|
489
|
-
toLogEntry(ctx) {
|
|
490
|
-
return {
|
|
491
|
-
...super.toLogEntry(ctx),
|
|
492
|
-
message: {
|
|
493
|
-
"subsystem type": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, this.subsystemType),
|
|
494
|
-
"subsystem state": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemState, this.subsystemState)
|
|
495
|
-
}
|
|
496
|
-
};
|
|
497
|
-
}
|
|
498
|
-
};
|
|
499
|
-
BarrierOperatorCCEventSignalingSet = __decorate([
|
|
500
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.EventSignalingSet),
|
|
501
|
-
(0, import_CommandClassDecorators.useSupervision)()
|
|
502
|
-
], BarrierOperatorCCEventSignalingSet);
|
|
503
|
-
let BarrierOperatorCCEventSignalingReport = BarrierOperatorCCEventSignalingReport_1 = class BarrierOperatorCCEventSignalingReport2 extends BarrierOperatorCC {
|
|
504
|
-
constructor(options) {
|
|
505
|
-
super(options);
|
|
506
|
-
this.subsystemType = options.subsystemType;
|
|
507
|
-
this.subsystemState = options.subsystemState;
|
|
508
|
-
}
|
|
509
|
-
static from(raw, ctx) {
|
|
510
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
511
|
-
const subsystemType = raw.payload[0];
|
|
512
|
-
const subsystemState = raw.payload[1];
|
|
513
|
-
return new BarrierOperatorCCEventSignalingReport_1({
|
|
514
|
-
nodeId: ctx.sourceNodeId,
|
|
515
|
-
subsystemType,
|
|
516
|
-
subsystemState
|
|
517
|
-
});
|
|
518
|
-
}
|
|
519
|
-
persistValues(ctx) {
|
|
520
|
-
if (!super.persistValues(ctx))
|
|
521
|
-
return false;
|
|
522
|
-
const signalingStateValue = BarrierOperatorCCValues.signalingState(this.subsystemType);
|
|
523
|
-
this.ensureMetadata(ctx, signalingStateValue);
|
|
524
|
-
this.setValue(ctx, signalingStateValue, this.subsystemState);
|
|
525
|
-
return true;
|
|
526
|
-
}
|
|
527
|
-
subsystemType;
|
|
528
|
-
subsystemState;
|
|
529
|
-
toLogEntry(ctx) {
|
|
530
|
-
return {
|
|
531
|
-
...super.toLogEntry(ctx),
|
|
532
|
-
message: {
|
|
533
|
-
"subsystem type": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, this.subsystemType),
|
|
534
|
-
"subsystem state": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemState, this.subsystemState)
|
|
414
|
+
};
|
|
415
|
+
return BarrierOperatorCC2 = _classThis;
|
|
416
|
+
})();
|
|
417
|
+
let BarrierOperatorCCSet = (() => {
|
|
418
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.Set), (0, import_CommandClassDecorators.useSupervision)()];
|
|
419
|
+
let _classDescriptor;
|
|
420
|
+
let _classExtraInitializers = [];
|
|
421
|
+
let _classThis;
|
|
422
|
+
let _classSuper = BarrierOperatorCC;
|
|
423
|
+
var BarrierOperatorCCSet2 = class extends _classSuper {
|
|
424
|
+
static {
|
|
425
|
+
_classThis = this;
|
|
426
|
+
}
|
|
427
|
+
static {
|
|
428
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
429
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
430
|
+
BarrierOperatorCCSet2 = _classThis = _classDescriptor.value;
|
|
431
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
432
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
433
|
+
}
|
|
434
|
+
constructor(options) {
|
|
435
|
+
super(options);
|
|
436
|
+
this.targetState = options.targetState;
|
|
437
|
+
}
|
|
438
|
+
static from(_raw, _ctx) {
|
|
439
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
440
|
+
}
|
|
441
|
+
targetState;
|
|
442
|
+
serialize(ctx) {
|
|
443
|
+
this.payload = import_safe2.Bytes.from([this.targetState]);
|
|
444
|
+
return super.serialize(ctx);
|
|
445
|
+
}
|
|
446
|
+
toLogEntry(ctx) {
|
|
447
|
+
return {
|
|
448
|
+
...super.toLogEntry(ctx),
|
|
449
|
+
message: { "target state": this.targetState }
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
return BarrierOperatorCCSet2 = _classThis;
|
|
454
|
+
})();
|
|
455
|
+
let BarrierOperatorCCReport = (() => {
|
|
456
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("currentState", BarrierOperatorCCValues.currentState), (0, import_CommandClassDecorators.ccValueProperty)("position", BarrierOperatorCCValues.position)];
|
|
457
|
+
let _classDescriptor;
|
|
458
|
+
let _classExtraInitializers = [];
|
|
459
|
+
let _classThis;
|
|
460
|
+
let _classSuper = BarrierOperatorCC;
|
|
461
|
+
var BarrierOperatorCCReport2 = class extends _classSuper {
|
|
462
|
+
static {
|
|
463
|
+
_classThis = this;
|
|
464
|
+
}
|
|
465
|
+
static {
|
|
466
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
467
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
468
|
+
BarrierOperatorCCReport2 = _classThis = _classDescriptor.value;
|
|
469
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
470
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
471
|
+
}
|
|
472
|
+
constructor(options) {
|
|
473
|
+
super(options);
|
|
474
|
+
this.position = options.position;
|
|
475
|
+
this.currentState = options.currentState;
|
|
476
|
+
}
|
|
477
|
+
static from(raw, ctx) {
|
|
478
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
479
|
+
const payloadValue = raw.payload[0];
|
|
480
|
+
let position;
|
|
481
|
+
if (payloadValue <= 99) {
|
|
482
|
+
position = payloadValue;
|
|
483
|
+
} else if (payloadValue === 255) {
|
|
484
|
+
position = 100;
|
|
485
|
+
} else {
|
|
486
|
+
position = import_safe.UNKNOWN_STATE;
|
|
535
487
|
}
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
constructor(options) {
|
|
544
|
-
super(options);
|
|
545
|
-
this.subsystemType = options.subsystemType;
|
|
546
|
-
}
|
|
547
|
-
static from(_raw, _ctx) {
|
|
548
|
-
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
549
|
-
}
|
|
550
|
-
subsystemType;
|
|
551
|
-
serialize(ctx) {
|
|
552
|
-
this.payload = import_safe2.Bytes.from([this.subsystemType]);
|
|
553
|
-
return super.serialize(ctx);
|
|
554
|
-
}
|
|
555
|
-
toLogEntry(ctx) {
|
|
556
|
-
return {
|
|
557
|
-
...super.toLogEntry(ctx),
|
|
558
|
-
message: {
|
|
559
|
-
"subsystem type": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, this.subsystemType)
|
|
488
|
+
let currentState;
|
|
489
|
+
if (payloadValue === import_Types.BarrierState.Closed || payloadValue >= import_Types.BarrierState.Closing) {
|
|
490
|
+
currentState = payloadValue;
|
|
491
|
+
} else if (payloadValue > 0 && payloadValue <= 99) {
|
|
492
|
+
currentState = import_Types.BarrierState.Stopped;
|
|
493
|
+
} else {
|
|
494
|
+
currentState = import_safe.UNKNOWN_STATE;
|
|
560
495
|
}
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
496
|
+
return new this({
|
|
497
|
+
nodeId: ctx.sourceNodeId,
|
|
498
|
+
position,
|
|
499
|
+
currentState
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
currentState;
|
|
503
|
+
position;
|
|
504
|
+
toLogEntry(ctx) {
|
|
505
|
+
return {
|
|
506
|
+
...super.toLogEntry(ctx),
|
|
507
|
+
message: {
|
|
508
|
+
"barrier position": (0, import_safe.maybeUnknownToString)(this.position),
|
|
509
|
+
"barrier state": this.currentState != void 0 ? (0, import_safe3.getEnumMemberName)(import_Types.BarrierState, this.currentState) : "unknown"
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
return BarrierOperatorCCReport2 = _classThis;
|
|
515
|
+
})();
|
|
516
|
+
let BarrierOperatorCCGet = (() => {
|
|
517
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.Get), (0, import_CommandClassDecorators.expectedCCResponse)(BarrierOperatorCCReport)];
|
|
518
|
+
let _classDescriptor;
|
|
519
|
+
let _classExtraInitializers = [];
|
|
520
|
+
let _classThis;
|
|
521
|
+
let _classSuper = BarrierOperatorCC;
|
|
522
|
+
var BarrierOperatorCCGet2 = class extends _classSuper {
|
|
523
|
+
static {
|
|
524
|
+
_classThis = this;
|
|
525
|
+
}
|
|
526
|
+
static {
|
|
527
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
528
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
529
|
+
BarrierOperatorCCGet2 = _classThis = _classDescriptor.value;
|
|
530
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
531
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
532
|
+
}
|
|
533
|
+
};
|
|
534
|
+
return BarrierOperatorCCGet2 = _classThis;
|
|
535
|
+
})();
|
|
536
|
+
let BarrierOperatorCCSignalingCapabilitiesReport = (() => {
|
|
537
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.SignalingCapabilitiesReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedSubsystemTypes", BarrierOperatorCCValues.supportedSubsystemTypes)];
|
|
538
|
+
let _classDescriptor;
|
|
539
|
+
let _classExtraInitializers = [];
|
|
540
|
+
let _classThis;
|
|
541
|
+
let _classSuper = BarrierOperatorCC;
|
|
542
|
+
var BarrierOperatorCCSignalingCapabilitiesReport2 = class extends _classSuper {
|
|
543
|
+
static {
|
|
544
|
+
_classThis = this;
|
|
545
|
+
}
|
|
546
|
+
static {
|
|
547
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
548
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
549
|
+
BarrierOperatorCCSignalingCapabilitiesReport2 = _classThis = _classDescriptor.value;
|
|
550
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
551
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
552
|
+
}
|
|
553
|
+
constructor(options) {
|
|
554
|
+
super(options);
|
|
555
|
+
this.supportedSubsystemTypes = options.supportedSubsystemTypes;
|
|
556
|
+
}
|
|
557
|
+
static from(raw, ctx) {
|
|
558
|
+
const supportedSubsystemTypes = (0, import_safe.parseBitMask)(raw.payload, import_Types.SubsystemType.Audible);
|
|
559
|
+
return new this({
|
|
560
|
+
nodeId: ctx.sourceNodeId,
|
|
561
|
+
supportedSubsystemTypes
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
supportedSubsystemTypes;
|
|
565
|
+
toLogEntry(ctx) {
|
|
566
|
+
return {
|
|
567
|
+
...super.toLogEntry(ctx),
|
|
568
|
+
message: {
|
|
569
|
+
"supported types": this.supportedSubsystemTypes.map((t) => `
|
|
570
|
+
\xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, t)}`).join("")
|
|
571
|
+
}
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
};
|
|
575
|
+
return BarrierOperatorCCSignalingCapabilitiesReport2 = _classThis;
|
|
576
|
+
})();
|
|
577
|
+
let BarrierOperatorCCSignalingCapabilitiesGet = (() => {
|
|
578
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.SignalingCapabilitiesGet), (0, import_CommandClassDecorators.expectedCCResponse)(BarrierOperatorCCSignalingCapabilitiesReport)];
|
|
579
|
+
let _classDescriptor;
|
|
580
|
+
let _classExtraInitializers = [];
|
|
581
|
+
let _classThis;
|
|
582
|
+
let _classSuper = BarrierOperatorCC;
|
|
583
|
+
var BarrierOperatorCCSignalingCapabilitiesGet2 = class extends _classSuper {
|
|
584
|
+
static {
|
|
585
|
+
_classThis = this;
|
|
586
|
+
}
|
|
587
|
+
static {
|
|
588
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
589
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
590
|
+
BarrierOperatorCCSignalingCapabilitiesGet2 = _classThis = _classDescriptor.value;
|
|
591
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
592
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
593
|
+
}
|
|
594
|
+
};
|
|
595
|
+
return BarrierOperatorCCSignalingCapabilitiesGet2 = _classThis;
|
|
596
|
+
})();
|
|
597
|
+
let BarrierOperatorCCEventSignalingSet = (() => {
|
|
598
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.EventSignalingSet), (0, import_CommandClassDecorators.useSupervision)()];
|
|
599
|
+
let _classDescriptor;
|
|
600
|
+
let _classExtraInitializers = [];
|
|
601
|
+
let _classThis;
|
|
602
|
+
let _classSuper = BarrierOperatorCC;
|
|
603
|
+
var BarrierOperatorCCEventSignalingSet2 = class extends _classSuper {
|
|
604
|
+
static {
|
|
605
|
+
_classThis = this;
|
|
606
|
+
}
|
|
607
|
+
static {
|
|
608
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
609
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
610
|
+
BarrierOperatorCCEventSignalingSet2 = _classThis = _classDescriptor.value;
|
|
611
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
612
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
613
|
+
}
|
|
614
|
+
constructor(options) {
|
|
615
|
+
super(options);
|
|
616
|
+
this.subsystemType = options.subsystemType;
|
|
617
|
+
this.subsystemState = options.subsystemState;
|
|
618
|
+
}
|
|
619
|
+
static from(_raw, _ctx) {
|
|
620
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
621
|
+
}
|
|
622
|
+
subsystemType;
|
|
623
|
+
subsystemState;
|
|
624
|
+
serialize(ctx) {
|
|
625
|
+
this.payload = import_safe2.Bytes.from([this.subsystemType, this.subsystemState]);
|
|
626
|
+
return super.serialize(ctx);
|
|
627
|
+
}
|
|
628
|
+
toLogEntry(ctx) {
|
|
629
|
+
return {
|
|
630
|
+
...super.toLogEntry(ctx),
|
|
631
|
+
message: {
|
|
632
|
+
"subsystem type": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, this.subsystemType),
|
|
633
|
+
"subsystem state": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemState, this.subsystemState)
|
|
634
|
+
}
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
};
|
|
638
|
+
return BarrierOperatorCCEventSignalingSet2 = _classThis;
|
|
639
|
+
})();
|
|
640
|
+
let BarrierOperatorCCEventSignalingReport = (() => {
|
|
641
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.EventSignalingReport)];
|
|
642
|
+
let _classDescriptor;
|
|
643
|
+
let _classExtraInitializers = [];
|
|
644
|
+
let _classThis;
|
|
645
|
+
let _classSuper = BarrierOperatorCC;
|
|
646
|
+
var BarrierOperatorCCEventSignalingReport2 = class extends _classSuper {
|
|
647
|
+
static {
|
|
648
|
+
_classThis = this;
|
|
649
|
+
}
|
|
650
|
+
static {
|
|
651
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
652
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
653
|
+
BarrierOperatorCCEventSignalingReport2 = _classThis = _classDescriptor.value;
|
|
654
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
655
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
656
|
+
}
|
|
657
|
+
constructor(options) {
|
|
658
|
+
super(options);
|
|
659
|
+
this.subsystemType = options.subsystemType;
|
|
660
|
+
this.subsystemState = options.subsystemState;
|
|
661
|
+
}
|
|
662
|
+
static from(raw, ctx) {
|
|
663
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
664
|
+
const subsystemType = raw.payload[0];
|
|
665
|
+
const subsystemState = raw.payload[1];
|
|
666
|
+
return new this({
|
|
667
|
+
nodeId: ctx.sourceNodeId,
|
|
668
|
+
subsystemType,
|
|
669
|
+
subsystemState
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
persistValues(ctx) {
|
|
673
|
+
if (!super.persistValues(ctx))
|
|
674
|
+
return false;
|
|
675
|
+
const signalingStateValue = BarrierOperatorCCValues.signalingState(this.subsystemType);
|
|
676
|
+
this.ensureMetadata(ctx, signalingStateValue);
|
|
677
|
+
this.setValue(ctx, signalingStateValue, this.subsystemState);
|
|
678
|
+
return true;
|
|
679
|
+
}
|
|
680
|
+
subsystemType;
|
|
681
|
+
subsystemState;
|
|
682
|
+
toLogEntry(ctx) {
|
|
683
|
+
return {
|
|
684
|
+
...super.toLogEntry(ctx),
|
|
685
|
+
message: {
|
|
686
|
+
"subsystem type": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, this.subsystemType),
|
|
687
|
+
"subsystem state": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemState, this.subsystemState)
|
|
688
|
+
}
|
|
689
|
+
};
|
|
690
|
+
}
|
|
691
|
+
};
|
|
692
|
+
return BarrierOperatorCCEventSignalingReport2 = _classThis;
|
|
693
|
+
})();
|
|
694
|
+
let BarrierOperatorCCEventSignalingGet = (() => {
|
|
695
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BarrierOperatorCommand.EventSignalingGet), (0, import_CommandClassDecorators.expectedCCResponse)(BarrierOperatorCCEventSignalingReport)];
|
|
696
|
+
let _classDescriptor;
|
|
697
|
+
let _classExtraInitializers = [];
|
|
698
|
+
let _classThis;
|
|
699
|
+
let _classSuper = BarrierOperatorCC;
|
|
700
|
+
var BarrierOperatorCCEventSignalingGet2 = class extends _classSuper {
|
|
701
|
+
static {
|
|
702
|
+
_classThis = this;
|
|
703
|
+
}
|
|
704
|
+
static {
|
|
705
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
706
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
707
|
+
BarrierOperatorCCEventSignalingGet2 = _classThis = _classDescriptor.value;
|
|
708
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
709
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
710
|
+
}
|
|
711
|
+
constructor(options) {
|
|
712
|
+
super(options);
|
|
713
|
+
this.subsystemType = options.subsystemType;
|
|
714
|
+
}
|
|
715
|
+
static from(_raw, _ctx) {
|
|
716
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
717
|
+
}
|
|
718
|
+
subsystemType;
|
|
719
|
+
serialize(ctx) {
|
|
720
|
+
this.payload = import_safe2.Bytes.from([this.subsystemType]);
|
|
721
|
+
return super.serialize(ctx);
|
|
722
|
+
}
|
|
723
|
+
toLogEntry(ctx) {
|
|
724
|
+
return {
|
|
725
|
+
...super.toLogEntry(ctx),
|
|
726
|
+
message: {
|
|
727
|
+
"subsystem type": (0, import_safe3.getEnumMemberName)(import_Types.SubsystemType, this.subsystemType)
|
|
728
|
+
}
|
|
729
|
+
};
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
return BarrierOperatorCCEventSignalingGet2 = _classThis;
|
|
733
|
+
})();
|
|
568
734
|
// Annotate the CommonJS export names for ESM import in node:
|
|
569
735
|
0 && (module.exports = {
|
|
570
736
|
BarrierOperatorCC,
|