@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
|
@@ -1,10 +1,37 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
27
|
+
};
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
+
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
6
34
|
};
|
|
7
|
-
var BarrierOperatorCCReport_1, BarrierOperatorCCSignalingCapabilitiesReport_1, BarrierOperatorCCEventSignalingReport_1;
|
|
8
35
|
function __assertType(argName, typeName, boundHasError) {
|
|
9
36
|
const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
|
|
10
37
|
if (boundHasError()) {
|
|
@@ -46,7 +73,7 @@ import { Bytes } from "@zwave-js/shared/safe";
|
|
|
46
73
|
import { getEnumMemberName, isEnumMember, noop, pick, } from "@zwave-js/shared/safe";
|
|
47
74
|
import { CCAPI, POLL_VALUE, SET_VALUE, SET_VALUE_HOOKS, throwMissingPropertyKey, throwUnsupportedProperty, throwUnsupportedPropertyKey, throwWrongValueType, } from "../lib/API.js";
|
|
48
75
|
import { CommandClass, } from "../lib/CommandClass.js";
|
|
49
|
-
import { API, CCCommand,
|
|
76
|
+
import { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from "../lib/CommandClassDecorators.js";
|
|
50
77
|
import { V } from "../lib/Values.js";
|
|
51
78
|
import { BarrierOperatorCommand, BarrierState, SubsystemState, SubsystemType, } from "../lib/_Types.js";
|
|
52
79
|
export const BarrierOperatorCCValues = Object.freeze({
|
|
@@ -83,528 +110,642 @@ export const BarrierOperatorCCValues = Object.freeze({
|
|
|
83
110
|
})),
|
|
84
111
|
}),
|
|
85
112
|
});
|
|
86
|
-
let BarrierOperatorCCAPI =
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
this.assertSupportsCommand(BarrierOperatorCommand, BarrierOperatorCommand.Get);
|
|
101
|
-
const cc = new BarrierOperatorCCGet({
|
|
102
|
-
nodeId: this.endpoint.nodeId,
|
|
103
|
-
endpointIndex: this.endpoint.index,
|
|
104
|
-
});
|
|
105
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
106
|
-
if (response) {
|
|
107
|
-
return pick(response, ["currentState", "position"]);
|
|
113
|
+
let BarrierOperatorCCAPI = (() => {
|
|
114
|
+
let _classDecorators = [API(CommandClasses["Barrier Operator"])];
|
|
115
|
+
let _classDescriptor;
|
|
116
|
+
let _classExtraInitializers = [];
|
|
117
|
+
let _classThis;
|
|
118
|
+
let _classSuper = CCAPI;
|
|
119
|
+
var BarrierOperatorCCAPI = class extends _classSuper {
|
|
120
|
+
static { _classThis = this; }
|
|
121
|
+
static {
|
|
122
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
123
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
124
|
+
BarrierOperatorCCAPI = _classThis = _classDescriptor.value;
|
|
125
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
126
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
108
127
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
});
|
|
118
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
119
|
-
}
|
|
120
|
-
async getSignalingCapabilities() {
|
|
121
|
-
this.assertSupportsCommand(BarrierOperatorCommand, BarrierOperatorCommand.SignalingCapabilitiesGet);
|
|
122
|
-
const cc = new BarrierOperatorCCSignalingCapabilitiesGet({
|
|
123
|
-
nodeId: this.endpoint.nodeId,
|
|
124
|
-
endpointIndex: this.endpoint.index,
|
|
125
|
-
});
|
|
126
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
127
|
-
return response?.supportedSubsystemTypes;
|
|
128
|
-
}
|
|
129
|
-
async getEventSignaling(subsystemType) {
|
|
130
|
-
__assertType("subsystemType", "SubsystemType", __assertType__SubsystemType.bind(void 0, subsystemType));
|
|
131
|
-
this.assertSupportsCommand(BarrierOperatorCommand, BarrierOperatorCommand.EventSignalingGet);
|
|
132
|
-
const cc = new BarrierOperatorCCEventSignalingGet({
|
|
133
|
-
nodeId: this.endpoint.nodeId,
|
|
134
|
-
endpointIndex: this.endpoint.index,
|
|
135
|
-
subsystemType,
|
|
136
|
-
});
|
|
137
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
138
|
-
return response?.subsystemState;
|
|
139
|
-
}
|
|
140
|
-
async setEventSignaling(subsystemType, subsystemState) {
|
|
141
|
-
__assertType("subsystemType", "SubsystemType", __assertType__SubsystemType.bind(void 0, subsystemType));
|
|
142
|
-
__assertType("subsystemState", "SubsystemState", __assertType__SubsystemState.bind(void 0, subsystemState));
|
|
143
|
-
this.assertSupportsCommand(BarrierOperatorCommand, BarrierOperatorCommand.EventSignalingSet);
|
|
144
|
-
const cc = new BarrierOperatorCCEventSignalingSet({
|
|
145
|
-
nodeId: this.endpoint.nodeId,
|
|
146
|
-
endpointIndex: this.endpoint.index,
|
|
147
|
-
subsystemType,
|
|
148
|
-
subsystemState,
|
|
149
|
-
});
|
|
150
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
151
|
-
}
|
|
152
|
-
get [SET_VALUE]() {
|
|
153
|
-
return async function ({ property, propertyKey }, value) {
|
|
154
|
-
if (property === "targetState") {
|
|
155
|
-
if (typeof value !== "number") {
|
|
156
|
-
throwWrongValueType(this.ccId, property, "number", typeof value);
|
|
157
|
-
}
|
|
158
|
-
const targetValue = value === BarrierState.Closed
|
|
159
|
-
? BarrierState.Closed
|
|
160
|
-
: BarrierState.Open;
|
|
161
|
-
return this.set(targetValue);
|
|
128
|
+
supportsCommand(cmd) {
|
|
129
|
+
switch (cmd) {
|
|
130
|
+
case BarrierOperatorCommand.Get:
|
|
131
|
+
case BarrierOperatorCommand.Set:
|
|
132
|
+
case BarrierOperatorCommand.SignalingCapabilitiesGet:
|
|
133
|
+
case BarrierOperatorCommand.EventSignalingGet:
|
|
134
|
+
case BarrierOperatorCommand.EventSignalingSet:
|
|
135
|
+
return true; // This is mandatory
|
|
162
136
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
else {
|
|
176
|
-
throwUnsupportedProperty(this.ccId, property);
|
|
137
|
+
return super.supportsCommand(cmd);
|
|
138
|
+
}
|
|
139
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
140
|
+
async get() {
|
|
141
|
+
this.assertSupportsCommand(BarrierOperatorCommand, BarrierOperatorCommand.Get);
|
|
142
|
+
const cc = new BarrierOperatorCCGet({
|
|
143
|
+
nodeId: this.endpoint.nodeId,
|
|
144
|
+
endpointIndex: this.endpoint.index,
|
|
145
|
+
});
|
|
146
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
147
|
+
if (response) {
|
|
148
|
+
return pick(response, ["currentState", "position"]);
|
|
177
149
|
}
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
[SET_VALUE_HOOKS] = ({ property, propertyKey }, value, _options) => {
|
|
181
|
-
const valueId = {
|
|
182
|
-
commandClass: this.ccId,
|
|
183
|
-
property,
|
|
184
|
-
propertyKey,
|
|
185
|
-
};
|
|
186
|
-
if (BarrierOperatorCCValues.targetState.is(valueId)) {
|
|
187
|
-
const currentStateValueId = BarrierOperatorCCValues.currentState
|
|
188
|
-
.endpoint(this.endpoint.index);
|
|
189
|
-
const targetValue = value === BarrierState.Closed
|
|
190
|
-
? BarrierState.Closed
|
|
191
|
-
: BarrierState.Open;
|
|
192
|
-
return {
|
|
193
|
-
// Barrier Operator commands may take some time to be executed.
|
|
194
|
-
// Therefore we try to supervise the command execution and delay the
|
|
195
|
-
// optimistic update until the final result is received.
|
|
196
|
-
supervisionDelayedUpdates: true,
|
|
197
|
-
supervisionOnSuccess: () => {
|
|
198
|
-
this.tryGetValueDB()?.setValue(currentStateValueId, targetValue);
|
|
199
|
-
},
|
|
200
|
-
supervisionOnFailure: async () => {
|
|
201
|
-
// The command failed, so now we don't know the status - refresh the current value
|
|
202
|
-
try {
|
|
203
|
-
await this.get();
|
|
204
|
-
}
|
|
205
|
-
catch {
|
|
206
|
-
// ignore
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
optimisticallyUpdateRelatedValues: (supervisedAndSuccessful) => {
|
|
210
|
-
// For barriers, do not update the current value unless we actually know the command was successful
|
|
211
|
-
if (!supervisedAndSuccessful)
|
|
212
|
-
return;
|
|
213
|
-
if (this.isSinglecast()) {
|
|
214
|
-
this.tryGetValueDB()?.setValue(currentStateValueId, targetValue);
|
|
215
|
-
}
|
|
216
|
-
else if (this.isMulticast()) {
|
|
217
|
-
// Figure out which nodes were affected by this command
|
|
218
|
-
const affectedNodes = this.endpoint.node.physicalNodes
|
|
219
|
-
.filter((node) => node
|
|
220
|
-
.getEndpoint(this.endpoint.index)
|
|
221
|
-
?.supportsCC(this.ccId));
|
|
222
|
-
// and optimistically update the currentValue
|
|
223
|
-
for (const node of affectedNodes) {
|
|
224
|
-
this.host
|
|
225
|
-
.tryGetValueDB(node.id)
|
|
226
|
-
?.setValue(currentStateValueId, targetValue);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
verifyChanges: () => {
|
|
231
|
-
if (this.isSinglecast()) {
|
|
232
|
-
// We query currentValue instead of targetValue to make sure that unsolicited updates cancel the scheduled poll
|
|
233
|
-
this.schedulePoll(currentStateValueId, targetValue);
|
|
234
|
-
}
|
|
235
|
-
else {
|
|
236
|
-
// For multicasts, do not schedule a refresh - this could cause a LOT of traffic
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
|
-
};
|
|
240
150
|
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
transition: "fast",
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
};
|
|
151
|
+
async set(targetState) {
|
|
152
|
+
__assertType("targetState", undefined, __assertType__su__1__2_eu.bind(void 0, targetState));
|
|
153
|
+
this.assertSupportsCommand(BarrierOperatorCommand, BarrierOperatorCommand.Set);
|
|
154
|
+
const cc = new BarrierOperatorCCSet({
|
|
155
|
+
nodeId: this.endpoint.nodeId,
|
|
156
|
+
endpointIndex: this.endpoint.index,
|
|
157
|
+
targetState,
|
|
158
|
+
});
|
|
159
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
255
160
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
161
|
+
async getSignalingCapabilities() {
|
|
162
|
+
this.assertSupportsCommand(BarrierOperatorCommand, BarrierOperatorCommand.SignalingCapabilitiesGet);
|
|
163
|
+
const cc = new BarrierOperatorCCSignalingCapabilitiesGet({
|
|
164
|
+
nodeId: this.endpoint.nodeId,
|
|
165
|
+
endpointIndex: this.endpoint.index,
|
|
166
|
+
});
|
|
167
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
168
|
+
return response?.supportedSubsystemTypes;
|
|
169
|
+
}
|
|
170
|
+
async getEventSignaling(subsystemType) {
|
|
171
|
+
__assertType("subsystemType", "SubsystemType", __assertType__SubsystemType.bind(void 0, subsystemType));
|
|
172
|
+
this.assertSupportsCommand(BarrierOperatorCommand, BarrierOperatorCommand.EventSignalingGet);
|
|
173
|
+
const cc = new BarrierOperatorCCEventSignalingGet({
|
|
174
|
+
nodeId: this.endpoint.nodeId,
|
|
175
|
+
endpointIndex: this.endpoint.index,
|
|
176
|
+
subsystemType,
|
|
177
|
+
});
|
|
178
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
179
|
+
return response?.subsystemState;
|
|
180
|
+
}
|
|
181
|
+
async setEventSignaling(subsystemType, subsystemState) {
|
|
182
|
+
__assertType("subsystemType", "SubsystemType", __assertType__SubsystemType.bind(void 0, subsystemType));
|
|
183
|
+
__assertType("subsystemState", "SubsystemState", __assertType__SubsystemState.bind(void 0, subsystemState));
|
|
184
|
+
this.assertSupportsCommand(BarrierOperatorCommand, BarrierOperatorCommand.EventSignalingSet);
|
|
185
|
+
const cc = new BarrierOperatorCCEventSignalingSet({
|
|
186
|
+
nodeId: this.endpoint.nodeId,
|
|
187
|
+
endpointIndex: this.endpoint.index,
|
|
188
|
+
subsystemType,
|
|
189
|
+
subsystemState,
|
|
190
|
+
});
|
|
191
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
192
|
+
}
|
|
193
|
+
get [SET_VALUE]() {
|
|
194
|
+
return async function ({ property, propertyKey }, value) {
|
|
195
|
+
if (property === "targetState") {
|
|
196
|
+
if (typeof value !== "number") {
|
|
197
|
+
throwWrongValueType(this.ccId, property, "number", typeof value);
|
|
198
|
+
}
|
|
199
|
+
const targetValue = value === BarrierState.Closed
|
|
200
|
+
? BarrierState.Closed
|
|
201
|
+
: BarrierState.Open;
|
|
202
|
+
return this.set(targetValue);
|
|
203
|
+
}
|
|
204
|
+
else if (property === "signalingState") {
|
|
264
205
|
if (propertyKey == undefined) {
|
|
265
206
|
throwMissingPropertyKey(this.ccId, property);
|
|
266
207
|
}
|
|
267
208
|
else if (typeof propertyKey !== "number") {
|
|
268
209
|
throwUnsupportedPropertyKey(this.ccId, property, propertyKey);
|
|
269
210
|
}
|
|
270
|
-
|
|
271
|
-
|
|
211
|
+
if (typeof value !== "number") {
|
|
212
|
+
throwWrongValueType(this.ccId, property, "number", typeof value);
|
|
213
|
+
}
|
|
214
|
+
return this.setEventSignaling(propertyKey, value);
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
272
217
|
throwUnsupportedProperty(this.ccId, property);
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
[SET_VALUE_HOOKS] = ({ property, propertyKey }, value, _options) => {
|
|
222
|
+
const valueId = {
|
|
223
|
+
commandClass: this.ccId,
|
|
224
|
+
property,
|
|
225
|
+
propertyKey,
|
|
226
|
+
};
|
|
227
|
+
if (BarrierOperatorCCValues.targetState.is(valueId)) {
|
|
228
|
+
const currentStateValueId = BarrierOperatorCCValues.currentState
|
|
229
|
+
.endpoint(this.endpoint.index);
|
|
230
|
+
const targetValue = value === BarrierState.Closed
|
|
231
|
+
? BarrierState.Closed
|
|
232
|
+
: BarrierState.Open;
|
|
233
|
+
return {
|
|
234
|
+
// Barrier Operator commands may take some time to be executed.
|
|
235
|
+
// Therefore we try to supervise the command execution and delay the
|
|
236
|
+
// optimistic update until the final result is received.
|
|
237
|
+
supervisionDelayedUpdates: true,
|
|
238
|
+
supervisionOnSuccess: () => {
|
|
239
|
+
this.tryGetValueDB()?.setValue(currentStateValueId, targetValue);
|
|
240
|
+
},
|
|
241
|
+
supervisionOnFailure: async () => {
|
|
242
|
+
// The command failed, so now we don't know the status - refresh the current value
|
|
243
|
+
try {
|
|
244
|
+
await this.get();
|
|
245
|
+
}
|
|
246
|
+
catch {
|
|
247
|
+
// ignore
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
optimisticallyUpdateRelatedValues: (supervisedAndSuccessful) => {
|
|
251
|
+
// For barriers, do not update the current value unless we actually know the command was successful
|
|
252
|
+
if (!supervisedAndSuccessful)
|
|
253
|
+
return;
|
|
254
|
+
if (this.isSinglecast()) {
|
|
255
|
+
this.tryGetValueDB()?.setValue(currentStateValueId, targetValue);
|
|
256
|
+
}
|
|
257
|
+
else if (this.isMulticast()) {
|
|
258
|
+
// Figure out which nodes were affected by this command
|
|
259
|
+
const affectedNodes = this.endpoint.node.physicalNodes
|
|
260
|
+
.filter((node) => node
|
|
261
|
+
.getEndpoint(this.endpoint.index)
|
|
262
|
+
?.supportsCC(this.ccId));
|
|
263
|
+
// and optimistically update the currentValue
|
|
264
|
+
for (const node of affectedNodes) {
|
|
265
|
+
this.host
|
|
266
|
+
.tryGetValueDB(node.id)
|
|
267
|
+
?.setValue(currentStateValueId, targetValue);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
verifyChanges: () => {
|
|
272
|
+
if (this.isSinglecast()) {
|
|
273
|
+
// We query currentValue instead of targetValue to make sure that unsolicited updates cancel the scheduled poll
|
|
274
|
+
this.schedulePoll(currentStateValueId, targetValue);
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
// For multicasts, do not schedule a refresh - this could cause a LOT of traffic
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
else if (BarrierOperatorCCValues.signalingState.is(valueId)) {
|
|
283
|
+
const subsystemType = propertyKey;
|
|
284
|
+
const signalingStateValueId = BarrierOperatorCCValues
|
|
285
|
+
.signalingState(subsystemType).endpoint(this.endpoint.index);
|
|
286
|
+
return {
|
|
287
|
+
verifyChanges: () => {
|
|
288
|
+
if (this.isSinglecast()) {
|
|
289
|
+
this.schedulePoll(signalingStateValueId, value, {
|
|
290
|
+
// Signaling state changes are fast
|
|
291
|
+
transition: "fast",
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
};
|
|
273
296
|
}
|
|
274
297
|
};
|
|
275
|
-
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
298
|
+
get [POLL_VALUE]() {
|
|
299
|
+
return async function ({ property, propertyKey }) {
|
|
300
|
+
switch (property) {
|
|
301
|
+
case "currentState":
|
|
302
|
+
case "position":
|
|
303
|
+
return (await this.get())?.[property];
|
|
304
|
+
case "signalingState":
|
|
305
|
+
if (propertyKey == undefined) {
|
|
306
|
+
throwMissingPropertyKey(this.ccId, property);
|
|
307
|
+
}
|
|
308
|
+
else if (typeof propertyKey !== "number") {
|
|
309
|
+
throwUnsupportedPropertyKey(this.ccId, property, propertyKey);
|
|
310
|
+
}
|
|
311
|
+
return this.getEventSignaling(propertyKey);
|
|
312
|
+
default:
|
|
313
|
+
throwUnsupportedProperty(this.ccId, property);
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
return BarrierOperatorCCAPI = _classThis;
|
|
319
|
+
})();
|
|
280
320
|
export { BarrierOperatorCCAPI };
|
|
281
|
-
let BarrierOperatorCC =
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
321
|
+
let BarrierOperatorCC = (() => {
|
|
322
|
+
let _classDecorators = [commandClass(CommandClasses["Barrier Operator"]), implementedVersion(1), ccValues(BarrierOperatorCCValues)];
|
|
323
|
+
let _classDescriptor;
|
|
324
|
+
let _classExtraInitializers = [];
|
|
325
|
+
let _classThis;
|
|
326
|
+
let _classSuper = CommandClass;
|
|
327
|
+
var BarrierOperatorCC = class extends _classSuper {
|
|
328
|
+
static { _classThis = this; }
|
|
329
|
+
static {
|
|
330
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
331
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
332
|
+
BarrierOperatorCC = _classThis = _classDescriptor.value;
|
|
333
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
334
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
335
|
+
}
|
|
336
|
+
async interview(ctx) {
|
|
337
|
+
const node = this.getNode(ctx);
|
|
338
|
+
const endpoint = this.getEndpoint(ctx);
|
|
339
|
+
const api = CCAPI.create(CommandClasses["Barrier Operator"], ctx, endpoint).withOptions({
|
|
340
|
+
priority: MessagePriority.NodeQuery,
|
|
341
|
+
});
|
|
301
342
|
ctx.logNode(node.id, {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
343
|
+
endpoint: this.endpointIndex,
|
|
344
|
+
message: `Interviewing ${this.ccName}...`,
|
|
345
|
+
direction: "none",
|
|
346
|
+
});
|
|
347
|
+
// Create targetState value if it does not exist
|
|
348
|
+
this.ensureMetadata(ctx, BarrierOperatorCCValues.targetState);
|
|
349
|
+
ctx.logNode(node.id, {
|
|
350
|
+
message: "Querying signaling capabilities...",
|
|
351
|
+
direction: "outbound",
|
|
306
352
|
});
|
|
307
|
-
|
|
308
|
-
|
|
353
|
+
const resp = await api.getSignalingCapabilities();
|
|
354
|
+
if (resp) {
|
|
355
|
+
ctx.logNode(node.id, {
|
|
356
|
+
message: `Received supported subsystem types: ${resp
|
|
357
|
+
.map((t) => `\n· ${getEnumMemberName(SubsystemType, t)}`)
|
|
358
|
+
.join("")}`,
|
|
359
|
+
direction: "inbound",
|
|
360
|
+
});
|
|
361
|
+
// Enable all supported subsystems
|
|
362
|
+
for (const subsystemType of resp) {
|
|
363
|
+
// Some devices report invalid subsystem types, but the CC API checks
|
|
364
|
+
// for valid values and throws otherwise.
|
|
365
|
+
if (!isEnumMember(SubsystemType, subsystemType))
|
|
366
|
+
continue;
|
|
367
|
+
ctx.logNode(node.id, {
|
|
368
|
+
message: `Enabling subsystem ${getEnumMemberName(SubsystemType, subsystemType)}...`,
|
|
369
|
+
direction: "outbound",
|
|
370
|
+
});
|
|
371
|
+
await api.setEventSignaling(subsystemType, SubsystemState.On)
|
|
372
|
+
.catch(noop);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
await this.refreshValues(ctx);
|
|
376
|
+
// Remember that the interview is complete
|
|
377
|
+
this.setInterviewComplete(ctx, true);
|
|
378
|
+
}
|
|
379
|
+
async refreshValues(ctx) {
|
|
380
|
+
const node = this.getNode(ctx);
|
|
381
|
+
const endpoint = this.getEndpoint(ctx);
|
|
382
|
+
const api = CCAPI.create(CommandClasses["Barrier Operator"], ctx, endpoint).withOptions({
|
|
383
|
+
priority: MessagePriority.NodeQuery,
|
|
384
|
+
});
|
|
385
|
+
const supportedSubsystems = this.getValue(ctx, BarrierOperatorCCValues.supportedSubsystemTypes) ?? [];
|
|
386
|
+
for (const subsystemType of supportedSubsystems) {
|
|
309
387
|
// Some devices report invalid subsystem types, but the CC API checks
|
|
310
388
|
// for valid values and throws otherwise.
|
|
311
389
|
if (!isEnumMember(SubsystemType, subsystemType))
|
|
312
390
|
continue;
|
|
313
391
|
ctx.logNode(node.id, {
|
|
314
|
-
message: `
|
|
392
|
+
message: `Querying event signaling state for subsystem ${getEnumMemberName(SubsystemType, subsystemType)}...`,
|
|
315
393
|
direction: "outbound",
|
|
316
394
|
});
|
|
317
|
-
await api.
|
|
318
|
-
|
|
395
|
+
const state = await api.getEventSignaling(subsystemType);
|
|
396
|
+
if (state != undefined) {
|
|
397
|
+
ctx.logNode(node.id, {
|
|
398
|
+
message: `Subsystem ${getEnumMemberName(SubsystemType, subsystemType)} has state ${getEnumMemberName(SubsystemState, state)}`,
|
|
399
|
+
direction: "inbound",
|
|
400
|
+
});
|
|
401
|
+
}
|
|
319
402
|
}
|
|
320
|
-
}
|
|
321
|
-
await this.refreshValues(ctx);
|
|
322
|
-
// Remember that the interview is complete
|
|
323
|
-
this.setInterviewComplete(ctx, true);
|
|
324
|
-
}
|
|
325
|
-
async refreshValues(ctx) {
|
|
326
|
-
const node = this.getNode(ctx);
|
|
327
|
-
const endpoint = this.getEndpoint(ctx);
|
|
328
|
-
const api = CCAPI.create(CommandClasses["Barrier Operator"], ctx, endpoint).withOptions({
|
|
329
|
-
priority: MessagePriority.NodeQuery,
|
|
330
|
-
});
|
|
331
|
-
const supportedSubsystems = this.getValue(ctx, BarrierOperatorCCValues.supportedSubsystemTypes) ?? [];
|
|
332
|
-
for (const subsystemType of supportedSubsystems) {
|
|
333
|
-
// Some devices report invalid subsystem types, but the CC API checks
|
|
334
|
-
// for valid values and throws otherwise.
|
|
335
|
-
if (!isEnumMember(SubsystemType, subsystemType))
|
|
336
|
-
continue;
|
|
337
403
|
ctx.logNode(node.id, {
|
|
338
|
-
message:
|
|
404
|
+
message: "querying current barrier state...",
|
|
339
405
|
direction: "outbound",
|
|
340
406
|
});
|
|
341
|
-
|
|
342
|
-
if (state != undefined) {
|
|
343
|
-
ctx.logNode(node.id, {
|
|
344
|
-
message: `Subsystem ${getEnumMemberName(SubsystemType, subsystemType)} has state ${getEnumMemberName(SubsystemState, state)}`,
|
|
345
|
-
direction: "inbound",
|
|
346
|
-
});
|
|
347
|
-
}
|
|
407
|
+
await api.get();
|
|
348
408
|
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
});
|
|
353
|
-
await api.get();
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
BarrierOperatorCC = __decorate([
|
|
357
|
-
commandClass(CommandClasses["Barrier Operator"]),
|
|
358
|
-
implementedVersion(1),
|
|
359
|
-
ccValues(BarrierOperatorCCValues)
|
|
360
|
-
], BarrierOperatorCC);
|
|
409
|
+
};
|
|
410
|
+
return BarrierOperatorCC = _classThis;
|
|
411
|
+
})();
|
|
361
412
|
export { BarrierOperatorCC };
|
|
362
|
-
let BarrierOperatorCCSet =
|
|
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
|
-
|
|
413
|
+
let BarrierOperatorCCSet = (() => {
|
|
414
|
+
let _classDecorators = [CCCommand(BarrierOperatorCommand.Set), useSupervision()];
|
|
415
|
+
let _classDescriptor;
|
|
416
|
+
let _classExtraInitializers = [];
|
|
417
|
+
let _classThis;
|
|
418
|
+
let _classSuper = BarrierOperatorCC;
|
|
419
|
+
var BarrierOperatorCCSet = class extends _classSuper {
|
|
420
|
+
static { _classThis = this; }
|
|
421
|
+
static {
|
|
422
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
423
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
424
|
+
BarrierOperatorCCSet = _classThis = _classDescriptor.value;
|
|
425
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
426
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
427
|
+
}
|
|
428
|
+
constructor(options) {
|
|
429
|
+
super(options);
|
|
430
|
+
this.targetState = options.targetState;
|
|
431
|
+
}
|
|
432
|
+
static from(_raw, _ctx) {
|
|
433
|
+
throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
434
|
+
// return new BarrierOperatorCCSet({
|
|
435
|
+
// nodeId: ctx.sourceNodeId,
|
|
436
|
+
// });
|
|
437
|
+
}
|
|
438
|
+
targetState;
|
|
439
|
+
serialize(ctx) {
|
|
440
|
+
this.payload = Bytes.from([this.targetState]);
|
|
441
|
+
return super.serialize(ctx);
|
|
442
|
+
}
|
|
443
|
+
toLogEntry(ctx) {
|
|
444
|
+
return {
|
|
445
|
+
...super.toLogEntry(ctx),
|
|
446
|
+
message: { "target state": this.targetState },
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
return BarrierOperatorCCSet = _classThis;
|
|
451
|
+
})();
|
|
389
452
|
export { BarrierOperatorCCSet };
|
|
390
|
-
let BarrierOperatorCCReport =
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
//
|
|
408
|
-
position =
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
453
|
+
let BarrierOperatorCCReport = (() => {
|
|
454
|
+
let _classDecorators = [CCCommand(BarrierOperatorCommand.Report), ccValueProperty("currentState", BarrierOperatorCCValues.currentState), ccValueProperty("position", BarrierOperatorCCValues.position)];
|
|
455
|
+
let _classDescriptor;
|
|
456
|
+
let _classExtraInitializers = [];
|
|
457
|
+
let _classThis;
|
|
458
|
+
let _classSuper = BarrierOperatorCC;
|
|
459
|
+
var BarrierOperatorCCReport = class extends _classSuper {
|
|
460
|
+
static { _classThis = this; }
|
|
461
|
+
static {
|
|
462
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
463
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
464
|
+
BarrierOperatorCCReport = _classThis = _classDescriptor.value;
|
|
465
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
466
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
467
|
+
}
|
|
468
|
+
constructor(options) {
|
|
469
|
+
super(options);
|
|
470
|
+
// TODO: Check implementation:
|
|
471
|
+
this.position = options.position;
|
|
472
|
+
this.currentState = options.currentState;
|
|
473
|
+
}
|
|
474
|
+
static from(raw, ctx) {
|
|
475
|
+
validatePayload(raw.payload.length >= 1);
|
|
476
|
+
// The payload byte encodes information about the state and position in a single value
|
|
477
|
+
const payloadValue = raw.payload[0];
|
|
478
|
+
let position;
|
|
479
|
+
if (payloadValue <= 99) {
|
|
480
|
+
// known position
|
|
481
|
+
position = payloadValue;
|
|
482
|
+
}
|
|
483
|
+
else if (payloadValue === 255) {
|
|
484
|
+
// known position, fully opened
|
|
485
|
+
position = 100;
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
// unknown position
|
|
489
|
+
position = UNKNOWN_STATE;
|
|
490
|
+
}
|
|
491
|
+
let currentState;
|
|
492
|
+
if (payloadValue === BarrierState.Closed
|
|
493
|
+
|| payloadValue >= BarrierState.Closing) {
|
|
494
|
+
// predefined states
|
|
495
|
+
currentState = payloadValue;
|
|
496
|
+
}
|
|
497
|
+
else if (payloadValue > 0 && payloadValue <= 99) {
|
|
498
|
+
// stopped at exact position
|
|
499
|
+
currentState = BarrierState.Stopped;
|
|
500
|
+
}
|
|
501
|
+
else {
|
|
502
|
+
// invalid value, assume unknown
|
|
503
|
+
currentState = UNKNOWN_STATE;
|
|
504
|
+
}
|
|
505
|
+
return new this({
|
|
506
|
+
nodeId: ctx.sourceNodeId,
|
|
507
|
+
position,
|
|
508
|
+
currentState,
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
currentState;
|
|
512
|
+
position;
|
|
513
|
+
toLogEntry(ctx) {
|
|
514
|
+
return {
|
|
515
|
+
...super.toLogEntry(ctx),
|
|
516
|
+
message: {
|
|
517
|
+
"barrier position": maybeUnknownToString(this.position),
|
|
518
|
+
"barrier state": this.currentState != undefined
|
|
519
|
+
? getEnumMemberName(BarrierState, this.currentState)
|
|
520
|
+
: "unknown",
|
|
521
|
+
},
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
};
|
|
525
|
+
return BarrierOperatorCCReport = _classThis;
|
|
526
|
+
})();
|
|
457
527
|
export { BarrierOperatorCCReport };
|
|
458
|
-
let BarrierOperatorCCGet =
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
528
|
+
let BarrierOperatorCCGet = (() => {
|
|
529
|
+
let _classDecorators = [CCCommand(BarrierOperatorCommand.Get), expectedCCResponse(BarrierOperatorCCReport)];
|
|
530
|
+
let _classDescriptor;
|
|
531
|
+
let _classExtraInitializers = [];
|
|
532
|
+
let _classThis;
|
|
533
|
+
let _classSuper = BarrierOperatorCC;
|
|
534
|
+
var BarrierOperatorCCGet = class extends _classSuper {
|
|
535
|
+
static { _classThis = this; }
|
|
536
|
+
static {
|
|
537
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
538
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
539
|
+
BarrierOperatorCCGet = _classThis = _classDescriptor.value;
|
|
540
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
541
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
542
|
+
}
|
|
543
|
+
};
|
|
544
|
+
return BarrierOperatorCCGet = _classThis;
|
|
545
|
+
})();
|
|
464
546
|
export { BarrierOperatorCCGet };
|
|
465
|
-
let BarrierOperatorCCSignalingCapabilitiesReport =
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
547
|
+
let BarrierOperatorCCSignalingCapabilitiesReport = (() => {
|
|
548
|
+
let _classDecorators = [CCCommand(BarrierOperatorCommand.SignalingCapabilitiesReport), ccValueProperty("supportedSubsystemTypes", BarrierOperatorCCValues.supportedSubsystemTypes)];
|
|
549
|
+
let _classDescriptor;
|
|
550
|
+
let _classExtraInitializers = [];
|
|
551
|
+
let _classThis;
|
|
552
|
+
let _classSuper = BarrierOperatorCC;
|
|
553
|
+
var BarrierOperatorCCSignalingCapabilitiesReport = class extends _classSuper {
|
|
554
|
+
static { _classThis = this; }
|
|
555
|
+
static {
|
|
556
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
557
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
558
|
+
BarrierOperatorCCSignalingCapabilitiesReport = _classThis = _classDescriptor.value;
|
|
559
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
560
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
561
|
+
}
|
|
562
|
+
constructor(options) {
|
|
563
|
+
super(options);
|
|
564
|
+
// TODO: Check implementation:
|
|
565
|
+
this.supportedSubsystemTypes = options.supportedSubsystemTypes;
|
|
566
|
+
}
|
|
567
|
+
static from(raw, ctx) {
|
|
568
|
+
const supportedSubsystemTypes = parseBitMask(raw.payload, SubsystemType.Audible);
|
|
569
|
+
return new this({
|
|
570
|
+
nodeId: ctx.sourceNodeId,
|
|
571
|
+
supportedSubsystemTypes,
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
supportedSubsystemTypes;
|
|
575
|
+
toLogEntry(ctx) {
|
|
576
|
+
return {
|
|
577
|
+
...super.toLogEntry(ctx),
|
|
578
|
+
message: {
|
|
579
|
+
"supported types": this.supportedSubsystemTypes
|
|
580
|
+
.map((t) => `\n· ${getEnumMemberName(SubsystemType, t)}`)
|
|
581
|
+
.join(""),
|
|
582
|
+
},
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
};
|
|
586
|
+
return BarrierOperatorCCSignalingCapabilitiesReport = _classThis;
|
|
587
|
+
})();
|
|
496
588
|
export { BarrierOperatorCCSignalingCapabilitiesReport };
|
|
497
|
-
let BarrierOperatorCCSignalingCapabilitiesGet =
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
589
|
+
let BarrierOperatorCCSignalingCapabilitiesGet = (() => {
|
|
590
|
+
let _classDecorators = [CCCommand(BarrierOperatorCommand.SignalingCapabilitiesGet), expectedCCResponse(BarrierOperatorCCSignalingCapabilitiesReport)];
|
|
591
|
+
let _classDescriptor;
|
|
592
|
+
let _classExtraInitializers = [];
|
|
593
|
+
let _classThis;
|
|
594
|
+
let _classSuper = BarrierOperatorCC;
|
|
595
|
+
var BarrierOperatorCCSignalingCapabilitiesGet = class extends _classSuper {
|
|
596
|
+
static { _classThis = this; }
|
|
597
|
+
static {
|
|
598
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
599
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
600
|
+
BarrierOperatorCCSignalingCapabilitiesGet = _classThis = _classDescriptor.value;
|
|
601
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
602
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
603
|
+
}
|
|
604
|
+
};
|
|
605
|
+
return BarrierOperatorCCSignalingCapabilitiesGet = _classThis;
|
|
606
|
+
})();
|
|
503
607
|
export { BarrierOperatorCCSignalingCapabilitiesGet };
|
|
504
|
-
let BarrierOperatorCCEventSignalingSet =
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
608
|
+
let BarrierOperatorCCEventSignalingSet = (() => {
|
|
609
|
+
let _classDecorators = [CCCommand(BarrierOperatorCommand.EventSignalingSet), useSupervision()];
|
|
610
|
+
let _classDescriptor;
|
|
611
|
+
let _classExtraInitializers = [];
|
|
612
|
+
let _classThis;
|
|
613
|
+
let _classSuper = BarrierOperatorCC;
|
|
614
|
+
var BarrierOperatorCCEventSignalingSet = class extends _classSuper {
|
|
615
|
+
static { _classThis = this; }
|
|
616
|
+
static {
|
|
617
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
618
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
619
|
+
BarrierOperatorCCEventSignalingSet = _classThis = _classDescriptor.value;
|
|
620
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
621
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
622
|
+
}
|
|
623
|
+
constructor(options) {
|
|
624
|
+
super(options);
|
|
625
|
+
this.subsystemType = options.subsystemType;
|
|
626
|
+
this.subsystemState = options.subsystemState;
|
|
627
|
+
}
|
|
628
|
+
static from(_raw, _ctx) {
|
|
629
|
+
// TODO: Deserialize payload
|
|
630
|
+
throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
631
|
+
// return new BarrierOperatorCCEventSignalingSet({
|
|
632
|
+
// nodeId: ctx.sourceNodeId,
|
|
633
|
+
// });
|
|
634
|
+
}
|
|
635
|
+
subsystemType;
|
|
636
|
+
subsystemState;
|
|
637
|
+
serialize(ctx) {
|
|
638
|
+
this.payload = Bytes.from([this.subsystemType, this.subsystemState]);
|
|
639
|
+
return super.serialize(ctx);
|
|
640
|
+
}
|
|
641
|
+
toLogEntry(ctx) {
|
|
642
|
+
return {
|
|
643
|
+
...super.toLogEntry(ctx),
|
|
644
|
+
message: {
|
|
645
|
+
"subsystem type": getEnumMemberName(SubsystemType, this.subsystemType),
|
|
646
|
+
"subsystem state": getEnumMemberName(SubsystemState, this.subsystemState),
|
|
647
|
+
},
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
};
|
|
651
|
+
return BarrierOperatorCCEventSignalingSet = _classThis;
|
|
652
|
+
})();
|
|
537
653
|
export { BarrierOperatorCCEventSignalingSet };
|
|
538
|
-
let BarrierOperatorCCEventSignalingReport =
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
654
|
+
let BarrierOperatorCCEventSignalingReport = (() => {
|
|
655
|
+
let _classDecorators = [CCCommand(BarrierOperatorCommand.EventSignalingReport)];
|
|
656
|
+
let _classDescriptor;
|
|
657
|
+
let _classExtraInitializers = [];
|
|
658
|
+
let _classThis;
|
|
659
|
+
let _classSuper = BarrierOperatorCC;
|
|
660
|
+
var BarrierOperatorCCEventSignalingReport = class extends _classSuper {
|
|
661
|
+
static { _classThis = this; }
|
|
662
|
+
static {
|
|
663
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
664
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
665
|
+
BarrierOperatorCCEventSignalingReport = _classThis = _classDescriptor.value;
|
|
666
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
667
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
668
|
+
}
|
|
669
|
+
constructor(options) {
|
|
670
|
+
super(options);
|
|
671
|
+
// TODO: Check implementation:
|
|
672
|
+
this.subsystemType = options.subsystemType;
|
|
673
|
+
this.subsystemState = options.subsystemState;
|
|
674
|
+
}
|
|
675
|
+
static from(raw, ctx) {
|
|
676
|
+
validatePayload(raw.payload.length >= 2);
|
|
677
|
+
const subsystemType = raw.payload[0];
|
|
678
|
+
const subsystemState = raw.payload[1];
|
|
679
|
+
return new this({
|
|
680
|
+
nodeId: ctx.sourceNodeId,
|
|
681
|
+
subsystemType,
|
|
682
|
+
subsystemState,
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
persistValues(ctx) {
|
|
686
|
+
if (!super.persistValues(ctx))
|
|
687
|
+
return false;
|
|
688
|
+
const signalingStateValue = BarrierOperatorCCValues.signalingState(this.subsystemType);
|
|
689
|
+
this.ensureMetadata(ctx, signalingStateValue);
|
|
690
|
+
this.setValue(ctx, signalingStateValue, this.subsystemState);
|
|
691
|
+
return true;
|
|
692
|
+
}
|
|
693
|
+
subsystemType;
|
|
694
|
+
subsystemState;
|
|
695
|
+
toLogEntry(ctx) {
|
|
696
|
+
return {
|
|
697
|
+
...super.toLogEntry(ctx),
|
|
698
|
+
message: {
|
|
699
|
+
"subsystem type": getEnumMemberName(SubsystemType, this.subsystemType),
|
|
700
|
+
"subsystem state": getEnumMemberName(SubsystemState, this.subsystemState),
|
|
701
|
+
},
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
};
|
|
705
|
+
return BarrierOperatorCCEventSignalingReport = _classThis;
|
|
706
|
+
})();
|
|
578
707
|
export { BarrierOperatorCCEventSignalingReport };
|
|
579
|
-
let BarrierOperatorCCEventSignalingGet =
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
708
|
+
let BarrierOperatorCCEventSignalingGet = (() => {
|
|
709
|
+
let _classDecorators = [CCCommand(BarrierOperatorCommand.EventSignalingGet), expectedCCResponse(BarrierOperatorCCEventSignalingReport)];
|
|
710
|
+
let _classDescriptor;
|
|
711
|
+
let _classExtraInitializers = [];
|
|
712
|
+
let _classThis;
|
|
713
|
+
let _classSuper = BarrierOperatorCC;
|
|
714
|
+
var BarrierOperatorCCEventSignalingGet = class extends _classSuper {
|
|
715
|
+
static { _classThis = this; }
|
|
716
|
+
static {
|
|
717
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
718
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
719
|
+
BarrierOperatorCCEventSignalingGet = _classThis = _classDescriptor.value;
|
|
720
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
721
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
722
|
+
}
|
|
723
|
+
constructor(options) {
|
|
724
|
+
super(options);
|
|
725
|
+
this.subsystemType = options.subsystemType;
|
|
726
|
+
}
|
|
727
|
+
static from(_raw, _ctx) {
|
|
728
|
+
// TODO: Deserialize payload
|
|
729
|
+
throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
730
|
+
// return new BarrierOperatorCCEventSignalingGet({
|
|
731
|
+
// nodeId: ctx.sourceNodeId,
|
|
732
|
+
// });
|
|
733
|
+
}
|
|
734
|
+
subsystemType;
|
|
735
|
+
serialize(ctx) {
|
|
736
|
+
this.payload = Bytes.from([this.subsystemType]);
|
|
737
|
+
return super.serialize(ctx);
|
|
738
|
+
}
|
|
739
|
+
toLogEntry(ctx) {
|
|
740
|
+
return {
|
|
741
|
+
...super.toLogEntry(ctx),
|
|
742
|
+
message: {
|
|
743
|
+
"subsystem type": getEnumMemberName(SubsystemType, this.subsystemType),
|
|
744
|
+
},
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
};
|
|
748
|
+
return BarrierOperatorCCEventSignalingGet = _classThis;
|
|
749
|
+
})();
|
|
609
750
|
export { BarrierOperatorCCEventSignalingGet };
|
|
610
751
|
//# sourceMappingURL=BarrierOperatorCC.js.map
|