@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 SceneControllerConfigurationCC_1, SceneControllerConfigurationCCReport_1;
|
|
8
35
|
function __assertType(argName, typeName, boundHasError) {
|
|
9
36
|
const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
|
|
10
37
|
if (boundHasError()) {
|
|
@@ -66,381 +93,442 @@ export const SceneControllerConfigurationCCValues = Object.freeze({
|
|
|
66
93
|
})),
|
|
67
94
|
}),
|
|
68
95
|
});
|
|
69
|
-
let SceneControllerConfigurationCCAPI =
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
if (value === 0) {
|
|
92
|
-
// Disable Group ID / Scene ID
|
|
93
|
-
return this.disable(propertyKey);
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
// We need to set the dimming duration along with the scene ID
|
|
97
|
-
// Dimming duration is chosen with the following precedence:
|
|
98
|
-
// 1. options.transitionDuration
|
|
99
|
-
// 2. current stored value
|
|
100
|
-
// 3. default value
|
|
101
|
-
const dimmingDuration = Duration.from(options?.transitionDuration)
|
|
102
|
-
?? this.tryGetValueDB()?.getValue(SceneControllerConfigurationCCValues
|
|
103
|
-
.dimmingDuration(propertyKey).endpoint(this.endpoint.index))
|
|
104
|
-
?? Duration.default();
|
|
105
|
-
return this.set(propertyKey, value, dimmingDuration);
|
|
106
|
-
}
|
|
96
|
+
let SceneControllerConfigurationCCAPI = (() => {
|
|
97
|
+
let _classDecorators = [API(CommandClasses["Scene Controller Configuration"])];
|
|
98
|
+
let _classDescriptor;
|
|
99
|
+
let _classExtraInitializers = [];
|
|
100
|
+
let _classThis;
|
|
101
|
+
let _classSuper = CCAPI;
|
|
102
|
+
var SceneControllerConfigurationCCAPI = class extends _classSuper {
|
|
103
|
+
static { _classThis = this; }
|
|
104
|
+
static {
|
|
105
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
106
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
107
|
+
SceneControllerConfigurationCCAPI = _classThis = _classDescriptor.value;
|
|
108
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
109
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
110
|
+
}
|
|
111
|
+
supportsCommand(cmd) {
|
|
112
|
+
switch (cmd) {
|
|
113
|
+
case SceneControllerConfigurationCommand.Get:
|
|
114
|
+
return this.isSinglecast();
|
|
115
|
+
case SceneControllerConfigurationCommand.Set:
|
|
116
|
+
return true; // This is mandatory
|
|
107
117
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
118
|
+
return super.supportsCommand(cmd);
|
|
119
|
+
}
|
|
120
|
+
get [SET_VALUE]() {
|
|
121
|
+
return async function ({ property, propertyKey }, value, options) {
|
|
122
|
+
if (propertyKey == undefined) {
|
|
123
|
+
throwMissingPropertyKey(this.ccId, property);
|
|
111
124
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
throw new ZWaveError(`${getCCName(this.ccId)}: "${property}" could not be set. ${JSON.stringify(value)} is not a valid duration.`, ZWaveErrorCodes.Argument_Invalid);
|
|
125
|
+
else if (typeof propertyKey !== "number") {
|
|
126
|
+
throwUnsupportedPropertyKey(this.ccId, property, propertyKey);
|
|
115
127
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
//
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
128
|
+
if (property === "sceneId") {
|
|
129
|
+
if (typeof value !== "number") {
|
|
130
|
+
throwWrongValueType(this.ccId, property, "number", typeof value);
|
|
131
|
+
}
|
|
132
|
+
if (value === 0) {
|
|
133
|
+
// Disable Group ID / Scene ID
|
|
134
|
+
return this.disable(propertyKey);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
// We need to set the dimming duration along with the scene ID
|
|
138
|
+
// Dimming duration is chosen with the following precedence:
|
|
139
|
+
// 1. options.transitionDuration
|
|
140
|
+
// 2. current stored value
|
|
141
|
+
// 3. default value
|
|
142
|
+
const dimmingDuration = Duration.from(options?.transitionDuration)
|
|
143
|
+
?? this.tryGetValueDB()?.getValue(SceneControllerConfigurationCCValues
|
|
144
|
+
.dimmingDuration(propertyKey).endpoint(this.endpoint.index))
|
|
145
|
+
?? Duration.default();
|
|
146
|
+
return this.set(propertyKey, value, dimmingDuration);
|
|
125
147
|
}
|
|
126
|
-
return;
|
|
127
148
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
throwUnsupportedProperty(this.ccId, property);
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
get [POLL_VALUE]() {
|
|
136
|
-
return async function ({ property, propertyKey }) {
|
|
137
|
-
switch (property) {
|
|
138
|
-
case "sceneId":
|
|
139
|
-
case "dimmingDuration": {
|
|
140
|
-
if (propertyKey == undefined) {
|
|
141
|
-
throwMissingPropertyKey(this.ccId, property);
|
|
149
|
+
else if (property === "dimmingDuration") {
|
|
150
|
+
if (typeof value !== "string" && !(value instanceof Duration)) {
|
|
151
|
+
throwWrongValueType(this.ccId, property, "duration", typeof value);
|
|
142
152
|
}
|
|
143
|
-
|
|
144
|
-
|
|
153
|
+
const dimmingDuration = Duration.from(value);
|
|
154
|
+
if (dimmingDuration == undefined) {
|
|
155
|
+
throw new ZWaveError(`${getCCName(this.ccId)}: "${property}" could not be set. ${JSON.stringify(value)} is not a valid duration.`, ZWaveErrorCodes.Argument_Invalid);
|
|
145
156
|
}
|
|
146
|
-
|
|
157
|
+
const valueDB = this.tryGetValueDB();
|
|
158
|
+
const sceneId = valueDB?.getValue(SceneControllerConfigurationCCValues.sceneId(propertyKey).endpoint(this.endpoint.index));
|
|
159
|
+
if (sceneId == undefined || sceneId === 0) {
|
|
160
|
+
if (valueDB) {
|
|
161
|
+
// Can't actually send dimmingDuration without valid sceneId
|
|
162
|
+
// So we save it in the valueDB without sending it to the node
|
|
163
|
+
const dimmingDurationValueId = SceneControllerConfigurationCCValues
|
|
164
|
+
.dimmingDuration(propertyKey).endpoint(this.endpoint.index);
|
|
165
|
+
valueDB.setValue(dimmingDurationValueId, dimmingDuration);
|
|
166
|
+
}
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
return this.set(propertyKey, sceneId, dimmingDuration);
|
|
147
170
|
}
|
|
148
|
-
|
|
171
|
+
else {
|
|
149
172
|
throwUnsupportedProperty(this.ccId, property);
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
get [POLL_VALUE]() {
|
|
177
|
+
return async function ({ property, propertyKey }) {
|
|
178
|
+
switch (property) {
|
|
179
|
+
case "sceneId":
|
|
180
|
+
case "dimmingDuration": {
|
|
181
|
+
if (propertyKey == undefined) {
|
|
182
|
+
throwMissingPropertyKey(this.ccId, property);
|
|
183
|
+
}
|
|
184
|
+
else if (typeof propertyKey !== "number") {
|
|
185
|
+
throwUnsupportedPropertyKey(this.ccId, property, propertyKey);
|
|
186
|
+
}
|
|
187
|
+
return (await this.get(propertyKey))?.[property];
|
|
188
|
+
}
|
|
189
|
+
default:
|
|
190
|
+
throwUnsupportedProperty(this.ccId, property);
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
async disable(groupId) {
|
|
195
|
+
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
196
|
+
this.assertSupportsCommand(SceneControllerConfigurationCommand, SceneControllerConfigurationCommand.Set);
|
|
197
|
+
return this.set(groupId, 0, new Duration(0, "seconds"));
|
|
198
|
+
}
|
|
199
|
+
async set(groupId, sceneId, dimmingDuration) {
|
|
200
|
+
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
201
|
+
__assertType("sceneId", "number", __assertType__number.bind(void 0, sceneId));
|
|
202
|
+
__assertType("dimmingDuration", undefined, __assertType__optional_su__string__2_eu.bind(void 0, dimmingDuration));
|
|
203
|
+
this.assertSupportsCommand(SceneControllerConfigurationCommand, SceneControllerConfigurationCommand.Set);
|
|
204
|
+
if (!this.endpoint.virtual) {
|
|
205
|
+
const groupCount = SceneControllerConfigurationCC
|
|
206
|
+
.getGroupCountCached(this.host, this.endpoint);
|
|
207
|
+
// The client SHOULD NOT specify group 1 (the life-line group).
|
|
208
|
+
// We don't block it here, because the specs don't forbid it,
|
|
209
|
+
// and it may be needed for some devices.
|
|
210
|
+
if (groupId < 1 || groupId > groupCount) {
|
|
211
|
+
throw new ZWaveError(`${this.constructor.name}: The group ID must be between 1 and the number of supported groups ${groupCount}.`, ZWaveErrorCodes.Argument_Invalid);
|
|
212
|
+
}
|
|
150
213
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
async disable(groupId) {
|
|
154
|
-
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
155
|
-
this.assertSupportsCommand(SceneControllerConfigurationCommand, SceneControllerConfigurationCommand.Set);
|
|
156
|
-
return this.set(groupId, 0, new Duration(0, "seconds"));
|
|
157
|
-
}
|
|
158
|
-
async set(groupId, sceneId, dimmingDuration) {
|
|
159
|
-
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
160
|
-
__assertType("sceneId", "number", __assertType__number.bind(void 0, sceneId));
|
|
161
|
-
__assertType("dimmingDuration", undefined, __assertType__optional_su__string__2_eu.bind(void 0, dimmingDuration));
|
|
162
|
-
this.assertSupportsCommand(SceneControllerConfigurationCommand, SceneControllerConfigurationCommand.Set);
|
|
163
|
-
if (!this.endpoint.virtual) {
|
|
164
|
-
const groupCount = SceneControllerConfigurationCC
|
|
165
|
-
.getGroupCountCached(this.host, this.endpoint);
|
|
166
|
-
// The client SHOULD NOT specify group 1 (the life-line group).
|
|
167
|
-
// We don't block it here, because the specs don't forbid it,
|
|
168
|
-
// and it may be needed for some devices.
|
|
169
|
-
if (groupId < 1 || groupId > groupCount) {
|
|
170
|
-
throw new ZWaveError(`${this.constructor.name}: The group ID must be between 1 and the number of supported groups ${groupCount}.`, ZWaveErrorCodes.Argument_Invalid);
|
|
214
|
+
else if (groupId < 1) {
|
|
215
|
+
throw new ZWaveError(`The group ID must be greater than 0.`, ZWaveErrorCodes.Argument_Invalid);
|
|
171
216
|
}
|
|
217
|
+
const cc = new SceneControllerConfigurationCCSet({
|
|
218
|
+
nodeId: this.endpoint.nodeId,
|
|
219
|
+
endpointIndex: this.endpoint.index,
|
|
220
|
+
groupId,
|
|
221
|
+
sceneId,
|
|
222
|
+
dimmingDuration,
|
|
223
|
+
});
|
|
224
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
172
225
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
const cc = new SceneControllerConfigurationCCGet({
|
|
188
|
-
nodeId: this.endpoint.nodeId,
|
|
189
|
-
endpointIndex: this.endpoint.index,
|
|
190
|
-
groupId: 0,
|
|
191
|
-
});
|
|
192
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
193
|
-
// Return value includes "groupId", because
|
|
194
|
-
// the returned report will include the actual groupId of the
|
|
195
|
-
// last activated groupId / sceneId
|
|
196
|
-
if (response) {
|
|
197
|
-
return pick(response, ["groupId", "sceneId", "dimmingDuration"]);
|
|
226
|
+
async getLastActivated() {
|
|
227
|
+
this.assertSupportsCommand(SceneControllerConfigurationCommand, SceneControllerConfigurationCommand.Get);
|
|
228
|
+
const cc = new SceneControllerConfigurationCCGet({
|
|
229
|
+
nodeId: this.endpoint.nodeId,
|
|
230
|
+
endpointIndex: this.endpoint.index,
|
|
231
|
+
groupId: 0,
|
|
232
|
+
});
|
|
233
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
234
|
+
// Return value includes "groupId", because
|
|
235
|
+
// the returned report will include the actual groupId of the
|
|
236
|
+
// last activated groupId / sceneId
|
|
237
|
+
if (response) {
|
|
238
|
+
return pick(response, ["groupId", "sceneId", "dimmingDuration"]);
|
|
239
|
+
}
|
|
198
240
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
241
|
+
async get(groupId) {
|
|
242
|
+
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
243
|
+
this.assertSupportsCommand(SceneControllerConfigurationCommand, SceneControllerConfigurationCommand.Get);
|
|
244
|
+
if (groupId === 0) {
|
|
245
|
+
throw new ZWaveError(`Invalid group ID 0. To get the last activated group / scene, use getLastActivated() instead.`, ZWaveErrorCodes.Argument_Invalid);
|
|
246
|
+
}
|
|
247
|
+
else if (groupId < 0) {
|
|
248
|
+
throw new ZWaveError(`The group ID must be greater than 0.`, ZWaveErrorCodes.Argument_Invalid);
|
|
249
|
+
}
|
|
250
|
+
const cc = new SceneControllerConfigurationCCGet({
|
|
251
|
+
nodeId: this.endpoint.nodeId,
|
|
252
|
+
endpointIndex: this.endpoint.index,
|
|
253
|
+
groupId,
|
|
254
|
+
});
|
|
255
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
256
|
+
// Since groupId is not allowed to be 0, only Reports with
|
|
257
|
+
// groupId equal to the requested groupId will be accepted,
|
|
258
|
+
// so we can omit groupId from the return.
|
|
259
|
+
if (response) {
|
|
260
|
+
return pick(response, ["sceneId", "dimmingDuration"]);
|
|
261
|
+
}
|
|
220
262
|
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
API(CommandClasses["Scene Controller Configuration"])
|
|
225
|
-
], SceneControllerConfigurationCCAPI);
|
|
263
|
+
};
|
|
264
|
+
return SceneControllerConfigurationCCAPI = _classThis;
|
|
265
|
+
})();
|
|
226
266
|
export { SceneControllerConfigurationCCAPI };
|
|
227
|
-
let SceneControllerConfigurationCC =
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
267
|
+
let SceneControllerConfigurationCC = (() => {
|
|
268
|
+
let _classDecorators = [commandClass(CommandClasses["Scene Controller Configuration"]), implementedVersion(1), ccValues(SceneControllerConfigurationCCValues)];
|
|
269
|
+
let _classDescriptor;
|
|
270
|
+
let _classExtraInitializers = [];
|
|
271
|
+
let _classThis;
|
|
272
|
+
let _classSuper = CommandClass;
|
|
273
|
+
var SceneControllerConfigurationCC = class extends _classSuper {
|
|
274
|
+
static { _classThis = this; }
|
|
275
|
+
static {
|
|
276
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
277
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
278
|
+
SceneControllerConfigurationCC = _classThis = _classDescriptor.value;
|
|
279
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
280
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
281
|
+
}
|
|
282
|
+
determineRequiredCCInterviews() {
|
|
283
|
+
// AssociationCC is required and MUST be interviewed
|
|
284
|
+
// before SceneControllerConfigurationCC to supply groupCount
|
|
285
|
+
return [
|
|
286
|
+
...super.determineRequiredCCInterviews(),
|
|
287
|
+
CommandClasses.Association,
|
|
288
|
+
];
|
|
289
|
+
}
|
|
290
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
291
|
+
async interview(ctx) {
|
|
292
|
+
const node = this.getNode(ctx);
|
|
293
|
+
const endpoint = this.getEndpoint(ctx);
|
|
247
294
|
ctx.logNode(node.id, {
|
|
248
295
|
endpoint: this.endpointIndex,
|
|
249
|
-
message: `
|
|
296
|
+
message: `Interviewing ${this.ccName}...`,
|
|
250
297
|
direction: "none",
|
|
251
|
-
level: "warn",
|
|
252
298
|
});
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
299
|
+
const groupCount = SceneControllerConfigurationCC.getGroupCountCached(ctx, endpoint);
|
|
300
|
+
if (groupCount === 0) {
|
|
301
|
+
ctx.logNode(node.id, {
|
|
302
|
+
endpoint: this.endpointIndex,
|
|
303
|
+
message: `skipping Scene Controller Configuration interview because Association group count is unknown`,
|
|
304
|
+
direction: "none",
|
|
305
|
+
level: "warn",
|
|
306
|
+
});
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
// Create metadata for each scene, but don't query their actual configuration
|
|
310
|
+
// since some devices only support setting scenes
|
|
311
|
+
for (let groupId = 1; groupId <= groupCount; groupId++) {
|
|
312
|
+
const sceneIdValue = SceneControllerConfigurationCCValues.sceneId(groupId);
|
|
313
|
+
this.ensureMetadata(ctx, sceneIdValue);
|
|
314
|
+
const dimmingDurationValue = SceneControllerConfigurationCCValues
|
|
315
|
+
.dimmingDuration(groupId);
|
|
316
|
+
this.ensureMetadata(ctx, dimmingDurationValue);
|
|
317
|
+
}
|
|
318
|
+
// Remember that the interview is complete
|
|
319
|
+
this.setInterviewComplete(ctx, true);
|
|
263
320
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
priority: MessagePriority.NodeQuery,
|
|
272
|
-
});
|
|
273
|
-
const groupCount = SceneControllerConfigurationCC_1.getGroupCountCached(ctx, endpoint);
|
|
274
|
-
ctx.logNode(node.id, {
|
|
275
|
-
message: "querying all scene controller configurations...",
|
|
276
|
-
direction: "outbound",
|
|
277
|
-
});
|
|
278
|
-
for (let groupId = 1; groupId <= groupCount; groupId++) {
|
|
321
|
+
async refreshValues(ctx) {
|
|
322
|
+
const node = this.getNode(ctx);
|
|
323
|
+
const endpoint = this.getEndpoint(ctx);
|
|
324
|
+
const api = CCAPI.create(CommandClasses["Scene Controller Configuration"], ctx, endpoint).withOptions({
|
|
325
|
+
priority: MessagePriority.NodeQuery,
|
|
326
|
+
});
|
|
327
|
+
const groupCount = SceneControllerConfigurationCC.getGroupCountCached(ctx, endpoint);
|
|
279
328
|
ctx.logNode(node.id, {
|
|
280
|
-
|
|
281
|
-
message: `querying scene configuration for group #${groupId}...`,
|
|
329
|
+
message: "querying all scene controller configurations...",
|
|
282
330
|
direction: "outbound",
|
|
283
331
|
});
|
|
284
|
-
|
|
285
|
-
if (group != undefined) {
|
|
286
|
-
const logMessage = `received scene configuration for group #${groupId}:
|
|
287
|
-
scene ID: ${group.sceneId}
|
|
288
|
-
dimming duration: ${group.dimmingDuration.toString()}`;
|
|
332
|
+
for (let groupId = 1; groupId <= groupCount; groupId++) {
|
|
289
333
|
ctx.logNode(node.id, {
|
|
290
334
|
endpoint: this.endpointIndex,
|
|
291
|
-
message:
|
|
292
|
-
direction: "
|
|
335
|
+
message: `querying scene configuration for group #${groupId}...`,
|
|
336
|
+
direction: "outbound",
|
|
293
337
|
});
|
|
338
|
+
const group = await api.get(groupId);
|
|
339
|
+
if (group != undefined) {
|
|
340
|
+
const logMessage = `received scene configuration for group #${groupId}:
|
|
341
|
+
scene ID: ${group.sceneId}
|
|
342
|
+
dimming duration: ${group.dimmingDuration.toString()}`;
|
|
343
|
+
ctx.logNode(node.id, {
|
|
344
|
+
endpoint: this.endpointIndex,
|
|
345
|
+
message: logMessage,
|
|
346
|
+
direction: "inbound",
|
|
347
|
+
});
|
|
348
|
+
}
|
|
294
349
|
}
|
|
295
350
|
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
commandClass(CommandClasses["Scene Controller Configuration"]),
|
|
311
|
-
implementedVersion(1),
|
|
312
|
-
ccValues(SceneControllerConfigurationCCValues)
|
|
313
|
-
], SceneControllerConfigurationCC);
|
|
351
|
+
/**
|
|
352
|
+
* Returns the number of association groups reported by the node.
|
|
353
|
+
* This only works AFTER the node has been interviewed by this CC
|
|
354
|
+
* or the AssociationCC.
|
|
355
|
+
*/
|
|
356
|
+
static getGroupCountCached(ctx, endpoint) {
|
|
357
|
+
return ctx.getDeviceConfig?.(endpoint.nodeId)?.compat
|
|
358
|
+
?.forceSceneControllerGroupCount
|
|
359
|
+
?? AssociationCC.getGroupCountCached(ctx, endpoint)
|
|
360
|
+
?? 0;
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
return SceneControllerConfigurationCC = _classThis;
|
|
364
|
+
})();
|
|
314
365
|
export { SceneControllerConfigurationCC };
|
|
315
|
-
let SceneControllerConfigurationCCSet =
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
366
|
+
let SceneControllerConfigurationCCSet = (() => {
|
|
367
|
+
let _classDecorators = [CCCommand(SceneControllerConfigurationCommand.Set), useSupervision()];
|
|
368
|
+
let _classDescriptor;
|
|
369
|
+
let _classExtraInitializers = [];
|
|
370
|
+
let _classThis;
|
|
371
|
+
let _classSuper = SceneControllerConfigurationCC;
|
|
372
|
+
var SceneControllerConfigurationCCSet = class extends _classSuper {
|
|
373
|
+
static { _classThis = this; }
|
|
374
|
+
static {
|
|
375
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
376
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
377
|
+
SceneControllerConfigurationCCSet = _classThis = _classDescriptor.value;
|
|
378
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
379
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
380
|
+
}
|
|
381
|
+
constructor(options) {
|
|
382
|
+
super(options);
|
|
383
|
+
this.groupId = options.groupId;
|
|
384
|
+
this.sceneId = options.sceneId;
|
|
385
|
+
// if dimmingDuration was missing, use default duration.
|
|
386
|
+
this.dimmingDuration = Duration.from(options.dimmingDuration)
|
|
387
|
+
?? Duration.default();
|
|
388
|
+
}
|
|
389
|
+
static from(_raw, _ctx) {
|
|
390
|
+
// TODO: Deserialize payload
|
|
391
|
+
throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
392
|
+
// return new SceneControllerConfigurationCCSet({
|
|
393
|
+
// nodeId: ctx.sourceNodeId,
|
|
394
|
+
// });
|
|
395
|
+
}
|
|
396
|
+
groupId;
|
|
397
|
+
sceneId;
|
|
398
|
+
dimmingDuration;
|
|
399
|
+
serialize(ctx) {
|
|
400
|
+
this.payload = Bytes.from([
|
|
401
|
+
this.groupId,
|
|
402
|
+
this.sceneId,
|
|
403
|
+
this.dimmingDuration.serializeSet(),
|
|
404
|
+
]);
|
|
405
|
+
return super.serialize(ctx);
|
|
406
|
+
}
|
|
407
|
+
toLogEntry(ctx) {
|
|
408
|
+
return {
|
|
409
|
+
...super.toLogEntry(ctx),
|
|
410
|
+
message: {
|
|
411
|
+
"group id": this.groupId,
|
|
412
|
+
"scene id": this.sceneId,
|
|
413
|
+
"dimming duration": this.dimmingDuration.toString(),
|
|
414
|
+
},
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
return SceneControllerConfigurationCCSet = _classThis;
|
|
419
|
+
})();
|
|
357
420
|
export { SceneControllerConfigurationCCSet };
|
|
358
|
-
let SceneControllerConfigurationCCReport =
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
421
|
+
let SceneControllerConfigurationCCReport = (() => {
|
|
422
|
+
let _classDecorators = [CCCommand(SceneControllerConfigurationCommand.Report)];
|
|
423
|
+
let _classDescriptor;
|
|
424
|
+
let _classExtraInitializers = [];
|
|
425
|
+
let _classThis;
|
|
426
|
+
let _classSuper = SceneControllerConfigurationCC;
|
|
427
|
+
var SceneControllerConfigurationCCReport = class extends _classSuper {
|
|
428
|
+
static { _classThis = this; }
|
|
429
|
+
static {
|
|
430
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
431
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
432
|
+
SceneControllerConfigurationCCReport = _classThis = _classDescriptor.value;
|
|
433
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
434
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
435
|
+
}
|
|
436
|
+
constructor(options) {
|
|
437
|
+
super(options);
|
|
438
|
+
// TODO: Check implementation:
|
|
439
|
+
this.groupId = options.groupId;
|
|
440
|
+
this.sceneId = options.sceneId;
|
|
441
|
+
this.dimmingDuration = options.dimmingDuration;
|
|
442
|
+
}
|
|
443
|
+
static from(raw, ctx) {
|
|
444
|
+
validatePayload(raw.payload.length >= 3);
|
|
445
|
+
const groupId = raw.payload[0];
|
|
446
|
+
const sceneId = raw.payload[1];
|
|
447
|
+
const dimmingDuration = Duration.parseReport(raw.payload[2])
|
|
448
|
+
?? Duration.unknown();
|
|
449
|
+
return new this({
|
|
450
|
+
nodeId: ctx.sourceNodeId,
|
|
451
|
+
groupId,
|
|
452
|
+
sceneId,
|
|
453
|
+
dimmingDuration,
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
groupId;
|
|
457
|
+
sceneId;
|
|
458
|
+
dimmingDuration;
|
|
459
|
+
persistValues(ctx) {
|
|
460
|
+
if (!super.persistValues(ctx))
|
|
461
|
+
return false;
|
|
462
|
+
// If groupId = 0, values are meaningless
|
|
463
|
+
if (this.groupId === 0)
|
|
464
|
+
return false;
|
|
465
|
+
const sceneIdValue = SceneControllerConfigurationCCValues.sceneId(this.groupId);
|
|
466
|
+
this.ensureMetadata(ctx, sceneIdValue);
|
|
467
|
+
const dimmingDurationValue = SceneControllerConfigurationCCValues
|
|
468
|
+
.dimmingDuration(this.groupId);
|
|
469
|
+
this.ensureMetadata(ctx, dimmingDurationValue);
|
|
470
|
+
this.setValue(ctx, sceneIdValue, this.sceneId);
|
|
471
|
+
this.setValue(ctx, dimmingDurationValue, this.dimmingDuration);
|
|
472
|
+
return true;
|
|
473
|
+
}
|
|
474
|
+
toLogEntry(ctx) {
|
|
475
|
+
return {
|
|
476
|
+
...super.toLogEntry(ctx),
|
|
477
|
+
message: {
|
|
478
|
+
"group id": this.groupId,
|
|
479
|
+
"scene id": this.sceneId,
|
|
480
|
+
"dimming duration": this.dimmingDuration.toString(),
|
|
481
|
+
},
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
};
|
|
485
|
+
return SceneControllerConfigurationCCReport = _classThis;
|
|
486
|
+
})();
|
|
411
487
|
export { SceneControllerConfigurationCCReport };
|
|
412
488
|
function testResponseForSceneControllerConfigurationGet(sent, received) {
|
|
413
489
|
// We expect a Scene Controller Configuration Report that matches
|
|
414
490
|
// the requested groupId, unless groupId 0 was requested
|
|
415
491
|
return sent.groupId === 0 || received.groupId === sent.groupId;
|
|
416
492
|
}
|
|
417
|
-
let SceneControllerConfigurationCCGet =
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
493
|
+
let SceneControllerConfigurationCCGet = (() => {
|
|
494
|
+
let _classDecorators = [CCCommand(SceneControllerConfigurationCommand.Get), expectedCCResponse(SceneControllerConfigurationCCReport, testResponseForSceneControllerConfigurationGet)];
|
|
495
|
+
let _classDescriptor;
|
|
496
|
+
let _classExtraInitializers = [];
|
|
497
|
+
let _classThis;
|
|
498
|
+
let _classSuper = SceneControllerConfigurationCC;
|
|
499
|
+
var SceneControllerConfigurationCCGet = class extends _classSuper {
|
|
500
|
+
static { _classThis = this; }
|
|
501
|
+
static {
|
|
502
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
503
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
504
|
+
SceneControllerConfigurationCCGet = _classThis = _classDescriptor.value;
|
|
505
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
506
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
507
|
+
}
|
|
508
|
+
constructor(options) {
|
|
509
|
+
super(options);
|
|
510
|
+
this.groupId = options.groupId;
|
|
511
|
+
}
|
|
512
|
+
static from(_raw, _ctx) {
|
|
513
|
+
// TODO: Deserialize payload
|
|
514
|
+
throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
515
|
+
// return new SceneControllerConfigurationCCGet({
|
|
516
|
+
// nodeId: ctx.sourceNodeId,
|
|
517
|
+
// });
|
|
518
|
+
}
|
|
519
|
+
groupId;
|
|
520
|
+
serialize(ctx) {
|
|
521
|
+
this.payload = Bytes.from([this.groupId]);
|
|
522
|
+
return super.serialize(ctx);
|
|
523
|
+
}
|
|
524
|
+
toLogEntry(ctx) {
|
|
525
|
+
return {
|
|
526
|
+
...super.toLogEntry(ctx),
|
|
527
|
+
message: { "group id": this.groupId },
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
};
|
|
531
|
+
return SceneControllerConfigurationCCGet = _classThis;
|
|
532
|
+
})();
|
|
445
533
|
export { SceneControllerConfigurationCCGet };
|
|
446
534
|
//# sourceMappingURL=SceneControllerConfigurationCC.js.map
|