@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,88 +1,240 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { type CCEncodingContext, type CCParsingContext } from "@zwave-js/cc";
|
|
2
|
+
import { CommandClasses, Duration, type GetValueDB, type MaybeNotKnown, type MaybeUnknown, type MessageOrCCLogEntry, type SupervisionResult, ValueMetadata, type WithAddress } from "@zwave-js/core/safe";
|
|
3
3
|
import { Bytes } from "@zwave-js/shared/safe";
|
|
4
4
|
import { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, SET_VALUE_HOOKS, type SetValueImplementation, type SetValueImplementationHooksFactory } from "../lib/API.js";
|
|
5
5
|
import { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext } from "../lib/CommandClass.js";
|
|
6
6
|
import { BinarySwitchCommand } from "../lib/_Types.js";
|
|
7
7
|
export declare const BinarySwitchCCValues: Readonly<{
|
|
8
8
|
duration: {
|
|
9
|
-
readonly id:
|
|
10
|
-
commandClass: (typeof CommandClasses)["Binary Switch"];
|
|
11
|
-
property: "duration";
|
|
12
|
-
};
|
|
9
|
+
readonly id: ValueIDBase;
|
|
13
10
|
readonly endpoint: (endpoint?: number | undefined) => {
|
|
14
11
|
readonly commandClass: (typeof CommandClasses)["Binary Switch"];
|
|
15
12
|
readonly endpoint: number;
|
|
16
13
|
readonly property: "duration";
|
|
17
14
|
};
|
|
18
15
|
readonly is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
|
|
19
|
-
readonly meta: {
|
|
20
|
-
readonly
|
|
21
|
-
readonly writeable: false;
|
|
22
|
-
readonly type: "duration";
|
|
16
|
+
readonly meta: Readonly<(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
17
|
+
readonly type: "any";
|
|
23
18
|
readonly readable: true;
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
readonly writeable: true;
|
|
20
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
21
|
+
readonly type: "any";
|
|
22
|
+
readonly readable: true;
|
|
23
|
+
readonly writeable: true;
|
|
24
|
+
}>, ("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<{
|
|
25
|
+
readonly type: "any";
|
|
26
|
+
readonly readable: true;
|
|
27
|
+
readonly writeable: true;
|
|
28
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
29
|
+
readonly type: "any";
|
|
30
|
+
readonly readable: true;
|
|
31
|
+
readonly writeable: true;
|
|
32
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
33
|
+
readonly type: "any";
|
|
34
|
+
readonly readable: true;
|
|
35
|
+
readonly writeable: true;
|
|
36
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
37
|
+
readonly type: "any";
|
|
38
|
+
readonly readable: true;
|
|
39
|
+
readonly writeable: true;
|
|
40
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
|
|
41
|
+
readonly options: Readonly<(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
42
|
+
readonly internal: false;
|
|
43
|
+
readonly minVersion: 1;
|
|
44
|
+
readonly secret: false;
|
|
26
45
|
readonly stateful: true;
|
|
46
|
+
readonly supportsEndpoints: true;
|
|
47
|
+
readonly autoCreate: true;
|
|
48
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
49
|
+
readonly internal: false;
|
|
50
|
+
readonly minVersion: 1;
|
|
51
|
+
readonly secret: false;
|
|
52
|
+
readonly stateful: true;
|
|
53
|
+
readonly supportsEndpoints: true;
|
|
54
|
+
readonly autoCreate: true;
|
|
55
|
+
}, ("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"]> ? {
|
|
56
|
+
readonly internal: false;
|
|
57
|
+
readonly minVersion: 1;
|
|
27
58
|
readonly secret: false;
|
|
59
|
+
readonly stateful: true;
|
|
60
|
+
readonly supportsEndpoints: true;
|
|
61
|
+
readonly autoCreate: true;
|
|
62
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
28
63
|
readonly internal: false;
|
|
64
|
+
readonly minVersion: 1;
|
|
65
|
+
readonly secret: false;
|
|
66
|
+
readonly stateful: true;
|
|
29
67
|
readonly supportsEndpoints: true;
|
|
30
68
|
readonly autoCreate: true;
|
|
31
|
-
|
|
32
|
-
|
|
69
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]] ? never : K]: (import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
70
|
+
readonly internal: false;
|
|
71
|
+
readonly minVersion: 1;
|
|
72
|
+
readonly secret: false;
|
|
73
|
+
readonly stateful: true;
|
|
74
|
+
readonly supportsEndpoints: true;
|
|
75
|
+
readonly autoCreate: true;
|
|
76
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
77
|
+
readonly internal: false;
|
|
78
|
+
readonly minVersion: 1;
|
|
79
|
+
readonly secret: false;
|
|
80
|
+
readonly stateful: true;
|
|
81
|
+
readonly supportsEndpoints: true;
|
|
82
|
+
readonly autoCreate: true;
|
|
83
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]; } : never>;
|
|
33
84
|
};
|
|
34
85
|
targetValue: {
|
|
35
|
-
readonly id:
|
|
36
|
-
commandClass: (typeof CommandClasses)["Binary Switch"];
|
|
37
|
-
property: "targetValue";
|
|
38
|
-
};
|
|
86
|
+
readonly id: ValueIDBase;
|
|
39
87
|
readonly endpoint: (endpoint?: number | undefined) => {
|
|
40
88
|
readonly commandClass: (typeof CommandClasses)["Binary Switch"];
|
|
41
89
|
readonly endpoint: number;
|
|
42
90
|
readonly property: "targetValue";
|
|
43
91
|
};
|
|
44
92
|
readonly is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
|
|
45
|
-
readonly meta: {
|
|
46
|
-
readonly
|
|
47
|
-
readonly valueChangeOptions: readonly ["transitionDuration"];
|
|
48
|
-
readonly type: "boolean";
|
|
93
|
+
readonly meta: Readonly<(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
94
|
+
readonly type: "any";
|
|
49
95
|
readonly readable: true;
|
|
50
96
|
readonly writeable: true;
|
|
51
|
-
}
|
|
52
|
-
|
|
97
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
98
|
+
readonly type: "any";
|
|
99
|
+
readonly readable: true;
|
|
100
|
+
readonly writeable: true;
|
|
101
|
+
}>, ("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<{
|
|
102
|
+
readonly type: "any";
|
|
103
|
+
readonly readable: true;
|
|
104
|
+
readonly writeable: true;
|
|
105
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
106
|
+
readonly type: "any";
|
|
107
|
+
readonly readable: true;
|
|
108
|
+
readonly writeable: true;
|
|
109
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
110
|
+
readonly type: "any";
|
|
111
|
+
readonly readable: true;
|
|
112
|
+
readonly writeable: true;
|
|
113
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
114
|
+
readonly type: "any";
|
|
115
|
+
readonly readable: true;
|
|
116
|
+
readonly writeable: true;
|
|
117
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
|
|
118
|
+
readonly options: Readonly<(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
53
119
|
readonly internal: false;
|
|
54
120
|
readonly minVersion: 1;
|
|
55
121
|
readonly secret: false;
|
|
56
122
|
readonly stateful: true;
|
|
57
123
|
readonly supportsEndpoints: true;
|
|
58
124
|
readonly autoCreate: true;
|
|
59
|
-
}
|
|
125
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
126
|
+
readonly internal: false;
|
|
127
|
+
readonly minVersion: 1;
|
|
128
|
+
readonly secret: false;
|
|
129
|
+
readonly stateful: true;
|
|
130
|
+
readonly supportsEndpoints: true;
|
|
131
|
+
readonly autoCreate: true;
|
|
132
|
+
}, ("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"]> ? {
|
|
133
|
+
readonly internal: false;
|
|
134
|
+
readonly minVersion: 1;
|
|
135
|
+
readonly secret: false;
|
|
136
|
+
readonly stateful: true;
|
|
137
|
+
readonly supportsEndpoints: true;
|
|
138
|
+
readonly autoCreate: true;
|
|
139
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
140
|
+
readonly internal: false;
|
|
141
|
+
readonly minVersion: 1;
|
|
142
|
+
readonly secret: false;
|
|
143
|
+
readonly stateful: true;
|
|
144
|
+
readonly supportsEndpoints: true;
|
|
145
|
+
readonly autoCreate: true;
|
|
146
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]] ? never : K]: (import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
147
|
+
readonly internal: false;
|
|
148
|
+
readonly minVersion: 1;
|
|
149
|
+
readonly secret: false;
|
|
150
|
+
readonly stateful: true;
|
|
151
|
+
readonly supportsEndpoints: true;
|
|
152
|
+
readonly autoCreate: true;
|
|
153
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
154
|
+
readonly internal: false;
|
|
155
|
+
readonly minVersion: 1;
|
|
156
|
+
readonly secret: false;
|
|
157
|
+
readonly stateful: true;
|
|
158
|
+
readonly supportsEndpoints: true;
|
|
159
|
+
readonly autoCreate: true;
|
|
160
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]; } : never>;
|
|
60
161
|
};
|
|
61
162
|
currentValue: {
|
|
62
|
-
readonly id:
|
|
63
|
-
commandClass: (typeof CommandClasses)["Binary Switch"];
|
|
64
|
-
property: "currentValue";
|
|
65
|
-
};
|
|
163
|
+
readonly id: ValueIDBase;
|
|
66
164
|
readonly endpoint: (endpoint?: number | undefined) => {
|
|
67
165
|
readonly commandClass: (typeof CommandClasses)["Binary Switch"];
|
|
68
166
|
readonly endpoint: number;
|
|
69
167
|
readonly property: "currentValue";
|
|
70
168
|
};
|
|
71
169
|
readonly is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
|
|
72
|
-
readonly meta: {
|
|
73
|
-
readonly
|
|
74
|
-
readonly writeable: false;
|
|
75
|
-
readonly type: "boolean";
|
|
170
|
+
readonly meta: Readonly<(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
171
|
+
readonly type: "any";
|
|
76
172
|
readonly readable: true;
|
|
77
|
-
|
|
78
|
-
|
|
173
|
+
readonly writeable: true;
|
|
174
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
175
|
+
readonly type: "any";
|
|
176
|
+
readonly readable: true;
|
|
177
|
+
readonly writeable: true;
|
|
178
|
+
}>, ("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<{
|
|
179
|
+
readonly type: "any";
|
|
180
|
+
readonly readable: true;
|
|
181
|
+
readonly writeable: true;
|
|
182
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
183
|
+
readonly type: "any";
|
|
184
|
+
readonly readable: true;
|
|
185
|
+
readonly writeable: true;
|
|
186
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
187
|
+
readonly type: "any";
|
|
188
|
+
readonly readable: true;
|
|
189
|
+
readonly writeable: true;
|
|
190
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
191
|
+
readonly type: "any";
|
|
192
|
+
readonly readable: true;
|
|
193
|
+
readonly writeable: true;
|
|
194
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
|
|
195
|
+
readonly options: Readonly<(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
79
196
|
readonly internal: false;
|
|
80
197
|
readonly minVersion: 1;
|
|
81
198
|
readonly secret: false;
|
|
82
199
|
readonly stateful: true;
|
|
83
200
|
readonly supportsEndpoints: true;
|
|
84
201
|
readonly autoCreate: true;
|
|
85
|
-
}
|
|
202
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
203
|
+
readonly internal: false;
|
|
204
|
+
readonly minVersion: 1;
|
|
205
|
+
readonly secret: false;
|
|
206
|
+
readonly stateful: true;
|
|
207
|
+
readonly supportsEndpoints: true;
|
|
208
|
+
readonly autoCreate: true;
|
|
209
|
+
}, ("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"]> ? {
|
|
210
|
+
readonly internal: false;
|
|
211
|
+
readonly minVersion: 1;
|
|
212
|
+
readonly secret: false;
|
|
213
|
+
readonly stateful: true;
|
|
214
|
+
readonly supportsEndpoints: true;
|
|
215
|
+
readonly autoCreate: true;
|
|
216
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
217
|
+
readonly internal: false;
|
|
218
|
+
readonly minVersion: 1;
|
|
219
|
+
readonly secret: false;
|
|
220
|
+
readonly stateful: true;
|
|
221
|
+
readonly supportsEndpoints: true;
|
|
222
|
+
readonly autoCreate: true;
|
|
223
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]] ? never : K]: (import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
224
|
+
readonly internal: false;
|
|
225
|
+
readonly minVersion: 1;
|
|
226
|
+
readonly secret: false;
|
|
227
|
+
readonly stateful: true;
|
|
228
|
+
readonly supportsEndpoints: true;
|
|
229
|
+
readonly autoCreate: true;
|
|
230
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
231
|
+
readonly internal: false;
|
|
232
|
+
readonly minVersion: 1;
|
|
233
|
+
readonly secret: false;
|
|
234
|
+
readonly stateful: true;
|
|
235
|
+
readonly supportsEndpoints: true;
|
|
236
|
+
readonly autoCreate: true;
|
|
237
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]; } : never>;
|
|
86
238
|
};
|
|
87
239
|
}>;
|
|
88
240
|
export declare class BinarySwitchCCAPI extends CCAPI {
|
|
@@ -117,7 +269,7 @@ export declare class BinarySwitchCCSet extends BinarySwitchCC {
|
|
|
117
269
|
static from(raw: CCRaw, ctx: CCParsingContext): BinarySwitchCCSet;
|
|
118
270
|
targetValue: boolean;
|
|
119
271
|
duration: Duration | undefined;
|
|
120
|
-
serialize(ctx: CCEncodingContext): Bytes
|
|
272
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
121
273
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
122
274
|
}
|
|
123
275
|
export interface BinarySwitchCCReportOptions {
|
|
@@ -131,7 +283,7 @@ export declare class BinarySwitchCCReport extends BinarySwitchCC {
|
|
|
131
283
|
readonly currentValue: MaybeUnknown<boolean> | undefined;
|
|
132
284
|
readonly targetValue: MaybeUnknown<boolean> | undefined;
|
|
133
285
|
readonly duration: Duration | undefined;
|
|
134
|
-
serialize(ctx: CCEncodingContext): Bytes
|
|
286
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
135
287
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
136
288
|
}
|
|
137
289
|
export declare class BinarySwitchCCGet extends BinarySwitchCC {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/BinarySwitchCC.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n\tCommandClasses,\n\tDuration,\n\ttype MaybeNotKnown,\n\ttype MaybeUnknown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tUNKNOWN_STATE,\n\tValueMetadata,\n\ttype WithAddress,\n\tencodeMaybeBoolean,\n\tmaybeUnknownToString,\n\tparseMaybeBoolean,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport type {\n\tCCEncodingContext,\n\tCCParsingContext,\n\tGetValueDB,\n} from \"@zwave-js/host/safe\";\nimport { Bytes } 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 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 { BinarySwitchCommand } from \"../lib/_Types.js\";\n\nexport const BinarySwitchCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Binary Switch\"], {\n\t\t...V.staticProperty(\n\t\t\t\"currentValue\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.ReadOnlyBoolean,\n\t\t\t\tlabel: \"Current value\",\n\t\t\t} as const,\n\t\t),\n\n\t\t...V.staticProperty(\n\t\t\t\"targetValue\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Boolean,\n\t\t\t\tlabel: \"Target value\",\n\t\t\t\tvalueChangeOptions: [\"transitionDuration\"],\n\t\t\t} as const,\n\t\t),\n\n\t\t...V.staticProperty(\n\t\t\t\"duration\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.ReadOnlyDuration,\n\t\t\t\tlabel: \"Remaining duration\",\n\t\t\t} as const,\n\t\t\t{ minVersion: 2 } as const,\n\t\t),\n\t}),\n});\n\n@API(CommandClasses[\"Binary Switch\"])\nexport class BinarySwitchCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: BinarySwitchCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase BinarySwitchCommand.Get:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase BinarySwitchCommand.Set:\n\t\t\t\treturn true;\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(\n\t\t\tBinarySwitchCommand,\n\t\t\tBinarySwitchCommand.Get,\n\t\t);\n\n\t\tconst cc = new BinarySwitchCCGet({\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<BinarySwitchCCReport>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn {\n\t\t\t\t// interpret unknown values as false\n\t\t\t\tcurrentValue: response.currentValue || false,\n\t\t\t\ttargetValue: response.targetValue,\n\t\t\t\tduration: response.duration,\n\t\t\t};\n\t\t}\n\t}\n\n\t/**\n\t * Sets the switch to the given value\n\t * @param targetValue The target value to set\n\t * @param duration The duration after which the target value should be reached. Can be a Duration instance or a user-friendly duration string like `\"1m17s\"`. Only supported in V2 and above.\n\t */\n\t@validateArgs()\n\tpublic async set(\n\t\ttargetValue: boolean,\n\t\tduration?: Duration | string,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tBinarySwitchCommand,\n\t\t\tBinarySwitchCommand.Set,\n\t\t);\n\n\t\tconst cc = new BinarySwitchCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\ttargetValue,\n\t\t\tduration,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(\n\t\t\tthis: BinarySwitchCCAPI,\n\t\t\t{ property },\n\t\t\tvalue,\n\t\t\toptions,\n\t\t) {\n\t\t\tif (property !== \"targetValue\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof value !== \"boolean\") {\n\t\t\t\tthrowWrongValueType(\n\t\t\t\t\tthis.ccId,\n\t\t\t\t\tproperty,\n\t\t\t\t\t\"boolean\",\n\t\t\t\t\ttypeof value,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst duration = Duration.from(options?.transitionDuration);\n\t\t\treturn this.set(value, duration);\n\t\t};\n\t}\n\n\tprotected [SET_VALUE_HOOKS]: SetValueImplementationHooksFactory = (\n\t\t{ property },\n\t\tvalue,\n\t\toptions,\n\t) => {\n\t\tif (property === \"targetValue\") {\n\t\t\tconst currentValueValueId = BinarySwitchCCValues.currentValue\n\t\t\t\t.endpoint(this.endpoint.index);\n\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// After setting targetValue, optimistically update currentValue\n\t\t\t\t\tif (this.isSinglecast()) {\n\t\t\t\t\t\tthis.tryGetValueDB()?.setValue(\n\t\t\t\t\t\t\tcurrentValueValueId,\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if (this.isMulticast()) {\n\t\t\t\t\t\t// Figure out which nodes were affected by this command\n\t\t\t\t\t\tconst affectedNodes = this.endpoint.node.physicalNodes\n\t\t\t\t\t\t\t.filter((node) =>\n\t\t\t\t\t\t\t\tnode\n\t\t\t\t\t\t\t\t\t.getEndpoint(this.endpoint.index)\n\t\t\t\t\t\t\t\t\t?.supportsCC(this.ccId)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t// and optimistically update the currentValue\n\t\t\t\t\t\tfor (const node of affectedNodes) {\n\t\t\t\t\t\t\tthis.host\n\t\t\t\t\t\t\t\t.tryGetValueDB(node.id)\n\t\t\t\t\t\t\t\t?.setValue(currentValueValueId, value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tverifyChanges: () => {\n\t\t\t\t\tif (this.isSinglecast()) {\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\tthis.schedulePoll(currentValueValueId, value, {\n\t\t\t\t\t\t\tduration: Duration.from(\n\t\t\t\t\t\t\t\toptions?.transitionDuration,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t// on/off \"transitions\" are usually fast\n\t\t\t\t\t\t\ttransition: \"fast\",\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// For multicasts, do not schedule a refresh - this could cause a LOT of traffic\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: BinarySwitchCCAPI, { 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\n@commandClass(CommandClasses[\"Binary Switch\"])\n@implementedVersion(2)\n@ccValues(BinarySwitchCCValues)\nexport class BinarySwitchCC extends CommandClass {\n\tdeclare ccCommand: BinarySwitchCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(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\tawait this.refreshValues(ctx);\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[\"Binary Switch\"],\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// Query the current state\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying Binary Switch state...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\n\t\tconst resp = await api.get();\n\t\tif (resp) {\n\t\t\tlet logMessage = `received Binary Switch state:\ncurrent value: ${resp.currentValue}`;\n\t\t\tif (resp.targetValue != undefined) {\n\t\t\t\tlogMessage += `\ntarget value: ${resp.targetValue}\nremaining duration: ${resp.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 setMappedBasicValue(\n\t\tctx: GetValueDB,\n\t\tvalue: number,\n\t): boolean {\n\t\tthis.setValue(ctx, BinarySwitchCCValues.currentValue, value > 0);\n\t\treturn true;\n\t}\n}\n\n// @publicAPI\nexport interface BinarySwitchCCSetOptions {\n\ttargetValue: boolean;\n\tduration?: Duration | string;\n}\n\n@CCCommand(BinarySwitchCommand.Set)\n@useSupervision()\nexport class BinarySwitchCCSet extends BinarySwitchCC {\n\tpublic constructor(\n\t\toptions: WithAddress<BinarySwitchCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.targetValue = options.targetValue;\n\t\tthis.duration = Duration.from(options.duration);\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): BinarySwitchCCSet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst targetValue = !!raw.payload[0];\n\t\tlet duration: Duration | undefined;\n\n\t\tif (raw.payload.length >= 2) {\n\t\t\tduration = Duration.parseSet(raw.payload[1]);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\ttargetValue,\n\t\t\tduration,\n\t\t});\n\t}\n\n\tpublic targetValue: boolean;\n\tpublic duration: Duration | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([\n\t\t\tthis.targetValue ? 0xff : 0x00,\n\t\t\t(this.duration ?? Duration.default()).serializeSet(),\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 target 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\"target value\": 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// @publicAPI\nexport interface BinarySwitchCCReportOptions {\n\tcurrentValue?: MaybeUnknown<boolean>;\n\ttargetValue?: MaybeUnknown<boolean>;\n\tduration?: Duration | string;\n}\n\n@CCCommand(BinarySwitchCommand.Report)\n@ccValueProperty(\"currentValue\", BinarySwitchCCValues.currentValue)\n@ccValueProperty(\"targetValue\", BinarySwitchCCValues.targetValue)\n@ccValueProperty(\"duration\", BinarySwitchCCValues.duration)\nexport class BinarySwitchCCReport extends BinarySwitchCC {\n\tpublic constructor(\n\t\toptions: WithAddress<BinarySwitchCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.currentValue = options.currentValue;\n\t\tthis.targetValue = options.targetValue;\n\t\tthis.duration = Duration.from(options.duration);\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): BinarySwitchCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst currentValue: MaybeUnknown<boolean> | undefined =\n\t\t\tparseMaybeBoolean(\n\t\t\t\traw.payload[0],\n\t\t\t);\n\t\tlet targetValue: MaybeUnknown<boolean> | undefined;\n\t\tlet duration: Duration | undefined;\n\n\t\tif (raw.payload.length >= 3) {\n\t\t\ttargetValue = parseMaybeBoolean(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 readonly currentValue: MaybeUnknown<boolean> | undefined;\n\n\tpublic readonly targetValue: MaybeUnknown<boolean> | undefined;\n\n\tpublic readonly duration: Duration | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([\n\t\t\tencodeMaybeBoolean(this.currentValue ?? UNKNOWN_STATE),\n\t\t]);\n\t\tif (this.targetValue !== undefined) {\n\t\t\tthis.payload = Bytes.concat([\n\t\t\t\tthis.payload,\n\t\t\t\tBytes.from([\n\t\t\t\t\tencodeMaybeBoolean(this.targetValue),\n\t\t\t\t\t(this.duration ?? Duration.default()).serializeReport(),\n\t\t\t\t]),\n\t\t\t]);\n\t\t}\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(BinarySwitchCommand.Get)\n@expectedCCResponse(BinarySwitchCCReport)\nexport class BinarySwitchCCGet extends BinarySwitchCC {}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
4
|
+
"sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\tDuration,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MaybeUnknown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tUNKNOWN_STATE,\n\tValueMetadata,\n\ttype WithAddress,\n\tencodeMaybeBoolean,\n\tmaybeUnknownToString,\n\tparseMaybeBoolean,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } 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 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 { BinarySwitchCommand } from \"../lib/_Types.js\";\n\nexport const BinarySwitchCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Binary Switch\"], {\n\t\t...V.staticProperty(\n\t\t\t\"currentValue\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.ReadOnlyBoolean,\n\t\t\t\tlabel: \"Current value\",\n\t\t\t} as const,\n\t\t),\n\n\t\t...V.staticProperty(\n\t\t\t\"targetValue\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Boolean,\n\t\t\t\tlabel: \"Target value\",\n\t\t\t\tvalueChangeOptions: [\"transitionDuration\"],\n\t\t\t} as const,\n\t\t),\n\n\t\t...V.staticProperty(\n\t\t\t\"duration\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.ReadOnlyDuration,\n\t\t\t\tlabel: \"Remaining duration\",\n\t\t\t} as const,\n\t\t\t{ minVersion: 2 } as const,\n\t\t),\n\t}),\n});\n\n@API(CommandClasses[\"Binary Switch\"])\nexport class BinarySwitchCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: BinarySwitchCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase BinarySwitchCommand.Get:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase BinarySwitchCommand.Set:\n\t\t\t\treturn true;\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(\n\t\t\tBinarySwitchCommand,\n\t\t\tBinarySwitchCommand.Get,\n\t\t);\n\n\t\tconst cc = new BinarySwitchCCGet({\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<BinarySwitchCCReport>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn {\n\t\t\t\t// interpret unknown values as false\n\t\t\t\tcurrentValue: response.currentValue || false,\n\t\t\t\ttargetValue: response.targetValue,\n\t\t\t\tduration: response.duration,\n\t\t\t};\n\t\t}\n\t}\n\n\t/**\n\t * Sets the switch to the given value\n\t * @param targetValue The target value to set\n\t * @param duration The duration after which the target value should be reached. Can be a Duration instance or a user-friendly duration string like `\"1m17s\"`. Only supported in V2 and above.\n\t */\n\t@validateArgs()\n\tpublic async set(\n\t\ttargetValue: boolean,\n\t\tduration?: Duration | string,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tBinarySwitchCommand,\n\t\t\tBinarySwitchCommand.Set,\n\t\t);\n\n\t\tconst cc = new BinarySwitchCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\ttargetValue,\n\t\t\tduration,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(\n\t\t\tthis: BinarySwitchCCAPI,\n\t\t\t{ property },\n\t\t\tvalue,\n\t\t\toptions,\n\t\t) {\n\t\t\tif (property !== \"targetValue\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof value !== \"boolean\") {\n\t\t\t\tthrowWrongValueType(\n\t\t\t\t\tthis.ccId,\n\t\t\t\t\tproperty,\n\t\t\t\t\t\"boolean\",\n\t\t\t\t\ttypeof value,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst duration = Duration.from(options?.transitionDuration);\n\t\t\treturn this.set(value, duration);\n\t\t};\n\t}\n\n\tprotected [SET_VALUE_HOOKS]: SetValueImplementationHooksFactory = (\n\t\t{ property },\n\t\tvalue,\n\t\toptions,\n\t) => {\n\t\tif (property === \"targetValue\") {\n\t\t\tconst currentValueValueId = BinarySwitchCCValues.currentValue\n\t\t\t\t.endpoint(this.endpoint.index);\n\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// After setting targetValue, optimistically update currentValue\n\t\t\t\t\tif (this.isSinglecast()) {\n\t\t\t\t\t\tthis.tryGetValueDB()?.setValue(\n\t\t\t\t\t\t\tcurrentValueValueId,\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if (this.isMulticast()) {\n\t\t\t\t\t\t// Figure out which nodes were affected by this command\n\t\t\t\t\t\tconst affectedNodes = this.endpoint.node.physicalNodes\n\t\t\t\t\t\t\t.filter((node) =>\n\t\t\t\t\t\t\t\tnode\n\t\t\t\t\t\t\t\t\t.getEndpoint(this.endpoint.index)\n\t\t\t\t\t\t\t\t\t?.supportsCC(this.ccId)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t// and optimistically update the currentValue\n\t\t\t\t\t\tfor (const node of affectedNodes) {\n\t\t\t\t\t\t\tthis.host\n\t\t\t\t\t\t\t\t.tryGetValueDB(node.id)\n\t\t\t\t\t\t\t\t?.setValue(currentValueValueId, value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tverifyChanges: () => {\n\t\t\t\t\tif (this.isSinglecast()) {\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\tthis.schedulePoll(currentValueValueId, value, {\n\t\t\t\t\t\t\tduration: Duration.from(\n\t\t\t\t\t\t\t\toptions?.transitionDuration,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t// on/off \"transitions\" are usually fast\n\t\t\t\t\t\t\ttransition: \"fast\",\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// For multicasts, do not schedule a refresh - this could cause a LOT of traffic\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: BinarySwitchCCAPI, { 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\n@commandClass(CommandClasses[\"Binary Switch\"])\n@implementedVersion(2)\n@ccValues(BinarySwitchCCValues)\nexport class BinarySwitchCC extends CommandClass {\n\tdeclare ccCommand: BinarySwitchCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(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\tawait this.refreshValues(ctx);\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[\"Binary Switch\"],\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// Query the current state\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying Binary Switch state...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\n\t\tconst resp = await api.get();\n\t\tif (resp) {\n\t\t\tlet logMessage = `received Binary Switch state:\ncurrent value: ${resp.currentValue}`;\n\t\t\tif (resp.targetValue != undefined) {\n\t\t\t\tlogMessage += `\ntarget value: ${resp.targetValue}\nremaining duration: ${resp.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 setMappedBasicValue(\n\t\tctx: GetValueDB,\n\t\tvalue: number,\n\t): boolean {\n\t\tthis.setValue(ctx, BinarySwitchCCValues.currentValue, value > 0);\n\t\treturn true;\n\t}\n}\n\n// @publicAPI\nexport interface BinarySwitchCCSetOptions {\n\ttargetValue: boolean;\n\tduration?: Duration | string;\n}\n\n@CCCommand(BinarySwitchCommand.Set)\n@useSupervision()\nexport class BinarySwitchCCSet extends BinarySwitchCC {\n\tpublic constructor(\n\t\toptions: WithAddress<BinarySwitchCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.targetValue = options.targetValue;\n\t\tthis.duration = Duration.from(options.duration);\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): BinarySwitchCCSet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst targetValue = !!raw.payload[0];\n\t\tlet duration: Duration | undefined;\n\n\t\tif (raw.payload.length >= 2) {\n\t\t\tduration = Duration.parseSet(raw.payload[1]);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\ttargetValue,\n\t\t\tduration,\n\t\t});\n\t}\n\n\tpublic targetValue: boolean;\n\tpublic duration: Duration | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([\n\t\t\tthis.targetValue ? 0xff : 0x00,\n\t\t\t(this.duration ?? Duration.default()).serializeSet(),\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 target 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\"target value\": 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// @publicAPI\nexport interface BinarySwitchCCReportOptions {\n\tcurrentValue?: MaybeUnknown<boolean>;\n\ttargetValue?: MaybeUnknown<boolean>;\n\tduration?: Duration | string;\n}\n\n@CCCommand(BinarySwitchCommand.Report)\n@ccValueProperty(\"currentValue\", BinarySwitchCCValues.currentValue)\n@ccValueProperty(\"targetValue\", BinarySwitchCCValues.targetValue)\n@ccValueProperty(\"duration\", BinarySwitchCCValues.duration)\nexport class BinarySwitchCCReport extends BinarySwitchCC {\n\tpublic constructor(\n\t\toptions: WithAddress<BinarySwitchCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.currentValue = options.currentValue;\n\t\tthis.targetValue = options.targetValue;\n\t\tthis.duration = Duration.from(options.duration);\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): BinarySwitchCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst currentValue: MaybeUnknown<boolean> | undefined =\n\t\t\tparseMaybeBoolean(\n\t\t\t\traw.payload[0],\n\t\t\t);\n\t\tlet targetValue: MaybeUnknown<boolean> | undefined;\n\t\tlet duration: Duration | undefined;\n\n\t\tif (raw.payload.length >= 3) {\n\t\t\ttargetValue = parseMaybeBoolean(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 readonly currentValue: MaybeUnknown<boolean> | undefined;\n\n\tpublic readonly targetValue: MaybeUnknown<boolean> | undefined;\n\n\tpublic readonly duration: Duration | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([\n\t\t\tencodeMaybeBoolean(this.currentValue ?? UNKNOWN_STATE),\n\t\t]);\n\t\tif (this.targetValue !== undefined) {\n\t\t\tthis.payload = Bytes.concat([\n\t\t\t\tthis.payload,\n\t\t\t\tBytes.from([\n\t\t\t\t\tencodeMaybeBoolean(this.targetValue),\n\t\t\t\t\t(this.duration ?? Duration.default()).serializeReport(),\n\t\t\t\t]),\n\t\t\t]);\n\t\t}\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(BinarySwitchCommand.Get)\n@expectedCCResponse(BinarySwitchCCReport)\nexport class BinarySwitchCCGet extends BinarySwitchCC {}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAiBO;AACP,IAAAA,eAAsB;AAEtB,iBAUO;AACP,0BAMO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE7B,MAAM,uBAAuB,OAAO,OAAO;EACjD,GAAG,gBAAE,qBAAqB,2BAAe,eAAe,GAAG;IAC1D,GAAG,gBAAE,eACJ,gBACA;MACC,GAAG,0BAA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AmB,KAAK,WAAW;aAClC,KAAK,YAAY,qBAAS,QAAO,GAAI,gBAAe;WACrD;SACD;MACF;AACA,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,YAAM,UAAyB;QAC9B,qBAAiB,kCAAqB,KAAK,YAAY;;AAExD,UAAI,KAAK,gBAAgB,QAAW;AACnC,gBAAQ,cAAc,QAAI,kCAAqB,KAAK,WAAW;MAChE;AACA,UAAI,KAAK,YAAY,QAAW;AAC/B,gBAAQ,WAAW,KAAK,SAAS,SAAQ;MAC1C;AACA,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB;;IAEF;;;;IAKY,qBAAiB,MAAA;8BAF7B,yCAAU,iCAAoB,GAAG,OACjC,kDAAmB,oBAAoB,CAAC;;;;oBACF;yCAAA,YAAc;WAAA;;;;;;;;AAArD,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;;;;",
|
|
6
6
|
"names": ["import_safe"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type MaybeNotKnown, type MessageOrCCLogEntry, type WithAddress } from "@zwave-js/core/safe";
|
|
2
|
-
import type { CCEncodingContext, CCParsingContext, GetValueDB } from "@zwave-js/host/safe";
|
|
1
|
+
import { type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type WithAddress } from "@zwave-js/core/safe";
|
|
3
2
|
import { CCAPI } from "../lib/API.js";
|
|
4
3
|
import { type CCRaw, CommandClass } from "../lib/CommandClass.js";
|
|
4
|
+
import { type CCEncodingContext, type CCParsingContext } from "@zwave-js/cc";
|
|
5
5
|
import { Bytes } from "@zwave-js/shared/safe";
|
|
6
6
|
import { CRC16Command } from "../lib/_Types.js";
|
|
7
7
|
export declare class CRC16CCAPI extends CCAPI {
|
|
@@ -20,13 +20,9 @@ export interface CRC16CCCommandEncapsulationOptions {
|
|
|
20
20
|
}
|
|
21
21
|
export declare class CRC16CCCommandEncapsulation extends CRC16CC {
|
|
22
22
|
constructor(options: WithAddress<CRC16CCCommandEncapsulationOptions>);
|
|
23
|
-
|
|
24
|
-
static from(raw: CCRaw, ctx: CCParsingContext): CRC16CCCommandEncapsulation;
|
|
25
|
-
static fromAsync(raw: CCRaw, ctx: CCParsingContext): Promise<CRC16CCCommandEncapsulation>;
|
|
23
|
+
static from(raw: CCRaw, ctx: CCParsingContext): Promise<CRC16CCCommandEncapsulation>;
|
|
26
24
|
encapsulated: CommandClass;
|
|
27
|
-
|
|
28
|
-
serialize(ctx: CCEncodingContext): Bytes;
|
|
29
|
-
serializeAsync(ctx: CCEncodingContext): Promise<Bytes>;
|
|
25
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
30
26
|
protected computeEncapsulationOverhead(): number;
|
|
31
27
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
32
28
|
}
|
package/build/cjs/cc/CRC16CC.js
CHANGED
|
@@ -176,51 +176,28 @@ let CRC16CCCommandEncapsulation = (() => {
|
|
|
176
176
|
this.encapsulated = options.encapsulated;
|
|
177
177
|
this.encapsulated.encapsulatingCC = this;
|
|
178
178
|
}
|
|
179
|
-
|
|
180
|
-
static from(raw, ctx) {
|
|
179
|
+
static async from(raw, ctx) {
|
|
181
180
|
(0, import_safe.validatePayload)(raw.payload.length >= 3);
|
|
182
181
|
const ccBuffer = raw.payload.subarray(0, -2);
|
|
183
182
|
let expectedCRC = (0, import_safe.CRC16_CCITT)(headerBuffer);
|
|
184
183
|
expectedCRC = (0, import_safe.CRC16_CCITT)(ccBuffer, expectedCRC);
|
|
185
184
|
const actualCRC = raw.payload.readUInt16BE(raw.payload.length - 2);
|
|
186
185
|
(0, import_safe.validatePayload)(expectedCRC === actualCRC);
|
|
187
|
-
const encapsulated = import_CommandClass.CommandClass.parse(ccBuffer, ctx);
|
|
188
|
-
return new this({
|
|
189
|
-
nodeId: ctx.sourceNodeId,
|
|
190
|
-
encapsulated
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
static async fromAsync(raw, ctx) {
|
|
194
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 3);
|
|
195
|
-
const ccBuffer = raw.payload.subarray(0, -2);
|
|
196
|
-
let expectedCRC = (0, import_safe.CRC16_CCITT)(headerBuffer);
|
|
197
|
-
expectedCRC = (0, import_safe.CRC16_CCITT)(ccBuffer, expectedCRC);
|
|
198
|
-
const actualCRC = raw.payload.readUInt16BE(raw.payload.length - 2);
|
|
199
|
-
(0, import_safe.validatePayload)(expectedCRC === actualCRC);
|
|
200
|
-
const encapsulated = await import_CommandClass.CommandClass.parseAsync(ccBuffer, ctx);
|
|
186
|
+
const encapsulated = await import_CommandClass.CommandClass.parse(ccBuffer, ctx);
|
|
201
187
|
return new this({
|
|
202
188
|
nodeId: ctx.sourceNodeId,
|
|
203
189
|
encapsulated
|
|
204
190
|
});
|
|
205
191
|
}
|
|
206
192
|
encapsulated;
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
const commandBuffer = this.encapsulated.serialize(ctx);
|
|
193
|
+
async serialize(ctx) {
|
|
194
|
+
const commandBuffer = await this.encapsulated.serialize(ctx);
|
|
210
195
|
this.payload = import_safe2.Bytes.concat([commandBuffer, new import_safe2.Bytes(2)]);
|
|
211
196
|
let crc = (0, import_safe.CRC16_CCITT)(headerBuffer);
|
|
212
197
|
crc = (0, import_safe.CRC16_CCITT)(commandBuffer, crc);
|
|
213
198
|
this.payload.writeUInt16BE(crc, this.payload.length - 2);
|
|
214
199
|
return super.serialize(ctx);
|
|
215
200
|
}
|
|
216
|
-
async serializeAsync(ctx) {
|
|
217
|
-
const commandBuffer = await this.encapsulated.serializeAsync(ctx);
|
|
218
|
-
this.payload = import_safe2.Bytes.concat([commandBuffer, new import_safe2.Bytes(2)]);
|
|
219
|
-
let crc = (0, import_safe.CRC16_CCITT)(headerBuffer);
|
|
220
|
-
crc = (0, import_safe.CRC16_CCITT)(commandBuffer, crc);
|
|
221
|
-
this.payload.writeUInt16BE(crc, this.payload.length - 2);
|
|
222
|
-
return super.serializeAsync(ctx);
|
|
223
|
-
}
|
|
224
201
|
computeEncapsulationOverhead() {
|
|
225
202
|
return super.computeEncapsulationOverhead() + 2;
|
|
226
203
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/CRC16CC.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n\tCRC16_CCITT,\n\tCommandClasses,\n\tEncapsulationFlags,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\ttype WithAddress,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
4
|
+
"sourcesContent": ["import {\n\tCRC16_CCITT,\n\tCommandClasses,\n\tEncapsulationFlags,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\ttype WithAddress,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { CCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass } from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n} from \"../lib/CommandClassDecorators.js\";\n\nimport { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { CRC16Command } from \"../lib/_Types.js\";\n\nconst headerBuffer = Bytes.from([\n\tCommandClasses[\"CRC-16 Encapsulation\"],\n\tCRC16Command.CommandEncapsulation,\n]);\n\n// @noSetValueAPI\n// @noInterview This CC only has a single encapsulation command\n\n// Encapsulation CCs are used internally and too frequently that we\n// want to pay the cost of validating each call\n/* eslint-disable @zwave-js/ccapi-validate-args */\n\n@API(CommandClasses[\"CRC-16 Encapsulation\"])\nexport class CRC16CCAPI extends CCAPI {\n\tpublic supportsCommand(_cmd: CRC16Command): MaybeNotKnown<boolean> {\n\t\t// switch (cmd) {\n\t\t// \tcase CRC16Command.CommandEncapsulation:\n\t\treturn true; // This is mandatory\n\t\t// }\n\t\t// return super.supportsCommand(cmd);\n\t}\n\n\tpublic async sendEncapsulated(encapsulatedCC: CommandClass): Promise<void> {\n\t\tthis.assertSupportsCommand(\n\t\t\tCRC16Command,\n\t\t\tCRC16Command.CommandEncapsulation,\n\t\t);\n\n\t\tconst cc = new CRC16CCCommandEncapsulation({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tencapsulated: encapsulatedCC,\n\t\t});\n\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses[\"CRC-16 Encapsulation\"])\n@implementedVersion(1)\nexport class CRC16CC extends CommandClass {\n\tdeclare ccCommand: CRC16Command;\n\n\t/** Tests if a command should be supervised and thus requires encapsulation */\n\tpublic static requiresEncapsulation(cc: CommandClass): boolean {\n\t\treturn (\n\t\t\t!!(cc.encapsulationFlags & EncapsulationFlags.CRC16)\n\t\t\t&& !(cc instanceof CRC16CCCommandEncapsulation)\n\t\t);\n\t}\n\n\t/** Encapsulates a command in a CRC-16 CC */\n\tpublic static encapsulate(\n\t\tcc: CommandClass,\n\t): CRC16CCCommandEncapsulation {\n\t\tconst ret = new CRC16CCCommandEncapsulation({\n\t\t\tnodeId: cc.nodeId,\n\t\t\tencapsulated: cc,\n\t\t});\n\n\t\t// Copy the encapsulation flags from the encapsulated command\n\t\t// but omit CRC-16, since we're doing that right now\n\t\tret.encapsulationFlags = cc.encapsulationFlags\n\t\t\t& ~EncapsulationFlags.CRC16;\n\n\t\treturn ret;\n\t}\n}\n\n// @publicAPI\nexport interface CRC16CCCommandEncapsulationOptions {\n\tencapsulated: CommandClass;\n}\n\nfunction getCCResponseForCommandEncapsulation(\n\tsent: CRC16CCCommandEncapsulation,\n) {\n\tif (sent.encapsulated?.expectsCCResponse()) {\n\t\treturn CRC16CCCommandEncapsulation;\n\t}\n}\n\n@CCCommand(CRC16Command.CommandEncapsulation)\n@expectedCCResponse(\n\tgetCCResponseForCommandEncapsulation,\n\t() => \"checkEncapsulated\",\n)\nexport class CRC16CCCommandEncapsulation extends CRC16CC {\n\tpublic constructor(\n\t\toptions: WithAddress<CRC16CCCommandEncapsulationOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.encapsulated = options.encapsulated;\n\t\tthis.encapsulated.encapsulatingCC = this as any;\n\t}\n\n\tpublic static async from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): Promise<CRC16CCCommandEncapsulation> {\n\t\tvalidatePayload(raw.payload.length >= 3);\n\n\t\tconst ccBuffer = raw.payload.subarray(0, -2);\n\n\t\t// Verify the CRC\n\t\tlet expectedCRC = CRC16_CCITT(headerBuffer);\n\t\texpectedCRC = CRC16_CCITT(ccBuffer, expectedCRC);\n\t\tconst actualCRC = raw.payload.readUInt16BE(\n\t\t\traw.payload.length - 2,\n\t\t);\n\t\tvalidatePayload(expectedCRC === actualCRC);\n\n\t\tconst encapsulated = await CommandClass.parse(ccBuffer, ctx);\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tencapsulated,\n\t\t});\n\t}\n\n\tpublic encapsulated: CommandClass;\n\n\tpublic async serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tconst commandBuffer = await this.encapsulated.serialize(ctx);\n\t\t// Reserve 2 bytes for the CRC\n\t\tthis.payload = Bytes.concat([commandBuffer, new Bytes(2)]);\n\n\t\t// Compute and save the CRC16 in the payload\n\t\t// The CC header is included in the CRC computation\n\t\tlet crc = CRC16_CCITT(headerBuffer);\n\t\tcrc = CRC16_CCITT(commandBuffer, crc);\n\t\tthis.payload.writeUInt16BE(crc, this.payload.length - 2);\n\n\t\treturn super.serialize(ctx);\n\t}\n\n\tprotected computeEncapsulationOverhead(): number {\n\t\t// CRC16 adds two bytes CRC to the default overhead\n\t\treturn super.computeEncapsulationOverhead() + 2;\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\t// Hide the default payload line\n\t\t\tmessage: undefined,\n\t\t};\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBASO;AACP,iBAAsB;AACtB,0BAAyC;AACzC,oCAMO;AAGP,IAAAA,eAAsB;AACtB,mBAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE7B,MAAM,eAAe,mBAAM,KAAK;EAC/B,2BAAe,sBAAsB;EACrC,0BAAa;CACb;IAUY,cAAU,MAAA;8BADtB,mCAAI,2BAAe,sBAAsB,CAAC,CAAC;;;;oBACZ;kCAAA,YAAK;WAAA;;;;;;;;AAArC,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACL,gBAAgB,MAAkB;AAGxC,aAAO;IAGR;IAEO,MAAM,iBAAiB,gBAA4B;AACzD,WAAK,sBACJ,2BACA,0BAAa,oBAAoB;AAGlC,YAAM,KAAK,IAAI,4BAA4B;QAC1C,QAAQ,KAAK,SAAS;QACtB,eAAe,KAAK,SAAS;QAC7B,cAAc;OACd;AACD,YAAM,KAAK,KAAK,YAAY,IAAI,KAAK,cAAc;IACpD;;;;IAKY,WAAO,MAAA;8BAFnB,4CAAa,2BAAe,sBAAsB,CAAC,OACnD,kDAAmB,CAAC,CAAC;;;;oBACO;+BAAA,YAAY;WAAA;;;;;;;;AAAzC,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAA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