@zwave-js/cc 15.0.0-beta.0 → 15.0.0-beta.1
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.d.ts +79 -161
- package/build/cjs/cc/AlarmSensorCC.js +12 -50
- package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
- package/build/cjs/cc/AssociationCC.d.ts +63 -199
- package/build/cjs/cc/AssociationCC.js +9 -22
- package/build/cjs/cc/AssociationCC.js.map +2 -2
- package/build/cjs/cc/AssociationGroupInfoCC.d.ts +66 -166
- package/build/cjs/cc/AssociationGroupInfoCC.js +11 -22
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
- package/build/cjs/cc/BarrierOperatorCC.d.ts +86 -294
- package/build/cjs/cc/BarrierOperatorCC.js +12 -44
- package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
- package/build/cjs/cc/BasicCC.d.ts +85 -331
- package/build/cjs/cc/BasicCC.js +15 -46
- package/build/cjs/cc/BasicCC.js.map +2 -2
- package/build/cjs/cc/BatteryCC.d.ts +237 -835
- package/build/cjs/cc/BatteryCC.js +7 -84
- package/build/cjs/cc/BatteryCC.js.map +2 -2
- package/build/cjs/cc/BinarySensorCC.d.ts +34 -99
- package/build/cjs/cc/BinarySensorCC.js +9 -29
- package/build/cjs/cc/BinarySensorCC.js.map +2 -2
- package/build/cjs/cc/BinarySwitchCC.d.ts +45 -197
- package/build/cjs/cc/BinarySwitchCC.js +6 -22
- package/build/cjs/cc/BinarySwitchCC.js.map +2 -2
- package/build/cjs/cc/CentralSceneCC.d.ts +77 -296
- package/build/cjs/cc/CentralSceneCC.js +7 -30
- package/build/cjs/cc/CentralSceneCC.js.map +2 -2
- package/build/cjs/cc/ClimateControlScheduleCC.d.ts +45 -160
- package/build/cjs/cc/ClimateControlScheduleCC.js +5 -24
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +2 -2
- package/build/cjs/cc/ColorSwitchCC.d.ts +130 -457
- package/build/cjs/cc/ColorSwitchCC.js +23 -75
- package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
- package/build/cjs/cc/ConfigurationCC.d.ts +32 -100
- package/build/cjs/cc/ConfigurationCC.js +11 -31
- package/build/cjs/cc/ConfigurationCC.js.map +2 -2
- package/build/cjs/cc/DoorLockCC.d.ts +512 -1823
- package/build/cjs/cc/DoorLockCC.js +51 -156
- package/build/cjs/cc/DoorLockCC.js.map +2 -2
- package/build/cjs/cc/DoorLockLoggingCC.d.ts +11 -63
- package/build/cjs/cc/DoorLockLoggingCC.js +4 -8
- package/build/cjs/cc/DoorLockLoggingCC.js.map +2 -2
- package/build/cjs/cc/EnergyProductionCC.d.ts +14 -29
- package/build/cjs/cc/EnergyProductionCC.js +5 -17
- package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
- package/build/cjs/cc/EntryControlCC.d.ts +73 -324
- package/build/cjs/cc/EntryControlCC.js +9 -36
- package/build/cjs/cc/EntryControlCC.js.map +2 -2
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +78 -390
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +5 -26
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlModeCC.d.ts +31 -131
- package/build/cjs/cc/HumidityControlModeCC.js +6 -15
- package/build/cjs/cc/HumidityControlModeCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +17 -65
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +4 -12
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.d.ts +51 -128
- package/build/cjs/cc/HumidityControlSetpointCC.js +10 -28
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
- package/build/cjs/cc/IndicatorCC.d.ts +123 -365
- package/build/cjs/cc/IndicatorCC.js +15 -61
- package/build/cjs/cc/IndicatorCC.js.map +2 -2
- package/build/cjs/cc/IrrigationCC.d.ts +826 -2317
- package/build/cjs/cc/IrrigationCC.js +29 -233
- package/build/cjs/cc/IrrigationCC.js.map +2 -2
- package/build/cjs/cc/LanguageCC.d.ts +31 -133
- package/build/cjs/cc/LanguageCC.js +4 -15
- package/build/cjs/cc/LanguageCC.js.map +2 -2
- package/build/cjs/cc/LockCC.d.ts +14 -64
- package/build/cjs/cc/LockCC.js +4 -12
- package/build/cjs/cc/LockCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.d.ts +77 -239
- package/build/cjs/cc/ManufacturerSpecificCC.js +5 -26
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +2 -2
- package/build/cjs/cc/MeterCC.d.ts +119 -393
- package/build/cjs/cc/MeterCC.js +25 -69
- package/build/cjs/cc/MeterCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelAssociationCC.d.ts +66 -166
- package/build/cjs/cc/MultiChannelAssociationCC.js +10 -23
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelCC.d.ts +119 -499
- package/build/cjs/cc/MultiChannelCC.js +18 -46
- package/build/cjs/cc/MultiChannelCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSensorCC.d.ts +46 -130
- package/build/cjs/cc/MultilevelSensorCC.js +12 -33
- package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +160 -525
- package/build/cjs/cc/MultilevelSwitchCC.js +13 -107
- package/build/cjs/cc/MultilevelSwitchCC.js.map +2 -2
- package/build/cjs/cc/NodeNamingCC.d.ts +33 -135
- package/build/cjs/cc/NodeNamingCC.js +5 -16
- package/build/cjs/cc/NodeNamingCC.js.map +2 -2
- package/build/cjs/cc/NotificationCC.d.ts +262 -702
- package/build/cjs/cc/NotificationCC.js +29 -112
- package/build/cjs/cc/NotificationCC.js.map +2 -2
- package/build/cjs/cc/ProtectionCC.d.ts +118 -524
- package/build/cjs/cc/ProtectionCC.js +15 -50
- package/build/cjs/cc/ProtectionCC.js.map +2 -2
- package/build/cjs/cc/SceneActivationCC.d.ts +33 -132
- package/build/cjs/cc/SceneActivationCC.js +4 -17
- package/build/cjs/cc/SceneActivationCC.js.map +2 -2
- package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +34 -61
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +9 -21
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +2 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +34 -61
- package/build/cjs/cc/SceneControllerConfigurationCC.js +10 -22
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
- package/build/cjs/cc/ScheduleEntryLockCC.d.ts +95 -299
- package/build/cjs/cc/ScheduleEntryLockCC.js +13 -30
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
- package/build/cjs/cc/SoundSwitchCC.d.ts +72 -261
- package/build/cjs/cc/SoundSwitchCC.js +11 -43
- package/build/cjs/cc/SoundSwitchCC.js.map +2 -2
- package/build/cjs/cc/SupervisionCC.d.ts +17 -33
- package/build/cjs/cc/SupervisionCC.js +4 -9
- package/build/cjs/cc/SupervisionCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanModeCC.d.ts +44 -195
- package/build/cjs/cc/ThermostatFanModeCC.js +8 -21
- package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanStateCC.d.ts +17 -65
- package/build/cjs/cc/ThermostatFanStateCC.js +4 -12
- package/build/cjs/cc/ThermostatFanStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatModeCC.d.ts +44 -195
- package/build/cjs/cc/ThermostatModeCC.js +8 -21
- package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +17 -65
- package/build/cjs/cc/ThermostatOperatingStateCC.js +4 -12
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +49 -129
- package/build/cjs/cc/ThermostatSetpointCC.js +10 -25
- package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
- package/build/cjs/cc/TimeParametersCC.d.ts +12 -63
- package/build/cjs/cc/TimeParametersCC.js +4 -11
- package/build/cjs/cc/TimeParametersCC.js.map +2 -2
- package/build/cjs/cc/UserCodeCC.d.ts +311 -1066
- package/build/cjs/cc/UserCodeCC.js +33 -98
- package/build/cjs/cc/UserCodeCC.js.map +2 -2
- package/build/cjs/cc/VersionCC.d.ts +289 -1003
- package/build/cjs/cc/VersionCC.js +7 -98
- package/build/cjs/cc/VersionCC.js.map +2 -2
- package/build/cjs/cc/WakeUpCC.d.ts +49 -201
- package/build/cjs/cc/WakeUpCC.js +6 -26
- package/build/cjs/cc/WakeUpCC.js.map +2 -2
- package/build/cjs/cc/WindowCoveringCC.d.ts +126 -220
- package/build/cjs/cc/WindowCoveringCC.js +16 -128
- package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
- package/build/cjs/cc/ZWavePlusCC.d.ts +69 -329
- package/build/cjs/cc/ZWavePlusCC.js +4 -25
- package/build/cjs/cc/ZWavePlusCC.js.map +2 -2
- package/build/cjs/cc/_CCValues.generated.d.ts +15814 -0
- package/build/cjs/cc/_CCValues.generated.js +8723 -0
- package/build/cjs/cc/_CCValues.generated.js.map +7 -0
- package/build/cjs/lib/CCValueUtils.d.ts +14 -0
- package/build/cjs/lib/CCValueUtils.js +93 -0
- package/build/cjs/lib/CCValueUtils.js.map +7 -0
- package/build/cjs/lib/Values.d.ts +6 -105
- package/build/cjs/lib/Values.js +13 -107
- package/build/cjs/lib/Values.js.map +3 -3
- package/build/esm/cc/AlarmSensorCC.d.ts +79 -161
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +2 -39
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts +63 -199
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +2 -14
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts +66 -166
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +2 -13
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts +86 -294
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +2 -34
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts +85 -331
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +2 -32
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts +237 -835
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +2 -78
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts +34 -99
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +2 -16
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts +45 -197
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +2 -17
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts +77 -296
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +2 -26
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts +45 -160
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +2 -23
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts +130 -457
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +2 -52
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts +32 -100
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +2 -15
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts +512 -1823
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +9 -127
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts +11 -63
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +2 -5
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.d.ts +14 -29
- package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +2 -13
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts +73 -324
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +2 -28
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +78 -390
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +2 -23
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts +31 -131
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +2 -10
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +17 -65
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +2 -9
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts +51 -128
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +2 -19
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.d.ts +123 -365
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
- package/build/esm/cc/IndicatorCC.js +2 -43
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts +826 -2317
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +3 -222
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts +31 -133
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +2 -12
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts +14 -64
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +2 -9
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +0 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts +77 -239
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +2 -24
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts +119 -393
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +3 -49
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts +66 -166
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +2 -14
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts +119 -499
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +2 -30
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts +46 -130
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +2 -22
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts +160 -525
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +5 -101
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts +33 -135
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +2 -12
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts +262 -702
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +3 -85
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts +118 -524
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +2 -36
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.d.ts +33 -132
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +2 -14
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +34 -61
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +2 -14
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts +34 -61
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +2 -14
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts +95 -299
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +2 -17
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts +72 -261
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +2 -33
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.d.ts +17 -33
- package/build/esm/cc/SupervisionCC.d.ts.map +1 -1
- package/build/esm/cc/SupervisionCC.js +2 -7
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts +44 -195
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +2 -14
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts +17 -65
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +2 -9
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts +44 -195
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +2 -14
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts +17 -65
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +2 -9
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts +49 -129
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +2 -16
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts +12 -63
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +2 -8
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts +311 -1066
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +2 -60
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts +289 -1003
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +2 -92
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts +49 -201
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +2 -21
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts +126 -220
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +3 -103
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts +69 -329
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +2 -25
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/_CCValues.generated.d.ts +15814 -0
- package/build/esm/cc/_CCValues.generated.d.ts.map +1 -0
- package/build/esm/cc/_CCValues.generated.js +9187 -0
- package/build/esm/cc/_CCValues.generated.js.map +1 -0
- package/build/esm/lib/CCValueUtils.d.ts +14 -0
- package/build/esm/lib/CCValueUtils.d.ts.map +1 -0
- package/build/esm/lib/CCValueUtils.js +62 -0
- package/build/esm/lib/CCValueUtils.js.map +1 -0
- package/build/esm/lib/Values.d.ts +6 -105
- package/build/esm/lib/Values.d.ts.map +1 -1
- package/build/esm/lib/Values.js +7 -104
- package/build/esm/lib/Values.js.map +1 -1
- package/package.json +9 -7
|
@@ -42,7 +42,7 @@ __export(ProtectionCC_exports, {
|
|
|
42
42
|
ProtectionCCTimeoutGet: () => ProtectionCCTimeoutGet,
|
|
43
43
|
ProtectionCCTimeoutReport: () => ProtectionCCTimeoutReport,
|
|
44
44
|
ProtectionCCTimeoutSet: () => ProtectionCCTimeoutSet,
|
|
45
|
-
ProtectionCCValues: () => ProtectionCCValues
|
|
45
|
+
ProtectionCCValues: () => import_CCValues_generated.ProtectionCCValues
|
|
46
46
|
});
|
|
47
47
|
module.exports = __toCommonJS(ProtectionCC_exports);
|
|
48
48
|
var __validateArgs = __toESM(require("./ProtectionCC._validateArgs.js"), 1);
|
|
@@ -54,6 +54,7 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
54
54
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
55
55
|
var import_Values = require("../lib/Values.js");
|
|
56
56
|
var import_Types = require("../lib/_Types.js");
|
|
57
|
+
var import_CCValues_generated = require("./_CCValues.generated.js");
|
|
57
58
|
var __runInitializers = function(thisArg, initializers, value) {
|
|
58
59
|
var useValue = arguments.length > 2;
|
|
59
60
|
for (var i = 0; i < initializers.length; i++) {
|
|
@@ -95,42 +96,6 @@ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializ
|
|
|
95
96
|
done = true;
|
|
96
97
|
};
|
|
97
98
|
const { validateArgs_ProtectionCCAPI_set, validateArgs_ProtectionCCAPI_setExclusiveControl, validateArgs_ProtectionCCAPI_setTimeout } = __validateArgs;
|
|
98
|
-
const ProtectionCCValues = Object.freeze({
|
|
99
|
-
...import_Values.V.defineStaticCCValues(import_safe.CommandClasses.Protection, {
|
|
100
|
-
...import_Values.V.staticProperty("exclusiveControlNodeId", {
|
|
101
|
-
...import_safe.ValueMetadata.UInt8,
|
|
102
|
-
min: 1,
|
|
103
|
-
max: import_safe.MAX_NODES,
|
|
104
|
-
label: "Node ID with exclusive control"
|
|
105
|
-
}, { minVersion: 2 }),
|
|
106
|
-
...import_Values.V.staticPropertyWithName("localProtectionState", "local", {
|
|
107
|
-
...import_safe.ValueMetadata.Number,
|
|
108
|
-
label: "Local protection state",
|
|
109
|
-
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.LocalProtectionState)
|
|
110
|
-
}),
|
|
111
|
-
...import_Values.V.staticPropertyWithName("rfProtectionState", "rf", {
|
|
112
|
-
...import_safe.ValueMetadata.Number,
|
|
113
|
-
label: "RF protection state",
|
|
114
|
-
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.RFProtectionState)
|
|
115
|
-
}, { minVersion: 2 }),
|
|
116
|
-
...import_Values.V.staticProperty("timeout", {
|
|
117
|
-
...import_safe.ValueMetadata.UInt8,
|
|
118
|
-
label: "RF protection timeout"
|
|
119
|
-
}, { minVersion: 2 }),
|
|
120
|
-
...import_Values.V.staticProperty("supportsExclusiveControl", void 0, {
|
|
121
|
-
internal: true
|
|
122
|
-
}),
|
|
123
|
-
...import_Values.V.staticProperty("supportsTimeout", void 0, {
|
|
124
|
-
internal: true
|
|
125
|
-
}),
|
|
126
|
-
...import_Values.V.staticProperty("supportedLocalStates", void 0, {
|
|
127
|
-
internal: true
|
|
128
|
-
}),
|
|
129
|
-
...import_Values.V.staticProperty("supportedRFStates", void 0, {
|
|
130
|
-
internal: true
|
|
131
|
-
})
|
|
132
|
-
})
|
|
133
|
-
});
|
|
134
99
|
let ProtectionCCAPI = (() => {
|
|
135
100
|
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses.Protection)];
|
|
136
101
|
let _classDescriptor;
|
|
@@ -172,11 +137,11 @@ let ProtectionCCAPI = (() => {
|
|
|
172
137
|
return this.version >= 2 && this.isSinglecast();
|
|
173
138
|
case import_Types.ProtectionCommand.TimeoutGet:
|
|
174
139
|
case import_Types.ProtectionCommand.TimeoutSet: {
|
|
175
|
-
return this.isSinglecast() && this.tryGetValueDB()?.getValue(ProtectionCCValues.supportsTimeout.endpoint(this.endpoint.index));
|
|
140
|
+
return this.isSinglecast() && this.tryGetValueDB()?.getValue(import_CCValues_generated.ProtectionCCValues.supportsTimeout.endpoint(this.endpoint.index));
|
|
176
141
|
}
|
|
177
142
|
case import_Types.ProtectionCommand.ExclusiveControlGet:
|
|
178
143
|
case import_Types.ProtectionCommand.ExclusiveControlSet: {
|
|
179
|
-
return this.isSinglecast() && this.tryGetValueDB()?.getValue(ProtectionCCValues.supportsExclusiveControl.endpoint(this.endpoint.index));
|
|
144
|
+
return this.isSinglecast() && this.tryGetValueDB()?.getValue(import_CCValues_generated.ProtectionCCValues.supportsExclusiveControl.endpoint(this.endpoint.index));
|
|
180
145
|
}
|
|
181
146
|
}
|
|
182
147
|
return super.supportsCommand(cmd);
|
|
@@ -188,13 +153,13 @@ let ProtectionCCAPI = (() => {
|
|
|
188
153
|
if (typeof value !== "number") {
|
|
189
154
|
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
190
155
|
}
|
|
191
|
-
const rf = valueDB?.getValue(ProtectionCCValues.rfProtectionState.endpoint(this.endpoint.index));
|
|
156
|
+
const rf = valueDB?.getValue(import_CCValues_generated.ProtectionCCValues.rfProtectionState.endpoint(this.endpoint.index));
|
|
192
157
|
return this.set(value, rf);
|
|
193
158
|
} else if (property === "rf") {
|
|
194
159
|
if (typeof value !== "number") {
|
|
195
160
|
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
196
161
|
}
|
|
197
|
-
const local = valueDB?.getValue(ProtectionCCValues.localProtectionState.endpoint(this.endpoint.index));
|
|
162
|
+
const local = valueDB?.getValue(import_CCValues_generated.ProtectionCCValues.localProtectionState.endpoint(this.endpoint.index));
|
|
198
163
|
return this.set(local ?? import_Types.LocalProtectionState.Unprotected, value);
|
|
199
164
|
} else if (property === "exclusiveControlNodeId") {
|
|
200
165
|
if (typeof value !== "number") {
|
|
@@ -302,7 +267,7 @@ let ProtectionCCAPI = (() => {
|
|
|
302
267
|
return ProtectionCCAPI2 = _classThis;
|
|
303
268
|
})();
|
|
304
269
|
let ProtectionCC = (() => {
|
|
305
|
-
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses.Protection), (0, import_CommandClassDecorators.implementedVersion)(2), (0, import_CommandClassDecorators.ccValues)(ProtectionCCValues)];
|
|
270
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses.Protection), (0, import_CommandClassDecorators.implementedVersion)(2), (0, import_CommandClassDecorators.ccValues)(import_CCValues_generated.ProtectionCCValues)];
|
|
306
271
|
let _classDescriptor;
|
|
307
272
|
let _classExtraInitializers = [];
|
|
308
273
|
let _classThis;
|
|
@@ -365,8 +330,8 @@ RF protection states: ${resp.supportedRFStates.map((local) => (0, import_safe
|
|
|
365
330
|
const api = import_API.CCAPI.create(import_safe.CommandClasses.Protection, ctx, endpoint).withOptions({
|
|
366
331
|
priority: import_safe.MessagePriority.NodeQuery
|
|
367
332
|
});
|
|
368
|
-
const supportsExclusiveControl = !!this.getValue(ctx, ProtectionCCValues.supportsExclusiveControl);
|
|
369
|
-
const supportsTimeout = !!this.getValue(ctx, ProtectionCCValues.supportsTimeout);
|
|
333
|
+
const supportsExclusiveControl = !!this.getValue(ctx, import_CCValues_generated.ProtectionCCValues.supportsExclusiveControl);
|
|
334
|
+
const supportsTimeout = !!this.getValue(ctx, import_CCValues_generated.ProtectionCCValues.supportsTimeout);
|
|
370
335
|
ctx.logNode(node.id, {
|
|
371
336
|
message: "querying protection status...",
|
|
372
337
|
direction: "outbound"
|
|
@@ -471,7 +436,7 @@ let ProtectionCCSet = (() => {
|
|
|
471
436
|
return ProtectionCCSet2 = _classThis;
|
|
472
437
|
})();
|
|
473
438
|
let ProtectionCCReport = (() => {
|
|
474
|
-
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("local", ProtectionCCValues.localProtectionState), (0, import_CommandClassDecorators.ccValueProperty)("rf", ProtectionCCValues.rfProtectionState)];
|
|
439
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("local", import_CCValues_generated.ProtectionCCValues.localProtectionState), (0, import_CommandClassDecorators.ccValueProperty)("rf", import_CCValues_generated.ProtectionCCValues.rfProtectionState)];
|
|
475
440
|
let _classDescriptor;
|
|
476
441
|
let _classExtraInitializers = [];
|
|
477
442
|
let _classThis;
|
|
@@ -549,7 +514,7 @@ let ProtectionCCGet = (() => {
|
|
|
549
514
|
return ProtectionCCGet2 = _classThis;
|
|
550
515
|
})();
|
|
551
516
|
let ProtectionCCSupportedReport = (() => {
|
|
552
|
-
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.SupportedReport), (0, import_CommandClassDecorators.ccValueProperty)("supportsExclusiveControl", ProtectionCCValues.supportsExclusiveControl), (0, import_CommandClassDecorators.ccValueProperty)("supportsTimeout", ProtectionCCValues.supportsTimeout), (0, import_CommandClassDecorators.ccValueProperty)("supportedLocalStates", ProtectionCCValues.supportedLocalStates), (0, import_CommandClassDecorators.ccValueProperty)("supportedRFStates", ProtectionCCValues.supportedRFStates)];
|
|
517
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.SupportedReport), (0, import_CommandClassDecorators.ccValueProperty)("supportsExclusiveControl", import_CCValues_generated.ProtectionCCValues.supportsExclusiveControl), (0, import_CommandClassDecorators.ccValueProperty)("supportsTimeout", import_CCValues_generated.ProtectionCCValues.supportsTimeout), (0, import_CommandClassDecorators.ccValueProperty)("supportedLocalStates", import_CCValues_generated.ProtectionCCValues.supportedLocalStates), (0, import_CommandClassDecorators.ccValueProperty)("supportedRFStates", import_CCValues_generated.ProtectionCCValues.supportedRFStates)];
|
|
553
518
|
let _classDescriptor;
|
|
554
519
|
let _classExtraInitializers = [];
|
|
555
520
|
let _classThis;
|
|
@@ -592,12 +557,12 @@ let ProtectionCCSupportedReport = (() => {
|
|
|
592
557
|
persistValues(ctx) {
|
|
593
558
|
if (!super.persistValues(ctx))
|
|
594
559
|
return false;
|
|
595
|
-
const localStateValue = ProtectionCCValues.localProtectionState;
|
|
560
|
+
const localStateValue = import_CCValues_generated.ProtectionCCValues.localProtectionState;
|
|
596
561
|
this.setMetadata(ctx, localStateValue, {
|
|
597
562
|
...localStateValue.meta,
|
|
598
563
|
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.LocalProtectionState, this.supportedLocalStates)
|
|
599
564
|
});
|
|
600
|
-
const rfStateValue = ProtectionCCValues.rfProtectionState;
|
|
565
|
+
const rfStateValue = import_CCValues_generated.ProtectionCCValues.rfProtectionState;
|
|
601
566
|
this.setMetadata(ctx, rfStateValue, {
|
|
602
567
|
...rfStateValue.meta,
|
|
603
568
|
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.RFProtectionState, this.supportedRFStates)
|
|
@@ -648,7 +613,7 @@ let ProtectionCCSupportedGet = (() => {
|
|
|
648
613
|
return ProtectionCCSupportedGet2 = _classThis;
|
|
649
614
|
})();
|
|
650
615
|
let ProtectionCCExclusiveControlReport = (() => {
|
|
651
|
-
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.ExclusiveControlReport), (0, import_CommandClassDecorators.ccValueProperty)("exclusiveControlNodeId", ProtectionCCValues.exclusiveControlNodeId)];
|
|
616
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.ExclusiveControlReport), (0, import_CommandClassDecorators.ccValueProperty)("exclusiveControlNodeId", import_CCValues_generated.ProtectionCCValues.exclusiveControlNodeId)];
|
|
652
617
|
let _classDescriptor;
|
|
653
618
|
let _classExtraInitializers = [];
|
|
654
619
|
let _classThis;
|
|
@@ -758,7 +723,7 @@ let ProtectionCCExclusiveControlSet = (() => {
|
|
|
758
723
|
return ProtectionCCExclusiveControlSet2 = _classThis;
|
|
759
724
|
})();
|
|
760
725
|
let ProtectionCCTimeoutReport = (() => {
|
|
761
|
-
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.TimeoutReport), (0, import_CommandClassDecorators.ccValueProperty)("timeout", ProtectionCCValues.timeout)];
|
|
726
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ProtectionCommand.TimeoutReport), (0, import_CommandClassDecorators.ccValueProperty)("timeout", import_CCValues_generated.ProtectionCCValues.timeout)];
|
|
762
727
|
let _classDescriptor;
|
|
763
728
|
let _classExtraInitializers = [];
|
|
764
729
|
let _classThis;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/ProtectionCC.ts"],
|
|
4
|
-
"sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype GetValueDB,\n\tMAX_NODES,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tTimeout,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tenumValuesToMetadataStates,\n\tparseBitMask,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { getEnumMemberName, pick } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n\tgetEffectiveCCVersion,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tLocalProtectionState,\n\tProtectionCommand,\n\tRFProtectionState,\n} from \"../lib/_Types.js\";\n\nexport const ProtectionCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses.Protection, {\n\t\t...V.staticProperty(\n\t\t\t\"exclusiveControlNodeId\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tmin: 1,\n\t\t\t\tmax: MAX_NODES,\n\t\t\t\tlabel: \"Node ID with exclusive control\",\n\t\t\t} as const,\n\t\t\t{ minVersion: 2 } as const,\n\t\t),\n\n\t\t...V.staticPropertyWithName(\n\t\t\t\"localProtectionState\",\n\t\t\t\"local\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Number,\n\t\t\t\tlabel: \"Local protection state\",\n\t\t\t\tstates: enumValuesToMetadataStates(LocalProtectionState),\n\t\t\t} as const,\n\t\t),\n\n\t\t...V.staticPropertyWithName(\n\t\t\t\"rfProtectionState\",\n\t\t\t\"rf\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Number,\n\t\t\t\tlabel: \"RF protection state\",\n\t\t\t\tstates: enumValuesToMetadataStates(RFProtectionState),\n\t\t\t} as const,\n\t\t\t{ minVersion: 2 } as const,\n\t\t),\n\n\t\t...V.staticProperty(\n\t\t\t\"timeout\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tlabel: \"RF protection timeout\",\n\t\t\t} as const,\n\t\t\t{ minVersion: 2 } as const,\n\t\t),\n\n\t\t...V.staticProperty(\"supportsExclusiveControl\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportsTimeout\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportedLocalStates\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportedRFStates\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t}),\n});\n\n@API(CommandClasses.Protection)\nexport class ProtectionCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: ProtectionCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase ProtectionCommand.Get:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase ProtectionCommand.Set:\n\t\t\t\treturn true; // This is mandatory\n\t\t\tcase ProtectionCommand.SupportedGet:\n\t\t\t\treturn this.version >= 2 && this.isSinglecast();\n\t\t\tcase ProtectionCommand.TimeoutGet:\n\t\t\tcase ProtectionCommand.TimeoutSet: {\n\t\t\t\treturn (\n\t\t\t\t\tthis.isSinglecast()\n\t\t\t\t\t&& this.tryGetValueDB()?.getValue<boolean>(\n\t\t\t\t\t\tProtectionCCValues.supportsTimeout.endpoint(\n\t\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\tcase ProtectionCommand.ExclusiveControlGet:\n\t\t\tcase ProtectionCommand.ExclusiveControlSet: {\n\t\t\t\treturn (\n\t\t\t\t\tthis.isSinglecast()\n\t\t\t\t\t&& this.tryGetValueDB()?.getValue<boolean>(\n\t\t\t\t\t\tProtectionCCValues.supportsExclusiveControl.endpoint(\n\t\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(this: ProtectionCCAPI, { property }, value) {\n\t\t\tconst valueDB = this.tryGetValueDB();\n\t\t\tif (property === \"local\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// We need to set both values together, so retrieve the other one from the value DB\n\t\t\t\tconst rf = valueDB?.getValue<RFProtectionState>(\n\t\t\t\t\tProtectionCCValues.rfProtectionState.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\treturn this.set(value, rf);\n\t\t\t} else if (property === \"rf\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// We need to set both values together, so retrieve the other one from the value DB\n\t\t\t\tconst local = valueDB?.getValue<LocalProtectionState>(\n\t\t\t\t\tProtectionCCValues.localProtectionState.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\treturn this.set(\n\t\t\t\t\tlocal ?? LocalProtectionState.Unprotected,\n\t\t\t\t\tvalue,\n\t\t\t\t);\n\t\t\t} else if (property === \"exclusiveControlNodeId\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn this.setExclusiveControl(value);\n\t\t\t} else {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: ProtectionCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"local\":\n\t\t\t\tcase \"rf\":\n\t\t\t\t\treturn (await this.get())?.[property];\n\t\t\t\tcase \"exclusiveControlNodeId\":\n\t\t\t\t\treturn this.getExclusiveControl();\n\t\t\t\tdefault:\n\t\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(ProtectionCommand, ProtectionCommand.Get);\n\n\t\tconst cc = new ProtectionCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<ProtectionCCReport>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"local\", \"rf\"]);\n\t\t}\n\t}\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async set(\n\t\tlocal: LocalProtectionState,\n\t\trf?: RFProtectionState,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(ProtectionCommand, ProtectionCommand.Set);\n\n\t\tconst cc = new ProtectionCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tlocal,\n\t\t\trf,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getSupported() {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCSupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tProtectionCCSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\n\t\t\t\t\"supportsExclusiveControl\",\n\t\t\t\t\"supportsTimeout\",\n\t\t\t\t\"supportedLocalStates\",\n\t\t\t\t\"supportedRFStates\",\n\t\t\t]);\n\t\t}\n\t}\n\n\tpublic async getExclusiveControl(): Promise<MaybeNotKnown<number>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.ExclusiveControlGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCExclusiveControlGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tProtectionCCExclusiveControlReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.exclusiveControlNodeId;\n\t}\n\n\t@validateArgs()\n\tpublic async setExclusiveControl(\n\t\tnodeId: number,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.ExclusiveControlSet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCExclusiveControlSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\texclusiveControlNodeId: nodeId,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tpublic async getTimeout(): Promise<MaybeNotKnown<Timeout>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.TimeoutGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCTimeoutGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tProtectionCCTimeoutReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.timeout;\n\t}\n\n\t@validateArgs()\n\tpublic async setTimeout(\n\t\ttimeout: Timeout,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.TimeoutSet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCTimeoutSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\ttimeout,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses.Protection)\n@implementedVersion(2)\n@ccValues(ProtectionCCValues)\nexport class ProtectionCC extends CommandClass {\n\tdeclare ccCommand: ProtectionCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses.Protection,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// We need to do some queries after a potential timeout\n\t\t// In this case, do now mark this CC as interviewed completely\n\t\tlet hadCriticalTimeout = false;\n\n\t\t// First find out what the device supports\n\t\tif (api.version >= 2) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying protection capabilities...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst resp = await api.getSupported();\n\t\t\tif (resp) {\n\t\t\t\tconst logMessage = `received protection capabilities:\nexclusive control: ${resp.supportsExclusiveControl}\ntimeout: ${resp.supportsTimeout}\nlocal protection states: ${\n\t\t\t\t\tresp.supportedLocalStates\n\t\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\t\tgetEnumMemberName(LocalProtectionState, local)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}\nRF protection states: ${\n\t\t\t\t\tresp.supportedRFStates\n\t\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\t\tgetEnumMemberName(RFProtectionState, local)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\thadCriticalTimeout = true;\n\t\t\t}\n\t\t}\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tif (!hadCriticalTimeout) this.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses.Protection,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tconst supportsExclusiveControl = !!this.getValue(\n\t\t\tctx,\n\t\t\tProtectionCCValues.supportsExclusiveControl,\n\t\t);\n\t\tconst supportsTimeout = !!this.getValue(\n\t\t\tctx,\n\t\t\tProtectionCCValues.supportsTimeout,\n\t\t);\n\n\t\t// Query the current state\n\t\tctx.logNode(node.id, {\n\t\t\tmessage: \"querying protection status...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst protectionResp = await api.get();\n\t\tif (protectionResp) {\n\t\t\tlet logMessage = `received protection status:\nlocal: ${getEnumMemberName(LocalProtectionState, protectionResp.local)}`;\n\t\t\tif (protectionResp.rf != undefined) {\n\t\t\t\tlogMessage += `\nrf ${getEnumMemberName(RFProtectionState, protectionResp.rf)}`;\n\t\t\t}\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\n\t\tif (supportsTimeout) {\n\t\t\t// Query the current timeout\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying protection timeout...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst timeout = await api.getTimeout();\n\t\t\tif (timeout) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: `received timeout: ${timeout.toString()}`,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (supportsExclusiveControl) {\n\t\t\t// Query the current timeout\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying exclusive control node...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst nodeId = await api.getExclusiveControl();\n\t\t\tif (nodeId != undefined) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: (nodeId !== 0\n\t\t\t\t\t\t? `Node ${nodeId.toString().padStart(3, \"0\")}`\n\t\t\t\t\t\t: `no node`) + ` has exclusive control`,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface ProtectionCCSetOptions {\n\tlocal: LocalProtectionState;\n\trf?: RFProtectionState;\n}\n\n@CCCommand(ProtectionCommand.Set)\n@useSupervision()\nexport class ProtectionCCSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.local = options.local;\n\t\tthis.rf = options.rf;\n\t}\n\n\tpublic static from(_raw: CCRaw, _ctx: CCParsingContext): ProtectionCCSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ProtectionCCSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic local: LocalProtectionState;\n\tpublic rf?: RFProtectionState;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([\n\t\t\tthis.local & 0b1111,\n\t\t\t(this.rf ?? RFProtectionState.Unprotected) & 0b1111,\n\t\t]);\n\n\t\tconst ccVersion = getEffectiveCCVersion(ctx, this);\n\t\tif (\n\t\t\tccVersion < 2 && ctx.getDeviceConfig?.(\n\t\t\t\tthis.nodeId as number,\n\t\t\t)?.compat?.encodeCCsUsingTargetVersion\n\t\t) {\n\t\t\t// When forcing CC version 1, only include the local state\n\t\t\tthis.payload = this.payload.subarray(0, 1);\n\t\t}\n\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tlocal: getEnumMemberName(LocalProtectionState, this.local),\n\t\t};\n\t\tif (this.rf != undefined) {\n\t\t\tmessage.rf = getEnumMemberName(RFProtectionState, this.rf);\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ProtectionCCReportOptions {\n\tlocal: LocalProtectionState;\n\trf?: RFProtectionState;\n}\n\n@CCCommand(ProtectionCommand.Report)\n@ccValueProperty(\"local\", ProtectionCCValues.localProtectionState)\n@ccValueProperty(\"rf\", ProtectionCCValues.rfProtectionState)\nexport class ProtectionCCReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.local = options.local;\n\t\tthis.rf = options.rf;\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): ProtectionCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst local: LocalProtectionState = raw.payload[0] & 0b1111;\n\t\tlet rf: RFProtectionState | undefined;\n\t\tif (raw.payload.length >= 2) {\n\t\t\trf = raw.payload[1] & 0b1111;\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tlocal,\n\t\t\trf,\n\t\t});\n\t}\n\n\tpublic readonly local: LocalProtectionState;\n\n\tpublic readonly rf?: RFProtectionState;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tlocal: getEnumMemberName(LocalProtectionState, this.local),\n\t\t};\n\t\tif (this.rf != undefined) {\n\t\t\tmessage.rf = getEnumMemberName(RFProtectionState, this.rf);\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.Get)\n@expectedCCResponse(ProtectionCCReport)\nexport class ProtectionCCGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCSupportedReportOptions {\n\tsupportsTimeout: boolean;\n\tsupportsExclusiveControl: boolean;\n\tsupportedLocalStates: LocalProtectionState[];\n\tsupportedRFStates: RFProtectionState[];\n}\n\n@CCCommand(ProtectionCommand.SupportedReport)\n@ccValueProperty(\n\t\"supportsExclusiveControl\",\n\tProtectionCCValues.supportsExclusiveControl,\n)\n@ccValueProperty(\"supportsTimeout\", ProtectionCCValues.supportsTimeout)\n@ccValueProperty(\n\t\"supportedLocalStates\",\n\tProtectionCCValues.supportedLocalStates,\n)\n@ccValueProperty(\"supportedRFStates\", ProtectionCCValues.supportedRFStates)\nexport class ProtectionCCSupportedReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportsTimeout = options.supportsTimeout;\n\t\tthis.supportsExclusiveControl = options.supportsExclusiveControl;\n\t\tthis.supportedLocalStates = options.supportedLocalStates;\n\t\tthis.supportedRFStates = options.supportedRFStates;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 5);\n\t\tconst supportsTimeout = !!(raw.payload[0] & 0b1);\n\t\tconst supportsExclusiveControl = !!(raw.payload[0] & 0b10);\n\t\tconst supportedLocalStates: LocalProtectionState[] = parseBitMask(\n\t\t\traw.payload.subarray(1, 3),\n\t\t\tLocalProtectionState.Unprotected,\n\t\t);\n\t\tconst supportedRFStates: RFProtectionState[] = parseBitMask(\n\t\t\traw.payload.subarray(3, 5),\n\t\t\tRFProtectionState.Unprotected,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportsTimeout,\n\t\t\tsupportsExclusiveControl,\n\t\t\tsupportedLocalStates,\n\t\t\tsupportedRFStates,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// update metadata (partially) for the local and rf values\n\t\tconst localStateValue = ProtectionCCValues.localProtectionState;\n\t\tthis.setMetadata(ctx, localStateValue, {\n\t\t\t...localStateValue.meta,\n\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\tLocalProtectionState,\n\t\t\t\tthis.supportedLocalStates,\n\t\t\t),\n\t\t});\n\n\t\tconst rfStateValue = ProtectionCCValues.rfProtectionState;\n\t\tthis.setMetadata(ctx, rfStateValue, {\n\t\t\t...rfStateValue.meta,\n\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\tRFProtectionState,\n\t\t\t\tthis.supportedRFStates,\n\t\t\t),\n\t\t});\n\n\t\treturn true;\n\t}\n\n\tpublic readonly supportsExclusiveControl: boolean;\n\n\tpublic readonly supportsTimeout: boolean;\n\n\tpublic readonly supportedLocalStates: LocalProtectionState[];\n\n\tpublic readonly supportedRFStates: RFProtectionState[];\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"supports exclusive control\": this.supportsExclusiveControl,\n\t\t\t\t\"supports timeout\": this.supportsTimeout,\n\t\t\t\t\"local protection states\": this.supportedLocalStates\n\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\tgetEnumMemberName(LocalProtectionState, local)\n\t\t\t\t\t)\n\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t\t\"RF protection states\": this.supportedRFStates\n\t\t\t\t\t.map((rf) => getEnumMemberName(RFProtectionState, rf))\n\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.SupportedGet)\n@expectedCCResponse(ProtectionCCSupportedReport)\nexport class ProtectionCCSupportedGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCExclusiveControlReportOptions {\n\texclusiveControlNodeId: number;\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlReport)\n@ccValueProperty(\n\t\"exclusiveControlNodeId\",\n\tProtectionCCValues.exclusiveControlNodeId,\n)\nexport class ProtectionCCExclusiveControlReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCExclusiveControlReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.exclusiveControlNodeId = options.exclusiveControlNodeId;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCExclusiveControlReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst exclusiveControlNodeId = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\texclusiveControlNodeId,\n\t\t});\n\t}\n\n\tpublic readonly exclusiveControlNodeId: number;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"exclusive control node id\": this.exclusiveControlNodeId,\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlGet)\n@expectedCCResponse(ProtectionCCExclusiveControlReport)\nexport class ProtectionCCExclusiveControlGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCExclusiveControlSetOptions {\n\texclusiveControlNodeId: number;\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlSet)\n@expectedCCResponse(ProtectionCCReport)\n@useSupervision()\nexport class ProtectionCCExclusiveControlSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCExclusiveControlSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.exclusiveControlNodeId = options.exclusiveControlNodeId;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ProtectionCCExclusiveControlSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ProtectionCCExclusiveControlSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic exclusiveControlNodeId: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.exclusiveControlNodeId]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"exclusive control node id\": this.exclusiveControlNodeId,\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ProtectionCCTimeoutReportOptions {\n\ttimeout: Timeout;\n}\n\n@CCCommand(ProtectionCommand.TimeoutReport)\n@ccValueProperty(\"timeout\", ProtectionCCValues.timeout)\nexport class ProtectionCCTimeoutReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCTimeoutReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.timeout = options.timeout;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCTimeoutReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst timeout: Timeout = Timeout.parse(raw.payload[0]);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\ttimeout,\n\t\t});\n\t}\n\n\tpublic readonly timeout: Timeout;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { timeout: this.timeout.toString() },\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.TimeoutGet)\n@expectedCCResponse(ProtectionCCTimeoutReport)\nexport class ProtectionCCTimeoutGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCTimeoutSetOptions {\n\ttimeout: Timeout;\n}\n\n@CCCommand(ProtectionCommand.TimeoutSet)\n@expectedCCResponse(ProtectionCCReport)\n@useSupervision()\nexport class ProtectionCCTimeoutSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCTimeoutSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.timeout = options.timeout;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ProtectionCCTimeoutSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ProtectionCCTimeoutSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic timeout: Timeout;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.timeout.serialize()]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { timeout: this.timeout.toString() },\n\t\t};\n\t}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAiBO;AACP,IAAAA,eAAsB;AACtB,IAAAA,eAAwC;AAExC,iBAQO;AACP,0BAOO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAIO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,qBAAqB,OAAO,OAAO;EAC/C,GAAG,gBAAE,qBAAqB,2BAAe,YAAY;IACpD,GAAG,gBAAE,eACJ,0BACA;MACC,GAAG,0BAAc;MACjB,KAAK;MACL,KAAK;MACL,OAAO;OAER,EAAE,YAAY,EAAC,CAAW;IAG3B,GAAG,gBAAE,uBACJ,wBACA,SACA;MACC,GAAG,0BAAc;MACjB,OAAO;MACP,YAAQ,wCAA2B,iCAAoB;KAC9C;IAGX,GAAG,gBAAE,uBACJ,qBACA,MACA;MACC,GAAG,0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AAS,KAAK,QAAQ,SAAQ,EAAE;;IAE7C;;;;IAKY,0BAAsB,MAAA;8BAFlC,yCAAU,+BAAkB,UAAU,OACtC,kDAAmB,yBAAyB,CAAC;;;;oBACF;8CAAA,YAAY;WAAA;;;;;;;;AAAxD,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;;;;IAUA,0BAAsB,MAAA;8BAHlC,yCAAU,+BAAkB,UAAU,OACtC,kDAAmB,kBAAkB,OACrC,8CAAc,CAAE;;;;oBAC2B;8CAAA,YAAY;WAAA;;;;;;;;AAAxD,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACZ,YACC,SAAmD;AAEnD,YAAM,OAAO;AACb,WAAK,UAAU,QAAQ;IACxB;IAEO,OAAO,KACb,MACA,MAAsB;AAGtB,YAAM,IAAI,uBACT,GAAG,KAAK,IAAI,qCACZ,4BAAgB,8BAA8B;IAMhD;IAEO;IAEA,UAAU,KAAsB;AACtC,WAAK,UAAU,mBAAM,KAAK,CAAC,KAAK,QAAQ,UAAS,CAAE,CAAC;AACpD,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS,EAAE,SAAS,KAAK,QAAQ,SAAQ,EAAE;;IAE7C;;;;",
|
|
4
|
+
"sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype GetValueDB,\n\tMAX_NODES,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tTimeout,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tenumValuesToMetadataStates,\n\tparseBitMask,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { getEnumMemberName, pick } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n\tgetEffectiveCCVersion,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tLocalProtectionState,\n\tProtectionCommand,\n\tRFProtectionState,\n} from \"../lib/_Types.js\";\n\nexport const ProtectionCCValues = V.defineCCValues(CommandClasses.Protection, {\n\t...V.staticProperty(\n\t\t\"exclusiveControlNodeId\",\n\t\t{\n\t\t\t...ValueMetadata.UInt8,\n\t\t\tmin: 1,\n\t\t\tmax: MAX_NODES,\n\t\t\tlabel: \"Node ID with exclusive control\",\n\t\t} as const,\n\t\t{ minVersion: 2 } as const,\n\t),\n\t...V.staticPropertyWithName(\n\t\t\"localProtectionState\",\n\t\t\"local\",\n\t\t{\n\t\t\t...ValueMetadata.Number,\n\t\t\tlabel: \"Local protection state\",\n\t\t\tstates: enumValuesToMetadataStates(LocalProtectionState),\n\t\t} as const,\n\t),\n\t...V.staticPropertyWithName(\n\t\t\"rfProtectionState\",\n\t\t\"rf\",\n\t\t{\n\t\t\t...ValueMetadata.Number,\n\t\t\tlabel: \"RF protection state\",\n\t\t\tstates: enumValuesToMetadataStates(RFProtectionState),\n\t\t} as const,\n\t\t{ minVersion: 2 } as const,\n\t),\n\t...V.staticProperty(\n\t\t\"timeout\",\n\t\t{\n\t\t\t...ValueMetadata.UInt8,\n\t\t\tlabel: \"RF protection timeout\",\n\t\t} as const,\n\t\t{ minVersion: 2 } as const,\n\t),\n\t...V.staticProperty(\"supportsExclusiveControl\", undefined, {\n\t\tinternal: true,\n\t}),\n\t...V.staticProperty(\"supportsTimeout\", undefined, {\n\t\tinternal: true,\n\t}),\n\t...V.staticProperty(\"supportedLocalStates\", undefined, {\n\t\tinternal: true,\n\t}),\n\t...V.staticProperty(\"supportedRFStates\", undefined, {\n\t\tinternal: true,\n\t}),\n});\n\n@API(CommandClasses.Protection)\nexport class ProtectionCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: ProtectionCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase ProtectionCommand.Get:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase ProtectionCommand.Set:\n\t\t\t\treturn true; // This is mandatory\n\t\t\tcase ProtectionCommand.SupportedGet:\n\t\t\t\treturn this.version >= 2 && this.isSinglecast();\n\t\t\tcase ProtectionCommand.TimeoutGet:\n\t\t\tcase ProtectionCommand.TimeoutSet: {\n\t\t\t\treturn (\n\t\t\t\t\tthis.isSinglecast()\n\t\t\t\t\t&& this.tryGetValueDB()?.getValue<boolean>(\n\t\t\t\t\t\tProtectionCCValues.supportsTimeout.endpoint(\n\t\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\tcase ProtectionCommand.ExclusiveControlGet:\n\t\t\tcase ProtectionCommand.ExclusiveControlSet: {\n\t\t\t\treturn (\n\t\t\t\t\tthis.isSinglecast()\n\t\t\t\t\t&& this.tryGetValueDB()?.getValue<boolean>(\n\t\t\t\t\t\tProtectionCCValues.supportsExclusiveControl.endpoint(\n\t\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(this: ProtectionCCAPI, { property }, value) {\n\t\t\tconst valueDB = this.tryGetValueDB();\n\t\t\tif (property === \"local\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// We need to set both values together, so retrieve the other one from the value DB\n\t\t\t\tconst rf = valueDB?.getValue<RFProtectionState>(\n\t\t\t\t\tProtectionCCValues.rfProtectionState.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\treturn this.set(value, rf);\n\t\t\t} else if (property === \"rf\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// We need to set both values together, so retrieve the other one from the value DB\n\t\t\t\tconst local = valueDB?.getValue<LocalProtectionState>(\n\t\t\t\t\tProtectionCCValues.localProtectionState.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\treturn this.set(\n\t\t\t\t\tlocal ?? LocalProtectionState.Unprotected,\n\t\t\t\t\tvalue,\n\t\t\t\t);\n\t\t\t} else if (property === \"exclusiveControlNodeId\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn this.setExclusiveControl(value);\n\t\t\t} else {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: ProtectionCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"local\":\n\t\t\t\tcase \"rf\":\n\t\t\t\t\treturn (await this.get())?.[property];\n\t\t\t\tcase \"exclusiveControlNodeId\":\n\t\t\t\t\treturn this.getExclusiveControl();\n\t\t\t\tdefault:\n\t\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(ProtectionCommand, ProtectionCommand.Get);\n\n\t\tconst cc = new ProtectionCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<ProtectionCCReport>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"local\", \"rf\"]);\n\t\t}\n\t}\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async set(\n\t\tlocal: LocalProtectionState,\n\t\trf?: RFProtectionState,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(ProtectionCommand, ProtectionCommand.Set);\n\n\t\tconst cc = new ProtectionCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tlocal,\n\t\t\trf,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getSupported() {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCSupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tProtectionCCSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\n\t\t\t\t\"supportsExclusiveControl\",\n\t\t\t\t\"supportsTimeout\",\n\t\t\t\t\"supportedLocalStates\",\n\t\t\t\t\"supportedRFStates\",\n\t\t\t]);\n\t\t}\n\t}\n\n\tpublic async getExclusiveControl(): Promise<MaybeNotKnown<number>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.ExclusiveControlGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCExclusiveControlGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tProtectionCCExclusiveControlReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.exclusiveControlNodeId;\n\t}\n\n\t@validateArgs()\n\tpublic async setExclusiveControl(\n\t\tnodeId: number,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.ExclusiveControlSet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCExclusiveControlSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\texclusiveControlNodeId: nodeId,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tpublic async getTimeout(): Promise<MaybeNotKnown<Timeout>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.TimeoutGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCTimeoutGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tProtectionCCTimeoutReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.timeout;\n\t}\n\n\t@validateArgs()\n\tpublic async setTimeout(\n\t\ttimeout: Timeout,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.TimeoutSet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCTimeoutSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\ttimeout,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses.Protection)\n@implementedVersion(2)\n@ccValues(ProtectionCCValues)\nexport class ProtectionCC extends CommandClass {\n\tdeclare ccCommand: ProtectionCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses.Protection,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// We need to do some queries after a potential timeout\n\t\t// In this case, do now mark this CC as interviewed completely\n\t\tlet hadCriticalTimeout = false;\n\n\t\t// First find out what the device supports\n\t\tif (api.version >= 2) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying protection capabilities...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst resp = await api.getSupported();\n\t\t\tif (resp) {\n\t\t\t\tconst logMessage = `received protection capabilities:\nexclusive control: ${resp.supportsExclusiveControl}\ntimeout: ${resp.supportsTimeout}\nlocal protection states: ${\n\t\t\t\t\tresp.supportedLocalStates\n\t\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\t\tgetEnumMemberName(LocalProtectionState, local)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}\nRF protection states: ${\n\t\t\t\t\tresp.supportedRFStates\n\t\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\t\tgetEnumMemberName(RFProtectionState, local)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\thadCriticalTimeout = true;\n\t\t\t}\n\t\t}\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tif (!hadCriticalTimeout) this.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses.Protection,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tconst supportsExclusiveControl = !!this.getValue(\n\t\t\tctx,\n\t\t\tProtectionCCValues.supportsExclusiveControl,\n\t\t);\n\t\tconst supportsTimeout = !!this.getValue(\n\t\t\tctx,\n\t\t\tProtectionCCValues.supportsTimeout,\n\t\t);\n\n\t\t// Query the current state\n\t\tctx.logNode(node.id, {\n\t\t\tmessage: \"querying protection status...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst protectionResp = await api.get();\n\t\tif (protectionResp) {\n\t\t\tlet logMessage = `received protection status:\nlocal: ${getEnumMemberName(LocalProtectionState, protectionResp.local)}`;\n\t\t\tif (protectionResp.rf != undefined) {\n\t\t\t\tlogMessage += `\nrf ${getEnumMemberName(RFProtectionState, protectionResp.rf)}`;\n\t\t\t}\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\n\t\tif (supportsTimeout) {\n\t\t\t// Query the current timeout\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying protection timeout...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst timeout = await api.getTimeout();\n\t\t\tif (timeout) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: `received timeout: ${timeout.toString()}`,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (supportsExclusiveControl) {\n\t\t\t// Query the current timeout\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying exclusive control node...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst nodeId = await api.getExclusiveControl();\n\t\t\tif (nodeId != undefined) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: (nodeId !== 0\n\t\t\t\t\t\t? `Node ${nodeId.toString().padStart(3, \"0\")}`\n\t\t\t\t\t\t: `no node`) + ` has exclusive control`,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface ProtectionCCSetOptions {\n\tlocal: LocalProtectionState;\n\trf?: RFProtectionState;\n}\n\n@CCCommand(ProtectionCommand.Set)\n@useSupervision()\nexport class ProtectionCCSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.local = options.local;\n\t\tthis.rf = options.rf;\n\t}\n\n\tpublic static from(_raw: CCRaw, _ctx: CCParsingContext): ProtectionCCSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ProtectionCCSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic local: LocalProtectionState;\n\tpublic rf?: RFProtectionState;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([\n\t\t\tthis.local & 0b1111,\n\t\t\t(this.rf ?? RFProtectionState.Unprotected) & 0b1111,\n\t\t]);\n\n\t\tconst ccVersion = getEffectiveCCVersion(ctx, this);\n\t\tif (\n\t\t\tccVersion < 2 && ctx.getDeviceConfig?.(\n\t\t\t\tthis.nodeId as number,\n\t\t\t)?.compat?.encodeCCsUsingTargetVersion\n\t\t) {\n\t\t\t// When forcing CC version 1, only include the local state\n\t\t\tthis.payload = this.payload.subarray(0, 1);\n\t\t}\n\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tlocal: getEnumMemberName(LocalProtectionState, this.local),\n\t\t};\n\t\tif (this.rf != undefined) {\n\t\t\tmessage.rf = getEnumMemberName(RFProtectionState, this.rf);\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ProtectionCCReportOptions {\n\tlocal: LocalProtectionState;\n\trf?: RFProtectionState;\n}\n\n@CCCommand(ProtectionCommand.Report)\n@ccValueProperty(\"local\", ProtectionCCValues.localProtectionState)\n@ccValueProperty(\"rf\", ProtectionCCValues.rfProtectionState)\nexport class ProtectionCCReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.local = options.local;\n\t\tthis.rf = options.rf;\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): ProtectionCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst local: LocalProtectionState = raw.payload[0] & 0b1111;\n\t\tlet rf: RFProtectionState | undefined;\n\t\tif (raw.payload.length >= 2) {\n\t\t\trf = raw.payload[1] & 0b1111;\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tlocal,\n\t\t\trf,\n\t\t});\n\t}\n\n\tpublic readonly local: LocalProtectionState;\n\n\tpublic readonly rf?: RFProtectionState;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tlocal: getEnumMemberName(LocalProtectionState, this.local),\n\t\t};\n\t\tif (this.rf != undefined) {\n\t\t\tmessage.rf = getEnumMemberName(RFProtectionState, this.rf);\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.Get)\n@expectedCCResponse(ProtectionCCReport)\nexport class ProtectionCCGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCSupportedReportOptions {\n\tsupportsTimeout: boolean;\n\tsupportsExclusiveControl: boolean;\n\tsupportedLocalStates: LocalProtectionState[];\n\tsupportedRFStates: RFProtectionState[];\n}\n\n@CCCommand(ProtectionCommand.SupportedReport)\n@ccValueProperty(\n\t\"supportsExclusiveControl\",\n\tProtectionCCValues.supportsExclusiveControl,\n)\n@ccValueProperty(\"supportsTimeout\", ProtectionCCValues.supportsTimeout)\n@ccValueProperty(\n\t\"supportedLocalStates\",\n\tProtectionCCValues.supportedLocalStates,\n)\n@ccValueProperty(\"supportedRFStates\", ProtectionCCValues.supportedRFStates)\nexport class ProtectionCCSupportedReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportsTimeout = options.supportsTimeout;\n\t\tthis.supportsExclusiveControl = options.supportsExclusiveControl;\n\t\tthis.supportedLocalStates = options.supportedLocalStates;\n\t\tthis.supportedRFStates = options.supportedRFStates;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 5);\n\t\tconst supportsTimeout = !!(raw.payload[0] & 0b1);\n\t\tconst supportsExclusiveControl = !!(raw.payload[0] & 0b10);\n\t\tconst supportedLocalStates: LocalProtectionState[] = parseBitMask(\n\t\t\traw.payload.subarray(1, 3),\n\t\t\tLocalProtectionState.Unprotected,\n\t\t);\n\t\tconst supportedRFStates: RFProtectionState[] = parseBitMask(\n\t\t\traw.payload.subarray(3, 5),\n\t\t\tRFProtectionState.Unprotected,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportsTimeout,\n\t\t\tsupportsExclusiveControl,\n\t\t\tsupportedLocalStates,\n\t\t\tsupportedRFStates,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// update metadata (partially) for the local and rf values\n\t\tconst localStateValue = ProtectionCCValues.localProtectionState;\n\t\tthis.setMetadata(ctx, localStateValue, {\n\t\t\t...localStateValue.meta,\n\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\tLocalProtectionState,\n\t\t\t\tthis.supportedLocalStates,\n\t\t\t),\n\t\t});\n\n\t\tconst rfStateValue = ProtectionCCValues.rfProtectionState;\n\t\tthis.setMetadata(ctx, rfStateValue, {\n\t\t\t...rfStateValue.meta,\n\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\tRFProtectionState,\n\t\t\t\tthis.supportedRFStates,\n\t\t\t),\n\t\t});\n\n\t\treturn true;\n\t}\n\n\tpublic readonly supportsExclusiveControl: boolean;\n\n\tpublic readonly supportsTimeout: boolean;\n\n\tpublic readonly supportedLocalStates: LocalProtectionState[];\n\n\tpublic readonly supportedRFStates: RFProtectionState[];\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"supports exclusive control\": this.supportsExclusiveControl,\n\t\t\t\t\"supports timeout\": this.supportsTimeout,\n\t\t\t\t\"local protection states\": this.supportedLocalStates\n\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\tgetEnumMemberName(LocalProtectionState, local)\n\t\t\t\t\t)\n\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t\t\"RF protection states\": this.supportedRFStates\n\t\t\t\t\t.map((rf) => getEnumMemberName(RFProtectionState, rf))\n\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.SupportedGet)\n@expectedCCResponse(ProtectionCCSupportedReport)\nexport class ProtectionCCSupportedGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCExclusiveControlReportOptions {\n\texclusiveControlNodeId: number;\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlReport)\n@ccValueProperty(\n\t\"exclusiveControlNodeId\",\n\tProtectionCCValues.exclusiveControlNodeId,\n)\nexport class ProtectionCCExclusiveControlReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCExclusiveControlReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.exclusiveControlNodeId = options.exclusiveControlNodeId;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCExclusiveControlReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst exclusiveControlNodeId = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\texclusiveControlNodeId,\n\t\t});\n\t}\n\n\tpublic readonly exclusiveControlNodeId: number;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"exclusive control node id\": this.exclusiveControlNodeId,\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlGet)\n@expectedCCResponse(ProtectionCCExclusiveControlReport)\nexport class ProtectionCCExclusiveControlGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCExclusiveControlSetOptions {\n\texclusiveControlNodeId: number;\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlSet)\n@expectedCCResponse(ProtectionCCReport)\n@useSupervision()\nexport class ProtectionCCExclusiveControlSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCExclusiveControlSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.exclusiveControlNodeId = options.exclusiveControlNodeId;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ProtectionCCExclusiveControlSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ProtectionCCExclusiveControlSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic exclusiveControlNodeId: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.exclusiveControlNodeId]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"exclusive control node id\": this.exclusiveControlNodeId,\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ProtectionCCTimeoutReportOptions {\n\ttimeout: Timeout;\n}\n\n@CCCommand(ProtectionCommand.TimeoutReport)\n@ccValueProperty(\"timeout\", ProtectionCCValues.timeout)\nexport class ProtectionCCTimeoutReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCTimeoutReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.timeout = options.timeout;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCTimeoutReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst timeout: Timeout = Timeout.parse(raw.payload[0]);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\ttimeout,\n\t\t});\n\t}\n\n\tpublic readonly timeout: Timeout;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { timeout: this.timeout.toString() },\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.TimeoutGet)\n@expectedCCResponse(ProtectionCCTimeoutReport)\nexport class ProtectionCCTimeoutGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCTimeoutSetOptions {\n\ttimeout: Timeout;\n}\n\n@CCCommand(ProtectionCommand.TimeoutSet)\n@expectedCCResponse(ProtectionCCReport)\n@useSupervision()\nexport class ProtectionCCTimeoutSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCTimeoutSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.timeout = options.timeout;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ProtectionCCTimeoutSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ProtectionCCTimeoutSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic timeout: Timeout;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.timeout.serialize()]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { timeout: this.timeout.toString() },\n\t\t};\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAiBO;AACP,IAAAA,eAAsB;AACtB,IAAAA,eAAwC;AAExC,iBAQO;AACP,0BAOO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAIO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuDM,mBAAe,MAAA;8BAD3B,mCAAI,2BAAe,UAAU,CAAC;;;;oBACM;;;;;uCAAA,YAAK;WAAA;;;;;;;;yBAwHxC,iCAAa,EAAE,aAAa,KAAI,CAAE,CAAC;yCA8DnC,iDAAA,CAAc;gCAoCd,wCAAA,CAAc;AAjGf,mBAAA,MAAA,MAAA,iBAAA,EAAA,MAAA,UAAA,MAAA,OAAA,QAAA,OAAA,SAAA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IACxB;IAEO,OAAO,KACb,MACA,MAAsB;AAGtB,YAAM,IAAI,uBACT,GAAG,KAAK,IAAI,qCACZ,4BAAgB,8BAA8B;IAMhD;IAEO;IAEA,UAAU,KAAsB;AACtC,WAAK,UAAU,mBAAM,KAAK,CAAC,KAAK,QAAQ,UAAS,CAAE,CAAC;AACpD,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS,EAAE,SAAS,KAAK,QAAQ,SAAQ,EAAE;;IAE7C;;;;",
|
|
6
6
|
"names": ["import_safe"]
|
|
7
7
|
}
|
|
@@ -1,164 +1,65 @@
|
|
|
1
1
|
import { type CCEncodingContext, type CCParsingContext } from "@zwave-js/cc";
|
|
2
2
|
import type { GetValueDB, MessageOrCCLogEntry, SupervisionResult, WithAddress } from "@zwave-js/core/safe";
|
|
3
|
-
import { CommandClasses, Duration, type MaybeNotKnown
|
|
3
|
+
import { CommandClasses, Duration, type MaybeNotKnown } from "@zwave-js/core/safe";
|
|
4
4
|
import { Bytes } from "@zwave-js/shared/safe";
|
|
5
5
|
import { CCAPI, SET_VALUE, type SetValueImplementation } from "../lib/API.js";
|
|
6
6
|
import { type CCRaw, CommandClass } from "../lib/CommandClass.js";
|
|
7
7
|
import { SceneActivationCommand } from "../lib/_Types.js";
|
|
8
8
|
export declare const SceneActivationCCValues: Readonly<{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
sceneId: {
|
|
10
|
+
id: {
|
|
11
|
+
readonly commandClass: (typeof CommandClasses)["Scene Activation"];
|
|
12
|
+
readonly property: "sceneId";
|
|
13
|
+
};
|
|
14
|
+
endpoint: (endpoint?: number) => {
|
|
12
15
|
readonly commandClass: (typeof CommandClasses)["Scene Activation"];
|
|
13
16
|
readonly endpoint: number;
|
|
14
|
-
readonly property: "
|
|
17
|
+
readonly property: "sceneId";
|
|
15
18
|
};
|
|
16
|
-
|
|
17
|
-
readonly meta:
|
|
18
|
-
readonly
|
|
19
|
-
readonly
|
|
20
|
-
readonly
|
|
21
|
-
|
|
22
|
-
readonly type: "
|
|
23
|
-
readonly readable: true;
|
|
24
|
-
readonly writeable: true;
|
|
25
|
-
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>) extends infer T ? { [K in keyof T as [undefined] extends [(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
26
|
-
readonly type: "any";
|
|
27
|
-
readonly readable: true;
|
|
28
|
-
readonly writeable: true;
|
|
29
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
30
|
-
readonly type: "any";
|
|
19
|
+
is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
|
|
20
|
+
readonly meta: {
|
|
21
|
+
readonly min: 1;
|
|
22
|
+
readonly label: "Scene ID";
|
|
23
|
+
readonly valueChangeOptions: readonly ["transitionDuration"];
|
|
24
|
+
readonly max: 255;
|
|
25
|
+
readonly type: "number";
|
|
31
26
|
readonly readable: true;
|
|
32
27
|
readonly writeable: true;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
readonly readable: true;
|
|
36
|
-
readonly writeable: true;
|
|
37
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
38
|
-
readonly type: "any";
|
|
39
|
-
readonly readable: true;
|
|
40
|
-
readonly writeable: true;
|
|
41
|
-
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
|
|
42
|
-
readonly options: Readonly<(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
43
|
-
readonly internal: false;
|
|
44
|
-
readonly minVersion: 1;
|
|
45
|
-
readonly secret: false;
|
|
46
|
-
readonly stateful: true;
|
|
47
|
-
readonly supportsEndpoints: true;
|
|
48
|
-
readonly autoCreate: true;
|
|
49
|
-
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
50
|
-
readonly internal: false;
|
|
51
|
-
readonly minVersion: 1;
|
|
52
|
-
readonly secret: false;
|
|
53
|
-
readonly stateful: true;
|
|
54
|
-
readonly supportsEndpoints: true;
|
|
55
|
-
readonly autoCreate: true;
|
|
56
|
-
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>) extends infer T ? { [K in keyof T as [undefined] extends [(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
57
|
-
readonly internal: false;
|
|
58
|
-
readonly minVersion: 1;
|
|
59
|
-
readonly secret: false;
|
|
60
|
-
readonly stateful: true;
|
|
61
|
-
readonly supportsEndpoints: true;
|
|
62
|
-
readonly autoCreate: true;
|
|
63
|
-
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
64
|
-
readonly internal: false;
|
|
65
|
-
readonly minVersion: 1;
|
|
66
|
-
readonly secret: false;
|
|
67
|
-
readonly stateful: true;
|
|
68
|
-
readonly supportsEndpoints: true;
|
|
69
|
-
readonly autoCreate: true;
|
|
70
|
-
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]] ? never : K]: (import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
71
|
-
readonly internal: false;
|
|
72
|
-
readonly minVersion: 1;
|
|
73
|
-
readonly secret: false;
|
|
74
|
-
readonly stateful: true;
|
|
75
|
-
readonly supportsEndpoints: true;
|
|
76
|
-
readonly autoCreate: true;
|
|
77
|
-
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
28
|
+
};
|
|
29
|
+
options: {
|
|
78
30
|
readonly internal: false;
|
|
79
31
|
readonly minVersion: 1;
|
|
80
32
|
readonly secret: false;
|
|
81
|
-
readonly stateful:
|
|
33
|
+
readonly stateful: false;
|
|
82
34
|
readonly supportsEndpoints: true;
|
|
83
35
|
readonly autoCreate: true;
|
|
84
|
-
}
|
|
36
|
+
};
|
|
85
37
|
};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
38
|
+
dimmingDuration: {
|
|
39
|
+
id: {
|
|
40
|
+
readonly commandClass: (typeof CommandClasses)["Scene Activation"];
|
|
41
|
+
readonly property: "dimmingDuration";
|
|
42
|
+
};
|
|
43
|
+
endpoint: (endpoint?: number) => {
|
|
89
44
|
readonly commandClass: (typeof CommandClasses)["Scene Activation"];
|
|
90
45
|
readonly endpoint: number;
|
|
91
|
-
readonly property: "
|
|
46
|
+
readonly property: "dimmingDuration";
|
|
92
47
|
};
|
|
93
|
-
|
|
94
|
-
readonly meta:
|
|
95
|
-
readonly
|
|
96
|
-
readonly
|
|
97
|
-
readonly writeable: true;
|
|
98
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
99
|
-
readonly type: "any";
|
|
100
|
-
readonly readable: true;
|
|
101
|
-
readonly writeable: true;
|
|
102
|
-
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>) extends infer T ? { [K in keyof T as [undefined] extends [(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
103
|
-
readonly type: "any";
|
|
104
|
-
readonly readable: true;
|
|
105
|
-
readonly writeable: true;
|
|
106
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
107
|
-
readonly type: "any";
|
|
48
|
+
is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
|
|
49
|
+
readonly meta: {
|
|
50
|
+
readonly label: "Dimming duration";
|
|
51
|
+
readonly type: "duration";
|
|
108
52
|
readonly readable: true;
|
|
109
53
|
readonly writeable: true;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
readonly readable: true;
|
|
113
|
-
readonly writeable: true;
|
|
114
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
115
|
-
readonly type: "any";
|
|
116
|
-
readonly readable: true;
|
|
117
|
-
readonly writeable: true;
|
|
118
|
-
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
|
|
119
|
-
readonly options: Readonly<(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
120
|
-
readonly internal: false;
|
|
121
|
-
readonly minVersion: 1;
|
|
122
|
-
readonly secret: false;
|
|
123
|
-
readonly stateful: true;
|
|
124
|
-
readonly supportsEndpoints: true;
|
|
125
|
-
readonly autoCreate: true;
|
|
126
|
-
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
127
|
-
readonly internal: false;
|
|
128
|
-
readonly minVersion: 1;
|
|
129
|
-
readonly secret: false;
|
|
130
|
-
readonly stateful: true;
|
|
131
|
-
readonly supportsEndpoints: true;
|
|
132
|
-
readonly autoCreate: true;
|
|
133
|
-
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>) extends infer T ? { [K in keyof T as [undefined] extends [(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
134
|
-
readonly internal: false;
|
|
135
|
-
readonly minVersion: 1;
|
|
136
|
-
readonly secret: false;
|
|
137
|
-
readonly stateful: true;
|
|
138
|
-
readonly supportsEndpoints: true;
|
|
139
|
-
readonly autoCreate: true;
|
|
140
|
-
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
141
|
-
readonly internal: false;
|
|
142
|
-
readonly minVersion: 1;
|
|
143
|
-
readonly secret: false;
|
|
144
|
-
readonly stateful: true;
|
|
145
|
-
readonly supportsEndpoints: true;
|
|
146
|
-
readonly autoCreate: true;
|
|
147
|
-
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]] ? never : K]: (import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
148
|
-
readonly internal: false;
|
|
149
|
-
readonly minVersion: 1;
|
|
150
|
-
readonly secret: false;
|
|
151
|
-
readonly stateful: true;
|
|
152
|
-
readonly supportsEndpoints: true;
|
|
153
|
-
readonly autoCreate: true;
|
|
154
|
-
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
54
|
+
};
|
|
55
|
+
options: {
|
|
155
56
|
readonly internal: false;
|
|
156
57
|
readonly minVersion: 1;
|
|
157
58
|
readonly secret: false;
|
|
158
59
|
readonly stateful: true;
|
|
159
60
|
readonly supportsEndpoints: true;
|
|
160
61
|
readonly autoCreate: true;
|
|
161
|
-
}
|
|
62
|
+
};
|
|
162
63
|
};
|
|
163
64
|
}>;
|
|
164
65
|
export declare class SceneActivationCCAPI extends CCAPI {
|
|
@@ -32,7 +32,7 @@ __export(SceneActivationCC_exports, {
|
|
|
32
32
|
SceneActivationCC: () => SceneActivationCC,
|
|
33
33
|
SceneActivationCCAPI: () => SceneActivationCCAPI,
|
|
34
34
|
SceneActivationCCSet: () => SceneActivationCCSet,
|
|
35
|
-
SceneActivationCCValues: () => SceneActivationCCValues
|
|
35
|
+
SceneActivationCCValues: () => import_CCValues_generated.SceneActivationCCValues
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(SceneActivationCC_exports);
|
|
38
38
|
var __validateArgs = __toESM(require("./SceneActivationCC._validateArgs.js"), 1);
|
|
@@ -43,6 +43,7 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
43
43
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
44
44
|
var import_Values = require("../lib/Values.js");
|
|
45
45
|
var import_Types = require("../lib/_Types.js");
|
|
46
|
+
var import_CCValues_generated = require("./_CCValues.generated.js");
|
|
46
47
|
var __runInitializers = function(thisArg, initializers, value) {
|
|
47
48
|
var useValue = arguments.length > 2;
|
|
48
49
|
for (var i = 0; i < initializers.length; i++) {
|
|
@@ -84,20 +85,6 @@ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializ
|
|
|
84
85
|
done = true;
|
|
85
86
|
};
|
|
86
87
|
const { validateArgs_SceneActivationCCAPI_set } = __validateArgs;
|
|
87
|
-
const SceneActivationCCValues = Object.freeze({
|
|
88
|
-
...import_Values.V.defineStaticCCValues(import_safe.CommandClasses["Scene Activation"], {
|
|
89
|
-
...import_Values.V.staticProperty("sceneId", {
|
|
90
|
-
...import_safe.ValueMetadata.UInt8,
|
|
91
|
-
min: 1,
|
|
92
|
-
label: "Scene ID",
|
|
93
|
-
valueChangeOptions: ["transitionDuration"]
|
|
94
|
-
}, { stateful: false }),
|
|
95
|
-
...import_Values.V.staticProperty("dimmingDuration", {
|
|
96
|
-
...import_safe.ValueMetadata.Duration,
|
|
97
|
-
label: "Dimming duration"
|
|
98
|
-
})
|
|
99
|
-
})
|
|
100
|
-
});
|
|
101
88
|
let SceneActivationCCAPI = (() => {
|
|
102
89
|
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Scene Activation"])];
|
|
103
90
|
let _classDescriptor;
|
|
@@ -159,7 +146,7 @@ let SceneActivationCCAPI = (() => {
|
|
|
159
146
|
return SceneActivationCCAPI2 = _classThis;
|
|
160
147
|
})();
|
|
161
148
|
let SceneActivationCC = (() => {
|
|
162
|
-
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Scene Activation"]), (0, import_CommandClassDecorators.implementedVersion)(1), (0, import_CommandClassDecorators.ccValues)(SceneActivationCCValues)];
|
|
149
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Scene Activation"]), (0, import_CommandClassDecorators.implementedVersion)(1), (0, import_CommandClassDecorators.ccValues)(import_CCValues_generated.SceneActivationCCValues)];
|
|
163
150
|
let _classDescriptor;
|
|
164
151
|
let _classExtraInitializers = [];
|
|
165
152
|
let _classThis;
|
|
@@ -182,7 +169,7 @@ let SceneActivationCC = (() => {
|
|
|
182
169
|
return SceneActivationCC2 = _classThis;
|
|
183
170
|
})();
|
|
184
171
|
let SceneActivationCCSet = (() => {
|
|
185
|
-
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.SceneActivationCommand.Set), (0, import_CommandClassDecorators.useSupervision)(), (0, import_CommandClassDecorators.ccValueProperty)("sceneId", SceneActivationCCValues.sceneId), (0, import_CommandClassDecorators.ccValueProperty)("dimmingDuration", SceneActivationCCValues.dimmingDuration)];
|
|
172
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.SceneActivationCommand.Set), (0, import_CommandClassDecorators.useSupervision)(), (0, import_CommandClassDecorators.ccValueProperty)("sceneId", import_CCValues_generated.SceneActivationCCValues.sceneId), (0, import_CommandClassDecorators.ccValueProperty)("dimmingDuration", import_CCValues_generated.SceneActivationCCValues.dimmingDuration)];
|
|
186
173
|
let _classDescriptor;
|
|
187
174
|
let _classExtraInitializers = [];
|
|
188
175
|
let _classThis;
|