@zwave-js/cc 14.3.10 → 15.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.d.ts +139 -57
- package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
- package/build/cjs/cc/AssociationCC.d.ts +178 -43
- package/build/cjs/cc/AssociationCC.js +0 -4
- package/build/cjs/cc/AssociationCC.js.map +2 -2
- package/build/cjs/cc/AssociationGroupInfoCC.d.ts +138 -38
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
- package/build/cjs/cc/BarrierOperatorCC.d.ts +275 -73
- package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
- package/build/cjs/cc/BasicCC.d.ts +316 -71
- package/build/cjs/cc/BasicCC.js.map +2 -2
- package/build/cjs/cc/BatteryCC.d.ts +759 -164
- package/build/cjs/cc/BatteryCC.js.map +2 -2
- package/build/cjs/cc/BinarySensorCC.d.ts +91 -26
- package/build/cjs/cc/BinarySensorCC.js.map +2 -2
- package/build/cjs/cc/BinarySwitchCC.d.ts +190 -38
- package/build/cjs/cc/BinarySwitchCC.js.map +2 -2
- package/build/cjs/cc/CRC16CC.d.ts +4 -8
- package/build/cjs/cc/CRC16CC.js +4 -27
- package/build/cjs/cc/CRC16CC.js.map +2 -2
- package/build/cjs/cc/CentralSceneCC.d.ts +272 -53
- package/build/cjs/cc/CentralSceneCC.js.map +2 -2
- package/build/cjs/cc/ClimateControlScheduleCC.d.ts +150 -37
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +2 -2
- package/build/cjs/cc/ClockCC.d.ts +3 -3
- package/build/cjs/cc/ClockCC.js.map +2 -2
- package/build/cjs/cc/ColorSwitchCC.d.ts +423 -96
- package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
- package/build/cjs/cc/ConfigurationCC._validateArgs.js +1 -1
- package/build/cjs/cc/ConfigurationCC._validateArgs.js.map +1 -1
- package/build/cjs/cc/ConfigurationCC.d.ts +101 -37
- package/build/cjs/cc/ConfigurationCC.js +0 -8
- package/build/cjs/cc/ConfigurationCC.js.map +2 -2
- package/build/cjs/cc/DeviceResetLocallyCC.d.ts +1 -1
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +2 -2
- package/build/cjs/cc/DoorLockCC._validateArgs.js +1 -1
- package/build/cjs/cc/DoorLockCC._validateArgs.js.map +1 -1
- package/build/cjs/cc/DoorLockCC.d.ts +1731 -419
- package/build/cjs/cc/DoorLockCC.js.map +2 -2
- package/build/cjs/cc/DoorLockLoggingCC.d.ts +64 -12
- package/build/cjs/cc/DoorLockLoggingCC.js.map +2 -2
- package/build/cjs/cc/EnergyProductionCC.d.ts +29 -14
- package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
- package/build/cjs/cc/EntryControlCC.d.ts +308 -57
- package/build/cjs/cc/EntryControlCC.js.map +2 -2
- package/build/cjs/cc/FirmwareUpdateMetaDataCC._validateArgs.d.ts +2 -0
- package/build/cjs/cc/FirmwareUpdateMetaDataCC._validateArgs.js +26 -0
- package/build/cjs/cc/FirmwareUpdateMetaDataCC._validateArgs.js.map +1 -1
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +389 -64
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +154 -8
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlModeCC.d.ts +125 -27
- package/build/cjs/cc/HumidityControlModeCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +64 -18
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.d.ts +116 -39
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
- package/build/cjs/cc/InclusionControllerCC.d.ts +4 -4
- package/build/cjs/cc/InclusionControllerCC.js.map +2 -2
- package/build/cjs/cc/IndicatorCC.d.ts +325 -83
- package/build/cjs/cc/IndicatorCC.js.map +2 -2
- package/build/cjs/cc/IrrigationCC.d.ts +2170 -683
- package/build/cjs/cc/IrrigationCC.js.map +2 -2
- package/build/cjs/cc/LanguageCC.d.ts +128 -26
- package/build/cjs/cc/LanguageCC.js.map +2 -2
- package/build/cjs/cc/LockCC.d.ts +64 -14
- package/build/cjs/cc/LockCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.d.ts +219 -57
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +2 -2
- package/build/cjs/cc/MeterCC.d.ts +364 -89
- package/build/cjs/cc/MeterCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelAssociationCC.d.ts +138 -40
- package/build/cjs/cc/MultiChannelAssociationCC.js +0 -5
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelCC.d.ts +469 -99
- package/build/cjs/cc/MultiChannelCC.js +8 -72
- package/build/cjs/cc/MultiChannelCC.js.map +2 -2
- package/build/cjs/cc/MultiCommandCC.d.ts +4 -8
- package/build/cjs/cc/MultiCommandCC.js +4 -37
- package/build/cjs/cc/MultiCommandCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSensorCC.d.ts +118 -33
- package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +490 -125
- package/build/cjs/cc/MultilevelSwitchCC.js.map +2 -2
- package/build/cjs/cc/NodeNamingCC.d.ts +128 -26
- package/build/cjs/cc/NodeNamingCC.js.map +2 -2
- package/build/cjs/cc/NotificationCC.d.ts +603 -161
- package/build/cjs/cc/NotificationCC.js +12 -1
- package/build/cjs/cc/NotificationCC.js.map +2 -2
- package/build/cjs/cc/PowerlevelCC.d.ts +6 -6
- package/build/cjs/cc/PowerlevelCC.js.map +2 -2
- package/build/cjs/cc/ProtectionCC.d.ts +496 -94
- package/build/cjs/cc/ProtectionCC.js.map +2 -2
- package/build/cjs/cc/SceneActivationCC.d.ts +127 -28
- package/build/cjs/cc/SceneActivationCC.js.map +2 -2
- package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +52 -25
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +2 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +53 -25
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
- package/build/cjs/cc/ScheduleEntryLockCC.d.ts +268 -64
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
- package/build/cjs/cc/Security2CC.d.ts +15 -21
- package/build/cjs/cc/Security2CC.js +32 -347
- package/build/cjs/cc/Security2CC.js.map +3 -3
- package/build/cjs/cc/SecurityCC.d.ts +12 -19
- package/build/cjs/cc/SecurityCC.js +12 -106
- package/build/cjs/cc/SecurityCC.js.map +2 -2
- package/build/cjs/cc/SoundSwitchCC.d.ts +253 -64
- package/build/cjs/cc/SoundSwitchCC.js.map +2 -2
- package/build/cjs/cc/SupervisionCC.d.ts +28 -16
- package/build/cjs/cc/SupervisionCC.js +4 -29
- package/build/cjs/cc/SupervisionCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanModeCC.d.ts +187 -38
- package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanStateCC.d.ts +64 -18
- package/build/cjs/cc/ThermostatFanStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatModeCC.d.ts +189 -40
- package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +65 -19
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetbackCC.d.ts +4 -4
- package/build/cjs/cc/ThermostatSetbackCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +116 -36
- package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
- package/build/cjs/cc/TimeCC.d.ts +6 -6
- package/build/cjs/cc/TimeCC.js.map +2 -2
- package/build/cjs/cc/TimeParametersCC.d.ts +63 -12
- package/build/cjs/cc/TimeParametersCC.js.map +2 -2
- package/build/cjs/cc/TransportServiceCC.d.ts +7 -12
- package/build/cjs/cc/TransportServiceCC.js +3 -20
- package/build/cjs/cc/TransportServiceCC.js.map +2 -2
- package/build/cjs/cc/UserCodeCC._validateArgs.js +1 -1
- package/build/cjs/cc/UserCodeCC._validateArgs.js.map +1 -1
- package/build/cjs/cc/UserCodeCC.d.ts +931 -176
- package/build/cjs/cc/UserCodeCC.js.map +2 -2
- package/build/cjs/cc/VersionCC.d.ts +897 -185
- package/build/cjs/cc/VersionCC.js.map +2 -2
- package/build/cjs/cc/WakeUpCC.d.ts +190 -38
- package/build/cjs/cc/WakeUpCC.js.map +2 -2
- package/build/cjs/cc/WindowCoveringCC.d.ts +193 -103
- package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
- package/build/cjs/cc/ZWavePlusCC.d.ts +311 -51
- package/build/cjs/cc/ZWavePlusCC.js.map +2 -2
- package/build/cjs/cc/ZWaveProtocolCC.d.ts +28 -28
- package/build/cjs/cc/ZWaveProtocolCC.js.map +2 -2
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +4 -4
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +2 -2
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index_browser.d.ts +9 -0
- package/build/cjs/index_browser.js +41 -1
- package/build/cjs/index_browser.js.map +2 -2
- package/build/cjs/lib/API.d.ts +7 -5
- package/build/cjs/lib/API.js +1 -1
- package/build/cjs/lib/API.js.map +2 -2
- package/build/cjs/lib/CommandClass.d.ts +10 -21
- package/build/cjs/lib/CommandClass.js +51 -106
- package/build/cjs/lib/CommandClass.js.map +3 -3
- package/build/cjs/lib/CommandClassDecorators.d.ts +1 -1
- package/build/cjs/lib/CommandClassDecorators.js +3 -3
- package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
- package/build/cjs/lib/Values.d.ts +2 -2
- package/build/cjs/lib/Values.js.map +2 -2
- package/build/cjs/lib/traits.d.ts +94 -0
- package/build/cjs/lib/traits.js +17 -0
- package/build/cjs/lib/traits.js.map +7 -0
- package/build/cjs/lib/utils.d.ts +2 -2
- package/build/cjs/lib/utils.js.map +2 -2
- package/build/esm/cc/AlarmSensorCC.d.ts +139 -57
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +0 -1
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts +178 -43
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +0 -13
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts +138 -38
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +0 -6
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts +275 -73
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +0 -3
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts +316 -71
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +0 -2
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts +759 -164
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +1 -2
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts +91 -26
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +0 -3
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts +190 -38
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +0 -2
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.d.ts +4 -8
- package/build/esm/cc/CRC16CC.d.ts.map +1 -1
- package/build/esm/cc/CRC16CC.js +4 -34
- package/build/esm/cc/CRC16CC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts +272 -53
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +0 -1
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts +150 -37
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +0 -3
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.d.ts +3 -3
- package/build/esm/cc/ClockCC.d.ts.map +1 -1
- package/build/esm/cc/ClockCC.js +0 -1
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts +423 -96
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +0 -6
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC._validateArgs.js +1 -1
- package/build/esm/cc/ConfigurationCC._validateArgs.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts +101 -37
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +0 -25
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.d.ts +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC._validateArgs.js +1 -1
- package/build/esm/cc/DoorLockCC._validateArgs.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts +1731 -419
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +0 -2
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts +64 -12
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +0 -1
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.d.ts +29 -14
- package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +0 -2
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts +308 -57
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +0 -1
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.d.ts +2 -0
- package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.js +20 -0
- package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +389 -64
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +158 -30
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts +125 -27
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +0 -1
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +64 -18
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts +116 -39
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +0 -4
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/InclusionControllerCC.d.ts +4 -4
- package/build/esm/cc/InclusionControllerCC.d.ts.map +1 -1
- package/build/esm/cc/InclusionControllerCC.js +0 -2
- package/build/esm/cc/InclusionControllerCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.d.ts +325 -83
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
- package/build/esm/cc/IndicatorCC.js +0 -7
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts +2170 -683
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +0 -9
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts +128 -26
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +0 -1
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts +64 -14
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +0 -1
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts +2 -2
- 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 +219 -57
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +0 -2
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts +364 -89
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +0 -4
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts +138 -40
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +0 -16
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts +469 -99
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +8 -101
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultiCommandCC.d.ts +4 -8
- package/build/esm/cc/MultiCommandCC.d.ts.map +1 -1
- package/build/esm/cc/MultiCommandCC.js +4 -38
- package/build/esm/cc/MultiCommandCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts +118 -33
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +0 -5
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts +490 -125
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +0 -4
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts +128 -26
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +0 -2
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts +603 -161
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +18 -12
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/PowerlevelCC.d.ts +6 -6
- package/build/esm/cc/PowerlevelCC.d.ts.map +1 -1
- package/build/esm/cc/PowerlevelCC.js +0 -4
- package/build/esm/cc/PowerlevelCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts +496 -94
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +0 -3
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.d.ts +127 -28
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +0 -1
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +52 -25
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +0 -2
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts +53 -25
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +0 -2
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts +268 -64
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +0 -14
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.d.ts +15 -21
- package/build/esm/cc/Security2CC.d.ts.map +1 -1
- package/build/esm/cc/Security2CC.js +27 -475
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.d.ts +12 -19
- package/build/esm/cc/SecurityCC.d.ts.map +1 -1
- package/build/esm/cc/SecurityCC.js +13 -138
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts +253 -64
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +0 -7
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.d.ts +28 -16
- package/build/esm/cc/SupervisionCC.d.ts.map +1 -1
- package/build/esm/cc/SupervisionCC.js +4 -34
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts +187 -38
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +0 -1
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts +64 -18
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts +189 -40
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +0 -3
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts +65 -19
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.d.ts +4 -4
- package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.js +0 -2
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts +116 -36
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +0 -6
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.d.ts +6 -6
- package/build/esm/cc/TimeCC.d.ts.map +1 -1
- package/build/esm/cc/TimeCC.js +0 -4
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts +63 -12
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +0 -1
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.d.ts +7 -12
- package/build/esm/cc/TransportServiceCC.d.ts.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +5 -38
- package/build/esm/cc/TransportServiceCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC._validateArgs.js +1 -1
- package/build/esm/cc/UserCodeCC._validateArgs.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts +931 -176
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +0 -12
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts +897 -185
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +0 -4
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts +190 -38
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +0 -1
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts +193 -103
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +0 -5
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts +311 -51
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +0 -1
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.d.ts +28 -28
- package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +0 -27
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +4 -4
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +0 -3
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/esm/index.d.ts +1 -0
- package/build/esm/index.d.ts.map +1 -1
- package/build/esm/index_browser.d.ts +9 -0
- package/build/esm/index_browser.d.ts.map +1 -1
- package/build/esm/index_browser.js +8 -1
- package/build/esm/index_browser.js.map +1 -1
- package/build/esm/lib/API.d.ts +7 -5
- package/build/esm/lib/API.d.ts.map +1 -1
- package/build/esm/lib/API.js +1 -1
- package/build/esm/lib/API.js.map +1 -1
- package/build/esm/lib/CommandClass.d.ts +10 -21
- package/build/esm/lib/CommandClass.d.ts.map +1 -1
- package/build/esm/lib/CommandClass.js +8 -101
- package/build/esm/lib/CommandClass.js.map +1 -1
- package/build/esm/lib/CommandClassDecorators.d.ts +1 -1
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
- package/build/esm/lib/CommandClassDecorators.js +1 -1
- package/build/esm/lib/CommandClassDecorators.js.map +1 -1
- package/build/esm/lib/Values.d.ts +2 -2
- package/build/esm/lib/Values.d.ts.map +1 -1
- package/build/esm/lib/Values.js.map +1 -1
- package/build/esm/lib/traits.d.ts +94 -0
- package/build/esm/lib/traits.d.ts.map +1 -0
- package/build/esm/lib/traits.js +2 -0
- package/build/esm/lib/traits.js.map +1 -0
- package/build/esm/lib/utils.d.ts +2 -2
- package/build/esm/lib/utils.d.ts.map +1 -1
- package/build/esm/lib/utils.js.map +1 -1
- package/package.json +13 -13
|
@@ -1,150 +1,395 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { type CCEncodingContext, type CCParsingContext } from "@zwave-js/cc";
|
|
2
|
+
import { type GetDeviceConfig } from "@zwave-js/config";
|
|
3
|
+
import { CommandClasses, type ControlsCC, Duration, type EndpointId, type GetEndpoint, type GetNode, type GetSupportedCCVersion, type GetValueDB, type MaybeNotKnown, type MaybeUnknown, type MessageOrCCLogEntry, type NodeId, type SupervisionResult, type SupportsCC, type ValueID, ValueMetadata, type WithAddress } from "@zwave-js/core/safe";
|
|
3
4
|
import { Bytes } from "@zwave-js/shared/safe";
|
|
4
5
|
import { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, SET_VALUE_HOOKS, type SetValueImplementation, type SetValueImplementationHooksFactory } from "../lib/API.js";
|
|
5
6
|
import { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext } from "../lib/CommandClass.js";
|
|
6
7
|
import { BasicCommand } from "../lib/_Types.js";
|
|
7
8
|
export declare const BasicCCValues: Readonly<{
|
|
8
9
|
compatEvent: {
|
|
9
|
-
readonly id:
|
|
10
|
-
commandClass: CommandClasses.Basic;
|
|
11
|
-
property: "event";
|
|
12
|
-
};
|
|
10
|
+
readonly id: ValueIDBase;
|
|
13
11
|
readonly endpoint: (endpoint?: number | undefined) => {
|
|
14
12
|
readonly commandClass: CommandClasses.Basic;
|
|
15
13
|
readonly endpoint: number;
|
|
16
14
|
readonly property: "event";
|
|
17
15
|
};
|
|
18
16
|
readonly is: (valueId: ValueID) => boolean;
|
|
19
|
-
readonly meta: {
|
|
20
|
-
readonly
|
|
21
|
-
readonly writeable: false;
|
|
22
|
-
readonly min: 0;
|
|
23
|
-
readonly max: 255;
|
|
24
|
-
readonly type: "number";
|
|
17
|
+
readonly meta: Readonly<(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
18
|
+
readonly type: "any";
|
|
25
19
|
readonly readable: true;
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
readonly writeable: true;
|
|
21
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
22
|
+
readonly type: "any";
|
|
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";
|
|
31
|
+
readonly readable: true;
|
|
32
|
+
readonly writeable: true;
|
|
33
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
34
|
+
readonly type: "any";
|
|
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;
|
|
28
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<{
|
|
29
50
|
readonly internal: false;
|
|
30
51
|
readonly minVersion: 1;
|
|
52
|
+
readonly secret: false;
|
|
53
|
+
readonly stateful: true;
|
|
31
54
|
readonly supportsEndpoints: true;
|
|
32
|
-
readonly
|
|
33
|
-
|
|
34
|
-
|
|
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<{
|
|
78
|
+
readonly internal: false;
|
|
79
|
+
readonly minVersion: 1;
|
|
80
|
+
readonly secret: false;
|
|
81
|
+
readonly stateful: true;
|
|
82
|
+
readonly supportsEndpoints: true;
|
|
83
|
+
readonly autoCreate: true;
|
|
84
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]; } : never>;
|
|
35
85
|
};
|
|
36
86
|
restorePrevious: {
|
|
37
|
-
readonly id:
|
|
38
|
-
commandClass: CommandClasses.Basic;
|
|
39
|
-
property: "restorePrevious";
|
|
40
|
-
};
|
|
87
|
+
readonly id: ValueIDBase;
|
|
41
88
|
readonly endpoint: (endpoint?: number | undefined) => {
|
|
42
89
|
readonly commandClass: CommandClasses.Basic;
|
|
43
90
|
readonly endpoint: number;
|
|
44
91
|
readonly property: "restorePrevious";
|
|
45
92
|
};
|
|
46
93
|
readonly is: (valueId: ValueID) => boolean;
|
|
47
|
-
readonly meta: {
|
|
48
|
-
readonly
|
|
49
|
-
readonly
|
|
50
|
-
true: string;
|
|
51
|
-
};
|
|
52
|
-
readonly readable: false;
|
|
53
|
-
readonly type: "boolean";
|
|
94
|
+
readonly meta: Readonly<(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
95
|
+
readonly type: "any";
|
|
96
|
+
readonly readable: true;
|
|
54
97
|
readonly writeable: true;
|
|
55
|
-
}
|
|
56
|
-
|
|
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";
|
|
108
|
+
readonly readable: true;
|
|
109
|
+
readonly writeable: true;
|
|
110
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
111
|
+
readonly type: "any";
|
|
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"]> ? {
|
|
57
120
|
readonly internal: false;
|
|
58
121
|
readonly minVersion: 1;
|
|
59
122
|
readonly secret: false;
|
|
60
123
|
readonly stateful: true;
|
|
61
124
|
readonly supportsEndpoints: true;
|
|
62
125
|
readonly autoCreate: true;
|
|
63
|
-
}
|
|
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<{
|
|
155
|
+
readonly internal: false;
|
|
156
|
+
readonly minVersion: 1;
|
|
157
|
+
readonly secret: false;
|
|
158
|
+
readonly stateful: true;
|
|
159
|
+
readonly supportsEndpoints: true;
|
|
160
|
+
readonly autoCreate: true;
|
|
161
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]; } : never>;
|
|
64
162
|
};
|
|
65
163
|
duration: {
|
|
66
|
-
readonly id:
|
|
67
|
-
commandClass: CommandClasses.Basic;
|
|
68
|
-
property: "duration";
|
|
69
|
-
};
|
|
164
|
+
readonly id: ValueIDBase;
|
|
70
165
|
readonly endpoint: (endpoint?: number | undefined) => {
|
|
71
166
|
readonly commandClass: CommandClasses.Basic;
|
|
72
167
|
readonly endpoint: number;
|
|
73
168
|
readonly property: "duration";
|
|
74
169
|
};
|
|
75
170
|
readonly is: (valueId: ValueID) => boolean;
|
|
76
|
-
readonly meta: {
|
|
77
|
-
readonly
|
|
78
|
-
readonly minVersion: number;
|
|
79
|
-
readonly writeable: false;
|
|
80
|
-
readonly type: "duration";
|
|
171
|
+
readonly meta: Readonly<(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
172
|
+
readonly type: "any";
|
|
81
173
|
readonly readable: true;
|
|
82
|
-
|
|
83
|
-
|
|
174
|
+
readonly writeable: true;
|
|
175
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
176
|
+
readonly type: "any";
|
|
177
|
+
readonly readable: true;
|
|
178
|
+
readonly writeable: true;
|
|
179
|
+
}>, ("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<{
|
|
180
|
+
readonly type: "any";
|
|
181
|
+
readonly readable: true;
|
|
182
|
+
readonly writeable: true;
|
|
183
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
184
|
+
readonly type: "any";
|
|
185
|
+
readonly readable: true;
|
|
186
|
+
readonly writeable: true;
|
|
187
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
188
|
+
readonly type: "any";
|
|
189
|
+
readonly readable: true;
|
|
190
|
+
readonly writeable: true;
|
|
191
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
192
|
+
readonly type: "any";
|
|
193
|
+
readonly readable: true;
|
|
194
|
+
readonly writeable: true;
|
|
195
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
|
|
196
|
+
readonly options: Readonly<(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
84
197
|
readonly internal: false;
|
|
85
198
|
readonly minVersion: 1;
|
|
86
199
|
readonly secret: false;
|
|
87
200
|
readonly stateful: true;
|
|
88
201
|
readonly supportsEndpoints: true;
|
|
89
202
|
readonly autoCreate: true;
|
|
90
|
-
}
|
|
203
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
204
|
+
readonly internal: false;
|
|
205
|
+
readonly minVersion: 1;
|
|
206
|
+
readonly secret: false;
|
|
207
|
+
readonly stateful: true;
|
|
208
|
+
readonly supportsEndpoints: true;
|
|
209
|
+
readonly autoCreate: true;
|
|
210
|
+
}, ("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"]> ? {
|
|
211
|
+
readonly internal: false;
|
|
212
|
+
readonly minVersion: 1;
|
|
213
|
+
readonly secret: false;
|
|
214
|
+
readonly stateful: true;
|
|
215
|
+
readonly supportsEndpoints: true;
|
|
216
|
+
readonly autoCreate: true;
|
|
217
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
218
|
+
readonly internal: false;
|
|
219
|
+
readonly minVersion: 1;
|
|
220
|
+
readonly secret: false;
|
|
221
|
+
readonly stateful: true;
|
|
222
|
+
readonly supportsEndpoints: true;
|
|
223
|
+
readonly autoCreate: true;
|
|
224
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]] ? never : K]: (import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
225
|
+
readonly internal: false;
|
|
226
|
+
readonly minVersion: 1;
|
|
227
|
+
readonly secret: false;
|
|
228
|
+
readonly stateful: true;
|
|
229
|
+
readonly supportsEndpoints: true;
|
|
230
|
+
readonly autoCreate: true;
|
|
231
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
232
|
+
readonly internal: false;
|
|
233
|
+
readonly minVersion: 1;
|
|
234
|
+
readonly secret: false;
|
|
235
|
+
readonly stateful: true;
|
|
236
|
+
readonly supportsEndpoints: true;
|
|
237
|
+
readonly autoCreate: true;
|
|
238
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]; } : never>;
|
|
91
239
|
};
|
|
92
240
|
targetValue: {
|
|
93
|
-
readonly id:
|
|
94
|
-
commandClass: CommandClasses.Basic;
|
|
95
|
-
property: "targetValue";
|
|
96
|
-
};
|
|
241
|
+
readonly id: ValueIDBase;
|
|
97
242
|
readonly endpoint: (endpoint?: number | undefined) => {
|
|
98
243
|
readonly commandClass: CommandClasses.Basic;
|
|
99
244
|
readonly endpoint: number;
|
|
100
245
|
readonly property: "targetValue";
|
|
101
246
|
};
|
|
102
247
|
readonly is: (valueId: ValueID) => boolean;
|
|
103
|
-
readonly meta: {
|
|
104
|
-
readonly
|
|
105
|
-
readonly forceCreation: boolean;
|
|
106
|
-
readonly min: 0;
|
|
107
|
-
readonly max: 255;
|
|
108
|
-
readonly type: "number";
|
|
248
|
+
readonly meta: Readonly<(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
249
|
+
readonly type: "any";
|
|
109
250
|
readonly readable: true;
|
|
110
251
|
readonly writeable: true;
|
|
111
|
-
}
|
|
112
|
-
|
|
252
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
253
|
+
readonly type: "any";
|
|
254
|
+
readonly readable: true;
|
|
255
|
+
readonly writeable: true;
|
|
256
|
+
}>, ("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<{
|
|
257
|
+
readonly type: "any";
|
|
258
|
+
readonly readable: true;
|
|
259
|
+
readonly writeable: true;
|
|
260
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
261
|
+
readonly type: "any";
|
|
262
|
+
readonly readable: true;
|
|
263
|
+
readonly writeable: true;
|
|
264
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
265
|
+
readonly type: "any";
|
|
266
|
+
readonly readable: true;
|
|
267
|
+
readonly writeable: true;
|
|
268
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
269
|
+
readonly type: "any";
|
|
270
|
+
readonly readable: true;
|
|
271
|
+
readonly writeable: true;
|
|
272
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
|
|
273
|
+
readonly options: Readonly<(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
113
274
|
readonly internal: false;
|
|
114
275
|
readonly minVersion: 1;
|
|
115
276
|
readonly secret: false;
|
|
116
277
|
readonly stateful: true;
|
|
117
278
|
readonly supportsEndpoints: true;
|
|
118
279
|
readonly autoCreate: true;
|
|
119
|
-
}
|
|
280
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
281
|
+
readonly internal: false;
|
|
282
|
+
readonly minVersion: 1;
|
|
283
|
+
readonly secret: false;
|
|
284
|
+
readonly stateful: true;
|
|
285
|
+
readonly supportsEndpoints: true;
|
|
286
|
+
readonly autoCreate: true;
|
|
287
|
+
}, ("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"]> ? {
|
|
288
|
+
readonly internal: false;
|
|
289
|
+
readonly minVersion: 1;
|
|
290
|
+
readonly secret: false;
|
|
291
|
+
readonly stateful: true;
|
|
292
|
+
readonly supportsEndpoints: true;
|
|
293
|
+
readonly autoCreate: true;
|
|
294
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
295
|
+
readonly internal: false;
|
|
296
|
+
readonly minVersion: 1;
|
|
297
|
+
readonly secret: false;
|
|
298
|
+
readonly stateful: true;
|
|
299
|
+
readonly supportsEndpoints: true;
|
|
300
|
+
readonly autoCreate: true;
|
|
301
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]] ? never : K]: (import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
302
|
+
readonly internal: false;
|
|
303
|
+
readonly minVersion: 1;
|
|
304
|
+
readonly secret: false;
|
|
305
|
+
readonly stateful: true;
|
|
306
|
+
readonly supportsEndpoints: true;
|
|
307
|
+
readonly autoCreate: true;
|
|
308
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
309
|
+
readonly internal: false;
|
|
310
|
+
readonly minVersion: 1;
|
|
311
|
+
readonly secret: false;
|
|
312
|
+
readonly stateful: true;
|
|
313
|
+
readonly supportsEndpoints: true;
|
|
314
|
+
readonly autoCreate: true;
|
|
315
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]; } : never>;
|
|
120
316
|
};
|
|
121
317
|
currentValue: {
|
|
122
|
-
readonly id:
|
|
123
|
-
commandClass: CommandClasses.Basic;
|
|
124
|
-
property: "currentValue";
|
|
125
|
-
};
|
|
318
|
+
readonly id: ValueIDBase;
|
|
126
319
|
readonly endpoint: (endpoint?: number | undefined) => {
|
|
127
320
|
readonly commandClass: CommandClasses.Basic;
|
|
128
321
|
readonly endpoint: number;
|
|
129
322
|
readonly property: "currentValue";
|
|
130
323
|
};
|
|
131
324
|
readonly is: (valueId: ValueID) => boolean;
|
|
132
|
-
readonly meta: {
|
|
133
|
-
readonly
|
|
134
|
-
readonly writeable: false;
|
|
135
|
-
readonly max: 99;
|
|
136
|
-
readonly min: 0;
|
|
137
|
-
readonly type: "number";
|
|
325
|
+
readonly meta: Readonly<(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
326
|
+
readonly type: "any";
|
|
138
327
|
readonly readable: true;
|
|
139
|
-
|
|
140
|
-
|
|
328
|
+
readonly writeable: true;
|
|
329
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
330
|
+
readonly type: "any";
|
|
331
|
+
readonly readable: true;
|
|
332
|
+
readonly writeable: true;
|
|
333
|
+
}>, ("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<{
|
|
334
|
+
readonly type: "any";
|
|
335
|
+
readonly readable: true;
|
|
336
|
+
readonly writeable: true;
|
|
337
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
338
|
+
readonly type: "any";
|
|
339
|
+
readonly readable: true;
|
|
340
|
+
readonly writeable: true;
|
|
341
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
342
|
+
readonly type: "any";
|
|
343
|
+
readonly readable: true;
|
|
344
|
+
readonly writeable: true;
|
|
345
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
346
|
+
readonly type: "any";
|
|
347
|
+
readonly readable: true;
|
|
348
|
+
readonly writeable: true;
|
|
349
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
|
|
350
|
+
readonly options: Readonly<(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
141
351
|
readonly internal: false;
|
|
142
352
|
readonly minVersion: 1;
|
|
143
353
|
readonly secret: false;
|
|
144
354
|
readonly stateful: true;
|
|
145
355
|
readonly supportsEndpoints: true;
|
|
146
356
|
readonly autoCreate: true;
|
|
147
|
-
}
|
|
357
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
358
|
+
readonly internal: false;
|
|
359
|
+
readonly minVersion: 1;
|
|
360
|
+
readonly secret: false;
|
|
361
|
+
readonly stateful: true;
|
|
362
|
+
readonly supportsEndpoints: true;
|
|
363
|
+
readonly autoCreate: true;
|
|
364
|
+
}, ("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"]> ? {
|
|
365
|
+
readonly internal: false;
|
|
366
|
+
readonly minVersion: 1;
|
|
367
|
+
readonly secret: false;
|
|
368
|
+
readonly stateful: true;
|
|
369
|
+
readonly supportsEndpoints: true;
|
|
370
|
+
readonly autoCreate: true;
|
|
371
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
372
|
+
readonly internal: false;
|
|
373
|
+
readonly minVersion: 1;
|
|
374
|
+
readonly secret: false;
|
|
375
|
+
readonly stateful: true;
|
|
376
|
+
readonly supportsEndpoints: true;
|
|
377
|
+
readonly autoCreate: true;
|
|
378
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]] ? never : K]: (import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
379
|
+
readonly internal: false;
|
|
380
|
+
readonly minVersion: 1;
|
|
381
|
+
readonly secret: false;
|
|
382
|
+
readonly stateful: true;
|
|
383
|
+
readonly supportsEndpoints: true;
|
|
384
|
+
readonly autoCreate: true;
|
|
385
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
386
|
+
readonly internal: false;
|
|
387
|
+
readonly minVersion: 1;
|
|
388
|
+
readonly secret: false;
|
|
389
|
+
readonly stateful: true;
|
|
390
|
+
readonly supportsEndpoints: true;
|
|
391
|
+
readonly autoCreate: true;
|
|
392
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]; } : never>;
|
|
148
393
|
};
|
|
149
394
|
}>;
|
|
150
395
|
export declare class BasicCCAPI extends CCAPI {
|
|
@@ -168,7 +413,7 @@ export declare class BasicCCSet extends BasicCC {
|
|
|
168
413
|
constructor(options: WithAddress<BasicCCSetOptions>);
|
|
169
414
|
static from(raw: CCRaw, ctx: CCParsingContext): BasicCCSet;
|
|
170
415
|
targetValue: number;
|
|
171
|
-
serialize(ctx: CCEncodingContext): Bytes
|
|
416
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
172
417
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
173
418
|
}
|
|
174
419
|
export interface BasicCCReportOptions {
|
|
@@ -183,7 +428,7 @@ export declare class BasicCCReport extends BasicCC {
|
|
|
183
428
|
readonly targetValue: MaybeUnknown<number> | undefined;
|
|
184
429
|
readonly duration: Duration | undefined;
|
|
185
430
|
persistValues(ctx: PersistValuesContext): boolean;
|
|
186
|
-
serialize(ctx: CCEncodingContext): Bytes
|
|
431
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
187
432
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
188
433
|
}
|
|
189
434
|
export declare class BasicCCGet extends BasicCC {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/BasicCC.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n\tCommandClasses,\n\ttype ControlsCC,\n\tDuration,\n\ttype EndpointId,\n\ttype GetEndpoint,\n\ttype MaybeNotKnown,\n\ttype MaybeUnknown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype NodeId,\n\ttype SupervisionResult,\n\ttype SupportsCC,\n\ttype ValueID,\n\tValueMetadata,\n\ttype WithAddress,\n\tmaybeUnknownToString,\n\tparseMaybeNumber,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport type {\n\tCCEncodingContext,\n\tCCParsingContext,\n\tGetDeviceConfig,\n\tGetNode,\n\tGetSupportedCCVersion,\n\tGetValueDB,\n} from \"@zwave-js/host/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { 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\tSET_VALUE_HOOKS,\n\ttype SetValueImplementation,\n\ttype SetValueImplementationHooksFactory,\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 { BasicCommand } from \"../lib/_Types.js\";\n\nexport const BasicCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses.Basic, {\n\t\t...V.staticProperty(\"currentValue\", {\n\t\t\t...ValueMetadata.ReadOnlyLevel,\n\t\t\tlabel: \"Current value\" as const,\n\t\t}),\n\t\t...V.staticProperty(\"targetValue\", {\n\t\t\t...ValueMetadata.UInt8,\n\t\t\tlabel: \"Target value\" as const,\n\t\t\tforceCreation: true,\n\t\t}),\n\t\t...V.staticProperty(\"duration\", {\n\t\t\t...ValueMetadata.ReadOnlyDuration,\n\t\t\tlabel: \"Remaining duration\" as const,\n\t\t\tminVersion: 2,\n\t\t}),\n\n\t\t...V.staticProperty(\"restorePrevious\", {\n\t\t\t...ValueMetadata.WriteOnlyBoolean,\n\t\t\tlabel: \"Restore previous value\" as const,\n\t\t\tstates: {\n\t\t\t\ttrue: \"Restore\",\n\t\t\t},\n\t\t}),\n\n\t\t...V.staticPropertyWithName(\n\t\t\t\"compatEvent\",\n\t\t\t\"event\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.ReadOnlyUInt8,\n\t\t\t\tlabel: \"Event value\",\n\t\t\t} as const,\n\t\t\t{\n\t\t\t\tstateful: false,\n\t\t\t\tautoCreate: false,\n\t\t\t},\n\t\t),\n\t}),\n});\n\n@API(CommandClasses.Basic)\nexport class BasicCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: BasicCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase BasicCommand.Get:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase BasicCommand.Set:\n\t\t\t\treturn true;\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: BasicCCAPI, { property }, value) {\n\t\t\t// Enable restoring the previous non-zero value\n\t\t\tif (property === \"restorePrevious\") {\n\t\t\t\tproperty = \"targetValue\";\n\t\t\t\tvalue = 255;\n\t\t\t}\n\n\t\t\tif (property !== \"targetValue\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof value !== \"number\") {\n\t\t\t\tthrowWrongValueType(\n\t\t\t\t\tthis.ccId,\n\t\t\t\t\tproperty,\n\t\t\t\t\t\"number\",\n\t\t\t\t\ttypeof value,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn this.set(value);\n\t\t};\n\t}\n\n\tprotected [SET_VALUE_HOOKS]: SetValueImplementationHooksFactory = (\n\t\t{ property },\n\t\tvalue,\n\t\t_options,\n\t) => {\n\t\t// Enable restoring the previous non-zero value\n\t\tif (property === \"restorePrevious\") {\n\t\t\tproperty = \"targetValue\";\n\t\t\tvalue = 255;\n\t\t}\n\n\t\tif (property === \"targetValue\") {\n\t\t\tconst currentValueValueId = BasicCCValues.currentValue.endpoint(\n\t\t\t\tthis.endpoint.index,\n\t\t\t);\n\t\t\treturn {\n\t\t\t\toptimisticallyUpdateRelatedValues: (\n\t\t\t\t\t_supervisedAndSuccessful,\n\t\t\t\t) => {\n\t\t\t\t\t// Only update currentValue for valid target values\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof value === \"number\"\n\t\t\t\t\t\t&& value >= 0\n\t\t\t\t\t\t&& value <= 99\n\t\t\t\t\t) {\n\t\t\t\t\t\tif (this.isSinglecast()) {\n\t\t\t\t\t\t\tthis.tryGetValueDB()?.setValue(\n\t\t\t\t\t\t\t\tcurrentValueValueId,\n\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else if (this.isMulticast()) {\n\t\t\t\t\t\t\t// Figure out which nodes were affected by this command\n\t\t\t\t\t\t\tconst affectedNodes = this.endpoint.node\n\t\t\t\t\t\t\t\t.physicalNodes.filter(\n\t\t\t\t\t\t\t\t\t(node) =>\n\t\t\t\t\t\t\t\t\t\tnode\n\t\t\t\t\t\t\t\t\t\t\t.getEndpoint(this.endpoint.index)\n\t\t\t\t\t\t\t\t\t\t\t?.supportsCC(this.ccId),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t// and optimistically update the currentValue\n\t\t\t\t\t\t\tfor (const node of affectedNodes) {\n\t\t\t\t\t\t\t\tthis.host\n\t\t\t\t\t\t\t\t\t.tryGetValueDB(node.id)\n\t\t\t\t\t\t\t\t\t?.setValue(currentValueValueId, value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tforceVerifyChanges: () => {\n\t\t\t\t\t// If we don't know the actual value, we need to verify the change, regardless of the supervision result\n\t\t\t\t\treturn value === 255;\n\t\t\t\t},\n\t\t\t\tverifyChanges: () => {\n\t\t\t\t\tif (\n\t\t\t\t\t\tthis.isSinglecast()\n\t\t\t\t\t\t// We generally don't want to poll for multicasts because of how much traffic it can cause\n\t\t\t\t\t\t// However, when setting the value 255 (ON), we don't know the actual state\n\t\t\t\t\t\t|| (this.isMulticast() && value === 255)\n\t\t\t\t\t) {\n\t\t\t\t\t\t// We query currentValue instead of targetValue to make sure that unsolicited updates cancel the scheduled poll\n\t\t\t\t\t\t(this as this).schedulePoll(\n\t\t\t\t\t\t\tcurrentValueValueId,\n\t\t\t\t\t\t\tvalue === 255 ? undefined : value,\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};\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: BasicCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"currentValue\":\n\t\t\t\tcase \"targetValue\":\n\t\t\t\tcase \"duration\":\n\t\t\t\t\treturn (await this.get())?.[property];\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(BasicCommand, BasicCommand.Get);\n\n\t\tconst cc = new BasicCCGet({\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<BasicCCReport>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\tthis.tryGetValueDB()?.setValue(\n\t\t\t\tBasicCCValues.currentValue.endpoint(this.endpoint.index),\n\t\t\t\tresponse.currentValue,\n\t\t\t);\n\t\t\treturn pick(response, [\"currentValue\", \"targetValue\", \"duration\"]);\n\t\t}\n\t}\n\n\t@validateArgs()\n\tpublic async set(\n\t\ttargetValue: number,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(BasicCommand, BasicCommand.Set);\n\n\t\tconst cc = new BasicCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\ttargetValue,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses.Basic)\n@implementedVersion(2) // Update tests in CommandClass.test.ts when changing this\n@ccValues(BasicCCValues)\nexport class BasicCC extends CommandClass {\n\tdeclare ccCommand: BasicCommand;\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\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// Assume that the endpoint supports Basic CC, so the values get persisted correctly.\n\t\tendpoint.addCC(CommandClasses.Basic, { isSupported: true });\n\n\t\t// try to query the current state\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remove Basic CC support again when there was no response\n\t\tif (\n\t\t\tthis.getValue(ctx, BasicCCValues.currentValue) == undefined\n\t\t) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t\"No response to Basic Get command, assuming Basic CC is unsupported...\",\n\t\t\t});\n\t\t\t// SDS14223: A controlling node MUST conclude that the Basic Command Class is not supported by a node (or\n\t\t\t// endpoint) if no Basic Report is returned.\n\t\t\tendpoint.addCC(CommandClasses.Basic, { isSupported: false });\n\t\t\tif (!endpoint.controlsCC(CommandClasses.Basic)) {\n\t\t\t\tendpoint.removeCC(CommandClasses.Basic);\n\t\t\t}\n\t\t}\n\n\t\t// Remember that the interview is complete\n\t\tthis.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.Basic,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\t// try to query the current state\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying Basic CC state...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\n\t\tconst basicResponse = await api.get();\n\t\tif (basicResponse) {\n\t\t\tlet logMessage = `received Basic CC state:\ncurrent value: ${basicResponse.currentValue}`;\n\t\t\tif (basicResponse.targetValue != undefined) {\n\t\t\t\tlogMessage += `\ntarget value: ${basicResponse.targetValue}\nremaining duration: ${basicResponse.duration?.toString() ?? \"undefined\"}`;\n\t\t\t}\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic override getDefinedValueIDs(\n\t\tctx:\n\t\t\t& GetValueDB\n\t\t\t& GetSupportedCCVersion\n\t\t\t& GetDeviceConfig\n\t\t\t& GetNode<\n\t\t\t\tNodeId & GetEndpoint<EndpointId & SupportsCC & ControlsCC>\n\t\t\t>,\n\t): ValueID[] {\n\t\tconst ret: ValueID[] = [];\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\n\t\tconst compat = ctx.getDeviceConfig?.(endpoint.nodeId)?.compat;\n\t\tif (compat?.mapBasicSet === \"event\") {\n\t\t\t// Add the compat event value if it should be exposed\n\t\t\tret.push(BasicCCValues.compatEvent.endpoint(endpoint.index));\n\t\t}\n\n\t\tif (endpoint.supportsCC(this.ccId)) {\n\t\t\t// Defer to the base implementation if Basic CC is supported.\n\t\t\t// This implies that no other actuator CC is supported.\n\t\t\tret.push(...super.getDefinedValueIDs(ctx));\n\t\t} else if (endpoint.controlsCC(CommandClasses.Basic)) {\n\t\t\t// During the interview, we mark Basic CC as controlled only if we want to expose currentValue\n\t\t\tret.push(BasicCCValues.currentValue.endpoint(endpoint.index));\n\t\t}\n\n\t\treturn ret;\n\t}\n}\n\n// @publicAPI\nexport interface BasicCCSetOptions {\n\ttargetValue: number;\n}\n\n@CCCommand(BasicCommand.Set)\n@useSupervision()\nexport class BasicCCSet extends BasicCC {\n\tpublic constructor(\n\t\toptions: WithAddress<BasicCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.targetValue = options.targetValue;\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): BasicCCSet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst targetValue = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\ttargetValue,\n\t\t});\n\t}\n\n\tpublic targetValue: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([this.targetValue]);\n\t\t// eslint-disable-next-line @typescript-eslint/no-deprecated\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: { \"target value\": this.targetValue },\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface BasicCCReportOptions {\n\tcurrentValue?: MaybeUnknown<number>;\n\ttargetValue?: MaybeUnknown<number>;\n\tduration?: Duration;\n}\n\n@CCCommand(BasicCommand.Report)\n@ccValueProperty(\"currentValue\", BasicCCValues.currentValue)\n@ccValueProperty(\"targetValue\", BasicCCValues.targetValue)\n@ccValueProperty(\"duration\", BasicCCValues.duration)\nexport class BasicCCReport extends BasicCC {\n\t// @noCCValues See comment in the constructor\n\tpublic constructor(\n\t\toptions: WithAddress<BasicCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.currentValue = options.currentValue;\n\t\tthis.targetValue = options.targetValue;\n\t\tthis.duration = options.duration;\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): BasicCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst currentValue: MaybeUnknown<number> | undefined =\n\t\t\t// 0xff is a legacy value for 100% (99)\n\t\t\traw.payload[0] === 0xff\n\t\t\t\t? 99\n\t\t\t\t: parseMaybeNumber(raw.payload[0]);\n\t\tvalidatePayload(currentValue !== undefined);\n\n\t\tlet targetValue: MaybeUnknown<number> | undefined;\n\t\tlet duration: Duration | undefined;\n\n\t\tif (raw.payload.length >= 3) {\n\t\t\ttargetValue = parseMaybeNumber(raw.payload[1]);\n\t\t\tduration = Duration.parseReport(raw.payload[2]);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tcurrentValue,\n\t\t\ttargetValue,\n\t\t\tduration,\n\t\t});\n\t}\n\n\tpublic currentValue: MaybeUnknown<number> | undefined;\n\n\tpublic readonly targetValue: MaybeUnknown<number> | undefined;\n\n\tpublic readonly duration: Duration | undefined;\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\t// Basic CC Report persists its values itself, since there are some\n\t\t// specific rules when which value may be persisted.\n\t\t// These rules are essentially encoded in the getDefinedValueIDs overload,\n\t\t// so we simply reuse that here.\n\n\t\t// Figure out which values may be persisted.\n\t\tconst definedValueIDs = this.getDefinedValueIDs(ctx);\n\t\tconst shouldPersistCurrentValue = definedValueIDs.some((vid) =>\n\t\t\tBasicCCValues.currentValue.is(vid)\n\t\t);\n\t\tconst shouldPersistTargetValue = definedValueIDs.some((vid) =>\n\t\t\tBasicCCValues.targetValue.is(vid)\n\t\t);\n\t\tconst shouldPersistDuration = definedValueIDs.some((vid) =>\n\t\t\tBasicCCValues.duration.is(vid)\n\t\t);\n\n\t\tif (this.currentValue !== undefined && shouldPersistCurrentValue) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tBasicCCValues.currentValue,\n\t\t\t\tthis.currentValue,\n\t\t\t);\n\t\t}\n\t\tif (this.targetValue !== undefined && shouldPersistTargetValue) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tBasicCCValues.targetValue,\n\t\t\t\tthis.targetValue,\n\t\t\t);\n\t\t}\n\t\tif (this.duration !== undefined && shouldPersistDuration) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tBasicCCValues.duration,\n\t\t\t\tthis.duration,\n\t\t\t);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([\n\t\t\tthis.currentValue ?? 0xfe,\n\t\t\tthis.targetValue ?? 0xfe,\n\t\t\t(this.duration ?? Duration.unknown()).serializeReport(),\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 send the current value\n\t\t\tthis.payload = this.payload.subarray(0, 1);\n\t\t}\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-deprecated\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\t\"current value\": maybeUnknownToString(this.currentValue),\n\t\t};\n\t\tif (this.targetValue !== undefined) {\n\t\t\tmessage[\"target value\"] = maybeUnknownToString(this.targetValue);\n\t\t}\n\t\tif (this.duration != undefined) {\n\t\t\tmessage.duration = this.duration.toString();\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(BasicCommand.Get)\n@expectedCCResponse(BasicCCReport)\nexport class BasicCCGet extends BasicCC {}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
4
|
+
"sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport { type GetDeviceConfig } from \"@zwave-js/config\";\nimport {\n\tCommandClasses,\n\ttype ControlsCC,\n\tDuration,\n\ttype EndpointId,\n\ttype GetEndpoint,\n\ttype GetNode,\n\ttype GetSupportedCCVersion,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MaybeUnknown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype NodeId,\n\ttype SupervisionResult,\n\ttype SupportsCC,\n\ttype ValueID,\n\tValueMetadata,\n\ttype WithAddress,\n\tmaybeUnknownToString,\n\tparseMaybeNumber,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { 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\tSET_VALUE_HOOKS,\n\ttype SetValueImplementation,\n\ttype SetValueImplementationHooksFactory,\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 { BasicCommand } from \"../lib/_Types.js\";\n\nexport const BasicCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses.Basic, {\n\t\t...V.staticProperty(\"currentValue\", {\n\t\t\t...ValueMetadata.ReadOnlyLevel,\n\t\t\tlabel: \"Current value\" as const,\n\t\t}),\n\t\t...V.staticProperty(\"targetValue\", {\n\t\t\t...ValueMetadata.UInt8,\n\t\t\tlabel: \"Target value\" as const,\n\t\t\tforceCreation: true,\n\t\t}),\n\t\t...V.staticProperty(\"duration\", {\n\t\t\t...ValueMetadata.ReadOnlyDuration,\n\t\t\tlabel: \"Remaining duration\" as const,\n\t\t\tminVersion: 2,\n\t\t}),\n\n\t\t...V.staticProperty(\"restorePrevious\", {\n\t\t\t...ValueMetadata.WriteOnlyBoolean,\n\t\t\tlabel: \"Restore previous value\" as const,\n\t\t\tstates: {\n\t\t\t\ttrue: \"Restore\",\n\t\t\t},\n\t\t}),\n\n\t\t...V.staticPropertyWithName(\n\t\t\t\"compatEvent\",\n\t\t\t\"event\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.ReadOnlyUInt8,\n\t\t\t\tlabel: \"Event value\",\n\t\t\t} as const,\n\t\t\t{\n\t\t\t\tstateful: false,\n\t\t\t\tautoCreate: false,\n\t\t\t},\n\t\t),\n\t}),\n});\n\n@API(CommandClasses.Basic)\nexport class BasicCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: BasicCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase BasicCommand.Get:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase BasicCommand.Set:\n\t\t\t\treturn true;\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: BasicCCAPI, { property }, value) {\n\t\t\t// Enable restoring the previous non-zero value\n\t\t\tif (property === \"restorePrevious\") {\n\t\t\t\tproperty = \"targetValue\";\n\t\t\t\tvalue = 255;\n\t\t\t}\n\n\t\t\tif (property !== \"targetValue\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof value !== \"number\") {\n\t\t\t\tthrowWrongValueType(\n\t\t\t\t\tthis.ccId,\n\t\t\t\t\tproperty,\n\t\t\t\t\t\"number\",\n\t\t\t\t\ttypeof value,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn this.set(value);\n\t\t};\n\t}\n\n\tprotected [SET_VALUE_HOOKS]: SetValueImplementationHooksFactory = (\n\t\t{ property },\n\t\tvalue,\n\t\t_options,\n\t) => {\n\t\t// Enable restoring the previous non-zero value\n\t\tif (property === \"restorePrevious\") {\n\t\t\tproperty = \"targetValue\";\n\t\t\tvalue = 255;\n\t\t}\n\n\t\tif (property === \"targetValue\") {\n\t\t\tconst currentValueValueId = BasicCCValues.currentValue.endpoint(\n\t\t\t\tthis.endpoint.index,\n\t\t\t);\n\t\t\treturn {\n\t\t\t\toptimisticallyUpdateRelatedValues: (\n\t\t\t\t\t_supervisedAndSuccessful,\n\t\t\t\t) => {\n\t\t\t\t\t// Only update currentValue for valid target values\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof value === \"number\"\n\t\t\t\t\t\t&& value >= 0\n\t\t\t\t\t\t&& value <= 99\n\t\t\t\t\t) {\n\t\t\t\t\t\tif (this.isSinglecast()) {\n\t\t\t\t\t\t\tthis.tryGetValueDB()?.setValue(\n\t\t\t\t\t\t\t\tcurrentValueValueId,\n\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else if (this.isMulticast()) {\n\t\t\t\t\t\t\t// Figure out which nodes were affected by this command\n\t\t\t\t\t\t\tconst affectedNodes = this.endpoint.node\n\t\t\t\t\t\t\t\t.physicalNodes.filter(\n\t\t\t\t\t\t\t\t\t(node) =>\n\t\t\t\t\t\t\t\t\t\tnode\n\t\t\t\t\t\t\t\t\t\t\t.getEndpoint(this.endpoint.index)\n\t\t\t\t\t\t\t\t\t\t\t?.supportsCC(this.ccId),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t// and optimistically update the currentValue\n\t\t\t\t\t\t\tfor (const node of affectedNodes) {\n\t\t\t\t\t\t\t\tthis.host\n\t\t\t\t\t\t\t\t\t.tryGetValueDB(node.id)\n\t\t\t\t\t\t\t\t\t?.setValue(currentValueValueId, value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tforceVerifyChanges: () => {\n\t\t\t\t\t// If we don't know the actual value, we need to verify the change, regardless of the supervision result\n\t\t\t\t\treturn value === 255;\n\t\t\t\t},\n\t\t\t\tverifyChanges: () => {\n\t\t\t\t\tif (\n\t\t\t\t\t\tthis.isSinglecast()\n\t\t\t\t\t\t// We generally don't want to poll for multicasts because of how much traffic it can cause\n\t\t\t\t\t\t// However, when setting the value 255 (ON), we don't know the actual state\n\t\t\t\t\t\t|| (this.isMulticast() && value === 255)\n\t\t\t\t\t) {\n\t\t\t\t\t\t// We query currentValue instead of targetValue to make sure that unsolicited updates cancel the scheduled poll\n\t\t\t\t\t\t(this as this).schedulePoll(\n\t\t\t\t\t\t\tcurrentValueValueId,\n\t\t\t\t\t\t\tvalue === 255 ? undefined : value,\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};\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: BasicCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"currentValue\":\n\t\t\t\tcase \"targetValue\":\n\t\t\t\tcase \"duration\":\n\t\t\t\t\treturn (await this.get())?.[property];\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(BasicCommand, BasicCommand.Get);\n\n\t\tconst cc = new BasicCCGet({\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<BasicCCReport>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\tthis.tryGetValueDB()?.setValue(\n\t\t\t\tBasicCCValues.currentValue.endpoint(this.endpoint.index),\n\t\t\t\tresponse.currentValue,\n\t\t\t);\n\t\t\treturn pick(response, [\"currentValue\", \"targetValue\", \"duration\"]);\n\t\t}\n\t}\n\n\t@validateArgs()\n\tpublic async set(\n\t\ttargetValue: number,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(BasicCommand, BasicCommand.Set);\n\n\t\tconst cc = new BasicCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\ttargetValue,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses.Basic)\n@implementedVersion(2) // Update tests in CommandClass.test.ts when changing this\n@ccValues(BasicCCValues)\nexport class BasicCC extends CommandClass {\n\tdeclare ccCommand: BasicCommand;\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\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// Assume that the endpoint supports Basic CC, so the values get persisted correctly.\n\t\tendpoint.addCC(CommandClasses.Basic, { isSupported: true });\n\n\t\t// try to query the current state\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remove Basic CC support again when there was no response\n\t\tif (\n\t\t\tthis.getValue(ctx, BasicCCValues.currentValue) == undefined\n\t\t) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t\"No response to Basic Get command, assuming Basic CC is unsupported...\",\n\t\t\t});\n\t\t\t// SDS14223: A controlling node MUST conclude that the Basic Command Class is not supported by a node (or\n\t\t\t// endpoint) if no Basic Report is returned.\n\t\t\tendpoint.addCC(CommandClasses.Basic, { isSupported: false });\n\t\t\tif (!endpoint.controlsCC(CommandClasses.Basic)) {\n\t\t\t\tendpoint.removeCC(CommandClasses.Basic);\n\t\t\t}\n\t\t}\n\n\t\t// Remember that the interview is complete\n\t\tthis.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.Basic,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\t// try to query the current state\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying Basic CC state...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\n\t\tconst basicResponse = await api.get();\n\t\tif (basicResponse) {\n\t\t\tlet logMessage = `received Basic CC state:\ncurrent value: ${basicResponse.currentValue}`;\n\t\t\tif (basicResponse.targetValue != undefined) {\n\t\t\t\tlogMessage += `\ntarget value: ${basicResponse.targetValue}\nremaining duration: ${basicResponse.duration?.toString() ?? \"undefined\"}`;\n\t\t\t}\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic override getDefinedValueIDs(\n\t\tctx:\n\t\t\t& GetValueDB\n\t\t\t& GetSupportedCCVersion\n\t\t\t& GetDeviceConfig\n\t\t\t& GetNode<\n\t\t\t\tNodeId & GetEndpoint<EndpointId & SupportsCC & ControlsCC>\n\t\t\t>,\n\t): ValueID[] {\n\t\tconst ret: ValueID[] = [];\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\n\t\tconst compat = ctx.getDeviceConfig?.(endpoint.nodeId)?.compat;\n\t\tif (compat?.mapBasicSet === \"event\") {\n\t\t\t// Add the compat event value if it should be exposed\n\t\t\tret.push(BasicCCValues.compatEvent.endpoint(endpoint.index));\n\t\t}\n\n\t\tif (endpoint.supportsCC(this.ccId)) {\n\t\t\t// Defer to the base implementation if Basic CC is supported.\n\t\t\t// This implies that no other actuator CC is supported.\n\t\t\tret.push(...super.getDefinedValueIDs(ctx));\n\t\t} else if (endpoint.controlsCC(CommandClasses.Basic)) {\n\t\t\t// During the interview, we mark Basic CC as controlled only if we want to expose currentValue\n\t\t\tret.push(BasicCCValues.currentValue.endpoint(endpoint.index));\n\t\t}\n\n\t\treturn ret;\n\t}\n}\n\n// @publicAPI\nexport interface BasicCCSetOptions {\n\ttargetValue: number;\n}\n\n@CCCommand(BasicCommand.Set)\n@useSupervision()\nexport class BasicCCSet extends BasicCC {\n\tpublic constructor(\n\t\toptions: WithAddress<BasicCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.targetValue = options.targetValue;\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): BasicCCSet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst targetValue = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\ttargetValue,\n\t\t});\n\t}\n\n\tpublic targetValue: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.targetValue]);\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: { \"target value\": this.targetValue },\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface BasicCCReportOptions {\n\tcurrentValue?: MaybeUnknown<number>;\n\ttargetValue?: MaybeUnknown<number>;\n\tduration?: Duration;\n}\n\n@CCCommand(BasicCommand.Report)\n@ccValueProperty(\"currentValue\", BasicCCValues.currentValue)\n@ccValueProperty(\"targetValue\", BasicCCValues.targetValue)\n@ccValueProperty(\"duration\", BasicCCValues.duration)\nexport class BasicCCReport extends BasicCC {\n\t// @noCCValues See comment in the constructor\n\tpublic constructor(\n\t\toptions: WithAddress<BasicCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.currentValue = options.currentValue;\n\t\tthis.targetValue = options.targetValue;\n\t\tthis.duration = options.duration;\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): BasicCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst currentValue: MaybeUnknown<number> | undefined =\n\t\t\t// 0xff is a legacy value for 100% (99)\n\t\t\traw.payload[0] === 0xff\n\t\t\t\t? 99\n\t\t\t\t: parseMaybeNumber(raw.payload[0]);\n\t\tvalidatePayload(currentValue !== undefined);\n\n\t\tlet targetValue: MaybeUnknown<number> | undefined;\n\t\tlet duration: Duration | undefined;\n\n\t\tif (raw.payload.length >= 3) {\n\t\t\ttargetValue = parseMaybeNumber(raw.payload[1]);\n\t\t\tduration = Duration.parseReport(raw.payload[2]);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tcurrentValue,\n\t\t\ttargetValue,\n\t\t\tduration,\n\t\t});\n\t}\n\n\tpublic currentValue: MaybeUnknown<number> | undefined;\n\n\tpublic readonly targetValue: MaybeUnknown<number> | undefined;\n\n\tpublic readonly duration: Duration | undefined;\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\t// Basic CC Report persists its values itself, since there are some\n\t\t// specific rules when which value may be persisted.\n\t\t// These rules are essentially encoded in the getDefinedValueIDs overload,\n\t\t// so we simply reuse that here.\n\n\t\t// Figure out which values may be persisted.\n\t\tconst definedValueIDs = this.getDefinedValueIDs(ctx);\n\t\tconst shouldPersistCurrentValue = definedValueIDs.some((vid) =>\n\t\t\tBasicCCValues.currentValue.is(vid)\n\t\t);\n\t\tconst shouldPersistTargetValue = definedValueIDs.some((vid) =>\n\t\t\tBasicCCValues.targetValue.is(vid)\n\t\t);\n\t\tconst shouldPersistDuration = definedValueIDs.some((vid) =>\n\t\t\tBasicCCValues.duration.is(vid)\n\t\t);\n\n\t\tif (this.currentValue !== undefined && shouldPersistCurrentValue) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tBasicCCValues.currentValue,\n\t\t\t\tthis.currentValue,\n\t\t\t);\n\t\t}\n\t\tif (this.targetValue !== undefined && shouldPersistTargetValue) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tBasicCCValues.targetValue,\n\t\t\t\tthis.targetValue,\n\t\t\t);\n\t\t}\n\t\tif (this.duration !== undefined && shouldPersistDuration) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tBasicCCValues.duration,\n\t\t\t\tthis.duration,\n\t\t\t);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([\n\t\t\tthis.currentValue ?? 0xfe,\n\t\t\tthis.targetValue ?? 0xfe,\n\t\t\t(this.duration ?? Duration.unknown()).serializeReport(),\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 send the current value\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\t\"current value\": maybeUnknownToString(this.currentValue),\n\t\t};\n\t\tif (this.targetValue !== undefined) {\n\t\t\tmessage[\"target value\"] = maybeUnknownToString(this.targetValue);\n\t\t}\n\t\tif (this.duration != undefined) {\n\t\t\tmessage.duration = this.duration.toString();\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(BasicCommand.Get)\n@expectedCCResponse(BasicCCReport)\nexport class BasicCCGet extends BasicCC {}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,kBAuBO;AACP,IAAAA,eAAsB;AACtB,IAAAA,eAAqB;AAErB,iBAUO;AACP,0BAOO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtB,MAAM,gBAAgB,OAAO,OAAO;EAC1C,GAAG,gBAAE,qBAAqB,2BAAe,OAAO;IAC/C,GAAG,gBAAE,eAAe,gBAAgB;MACnC,GAAG,0BAAc;MACjB,OAAO;KACP;IACD,GAAG,gBAAE,eAAe,eAAe;MAClC,GAAG,0BAAc;MACjB,OAAO;MACP,eAAe;KACf;IACD,GAAG,gBAAE,eAAe,YAAY;MAC/B,GAAG,0BAAc;MACjB,OAAO;MACP,YAAY;KACZ;IAED,GAAG,gBAAE,eAAe,mBAAmB;MACtC,GAAG,0BAAc;MACjB,OAAO;MACP,QAAQ;QACP,MAAM;;KAEP;IAED,GAAG,gBAAE,uBACJ,eACA,SACA;MACC,GAAG,0BAAc;MACjB,OAAO;OAER;MACC,UAAU;MACV,Y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