@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
|
@@ -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 CentralSceneCCNotification_1, CentralSceneCCSupportedReport_1, CentralSceneCCConfigurationReport_1;
|
|
8
35
|
function __assertType(argName, typeName, boundHasError) {
|
|
9
36
|
const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
|
|
10
37
|
if (boundHasError()) {
|
|
@@ -23,7 +50,7 @@ import { getEnumMemberName, pick } from "@zwave-js/shared/safe";
|
|
|
23
50
|
import { padStart } from "alcalzone-shared/strings/index.js";
|
|
24
51
|
import { CCAPI, POLL_VALUE, SET_VALUE, throwUnsupportedProperty, throwWrongValueType, } from "../lib/API.js";
|
|
25
52
|
import { CommandClass, } from "../lib/CommandClass.js";
|
|
26
|
-
import { API, CCCommand,
|
|
53
|
+
import { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from "../lib/CommandClassDecorators.js";
|
|
27
54
|
import { V } from "../lib/Values.js";
|
|
28
55
|
import { CentralSceneCommand, CentralSceneKeys } from "../lib/_Types.js";
|
|
29
56
|
import * as ccUtils from "../lib/utils.js";
|
|
@@ -53,375 +80,462 @@ export const CentralSceneCCValues = Object.freeze({
|
|
|
53
80
|
}), { stateful: false }),
|
|
54
81
|
}),
|
|
55
82
|
});
|
|
56
|
-
let CentralSceneCCAPI =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
this.assertSupportsCommand(CentralSceneCommand, CentralSceneCommand.SupportedGet);
|
|
71
|
-
const cc = new CentralSceneCCSupportedGet({
|
|
72
|
-
nodeId: this.endpoint.nodeId,
|
|
73
|
-
endpointIndex: this.endpoint.index,
|
|
74
|
-
});
|
|
75
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
76
|
-
if (response) {
|
|
77
|
-
return pick(response, [
|
|
78
|
-
"sceneCount",
|
|
79
|
-
"supportsSlowRefresh",
|
|
80
|
-
"supportedKeyAttributes",
|
|
81
|
-
]);
|
|
83
|
+
let CentralSceneCCAPI = (() => {
|
|
84
|
+
let _classDecorators = [API(CommandClasses["Central Scene"])];
|
|
85
|
+
let _classDescriptor;
|
|
86
|
+
let _classExtraInitializers = [];
|
|
87
|
+
let _classThis;
|
|
88
|
+
let _classSuper = CCAPI;
|
|
89
|
+
var CentralSceneCCAPI = class extends _classSuper {
|
|
90
|
+
static { _classThis = this; }
|
|
91
|
+
static {
|
|
92
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
93
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
94
|
+
CentralSceneCCAPI = _classThis = _classDescriptor.value;
|
|
95
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
96
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
82
97
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
92
|
-
if (response) {
|
|
93
|
-
return pick(response, ["slowRefresh"]);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
async setConfiguration(slowRefresh) {
|
|
97
|
-
__assertType("slowRefresh", "boolean", __assertType__boolean.bind(void 0, slowRefresh));
|
|
98
|
-
this.assertSupportsCommand(CentralSceneCommand, CentralSceneCommand.ConfigurationSet);
|
|
99
|
-
const cc = new CentralSceneCCConfigurationSet({
|
|
100
|
-
nodeId: this.endpoint.nodeId,
|
|
101
|
-
endpointIndex: this.endpoint.index,
|
|
102
|
-
slowRefresh,
|
|
103
|
-
});
|
|
104
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
105
|
-
}
|
|
106
|
-
get [SET_VALUE]() {
|
|
107
|
-
return async function ({ property }, value) {
|
|
108
|
-
if (property !== "slowRefresh") {
|
|
109
|
-
throwUnsupportedProperty(this.ccId, property);
|
|
110
|
-
}
|
|
111
|
-
if (typeof value !== "boolean") {
|
|
112
|
-
throwWrongValueType(this.ccId, property, "boolean", typeof value);
|
|
98
|
+
supportsCommand(cmd) {
|
|
99
|
+
switch (cmd) {
|
|
100
|
+
case CentralSceneCommand.SupportedGet:
|
|
101
|
+
return this.isSinglecast(); // this is mandatory
|
|
102
|
+
case CentralSceneCommand.ConfigurationGet:
|
|
103
|
+
return this.version >= 3 && this.isSinglecast();
|
|
104
|
+
case CentralSceneCommand.ConfigurationSet:
|
|
105
|
+
return this.version >= 3;
|
|
113
106
|
}
|
|
114
|
-
return
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
107
|
+
return super.supportsCommand(cmd);
|
|
108
|
+
}
|
|
109
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
110
|
+
async getSupported() {
|
|
111
|
+
this.assertSupportsCommand(CentralSceneCommand, CentralSceneCommand.SupportedGet);
|
|
112
|
+
const cc = new CentralSceneCCSupportedGet({
|
|
113
|
+
nodeId: this.endpoint.nodeId,
|
|
114
|
+
endpointIndex: this.endpoint.index,
|
|
115
|
+
});
|
|
116
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
117
|
+
if (response) {
|
|
118
|
+
return pick(response, [
|
|
119
|
+
"sceneCount",
|
|
120
|
+
"supportsSlowRefresh",
|
|
121
|
+
"supportedKeyAttributes",
|
|
122
|
+
]);
|
|
121
123
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
export { CentralSceneCCAPI };
|
|
130
|
-
let CentralSceneCC = class CentralSceneCC extends CommandClass {
|
|
131
|
-
determineRequiredCCInterviews() {
|
|
132
|
-
return [
|
|
133
|
-
...super.determineRequiredCCInterviews(),
|
|
134
|
-
CommandClasses.Association,
|
|
135
|
-
CommandClasses["Multi Channel Association"],
|
|
136
|
-
CommandClasses["Association Group Information"],
|
|
137
|
-
];
|
|
138
|
-
}
|
|
139
|
-
skipEndpointInterview() {
|
|
140
|
-
// Central scene notifications are issued by the root device
|
|
141
|
-
return true;
|
|
142
|
-
}
|
|
143
|
-
async interview(ctx) {
|
|
144
|
-
const node = this.getNode(ctx);
|
|
145
|
-
const endpoint = this.getEndpoint(ctx);
|
|
146
|
-
const api = CCAPI.create(CommandClasses["Central Scene"], ctx, endpoint).withOptions({
|
|
147
|
-
priority: MessagePriority.NodeQuery,
|
|
148
|
-
});
|
|
149
|
-
ctx.logNode(node.id, {
|
|
150
|
-
endpoint: this.endpointIndex,
|
|
151
|
-
message: `Interviewing ${this.ccName}...`,
|
|
152
|
-
direction: "none",
|
|
153
|
-
});
|
|
154
|
-
// If one Association group issues CentralScene notifications,
|
|
155
|
-
// we must associate ourselves with that channel
|
|
156
|
-
try {
|
|
157
|
-
await ccUtils.assignLifelineIssueingCommand(ctx, endpoint, this.ccId, CentralSceneCommand.Notification);
|
|
158
|
-
}
|
|
159
|
-
catch {
|
|
160
|
-
ctx.logNode(node.id, {
|
|
161
|
-
endpoint: endpoint.index,
|
|
162
|
-
message: `Configuring associations to receive ${getCCName(this.ccId)} commands failed!`,
|
|
163
|
-
level: "warn",
|
|
124
|
+
}
|
|
125
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
126
|
+
async getConfiguration() {
|
|
127
|
+
this.assertSupportsCommand(CentralSceneCommand, CentralSceneCommand.ConfigurationGet);
|
|
128
|
+
const cc = new CentralSceneCCConfigurationGet({
|
|
129
|
+
nodeId: this.endpoint.nodeId,
|
|
130
|
+
endpointIndex: this.endpoint.index,
|
|
164
131
|
});
|
|
132
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
133
|
+
if (response) {
|
|
134
|
+
return pick(response, ["slowRefresh"]);
|
|
135
|
+
}
|
|
165
136
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
const logMessage = `received supported scenes:
|
|
174
|
-
# of scenes: ${ccSupported.sceneCount}
|
|
175
|
-
supports slow refresh: ${ccSupported.supportsSlowRefresh}`;
|
|
176
|
-
ctx.logNode(node.id, {
|
|
177
|
-
endpoint: this.endpointIndex,
|
|
178
|
-
message: logMessage,
|
|
179
|
-
direction: "inbound",
|
|
137
|
+
async setConfiguration(slowRefresh) {
|
|
138
|
+
__assertType("slowRefresh", "boolean", __assertType__boolean.bind(void 0, slowRefresh));
|
|
139
|
+
this.assertSupportsCommand(CentralSceneCommand, CentralSceneCommand.ConfigurationSet);
|
|
140
|
+
const cc = new CentralSceneCCConfigurationSet({
|
|
141
|
+
nodeId: this.endpoint.nodeId,
|
|
142
|
+
endpointIndex: this.endpoint.index,
|
|
143
|
+
slowRefresh,
|
|
180
144
|
});
|
|
145
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
146
|
+
}
|
|
147
|
+
get [SET_VALUE]() {
|
|
148
|
+
return async function ({ property }, value) {
|
|
149
|
+
if (property !== "slowRefresh") {
|
|
150
|
+
throwUnsupportedProperty(this.ccId, property);
|
|
151
|
+
}
|
|
152
|
+
if (typeof value !== "boolean") {
|
|
153
|
+
throwWrongValueType(this.ccId, property, "boolean", typeof value);
|
|
154
|
+
}
|
|
155
|
+
return this.setConfiguration(value);
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
get [POLL_VALUE]() {
|
|
159
|
+
return async function ({ property }) {
|
|
160
|
+
if (property === "slowRefresh") {
|
|
161
|
+
return (await this.getConfiguration())?.[property];
|
|
162
|
+
}
|
|
163
|
+
throwUnsupportedProperty(this.ccId, property);
|
|
164
|
+
};
|
|
181
165
|
}
|
|
182
|
-
|
|
166
|
+
};
|
|
167
|
+
return CentralSceneCCAPI = _classThis;
|
|
168
|
+
})();
|
|
169
|
+
export { CentralSceneCCAPI };
|
|
170
|
+
let CentralSceneCC = (() => {
|
|
171
|
+
let _classDecorators = [commandClass(CommandClasses["Central Scene"]), implementedVersion(3), ccValues(CentralSceneCCValues)];
|
|
172
|
+
let _classDescriptor;
|
|
173
|
+
let _classExtraInitializers = [];
|
|
174
|
+
let _classThis;
|
|
175
|
+
let _classSuper = CommandClass;
|
|
176
|
+
var CentralSceneCC = class extends _classSuper {
|
|
177
|
+
static { _classThis = this; }
|
|
178
|
+
static {
|
|
179
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
180
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
181
|
+
CentralSceneCC = _classThis = _classDescriptor.value;
|
|
182
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
183
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
184
|
+
}
|
|
185
|
+
determineRequiredCCInterviews() {
|
|
186
|
+
return [
|
|
187
|
+
...super.determineRequiredCCInterviews(),
|
|
188
|
+
CommandClasses.Association,
|
|
189
|
+
CommandClasses["Multi Channel Association"],
|
|
190
|
+
CommandClasses["Association Group Information"],
|
|
191
|
+
];
|
|
192
|
+
}
|
|
193
|
+
skipEndpointInterview() {
|
|
194
|
+
// Central scene notifications are issued by the root device
|
|
195
|
+
return true;
|
|
196
|
+
}
|
|
197
|
+
async interview(ctx) {
|
|
198
|
+
const node = this.getNode(ctx);
|
|
199
|
+
const endpoint = this.getEndpoint(ctx);
|
|
200
|
+
const api = CCAPI.create(CommandClasses["Central Scene"], ctx, endpoint).withOptions({
|
|
201
|
+
priority: MessagePriority.NodeQuery,
|
|
202
|
+
});
|
|
183
203
|
ctx.logNode(node.id, {
|
|
184
204
|
endpoint: this.endpointIndex,
|
|
185
|
-
message:
|
|
186
|
-
|
|
205
|
+
message: `Interviewing ${this.ccName}...`,
|
|
206
|
+
direction: "none",
|
|
187
207
|
});
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
208
|
+
// If one Association group issues CentralScene notifications,
|
|
209
|
+
// we must associate ourselves with that channel
|
|
210
|
+
try {
|
|
211
|
+
await ccUtils.assignLifelineIssueingCommand(ctx, endpoint, this.ccId, CentralSceneCommand.Notification);
|
|
212
|
+
}
|
|
213
|
+
catch {
|
|
214
|
+
ctx.logNode(node.id, {
|
|
215
|
+
endpoint: endpoint.index,
|
|
216
|
+
message: `Configuring associations to receive ${getCCName(this.ccId)} commands failed!`,
|
|
217
|
+
level: "warn",
|
|
218
|
+
});
|
|
219
|
+
}
|
|
192
220
|
ctx.logNode(node.id, {
|
|
193
221
|
endpoint: this.endpointIndex,
|
|
194
|
-
message: "
|
|
222
|
+
message: "Querying supported scenes...",
|
|
195
223
|
direction: "outbound",
|
|
196
224
|
});
|
|
197
|
-
await api.
|
|
225
|
+
const ccSupported = await api.getSupported();
|
|
226
|
+
if (ccSupported) {
|
|
227
|
+
const logMessage = `received supported scenes:
|
|
228
|
+
# of scenes: ${ccSupported.sceneCount}
|
|
229
|
+
supports slow refresh: ${ccSupported.supportsSlowRefresh}`;
|
|
230
|
+
ctx.logNode(node.id, {
|
|
231
|
+
endpoint: this.endpointIndex,
|
|
232
|
+
message: logMessage,
|
|
233
|
+
direction: "inbound",
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
ctx.logNode(node.id, {
|
|
238
|
+
endpoint: this.endpointIndex,
|
|
239
|
+
message: "Querying supported scenes timed out, skipping interview...",
|
|
240
|
+
level: "warn",
|
|
241
|
+
});
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
// The slow refresh capability should be enabled whenever possible
|
|
245
|
+
if (api.version >= 3 && ccSupported?.supportsSlowRefresh) {
|
|
246
|
+
ctx.logNode(node.id, {
|
|
247
|
+
endpoint: this.endpointIndex,
|
|
248
|
+
message: "Enabling slow refresh capability...",
|
|
249
|
+
direction: "outbound",
|
|
250
|
+
});
|
|
251
|
+
await api.setConfiguration(true);
|
|
252
|
+
}
|
|
253
|
+
// Remember that the interview is complete
|
|
254
|
+
this.setInterviewComplete(ctx, true);
|
|
198
255
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
};
|
|
203
|
-
CentralSceneCC = __decorate([
|
|
204
|
-
commandClass(CommandClasses["Central Scene"]),
|
|
205
|
-
implementedVersion(3),
|
|
206
|
-
ccValues(CentralSceneCCValues)
|
|
207
|
-
], CentralSceneCC);
|
|
256
|
+
};
|
|
257
|
+
return CentralSceneCC = _classThis;
|
|
258
|
+
})();
|
|
208
259
|
export { CentralSceneCC };
|
|
209
|
-
let CentralSceneCCNotification =
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
//
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
260
|
+
let CentralSceneCCNotification = (() => {
|
|
261
|
+
let _classDecorators = [CCCommand(CentralSceneCommand.Notification)];
|
|
262
|
+
let _classDescriptor;
|
|
263
|
+
let _classExtraInitializers = [];
|
|
264
|
+
let _classThis;
|
|
265
|
+
let _classSuper = CentralSceneCC;
|
|
266
|
+
var CentralSceneCCNotification = class extends _classSuper {
|
|
267
|
+
static { _classThis = this; }
|
|
268
|
+
static {
|
|
269
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
270
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
271
|
+
CentralSceneCCNotification = _classThis = _classDescriptor.value;
|
|
272
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
273
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
274
|
+
}
|
|
275
|
+
constructor(options) {
|
|
276
|
+
super(options);
|
|
277
|
+
// TODO: Check implementation:
|
|
278
|
+
this.sequenceNumber = options.sequenceNumber;
|
|
279
|
+
this.keyAttribute = options.keyAttribute;
|
|
280
|
+
this.sceneNumber = options.sceneNumber;
|
|
281
|
+
this.slowRefresh = options.slowRefresh;
|
|
282
|
+
}
|
|
283
|
+
static from(raw, ctx) {
|
|
284
|
+
validatePayload(raw.payload.length >= 3);
|
|
285
|
+
const sequenceNumber = raw.payload[0];
|
|
286
|
+
const keyAttribute = raw.payload[1] & 0b111;
|
|
287
|
+
const sceneNumber = raw.payload[2];
|
|
288
|
+
let slowRefresh;
|
|
289
|
+
if (keyAttribute === CentralSceneKeys.KeyHeldDown) {
|
|
290
|
+
// A receiving node MUST ignore this field if the command is not
|
|
291
|
+
// carrying the Key Held Down key attribute.
|
|
292
|
+
slowRefresh = !!(raw.payload[1] & 0b1000_0000);
|
|
293
|
+
}
|
|
294
|
+
return new this({
|
|
295
|
+
nodeId: ctx.sourceNodeId,
|
|
296
|
+
sequenceNumber,
|
|
297
|
+
keyAttribute,
|
|
298
|
+
sceneNumber,
|
|
299
|
+
slowRefresh,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
persistValues(ctx) {
|
|
303
|
+
if (!super.persistValues(ctx))
|
|
304
|
+
return false;
|
|
305
|
+
// In case the interview is not yet completed, we still create some basic metadata
|
|
306
|
+
const sceneValue = CentralSceneCCValues.scene(this.sceneNumber);
|
|
307
|
+
this.ensureMetadata(ctx, sceneValue);
|
|
308
|
+
// The spec behavior is pretty complicated, so we cannot just store
|
|
309
|
+
// the value and call it a day. Handling of these notifications will
|
|
310
|
+
// happen in the receiving node class
|
|
311
|
+
return true;
|
|
312
|
+
}
|
|
313
|
+
sequenceNumber;
|
|
314
|
+
keyAttribute;
|
|
315
|
+
sceneNumber;
|
|
316
|
+
slowRefresh;
|
|
317
|
+
toLogEntry(ctx) {
|
|
318
|
+
const message = {
|
|
319
|
+
"sequence number": this.sequenceNumber,
|
|
320
|
+
"key attribute": getEnumMemberName(CentralSceneKeys, this.keyAttribute),
|
|
321
|
+
"scene number": this.sceneNumber,
|
|
322
|
+
};
|
|
323
|
+
if (this.slowRefresh != undefined) {
|
|
324
|
+
message["slow refresh"] = this.slowRefresh;
|
|
325
|
+
}
|
|
326
|
+
return {
|
|
327
|
+
...super.toLogEntry(ctx),
|
|
328
|
+
message,
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
return CentralSceneCCNotification = _classThis;
|
|
333
|
+
})();
|
|
270
334
|
export { CentralSceneCCNotification };
|
|
271
|
-
let CentralSceneCCSupportedReport =
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
335
|
+
let CentralSceneCCSupportedReport = (() => {
|
|
336
|
+
let _classDecorators = [CCCommand(CentralSceneCommand.SupportedReport), ccValueProperty("sceneCount", CentralSceneCCValues.sceneCount), ccValueProperty("supportsSlowRefresh", CentralSceneCCValues.supportsSlowRefresh), ccValueProperty("supportedKeyAttributes", CentralSceneCCValues.supportedKeyAttributes)];
|
|
337
|
+
let _classDescriptor;
|
|
338
|
+
let _classExtraInitializers = [];
|
|
339
|
+
let _classThis;
|
|
340
|
+
let _classSuper = CentralSceneCC;
|
|
341
|
+
var CentralSceneCCSupportedReport = class extends _classSuper {
|
|
342
|
+
static { _classThis = this; }
|
|
343
|
+
static {
|
|
344
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
345
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
346
|
+
CentralSceneCCSupportedReport = _classThis = _classDescriptor.value;
|
|
347
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
348
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
279
349
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
const numEntries = identicalKeyAttributes ? 1 : sceneCount;
|
|
288
|
-
validatePayload(raw.payload.length >= 2 + bitMaskBytes * numEntries);
|
|
289
|
-
const supportedKeyAttributes = {};
|
|
290
|
-
for (let i = 0; i < numEntries; i++) {
|
|
291
|
-
const mask = raw.payload.subarray(2 + i * bitMaskBytes, 2 + (i + 1) * bitMaskBytes);
|
|
292
|
-
supportedKeyAttributes[i + 1] = parseBitMask(mask, CentralSceneKeys.KeyPressed);
|
|
293
|
-
}
|
|
294
|
-
if (identicalKeyAttributes) {
|
|
295
|
-
// The key attributes are only transmitted for scene 1, copy them to the others
|
|
296
|
-
for (let i = 2; i <= sceneCount; i++) {
|
|
297
|
-
supportedKeyAttributes[i] = supportedKeyAttributes[1];
|
|
350
|
+
constructor(options) {
|
|
351
|
+
super(options);
|
|
352
|
+
// TODO: Check implementation:
|
|
353
|
+
this.sceneCount = options.sceneCount;
|
|
354
|
+
this.supportsSlowRefresh = options.supportsSlowRefresh;
|
|
355
|
+
for (const [scene, keys] of Object.entries(options.supportedKeyAttributes)) {
|
|
356
|
+
this._supportedKeyAttributes.set(parseInt(scene), keys);
|
|
298
357
|
}
|
|
299
358
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
sceneCount
|
|
303
|
-
supportsSlowRefresh
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
359
|
+
static from(raw, ctx) {
|
|
360
|
+
validatePayload(raw.payload.length >= 2);
|
|
361
|
+
const sceneCount = raw.payload[0];
|
|
362
|
+
const supportsSlowRefresh = !!(raw.payload[1] & 0b1000_0000);
|
|
363
|
+
const bitMaskBytes = (raw.payload[1] & 0b110) >>> 1;
|
|
364
|
+
const identicalKeyAttributes = !!(raw.payload[1] & 0b1);
|
|
365
|
+
const numEntries = identicalKeyAttributes ? 1 : sceneCount;
|
|
366
|
+
validatePayload(raw.payload.length >= 2 + bitMaskBytes * numEntries);
|
|
367
|
+
const supportedKeyAttributes = {};
|
|
368
|
+
for (let i = 0; i < numEntries; i++) {
|
|
369
|
+
const mask = raw.payload.subarray(2 + i * bitMaskBytes, 2 + (i + 1) * bitMaskBytes);
|
|
370
|
+
supportedKeyAttributes[i + 1] = parseBitMask(mask, CentralSceneKeys.KeyPressed);
|
|
371
|
+
}
|
|
372
|
+
if (identicalKeyAttributes) {
|
|
373
|
+
// The key attributes are only transmitted for scene 1, copy them to the others
|
|
374
|
+
for (let i = 2; i <= sceneCount; i++) {
|
|
375
|
+
supportedKeyAttributes[i] = supportedKeyAttributes[1];
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
return new this({
|
|
379
|
+
nodeId: ctx.sourceNodeId,
|
|
380
|
+
sceneCount,
|
|
381
|
+
supportsSlowRefresh,
|
|
382
|
+
supportedKeyAttributes,
|
|
316
383
|
});
|
|
317
384
|
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
message
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
};
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
385
|
+
persistValues(ctx) {
|
|
386
|
+
if (!super.persistValues(ctx))
|
|
387
|
+
return false;
|
|
388
|
+
// Create/extend metadata for all scenes
|
|
389
|
+
for (let i = 1; i <= this.sceneCount; i++) {
|
|
390
|
+
const sceneValue = CentralSceneCCValues.scene(i);
|
|
391
|
+
this.setMetadata(ctx, sceneValue, {
|
|
392
|
+
...sceneValue.meta,
|
|
393
|
+
states: enumValuesToMetadataStates(CentralSceneKeys, this._supportedKeyAttributes.get(i)),
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
return true;
|
|
397
|
+
}
|
|
398
|
+
sceneCount;
|
|
399
|
+
// TODO: Only offer `slowRefresh` if this is true
|
|
400
|
+
supportsSlowRefresh;
|
|
401
|
+
_supportedKeyAttributes = new Map();
|
|
402
|
+
get supportedKeyAttributes() {
|
|
403
|
+
return this._supportedKeyAttributes;
|
|
404
|
+
}
|
|
405
|
+
toLogEntry(ctx) {
|
|
406
|
+
const message = {
|
|
407
|
+
"scene count": this.sceneCount,
|
|
408
|
+
"supports slow refresh": maybeUnknownToString(this.supportsSlowRefresh),
|
|
409
|
+
};
|
|
410
|
+
for (const [scene, keys] of this.supportedKeyAttributes) {
|
|
411
|
+
message[`supported attributes (scene #${scene})`] = keys
|
|
412
|
+
.map((k) => `\n· ${getEnumMemberName(CentralSceneKeys, k)}`)
|
|
413
|
+
.join("");
|
|
414
|
+
}
|
|
415
|
+
return {
|
|
416
|
+
...super.toLogEntry(ctx),
|
|
417
|
+
message,
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
return CentralSceneCCSupportedReport = _classThis;
|
|
422
|
+
})();
|
|
355
423
|
export { CentralSceneCCSupportedReport };
|
|
356
|
-
let CentralSceneCCSupportedGet =
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
424
|
+
let CentralSceneCCSupportedGet = (() => {
|
|
425
|
+
let _classDecorators = [CCCommand(CentralSceneCommand.SupportedGet), expectedCCResponse(CentralSceneCCSupportedReport)];
|
|
426
|
+
let _classDescriptor;
|
|
427
|
+
let _classExtraInitializers = [];
|
|
428
|
+
let _classThis;
|
|
429
|
+
let _classSuper = CentralSceneCC;
|
|
430
|
+
var CentralSceneCCSupportedGet = class extends _classSuper {
|
|
431
|
+
static { _classThis = this; }
|
|
432
|
+
static {
|
|
433
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
434
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
435
|
+
CentralSceneCCSupportedGet = _classThis = _classDescriptor.value;
|
|
436
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
437
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
return CentralSceneCCSupportedGet = _classThis;
|
|
441
|
+
})();
|
|
362
442
|
export { CentralSceneCCSupportedGet };
|
|
363
|
-
let CentralSceneCCConfigurationReport =
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
443
|
+
let CentralSceneCCConfigurationReport = (() => {
|
|
444
|
+
let _classDecorators = [CCCommand(CentralSceneCommand.ConfigurationReport), ccValueProperty("slowRefresh", CentralSceneCCValues.slowRefresh)];
|
|
445
|
+
let _classDescriptor;
|
|
446
|
+
let _classExtraInitializers = [];
|
|
447
|
+
let _classThis;
|
|
448
|
+
let _classSuper = CentralSceneCC;
|
|
449
|
+
var CentralSceneCCConfigurationReport = class extends _classSuper {
|
|
450
|
+
static { _classThis = this; }
|
|
451
|
+
static {
|
|
452
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
453
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
454
|
+
CentralSceneCCConfigurationReport = _classThis = _classDescriptor.value;
|
|
455
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
456
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
457
|
+
}
|
|
458
|
+
constructor(options) {
|
|
459
|
+
super(options);
|
|
460
|
+
// TODO: Check implementation:
|
|
461
|
+
this.slowRefresh = options.slowRefresh;
|
|
462
|
+
}
|
|
463
|
+
static from(raw, ctx) {
|
|
464
|
+
validatePayload(raw.payload.length >= 1);
|
|
465
|
+
const slowRefresh = !!(raw.payload[0] & 0b1000_0000);
|
|
466
|
+
return new this({
|
|
467
|
+
nodeId: ctx.sourceNodeId,
|
|
468
|
+
slowRefresh,
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
slowRefresh;
|
|
472
|
+
toLogEntry(ctx) {
|
|
473
|
+
return {
|
|
474
|
+
...super.toLogEntry(ctx),
|
|
475
|
+
message: { "slow refresh": this.slowRefresh },
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
return CentralSceneCCConfigurationReport = _classThis;
|
|
480
|
+
})();
|
|
391
481
|
export { CentralSceneCCConfigurationReport };
|
|
392
|
-
let CentralSceneCCConfigurationGet =
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
482
|
+
let CentralSceneCCConfigurationGet = (() => {
|
|
483
|
+
let _classDecorators = [CCCommand(CentralSceneCommand.ConfigurationGet), expectedCCResponse(CentralSceneCCConfigurationReport)];
|
|
484
|
+
let _classDescriptor;
|
|
485
|
+
let _classExtraInitializers = [];
|
|
486
|
+
let _classThis;
|
|
487
|
+
let _classSuper = CentralSceneCC;
|
|
488
|
+
var CentralSceneCCConfigurationGet = class extends _classSuper {
|
|
489
|
+
static { _classThis = this; }
|
|
490
|
+
static {
|
|
491
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
492
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
493
|
+
CentralSceneCCConfigurationGet = _classThis = _classDescriptor.value;
|
|
494
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
495
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
return CentralSceneCCConfigurationGet = _classThis;
|
|
499
|
+
})();
|
|
398
500
|
export { CentralSceneCCConfigurationGet };
|
|
399
|
-
let CentralSceneCCConfigurationSet =
|
|
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
|
-
|
|
501
|
+
let CentralSceneCCConfigurationSet = (() => {
|
|
502
|
+
let _classDecorators = [CCCommand(CentralSceneCommand.ConfigurationSet), useSupervision()];
|
|
503
|
+
let _classDescriptor;
|
|
504
|
+
let _classExtraInitializers = [];
|
|
505
|
+
let _classThis;
|
|
506
|
+
let _classSuper = CentralSceneCC;
|
|
507
|
+
var CentralSceneCCConfigurationSet = class extends _classSuper {
|
|
508
|
+
static { _classThis = this; }
|
|
509
|
+
static {
|
|
510
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
511
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
512
|
+
CentralSceneCCConfigurationSet = _classThis = _classDescriptor.value;
|
|
513
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
514
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
515
|
+
}
|
|
516
|
+
constructor(options) {
|
|
517
|
+
super(options);
|
|
518
|
+
this.slowRefresh = options.slowRefresh;
|
|
519
|
+
}
|
|
520
|
+
static from(_raw, _ctx) {
|
|
521
|
+
throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
522
|
+
// return new CentralSceneCCConfigurationSet({
|
|
523
|
+
// nodeId: ctx.sourceNodeId,
|
|
524
|
+
// });
|
|
525
|
+
}
|
|
526
|
+
slowRefresh;
|
|
527
|
+
serialize(ctx) {
|
|
528
|
+
this.payload = Bytes.from([this.slowRefresh ? 0b1000_0000 : 0]);
|
|
529
|
+
return super.serialize(ctx);
|
|
530
|
+
}
|
|
531
|
+
toLogEntry(ctx) {
|
|
532
|
+
return {
|
|
533
|
+
...super.toLogEntry(ctx),
|
|
534
|
+
message: { "slow refresh": this.slowRefresh },
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
};
|
|
538
|
+
return CentralSceneCCConfigurationSet = _classThis;
|
|
539
|
+
})();
|
|
426
540
|
export { CentralSceneCCConfigurationSet };
|
|
427
541
|
//# sourceMappingURL=CentralSceneCC.js.map
|