@zwave-js/cc 14.0.0-beta.4 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.js +381 -266
- package/build/cjs/cc/AlarmSensorCC.js.map +3 -3
- package/build/cjs/cc/AssociationCC.js +669 -503
- package/build/cjs/cc/AssociationCC.js.map +3 -3
- package/build/cjs/cc/AssociationGroupInfoCC.js +633 -492
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +3 -3
- package/build/cjs/cc/BarrierOperatorCC.js +595 -429
- package/build/cjs/cc/BarrierOperatorCC.js.map +3 -3
- package/build/cjs/cc/BasicCC.js +354 -260
- package/build/cjs/cc/BasicCC.js.map +3 -3
- package/build/cjs/cc/BatteryCC.js +427 -345
- package/build/cjs/cc/BatteryCC.js.map +3 -3
- package/build/cjs/cc/BinarySensorCC.js +391 -276
- package/build/cjs/cc/BinarySensorCC.js.map +3 -3
- package/build/cjs/cc/BinarySwitchCC.js +347 -253
- package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
- package/build/cjs/cc/CRC16CC.js +160 -85
- package/build/cjs/cc/CRC16CC.js.map +3 -3
- package/build/cjs/cc/CentralSceneCC.js +459 -324
- package/build/cjs/cc/CentralSceneCC.js.map +3 -3
- package/build/cjs/cc/ClimateControlScheduleCC.js +459 -293
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +3 -3
- package/build/cjs/cc/ClockCC.js +254 -150
- package/build/cjs/cc/ClockCC.js.map +3 -3
- package/build/cjs/cc/ColorSwitchCC.js +758 -610
- package/build/cjs/cc/ColorSwitchCC.js.map +3 -3
- package/build/cjs/cc/ConfigurationCC.js +1700 -1453
- package/build/cjs/cc/ConfigurationCC.js.map +3 -3
- package/build/cjs/cc/DeviceResetLocallyCC.js +125 -49
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +3 -3
- package/build/cjs/cc/DoorLockCC.js +904 -777
- package/build/cjs/cc/DoorLockCC.js.map +3 -3
- package/build/cjs/cc/DoorLockLoggingCC.js +321 -206
- package/build/cjs/cc/DoorLockLoggingCC.js.map +3 -3
- package/build/cjs/cc/EnergyProductionCC.js +249 -160
- package/build/cjs/cc/EnergyProductionCC.js.map +3 -3
- package/build/cjs/cc/EntryControlCC.js +619 -458
- package/build/cjs/cc/EntryControlCC.js.map +3 -3
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +898 -698
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +3 -3
- package/build/cjs/cc/HailCC.js +57 -11
- package/build/cjs/cc/HailCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlModeCC.js +359 -233
- package/build/cjs/cc/HumidityControlModeCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +189 -103
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlSetpointCC.js +682 -495
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +3 -3
- package/build/cjs/cc/InclusionControllerCC.js +205 -114
- package/build/cjs/cc/InclusionControllerCC.js.map +3 -3
- package/build/cjs/cc/IndicatorCC.js +897 -736
- package/build/cjs/cc/IndicatorCC.js.map +3 -3
- package/build/cjs/cc/IrrigationCC.js +1651 -1405
- package/build/cjs/cc/IrrigationCC.js.map +3 -3
- package/build/cjs/cc/LanguageCC.js +268 -171
- package/build/cjs/cc/LanguageCC.js.map +3 -3
- package/build/cjs/cc/LockCC.js +254 -154
- package/build/cjs/cc/LockCC.js.map +3 -3
- package/build/cjs/cc/ManufacturerProprietaryCC.js +189 -129
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.js +319 -213
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +3 -3
- package/build/cjs/cc/MeterCC.js +827 -707
- package/build/cjs/cc/MeterCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelAssociationCC.js +612 -478
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelCC.js +1037 -819
- package/build/cjs/cc/MultiChannelCC.js.map +3 -3
- package/build/cjs/cc/MultiCommandCC.js +172 -97
- package/build/cjs/cc/MultiCommandCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSensorCC.js +589 -449
- package/build/cjs/cc/MultilevelSensorCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSwitchCC.js +587 -439
- package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
- package/build/cjs/cc/NoOperationCC.js +89 -27
- package/build/cjs/cc/NoOperationCC.js.map +2 -2
- package/build/cjs/cc/NodeNamingCC.js +417 -277
- package/build/cjs/cc/NodeNamingCC.js.map +3 -3
- package/build/cjs/cc/NotificationCC.js +972 -818
- package/build/cjs/cc/NotificationCC.js.map +3 -3
- package/build/cjs/cc/PowerlevelCC.js +450 -303
- package/build/cjs/cc/PowerlevelCC.js.map +3 -3
- package/build/cjs/cc/ProtectionCC.js +686 -494
- package/build/cjs/cc/ProtectionCC.js.map +3 -3
- package/build/cjs/cc/SceneActivationCC.js +165 -97
- package/build/cjs/cc/SceneActivationCC.js.map +3 -3
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +346 -243
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +3 -3
- package/build/cjs/cc/SceneControllerConfigurationCC.js +401 -298
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +3 -3
- package/build/cjs/cc/ScheduleEntryLockCC.js +1552 -1272
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +3 -3
- package/build/cjs/cc/Security2CC.js +1483 -1219
- package/build/cjs/cc/Security2CC.js.map +3 -3
- package/build/cjs/cc/SecurityCC.js +839 -619
- package/build/cjs/cc/SecurityCC.js.map +3 -3
- package/build/cjs/cc/SoundSwitchCC.js +707 -515
- package/build/cjs/cc/SoundSwitchCC.js.map +3 -3
- package/build/cjs/cc/SupervisionCC.js +327 -237
- package/build/cjs/cc/SupervisionCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanModeCC.js +386 -263
- package/build/cjs/cc/ThermostatFanModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanStateCC.js +192 -106
- package/build/cjs/cc/ThermostatFanStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatModeCC.js +425 -302
- package/build/cjs/cc/ThermostatModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatOperatingStateCC.js +188 -102
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetbackCC.js +277 -173
- package/build/cjs/cc/ThermostatSetbackCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetpointCC.js +645 -491
- package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
- package/build/cjs/cc/TimeCC.js +515 -353
- package/build/cjs/cc/TimeCC.js.map +3 -3
- package/build/cjs/cc/TimeParametersCC.js +302 -202
- package/build/cjs/cc/TimeParametersCC.js.map +3 -3
- package/build/cjs/cc/TransportServiceCC.js +433 -315
- package/build/cjs/cc/TransportServiceCC.js.map +3 -3
- package/build/cjs/cc/UserCodeCC.js +1385 -1102
- package/build/cjs/cc/UserCodeCC.js.map +3 -3
- package/build/cjs/cc/VersionCC.js +696 -562
- package/build/cjs/cc/VersionCC.js.map +3 -3
- package/build/cjs/cc/WakeUpCC.js +499 -346
- package/build/cjs/cc/WakeUpCC.js.map +3 -3
- package/build/cjs/cc/WindowCoveringCC.js +626 -478
- package/build/cjs/cc/WindowCoveringCC.js.map +3 -3
- package/build/cjs/cc/ZWaveLongRangeCC.js +57 -10
- package/build/cjs/cc/ZWaveLongRangeCC.js.map +2 -2
- package/build/cjs/cc/ZWavePlusCC.js +233 -159
- package/build/cjs/cc/ZWavePlusCC.js.map +3 -3
- package/build/cjs/cc/ZWaveProtocolCC.js +1515 -948
- package/build/cjs/cc/ZWaveProtocolCC.js.map +3 -3
- package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +4 -4
- package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +1 -1
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +395 -274
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +3 -3
- package/build/cjs/lib/CommandClassDecorators.d.ts +11 -15
- package/build/cjs/lib/CommandClassDecorators.js +19 -20
- package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
- package/build/cjs/lib/Security2/Extension.d.ts +1 -1
- package/build/cjs/lib/Security2/Extension.js +217 -126
- package/build/cjs/lib/Security2/Extension.js.map +3 -3
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +389 -291
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +678 -537
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +659 -539
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +634 -493
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +380 -302
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +449 -384
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +395 -297
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +353 -274
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.js +162 -98
- package/build/esm/cc/CRC16CC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +465 -351
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +454 -313
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.js +248 -159
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +802 -677
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +1899 -1687
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js +124 -59
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +951 -849
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +316 -218
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +240 -164
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +629 -493
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +938 -769
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HailCC.js +51 -12
- package/build/esm/cc/HailCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +357 -250
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +182 -109
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +706 -546
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/InclusionControllerCC.js +197 -119
- package/build/esm/cc/InclusionControllerCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.js +973 -835
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +1697 -1496
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +266 -184
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +247 -162
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +192 -141
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +312 -223
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +896 -795
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +631 -518
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +1106 -921
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultiCommandCC.js +166 -102
- package/build/esm/cc/MultiCommandCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +616 -497
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +621 -496
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NoOperationCC.js +82 -29
- package/build/esm/cc/NoOperationCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +413 -294
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +1097 -966
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/PowerlevelCC.js +437 -311
- package/build/esm/cc/PowerlevelCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +704 -543
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +157 -100
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +357 -269
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +434 -346
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +1596 -1357
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.js +1633 -1406
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.js +876 -687
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +689 -526
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.js +349 -272
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +388 -284
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +184 -111
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +435 -331
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +180 -107
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.js +274 -185
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +674 -543
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.js +499 -360
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +296 -211
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +464 -363
- package/build/esm/cc/TransportServiceCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +1443 -1205
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +744 -635
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +494 -364
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +655 -530
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWaveLongRangeCC.js +51 -11
- package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +223 -162
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +1443 -953
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +4 -4
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +390 -286
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/esm/lib/CommandClassDecorators.d.ts +11 -15
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
- package/build/esm/lib/CommandClassDecorators.js +24 -24
- package/build/esm/lib/CommandClassDecorators.js.map +1 -1
- package/build/esm/lib/Security2/Extension.d.ts +1 -1
- package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
- package/build/esm/lib/Security2/Extension.js +207 -123
- package/build/esm/lib/Security2/Extension.js.map +1 -1
- package/package.json +6 -6
|
@@ -49,13 +49,45 @@ var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
|
49
49
|
var import_Values = require("../lib/Values.js");
|
|
50
50
|
var import_Types = require("../lib/_Types.js");
|
|
51
51
|
var ccUtils = __toESM(require("../lib/utils.js"), 1);
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
53
|
+
function accept(f) {
|
|
54
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
55
|
+
return f;
|
|
56
|
+
}
|
|
57
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
58
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
59
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
60
|
+
var _, done = false;
|
|
61
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
62
|
+
var context = {};
|
|
63
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
64
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
65
|
+
context.addInitializer = function(f) {
|
|
66
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
67
|
+
extraInitializers.push(accept(f || null));
|
|
68
|
+
};
|
|
69
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
70
|
+
if (kind === "accessor") {
|
|
71
|
+
if (result === void 0) continue;
|
|
72
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
73
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
74
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
75
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
76
|
+
} else if (_ = accept(result)) {
|
|
77
|
+
if (kind === "field") initializers.unshift(_);
|
|
78
|
+
else descriptor[key] = _;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
82
|
+
done = true;
|
|
83
|
+
};
|
|
84
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
85
|
+
var useValue = arguments.length > 2;
|
|
86
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
87
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
88
|
+
}
|
|
89
|
+
return useValue ? value : void 0;
|
|
57
90
|
};
|
|
58
|
-
var CentralSceneCCNotification_1, CentralSceneCCSupportedReport_1, CentralSceneCCConfigurationReport_1;
|
|
59
91
|
function __assertType(argName, typeName, boundHasError) {
|
|
60
92
|
const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
|
|
61
93
|
if (boundHasError()) {
|
|
@@ -92,348 +124,451 @@ const CentralSceneCCValues = Object.freeze({
|
|
|
92
124
|
}), { stateful: false })
|
|
93
125
|
})
|
|
94
126
|
});
|
|
95
|
-
let CentralSceneCCAPI =
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return this.version >= 3;
|
|
105
|
-
}
|
|
106
|
-
return super.supportsCommand(cmd);
|
|
107
|
-
}
|
|
108
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
109
|
-
async getSupported() {
|
|
110
|
-
this.assertSupportsCommand(import_Types.CentralSceneCommand, import_Types.CentralSceneCommand.SupportedGet);
|
|
111
|
-
const cc = new CentralSceneCCSupportedGet({
|
|
112
|
-
nodeId: this.endpoint.nodeId,
|
|
113
|
-
endpointIndex: this.endpoint.index
|
|
114
|
-
});
|
|
115
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
116
|
-
if (response) {
|
|
117
|
-
return (0, import_safe3.pick)(response, [
|
|
118
|
-
"sceneCount",
|
|
119
|
-
"supportsSlowRefresh",
|
|
120
|
-
"supportedKeyAttributes"
|
|
121
|
-
]);
|
|
127
|
+
let CentralSceneCCAPI = (() => {
|
|
128
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Central Scene"])];
|
|
129
|
+
let _classDescriptor;
|
|
130
|
+
let _classExtraInitializers = [];
|
|
131
|
+
let _classThis;
|
|
132
|
+
let _classSuper = import_API.CCAPI;
|
|
133
|
+
var CentralSceneCCAPI2 = class extends _classSuper {
|
|
134
|
+
static {
|
|
135
|
+
_classThis = this;
|
|
122
136
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
endpointIndex: this.endpoint.index
|
|
130
|
-
});
|
|
131
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
132
|
-
if (response) {
|
|
133
|
-
return (0, import_safe3.pick)(response, ["slowRefresh"]);
|
|
137
|
+
static {
|
|
138
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
139
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
140
|
+
CentralSceneCCAPI2 = _classThis = _classDescriptor.value;
|
|
141
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
142
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
134
143
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
145
|
-
}
|
|
146
|
-
get [import_API.SET_VALUE]() {
|
|
147
|
-
return async function({ property }, value) {
|
|
148
|
-
if (property !== "slowRefresh") {
|
|
149
|
-
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
144
|
+
supportsCommand(cmd) {
|
|
145
|
+
switch (cmd) {
|
|
146
|
+
case import_Types.CentralSceneCommand.SupportedGet:
|
|
147
|
+
return this.isSinglecast();
|
|
148
|
+
// this is mandatory
|
|
149
|
+
case import_Types.CentralSceneCommand.ConfigurationGet:
|
|
150
|
+
return this.version >= 3 && this.isSinglecast();
|
|
151
|
+
case import_Types.CentralSceneCommand.ConfigurationSet:
|
|
152
|
+
return this.version >= 3;
|
|
150
153
|
}
|
|
151
|
-
|
|
152
|
-
|
|
154
|
+
return super.supportsCommand(cmd);
|
|
155
|
+
}
|
|
156
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
157
|
+
async getSupported() {
|
|
158
|
+
this.assertSupportsCommand(import_Types.CentralSceneCommand, import_Types.CentralSceneCommand.SupportedGet);
|
|
159
|
+
const cc = new CentralSceneCCSupportedGet({
|
|
160
|
+
nodeId: this.endpoint.nodeId,
|
|
161
|
+
endpointIndex: this.endpoint.index
|
|
162
|
+
});
|
|
163
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
164
|
+
if (response) {
|
|
165
|
+
return (0, import_safe3.pick)(response, [
|
|
166
|
+
"sceneCount",
|
|
167
|
+
"supportsSlowRefresh",
|
|
168
|
+
"supportedKeyAttributes"
|
|
169
|
+
]);
|
|
153
170
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
171
|
+
}
|
|
172
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
173
|
+
async getConfiguration() {
|
|
174
|
+
this.assertSupportsCommand(import_Types.CentralSceneCommand, import_Types.CentralSceneCommand.ConfigurationGet);
|
|
175
|
+
const cc = new CentralSceneCCConfigurationGet({
|
|
176
|
+
nodeId: this.endpoint.nodeId,
|
|
177
|
+
endpointIndex: this.endpoint.index
|
|
178
|
+
});
|
|
179
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
180
|
+
if (response) {
|
|
181
|
+
return (0, import_safe3.pick)(response, ["slowRefresh"]);
|
|
161
182
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
determineRequiredCCInterviews() {
|
|
171
|
-
return [
|
|
172
|
-
...super.determineRequiredCCInterviews(),
|
|
173
|
-
import_safe.CommandClasses.Association,
|
|
174
|
-
import_safe.CommandClasses["Multi Channel Association"],
|
|
175
|
-
import_safe.CommandClasses["Association Group Information"]
|
|
176
|
-
];
|
|
177
|
-
}
|
|
178
|
-
skipEndpointInterview() {
|
|
179
|
-
return true;
|
|
180
|
-
}
|
|
181
|
-
async interview(ctx) {
|
|
182
|
-
const node = this.getNode(ctx);
|
|
183
|
-
const endpoint = this.getEndpoint(ctx);
|
|
184
|
-
const api = import_API.CCAPI.create(import_safe.CommandClasses["Central Scene"], ctx, endpoint).withOptions({
|
|
185
|
-
priority: import_safe.MessagePriority.NodeQuery
|
|
186
|
-
});
|
|
187
|
-
ctx.logNode(node.id, {
|
|
188
|
-
endpoint: this.endpointIndex,
|
|
189
|
-
message: `Interviewing ${this.ccName}...`,
|
|
190
|
-
direction: "none"
|
|
191
|
-
});
|
|
192
|
-
try {
|
|
193
|
-
await ccUtils.assignLifelineIssueingCommand(ctx, endpoint, this.ccId, import_Types.CentralSceneCommand.Notification);
|
|
194
|
-
} catch {
|
|
195
|
-
ctx.logNode(node.id, {
|
|
196
|
-
endpoint: endpoint.index,
|
|
197
|
-
message: `Configuring associations to receive ${(0, import_safe.getCCName)(this.ccId)} commands failed!`,
|
|
198
|
-
level: "warn"
|
|
183
|
+
}
|
|
184
|
+
async setConfiguration(slowRefresh) {
|
|
185
|
+
__assertType("slowRefresh", "boolean", __assertType__boolean.bind(void 0, slowRefresh));
|
|
186
|
+
this.assertSupportsCommand(import_Types.CentralSceneCommand, import_Types.CentralSceneCommand.ConfigurationSet);
|
|
187
|
+
const cc = new CentralSceneCCConfigurationSet({
|
|
188
|
+
nodeId: this.endpoint.nodeId,
|
|
189
|
+
endpointIndex: this.endpoint.index,
|
|
190
|
+
slowRefresh
|
|
199
191
|
});
|
|
192
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
200
193
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
194
|
+
get [import_API.SET_VALUE]() {
|
|
195
|
+
return async function({ property }, value) {
|
|
196
|
+
if (property !== "slowRefresh") {
|
|
197
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
198
|
+
}
|
|
199
|
+
if (typeof value !== "boolean") {
|
|
200
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "boolean", typeof value);
|
|
201
|
+
}
|
|
202
|
+
return this.setConfiguration(value);
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
get [import_API.POLL_VALUE]() {
|
|
206
|
+
return async function({ property }) {
|
|
207
|
+
if (property === "slowRefresh") {
|
|
208
|
+
return (await this.getConfiguration())?.[property];
|
|
209
|
+
}
|
|
210
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
return CentralSceneCCAPI2 = _classThis;
|
|
215
|
+
})();
|
|
216
|
+
let CentralSceneCC = (() => {
|
|
217
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Central Scene"]), (0, import_CommandClassDecorators.implementedVersion)(3), (0, import_CommandClassDecorators.ccValues)(CentralSceneCCValues)];
|
|
218
|
+
let _classDescriptor;
|
|
219
|
+
let _classExtraInitializers = [];
|
|
220
|
+
let _classThis;
|
|
221
|
+
let _classSuper = import_CommandClass.CommandClass;
|
|
222
|
+
var CentralSceneCC2 = class extends _classSuper {
|
|
223
|
+
static {
|
|
224
|
+
_classThis = this;
|
|
225
|
+
}
|
|
226
|
+
static {
|
|
227
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
228
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
229
|
+
CentralSceneCC2 = _classThis = _classDescriptor.value;
|
|
230
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
231
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
232
|
+
}
|
|
233
|
+
determineRequiredCCInterviews() {
|
|
234
|
+
return [
|
|
235
|
+
...super.determineRequiredCCInterviews(),
|
|
236
|
+
import_safe.CommandClasses.Association,
|
|
237
|
+
import_safe.CommandClasses["Multi Channel Association"],
|
|
238
|
+
import_safe.CommandClasses["Association Group Information"]
|
|
239
|
+
];
|
|
240
|
+
}
|
|
241
|
+
skipEndpointInterview() {
|
|
242
|
+
return true;
|
|
243
|
+
}
|
|
244
|
+
async interview(ctx) {
|
|
245
|
+
const node = this.getNode(ctx);
|
|
246
|
+
const endpoint = this.getEndpoint(ctx);
|
|
247
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Central Scene"], ctx, endpoint).withOptions({
|
|
248
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
215
249
|
});
|
|
216
|
-
} else {
|
|
217
250
|
ctx.logNode(node.id, {
|
|
218
251
|
endpoint: this.endpointIndex,
|
|
219
|
-
message:
|
|
220
|
-
|
|
252
|
+
message: `Interviewing ${this.ccName}...`,
|
|
253
|
+
direction: "none"
|
|
221
254
|
});
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
255
|
+
try {
|
|
256
|
+
await ccUtils.assignLifelineIssueingCommand(ctx, endpoint, this.ccId, import_Types.CentralSceneCommand.Notification);
|
|
257
|
+
} catch {
|
|
258
|
+
ctx.logNode(node.id, {
|
|
259
|
+
endpoint: endpoint.index,
|
|
260
|
+
message: `Configuring associations to receive ${(0, import_safe.getCCName)(this.ccId)} commands failed!`,
|
|
261
|
+
level: "warn"
|
|
262
|
+
});
|
|
263
|
+
}
|
|
225
264
|
ctx.logNode(node.id, {
|
|
226
265
|
endpoint: this.endpointIndex,
|
|
227
|
-
message: "
|
|
266
|
+
message: "Querying supported scenes...",
|
|
228
267
|
direction: "outbound"
|
|
229
268
|
});
|
|
230
|
-
await api.
|
|
269
|
+
const ccSupported = await api.getSupported();
|
|
270
|
+
if (ccSupported) {
|
|
271
|
+
const logMessage = `received supported scenes:
|
|
272
|
+
# of scenes: ${ccSupported.sceneCount}
|
|
273
|
+
supports slow refresh: ${ccSupported.supportsSlowRefresh}`;
|
|
274
|
+
ctx.logNode(node.id, {
|
|
275
|
+
endpoint: this.endpointIndex,
|
|
276
|
+
message: logMessage,
|
|
277
|
+
direction: "inbound"
|
|
278
|
+
});
|
|
279
|
+
} else {
|
|
280
|
+
ctx.logNode(node.id, {
|
|
281
|
+
endpoint: this.endpointIndex,
|
|
282
|
+
message: "Querying supported scenes timed out, skipping interview...",
|
|
283
|
+
level: "warn"
|
|
284
|
+
});
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
if (api.version >= 3 && ccSupported?.supportsSlowRefresh) {
|
|
288
|
+
ctx.logNode(node.id, {
|
|
289
|
+
endpoint: this.endpointIndex,
|
|
290
|
+
message: "Enabling slow refresh capability...",
|
|
291
|
+
direction: "outbound"
|
|
292
|
+
});
|
|
293
|
+
await api.setConfiguration(true);
|
|
294
|
+
}
|
|
295
|
+
this.setInterviewComplete(ctx, true);
|
|
231
296
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
(0, import_CommandClassDecorators.
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
let
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
this.keyAttribute = options.keyAttribute;
|
|
245
|
-
this.sceneNumber = options.sceneNumber;
|
|
246
|
-
this.slowRefresh = options.slowRefresh;
|
|
247
|
-
}
|
|
248
|
-
static from(raw, ctx) {
|
|
249
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 3);
|
|
250
|
-
const sequenceNumber = raw.payload[0];
|
|
251
|
-
const keyAttribute = raw.payload[1] & 7;
|
|
252
|
-
const sceneNumber = raw.payload[2];
|
|
253
|
-
let slowRefresh;
|
|
254
|
-
if (keyAttribute === import_Types.CentralSceneKeys.KeyHeldDown) {
|
|
255
|
-
slowRefresh = !!(raw.payload[1] & 128);
|
|
256
|
-
}
|
|
257
|
-
return new CentralSceneCCNotification_1({
|
|
258
|
-
nodeId: ctx.sourceNodeId,
|
|
259
|
-
sequenceNumber,
|
|
260
|
-
keyAttribute,
|
|
261
|
-
sceneNumber,
|
|
262
|
-
slowRefresh
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
persistValues(ctx) {
|
|
266
|
-
if (!super.persistValues(ctx))
|
|
267
|
-
return false;
|
|
268
|
-
const sceneValue = CentralSceneCCValues.scene(this.sceneNumber);
|
|
269
|
-
this.ensureMetadata(ctx, sceneValue);
|
|
270
|
-
return true;
|
|
271
|
-
}
|
|
272
|
-
sequenceNumber;
|
|
273
|
-
keyAttribute;
|
|
274
|
-
sceneNumber;
|
|
275
|
-
slowRefresh;
|
|
276
|
-
toLogEntry(ctx) {
|
|
277
|
-
const message = {
|
|
278
|
-
"sequence number": this.sequenceNumber,
|
|
279
|
-
"key attribute": (0, import_safe3.getEnumMemberName)(import_Types.CentralSceneKeys, this.keyAttribute),
|
|
280
|
-
"scene number": this.sceneNumber
|
|
281
|
-
};
|
|
282
|
-
if (this.slowRefresh != void 0) {
|
|
283
|
-
message["slow refresh"] = this.slowRefresh;
|
|
297
|
+
};
|
|
298
|
+
return CentralSceneCC2 = _classThis;
|
|
299
|
+
})();
|
|
300
|
+
let CentralSceneCCNotification = (() => {
|
|
301
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.Notification)];
|
|
302
|
+
let _classDescriptor;
|
|
303
|
+
let _classExtraInitializers = [];
|
|
304
|
+
let _classThis;
|
|
305
|
+
let _classSuper = CentralSceneCC;
|
|
306
|
+
var CentralSceneCCNotification2 = class extends _classSuper {
|
|
307
|
+
static {
|
|
308
|
+
_classThis = this;
|
|
284
309
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
CentralSceneCCNotification = CentralSceneCCNotification_1 = __decorate([
|
|
292
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.Notification)
|
|
293
|
-
], CentralSceneCCNotification);
|
|
294
|
-
let CentralSceneCCSupportedReport = CentralSceneCCSupportedReport_1 = class CentralSceneCCSupportedReport2 extends CentralSceneCC {
|
|
295
|
-
constructor(options) {
|
|
296
|
-
super(options);
|
|
297
|
-
this.sceneCount = options.sceneCount;
|
|
298
|
-
this.supportsSlowRefresh = options.supportsSlowRefresh;
|
|
299
|
-
for (const [scene, keys] of Object.entries(options.supportedKeyAttributes)) {
|
|
300
|
-
this._supportedKeyAttributes.set(parseInt(scene), keys);
|
|
310
|
+
static {
|
|
311
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
312
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
313
|
+
CentralSceneCCNotification2 = _classThis = _classDescriptor.value;
|
|
314
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
315
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
301
316
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
for (let i = 2; i <= sceneCount; i++) {
|
|
318
|
-
supportedKeyAttributes[i] = supportedKeyAttributes[1];
|
|
317
|
+
constructor(options) {
|
|
318
|
+
super(options);
|
|
319
|
+
this.sequenceNumber = options.sequenceNumber;
|
|
320
|
+
this.keyAttribute = options.keyAttribute;
|
|
321
|
+
this.sceneNumber = options.sceneNumber;
|
|
322
|
+
this.slowRefresh = options.slowRefresh;
|
|
323
|
+
}
|
|
324
|
+
static from(raw, ctx) {
|
|
325
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 3);
|
|
326
|
+
const sequenceNumber = raw.payload[0];
|
|
327
|
+
const keyAttribute = raw.payload[1] & 7;
|
|
328
|
+
const sceneNumber = raw.payload[2];
|
|
329
|
+
let slowRefresh;
|
|
330
|
+
if (keyAttribute === import_Types.CentralSceneKeys.KeyHeldDown) {
|
|
331
|
+
slowRefresh = !!(raw.payload[1] & 128);
|
|
319
332
|
}
|
|
333
|
+
return new this({
|
|
334
|
+
nodeId: ctx.sourceNodeId,
|
|
335
|
+
sequenceNumber,
|
|
336
|
+
keyAttribute,
|
|
337
|
+
sceneNumber,
|
|
338
|
+
slowRefresh
|
|
339
|
+
});
|
|
320
340
|
}
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
341
|
+
persistValues(ctx) {
|
|
342
|
+
if (!super.persistValues(ctx))
|
|
343
|
+
return false;
|
|
344
|
+
const sceneValue = CentralSceneCCValues.scene(this.sceneNumber);
|
|
345
|
+
this.ensureMetadata(ctx, sceneValue);
|
|
346
|
+
return true;
|
|
347
|
+
}
|
|
348
|
+
sequenceNumber;
|
|
349
|
+
keyAttribute;
|
|
350
|
+
sceneNumber;
|
|
351
|
+
slowRefresh;
|
|
352
|
+
toLogEntry(ctx) {
|
|
353
|
+
const message = {
|
|
354
|
+
"sequence number": this.sequenceNumber,
|
|
355
|
+
"key attribute": (0, import_safe3.getEnumMemberName)(import_Types.CentralSceneKeys, this.keyAttribute),
|
|
356
|
+
"scene number": this.sceneNumber
|
|
357
|
+
};
|
|
358
|
+
if (this.slowRefresh != void 0) {
|
|
359
|
+
message["slow refresh"] = this.slowRefresh;
|
|
360
|
+
}
|
|
361
|
+
return {
|
|
362
|
+
...super.toLogEntry(ctx),
|
|
363
|
+
message
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
return CentralSceneCCNotification2 = _classThis;
|
|
368
|
+
})();
|
|
369
|
+
let CentralSceneCCSupportedReport = (() => {
|
|
370
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.SupportedReport), (0, import_CommandClassDecorators.ccValueProperty)("sceneCount", CentralSceneCCValues.sceneCount), (0, import_CommandClassDecorators.ccValueProperty)("supportsSlowRefresh", CentralSceneCCValues.supportsSlowRefresh), (0, import_CommandClassDecorators.ccValueProperty)("supportedKeyAttributes", CentralSceneCCValues.supportedKeyAttributes)];
|
|
371
|
+
let _classDescriptor;
|
|
372
|
+
let _classExtraInitializers = [];
|
|
373
|
+
let _classThis;
|
|
374
|
+
let _classSuper = CentralSceneCC;
|
|
375
|
+
var CentralSceneCCSupportedReport2 = class extends _classSuper {
|
|
376
|
+
static {
|
|
377
|
+
_classThis = this;
|
|
378
|
+
}
|
|
379
|
+
static {
|
|
380
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
381
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
382
|
+
CentralSceneCCSupportedReport2 = _classThis = _classDescriptor.value;
|
|
383
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
384
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
385
|
+
}
|
|
386
|
+
constructor(options) {
|
|
387
|
+
super(options);
|
|
388
|
+
this.sceneCount = options.sceneCount;
|
|
389
|
+
this.supportsSlowRefresh = options.supportsSlowRefresh;
|
|
390
|
+
for (const [scene, keys] of Object.entries(options.supportedKeyAttributes)) {
|
|
391
|
+
this._supportedKeyAttributes.set(parseInt(scene), keys);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
static from(raw, ctx) {
|
|
395
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
396
|
+
const sceneCount = raw.payload[0];
|
|
397
|
+
const supportsSlowRefresh = !!(raw.payload[1] & 128);
|
|
398
|
+
const bitMaskBytes = (raw.payload[1] & 6) >>> 1;
|
|
399
|
+
const identicalKeyAttributes = !!(raw.payload[1] & 1);
|
|
400
|
+
const numEntries = identicalKeyAttributes ? 1 : sceneCount;
|
|
401
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2 + bitMaskBytes * numEntries);
|
|
402
|
+
const supportedKeyAttributes = {};
|
|
403
|
+
for (let i = 0; i < numEntries; i++) {
|
|
404
|
+
const mask = raw.payload.subarray(2 + i * bitMaskBytes, 2 + (i + 1) * bitMaskBytes);
|
|
405
|
+
supportedKeyAttributes[i + 1] = (0, import_safe.parseBitMask)(mask, import_Types.CentralSceneKeys.KeyPressed);
|
|
406
|
+
}
|
|
407
|
+
if (identicalKeyAttributes) {
|
|
408
|
+
for (let i = 2; i <= sceneCount; i++) {
|
|
409
|
+
supportedKeyAttributes[i] = supportedKeyAttributes[1];
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
return new this({
|
|
413
|
+
nodeId: ctx.sourceNodeId,
|
|
414
|
+
sceneCount,
|
|
415
|
+
supportsSlowRefresh,
|
|
416
|
+
supportedKeyAttributes
|
|
336
417
|
});
|
|
337
418
|
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
419
|
+
persistValues(ctx) {
|
|
420
|
+
if (!super.persistValues(ctx))
|
|
421
|
+
return false;
|
|
422
|
+
for (let i = 1; i <= this.sceneCount; i++) {
|
|
423
|
+
const sceneValue = CentralSceneCCValues.scene(i);
|
|
424
|
+
this.setMetadata(ctx, sceneValue, {
|
|
425
|
+
...sceneValue.meta,
|
|
426
|
+
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.CentralSceneKeys, this._supportedKeyAttributes.get(i))
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
return true;
|
|
430
|
+
}
|
|
431
|
+
sceneCount;
|
|
432
|
+
// TODO: Only offer `slowRefresh` if this is true
|
|
433
|
+
supportsSlowRefresh;
|
|
434
|
+
_supportedKeyAttributes = /* @__PURE__ */ new Map();
|
|
435
|
+
get supportedKeyAttributes() {
|
|
436
|
+
return this._supportedKeyAttributes;
|
|
437
|
+
}
|
|
438
|
+
toLogEntry(ctx) {
|
|
439
|
+
const message = {
|
|
440
|
+
"scene count": this.sceneCount,
|
|
441
|
+
"supports slow refresh": (0, import_safe.maybeUnknownToString)(this.supportsSlowRefresh)
|
|
442
|
+
};
|
|
443
|
+
for (const [scene, keys] of this.supportedKeyAttributes) {
|
|
444
|
+
message[`supported attributes (scene #${scene})`] = keys.map((k) => `
|
|
354
445
|
\xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.CentralSceneKeys, k)}`).join("");
|
|
446
|
+
}
|
|
447
|
+
return {
|
|
448
|
+
...super.toLogEntry(ctx),
|
|
449
|
+
message
|
|
450
|
+
};
|
|
355
451
|
}
|
|
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
|
-
let
|
|
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
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
};
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
452
|
+
};
|
|
453
|
+
return CentralSceneCCSupportedReport2 = _classThis;
|
|
454
|
+
})();
|
|
455
|
+
let CentralSceneCCSupportedGet = (() => {
|
|
456
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.SupportedGet), (0, import_CommandClassDecorators.expectedCCResponse)(CentralSceneCCSupportedReport)];
|
|
457
|
+
let _classDescriptor;
|
|
458
|
+
let _classExtraInitializers = [];
|
|
459
|
+
let _classThis;
|
|
460
|
+
let _classSuper = CentralSceneCC;
|
|
461
|
+
var CentralSceneCCSupportedGet2 = 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
|
+
CentralSceneCCSupportedGet2 = _classThis = _classDescriptor.value;
|
|
469
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
470
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
return CentralSceneCCSupportedGet2 = _classThis;
|
|
474
|
+
})();
|
|
475
|
+
let CentralSceneCCConfigurationReport = (() => {
|
|
476
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.ConfigurationReport), (0, import_CommandClassDecorators.ccValueProperty)("slowRefresh", CentralSceneCCValues.slowRefresh)];
|
|
477
|
+
let _classDescriptor;
|
|
478
|
+
let _classExtraInitializers = [];
|
|
479
|
+
let _classThis;
|
|
480
|
+
let _classSuper = CentralSceneCC;
|
|
481
|
+
var CentralSceneCCConfigurationReport2 = class extends _classSuper {
|
|
482
|
+
static {
|
|
483
|
+
_classThis = this;
|
|
484
|
+
}
|
|
485
|
+
static {
|
|
486
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
487
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
488
|
+
CentralSceneCCConfigurationReport2 = _classThis = _classDescriptor.value;
|
|
489
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
490
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
491
|
+
}
|
|
492
|
+
constructor(options) {
|
|
493
|
+
super(options);
|
|
494
|
+
this.slowRefresh = options.slowRefresh;
|
|
495
|
+
}
|
|
496
|
+
static from(raw, ctx) {
|
|
497
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
498
|
+
const slowRefresh = !!(raw.payload[0] & 128);
|
|
499
|
+
return new this({
|
|
500
|
+
nodeId: ctx.sourceNodeId,
|
|
501
|
+
slowRefresh
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
slowRefresh;
|
|
505
|
+
toLogEntry(ctx) {
|
|
506
|
+
return {
|
|
507
|
+
...super.toLogEntry(ctx),
|
|
508
|
+
message: { "slow refresh": this.slowRefresh }
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
return CentralSceneCCConfigurationReport2 = _classThis;
|
|
513
|
+
})();
|
|
514
|
+
let CentralSceneCCConfigurationGet = (() => {
|
|
515
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.ConfigurationGet), (0, import_CommandClassDecorators.expectedCCResponse)(CentralSceneCCConfigurationReport)];
|
|
516
|
+
let _classDescriptor;
|
|
517
|
+
let _classExtraInitializers = [];
|
|
518
|
+
let _classThis;
|
|
519
|
+
let _classSuper = CentralSceneCC;
|
|
520
|
+
var CentralSceneCCConfigurationGet2 = class extends _classSuper {
|
|
521
|
+
static {
|
|
522
|
+
_classThis = this;
|
|
523
|
+
}
|
|
524
|
+
static {
|
|
525
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
526
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
527
|
+
CentralSceneCCConfigurationGet2 = _classThis = _classDescriptor.value;
|
|
528
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
529
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
530
|
+
}
|
|
531
|
+
};
|
|
532
|
+
return CentralSceneCCConfigurationGet2 = _classThis;
|
|
533
|
+
})();
|
|
534
|
+
let CentralSceneCCConfigurationSet = (() => {
|
|
535
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.ConfigurationSet), (0, import_CommandClassDecorators.useSupervision)()];
|
|
536
|
+
let _classDescriptor;
|
|
537
|
+
let _classExtraInitializers = [];
|
|
538
|
+
let _classThis;
|
|
539
|
+
let _classSuper = CentralSceneCC;
|
|
540
|
+
var CentralSceneCCConfigurationSet2 = class extends _classSuper {
|
|
541
|
+
static {
|
|
542
|
+
_classThis = this;
|
|
543
|
+
}
|
|
544
|
+
static {
|
|
545
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
546
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
547
|
+
CentralSceneCCConfigurationSet2 = _classThis = _classDescriptor.value;
|
|
548
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
549
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
550
|
+
}
|
|
551
|
+
constructor(options) {
|
|
552
|
+
super(options);
|
|
553
|
+
this.slowRefresh = options.slowRefresh;
|
|
554
|
+
}
|
|
555
|
+
static from(_raw, _ctx) {
|
|
556
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
557
|
+
}
|
|
558
|
+
slowRefresh;
|
|
559
|
+
serialize(ctx) {
|
|
560
|
+
this.payload = import_safe2.Bytes.from([this.slowRefresh ? 128 : 0]);
|
|
561
|
+
return super.serialize(ctx);
|
|
562
|
+
}
|
|
563
|
+
toLogEntry(ctx) {
|
|
564
|
+
return {
|
|
565
|
+
...super.toLogEntry(ctx),
|
|
566
|
+
message: { "slow refresh": this.slowRefresh }
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
};
|
|
570
|
+
return CentralSceneCCConfigurationSet2 = _classThis;
|
|
571
|
+
})();
|
|
437
572
|
// Annotate the CommonJS export names for ESM import in node:
|
|
438
573
|
0 && (module.exports = {
|
|
439
574
|
CentralSceneCC,
|