@zwave-js/cc 15.0.0-beta.0 → 15.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.d.ts +79 -161
- package/build/cjs/cc/AlarmSensorCC.js +12 -50
- package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
- package/build/cjs/cc/AssociationCC.d.ts +63 -199
- package/build/cjs/cc/AssociationCC.js +9 -22
- package/build/cjs/cc/AssociationCC.js.map +2 -2
- package/build/cjs/cc/AssociationGroupInfoCC.d.ts +66 -166
- package/build/cjs/cc/AssociationGroupInfoCC.js +11 -22
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
- package/build/cjs/cc/BarrierOperatorCC.d.ts +86 -294
- package/build/cjs/cc/BarrierOperatorCC.js +12 -44
- package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
- package/build/cjs/cc/BasicCC.d.ts +85 -331
- package/build/cjs/cc/BasicCC.js +15 -46
- package/build/cjs/cc/BasicCC.js.map +2 -2
- package/build/cjs/cc/BatteryCC.d.ts +237 -835
- package/build/cjs/cc/BatteryCC.js +7 -84
- package/build/cjs/cc/BatteryCC.js.map +2 -2
- package/build/cjs/cc/BinarySensorCC.d.ts +34 -99
- package/build/cjs/cc/BinarySensorCC.js +9 -29
- package/build/cjs/cc/BinarySensorCC.js.map +2 -2
- package/build/cjs/cc/BinarySwitchCC.d.ts +45 -197
- package/build/cjs/cc/BinarySwitchCC.js +6 -22
- package/build/cjs/cc/BinarySwitchCC.js.map +2 -2
- package/build/cjs/cc/CentralSceneCC.d.ts +77 -296
- package/build/cjs/cc/CentralSceneCC.js +7 -30
- package/build/cjs/cc/CentralSceneCC.js.map +2 -2
- package/build/cjs/cc/ClimateControlScheduleCC.d.ts +45 -160
- package/build/cjs/cc/ClimateControlScheduleCC.js +5 -24
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +2 -2
- package/build/cjs/cc/ColorSwitchCC.d.ts +130 -457
- package/build/cjs/cc/ColorSwitchCC.js +23 -75
- package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
- package/build/cjs/cc/ConfigurationCC.d.ts +32 -100
- package/build/cjs/cc/ConfigurationCC.js +11 -31
- package/build/cjs/cc/ConfigurationCC.js.map +2 -2
- package/build/cjs/cc/DoorLockCC.d.ts +512 -1823
- package/build/cjs/cc/DoorLockCC.js +51 -156
- package/build/cjs/cc/DoorLockCC.js.map +2 -2
- package/build/cjs/cc/DoorLockLoggingCC.d.ts +11 -63
- package/build/cjs/cc/DoorLockLoggingCC.js +4 -8
- package/build/cjs/cc/DoorLockLoggingCC.js.map +2 -2
- package/build/cjs/cc/EnergyProductionCC.d.ts +14 -29
- package/build/cjs/cc/EnergyProductionCC.js +5 -17
- package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
- package/build/cjs/cc/EntryControlCC.d.ts +73 -324
- package/build/cjs/cc/EntryControlCC.js +9 -36
- package/build/cjs/cc/EntryControlCC.js.map +2 -2
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +78 -390
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +5 -26
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlModeCC.d.ts +31 -131
- package/build/cjs/cc/HumidityControlModeCC.js +6 -15
- package/build/cjs/cc/HumidityControlModeCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +17 -65
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +4 -12
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.d.ts +51 -128
- package/build/cjs/cc/HumidityControlSetpointCC.js +10 -28
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
- package/build/cjs/cc/IndicatorCC.d.ts +123 -365
- package/build/cjs/cc/IndicatorCC.js +15 -61
- package/build/cjs/cc/IndicatorCC.js.map +2 -2
- package/build/cjs/cc/IrrigationCC.d.ts +826 -2317
- package/build/cjs/cc/IrrigationCC.js +29 -233
- package/build/cjs/cc/IrrigationCC.js.map +2 -2
- package/build/cjs/cc/LanguageCC.d.ts +31 -133
- package/build/cjs/cc/LanguageCC.js +4 -15
- package/build/cjs/cc/LanguageCC.js.map +2 -2
- package/build/cjs/cc/LockCC.d.ts +14 -64
- package/build/cjs/cc/LockCC.js +4 -12
- package/build/cjs/cc/LockCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.d.ts +77 -239
- package/build/cjs/cc/ManufacturerSpecificCC.js +5 -26
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +2 -2
- package/build/cjs/cc/MeterCC.d.ts +119 -393
- package/build/cjs/cc/MeterCC.js +25 -69
- package/build/cjs/cc/MeterCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelAssociationCC.d.ts +66 -166
- package/build/cjs/cc/MultiChannelAssociationCC.js +10 -23
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelCC.d.ts +119 -499
- package/build/cjs/cc/MultiChannelCC.js +18 -46
- package/build/cjs/cc/MultiChannelCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSensorCC.d.ts +46 -130
- package/build/cjs/cc/MultilevelSensorCC.js +12 -33
- package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +160 -525
- package/build/cjs/cc/MultilevelSwitchCC.js +13 -107
- package/build/cjs/cc/MultilevelSwitchCC.js.map +2 -2
- package/build/cjs/cc/NodeNamingCC.d.ts +33 -135
- package/build/cjs/cc/NodeNamingCC.js +5 -16
- package/build/cjs/cc/NodeNamingCC.js.map +2 -2
- package/build/cjs/cc/NotificationCC.d.ts +262 -702
- package/build/cjs/cc/NotificationCC.js +29 -112
- package/build/cjs/cc/NotificationCC.js.map +2 -2
- package/build/cjs/cc/ProtectionCC.d.ts +118 -524
- package/build/cjs/cc/ProtectionCC.js +15 -50
- package/build/cjs/cc/ProtectionCC.js.map +2 -2
- package/build/cjs/cc/SceneActivationCC.d.ts +33 -132
- package/build/cjs/cc/SceneActivationCC.js +4 -17
- package/build/cjs/cc/SceneActivationCC.js.map +2 -2
- package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +34 -61
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +9 -21
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +2 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +34 -61
- package/build/cjs/cc/SceneControllerConfigurationCC.js +10 -22
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
- package/build/cjs/cc/ScheduleEntryLockCC.d.ts +95 -299
- package/build/cjs/cc/ScheduleEntryLockCC.js +13 -30
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
- package/build/cjs/cc/SoundSwitchCC.d.ts +72 -261
- package/build/cjs/cc/SoundSwitchCC.js +11 -43
- package/build/cjs/cc/SoundSwitchCC.js.map +2 -2
- package/build/cjs/cc/SupervisionCC.d.ts +17 -33
- package/build/cjs/cc/SupervisionCC.js +4 -9
- package/build/cjs/cc/SupervisionCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanModeCC.d.ts +44 -195
- package/build/cjs/cc/ThermostatFanModeCC.js +8 -21
- package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanStateCC.d.ts +17 -65
- package/build/cjs/cc/ThermostatFanStateCC.js +4 -12
- package/build/cjs/cc/ThermostatFanStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatModeCC.d.ts +44 -195
- package/build/cjs/cc/ThermostatModeCC.js +8 -21
- package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +17 -65
- package/build/cjs/cc/ThermostatOperatingStateCC.js +4 -12
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +49 -129
- package/build/cjs/cc/ThermostatSetpointCC.js +10 -25
- package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
- package/build/cjs/cc/TimeParametersCC.d.ts +12 -63
- package/build/cjs/cc/TimeParametersCC.js +4 -11
- package/build/cjs/cc/TimeParametersCC.js.map +2 -2
- package/build/cjs/cc/UserCodeCC.d.ts +311 -1066
- package/build/cjs/cc/UserCodeCC.js +33 -98
- package/build/cjs/cc/UserCodeCC.js.map +2 -2
- package/build/cjs/cc/VersionCC.d.ts +289 -1003
- package/build/cjs/cc/VersionCC.js +7 -98
- package/build/cjs/cc/VersionCC.js.map +2 -2
- package/build/cjs/cc/WakeUpCC.d.ts +49 -201
- package/build/cjs/cc/WakeUpCC.js +6 -26
- package/build/cjs/cc/WakeUpCC.js.map +2 -2
- package/build/cjs/cc/WindowCoveringCC.d.ts +126 -220
- package/build/cjs/cc/WindowCoveringCC.js +16 -128
- package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
- package/build/cjs/cc/ZWavePlusCC.d.ts +69 -329
- package/build/cjs/cc/ZWavePlusCC.js +4 -25
- package/build/cjs/cc/ZWavePlusCC.js.map +2 -2
- package/build/cjs/cc/_CCValues.generated.d.ts +15814 -0
- package/build/cjs/cc/_CCValues.generated.js +8723 -0
- package/build/cjs/cc/_CCValues.generated.js.map +7 -0
- package/build/cjs/lib/CCValueUtils.d.ts +14 -0
- package/build/cjs/lib/CCValueUtils.js +93 -0
- package/build/cjs/lib/CCValueUtils.js.map +7 -0
- package/build/cjs/lib/Values.d.ts +6 -105
- package/build/cjs/lib/Values.js +13 -107
- package/build/cjs/lib/Values.js.map +3 -3
- package/build/esm/cc/AlarmSensorCC.d.ts +79 -161
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +2 -39
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts +63 -199
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +2 -14
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts +66 -166
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +2 -13
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts +86 -294
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +2 -34
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts +85 -331
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +2 -32
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts +237 -835
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +2 -78
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts +34 -99
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +2 -16
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts +45 -197
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +2 -17
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts +77 -296
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +2 -26
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts +45 -160
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +2 -23
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts +130 -457
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +2 -52
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts +32 -100
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +2 -15
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts +512 -1823
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +9 -127
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts +11 -63
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +2 -5
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.d.ts +14 -29
- package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +2 -13
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts +73 -324
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +2 -28
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +78 -390
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +2 -23
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts +31 -131
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +2 -10
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +17 -65
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +2 -9
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts +51 -128
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +2 -19
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.d.ts +123 -365
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
- package/build/esm/cc/IndicatorCC.js +2 -43
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts +826 -2317
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +3 -222
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts +31 -133
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +2 -12
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts +14 -64
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +2 -9
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +0 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts +77 -239
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +2 -24
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts +119 -393
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +3 -49
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts +66 -166
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +2 -14
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts +119 -499
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +2 -30
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts +46 -130
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +2 -22
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts +160 -525
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +5 -101
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts +33 -135
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +2 -12
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts +262 -702
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +3 -85
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts +118 -524
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +2 -36
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.d.ts +33 -132
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +2 -14
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +34 -61
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +2 -14
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts +34 -61
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +2 -14
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts +95 -299
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +2 -17
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts +72 -261
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +2 -33
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.d.ts +17 -33
- package/build/esm/cc/SupervisionCC.d.ts.map +1 -1
- package/build/esm/cc/SupervisionCC.js +2 -7
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts +44 -195
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +2 -14
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts +17 -65
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +2 -9
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts +44 -195
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +2 -14
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts +17 -65
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +2 -9
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts +49 -129
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +2 -16
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts +12 -63
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +2 -8
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts +311 -1066
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +2 -60
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts +289 -1003
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +2 -92
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts +49 -201
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +2 -21
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts +126 -220
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +3 -103
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts +69 -329
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +2 -25
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/_CCValues.generated.d.ts +15814 -0
- package/build/esm/cc/_CCValues.generated.d.ts.map +1 -0
- package/build/esm/cc/_CCValues.generated.js +9187 -0
- package/build/esm/cc/_CCValues.generated.js.map +1 -0
- package/build/esm/lib/CCValueUtils.d.ts +14 -0
- package/build/esm/lib/CCValueUtils.d.ts.map +1 -0
- package/build/esm/lib/CCValueUtils.js +62 -0
- package/build/esm/lib/CCValueUtils.js.map +1 -0
- package/build/esm/lib/Values.d.ts +6 -105
- package/build/esm/lib/Values.d.ts.map +1 -1
- package/build/esm/lib/Values.js +7 -104
- package/build/esm/lib/Values.js.map +1 -1
- package/package.json +9 -7
|
@@ -2,49 +2,31 @@ import { type CCEncodingContext, type CCParsingContext } from "@zwave-js/cc";
|
|
|
2
2
|
import { type GetDeviceConfig } from "@zwave-js/config";
|
|
3
3
|
import { type GetNode, type GetSupportedCCVersion, type GetValueDB, type WithAddress } from "@zwave-js/core";
|
|
4
4
|
import type { ControlsCC, EndpointId, GetEndpoint, MessageOrCCLogEntry, NodeId, Scale, SinglecastCC, SupervisionResult, SupportsCC, ValueID } from "@zwave-js/core/safe";
|
|
5
|
-
import { CommandClasses, type MaybeNotKnown
|
|
5
|
+
import { CommandClasses, type MaybeNotKnown } from "@zwave-js/core/safe";
|
|
6
6
|
import { Bytes } from "@zwave-js/shared/safe";
|
|
7
7
|
import { type AllOrNone } from "@zwave-js/shared/safe";
|
|
8
8
|
import { POLL_VALUE, PhysicalCCAPI, type PollValueImplementation } from "../lib/API.js";
|
|
9
9
|
import { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext } from "../lib/CommandClass.js";
|
|
10
10
|
import { MultilevelSensorCommand, type MultilevelSensorValue } from "../lib/_Types.js";
|
|
11
11
|
export declare const MultilevelSensorCCValues: Readonly<{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
readonly type: "any";
|
|
19
|
-
readonly readable: true;
|
|
20
|
-
readonly writeable: true;
|
|
21
|
-
}>, ("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<{
|
|
22
|
-
readonly type: "any";
|
|
23
|
-
readonly readable: true;
|
|
24
|
-
readonly writeable: true;
|
|
25
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
26
|
-
readonly type: "any";
|
|
27
|
-
readonly readable: true;
|
|
28
|
-
readonly writeable: true;
|
|
29
|
-
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
30
|
-
readonly type: "any";
|
|
31
|
-
readonly readable: true;
|
|
32
|
-
readonly writeable: true;
|
|
33
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
34
|
-
readonly type: "any";
|
|
35
|
-
readonly readable: true;
|
|
36
|
-
readonly writeable: true;
|
|
37
|
-
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
|
|
38
|
-
readonly id: ValueIDBase;
|
|
39
|
-
readonly endpoint: (endpoint?: number | undefined) => {
|
|
12
|
+
supportedSensorTypes: {
|
|
13
|
+
id: {
|
|
14
|
+
readonly commandClass: (typeof CommandClasses)["Multilevel Sensor"];
|
|
15
|
+
readonly property: "supportedSensorTypes";
|
|
16
|
+
};
|
|
17
|
+
endpoint: (endpoint?: number) => {
|
|
40
18
|
readonly commandClass: (typeof CommandClasses)["Multilevel Sensor"];
|
|
41
19
|
readonly endpoint: number;
|
|
42
|
-
readonly property:
|
|
20
|
+
readonly property: "supportedSensorTypes";
|
|
43
21
|
};
|
|
44
|
-
}) & {
|
|
45
22
|
is: (valueId: ValueID) => boolean;
|
|
46
|
-
readonly
|
|
47
|
-
readonly
|
|
23
|
+
readonly meta: Readonly<{
|
|
24
|
+
readonly type: "any";
|
|
25
|
+
readonly readable: true;
|
|
26
|
+
readonly writeable: true;
|
|
27
|
+
}>;
|
|
28
|
+
options: {
|
|
29
|
+
readonly internal: true;
|
|
48
30
|
readonly minVersion: 1;
|
|
49
31
|
readonly secret: false;
|
|
50
32
|
readonly stateful: true;
|
|
@@ -53,125 +35,59 @@ export declare const MultilevelSensorCCValues: Readonly<{
|
|
|
53
35
|
};
|
|
54
36
|
};
|
|
55
37
|
supportedScales: ((sensorType: number) => {
|
|
56
|
-
|
|
57
|
-
readonly
|
|
58
|
-
readonly
|
|
59
|
-
readonly
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
readonly readable: true;
|
|
63
|
-
readonly writeable: true;
|
|
64
|
-
}>, ("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<{
|
|
65
|
-
readonly type: "any";
|
|
66
|
-
readonly readable: true;
|
|
67
|
-
readonly writeable: true;
|
|
68
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
69
|
-
readonly type: "any";
|
|
70
|
-
readonly readable: true;
|
|
71
|
-
readonly writeable: true;
|
|
72
|
-
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
73
|
-
readonly type: "any";
|
|
74
|
-
readonly readable: true;
|
|
75
|
-
readonly writeable: true;
|
|
76
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
77
|
-
readonly type: "any";
|
|
78
|
-
readonly readable: true;
|
|
79
|
-
readonly writeable: true;
|
|
80
|
-
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
|
|
81
|
-
readonly id: ValueIDBase;
|
|
82
|
-
readonly endpoint: (endpoint?: number | undefined) => {
|
|
38
|
+
id: {
|
|
39
|
+
readonly commandClass: (typeof CommandClasses)["Multilevel Sensor"];
|
|
40
|
+
readonly property: "supportedScales";
|
|
41
|
+
readonly propertyKey: number;
|
|
42
|
+
};
|
|
43
|
+
endpoint: (endpoint?: number) => {
|
|
83
44
|
readonly commandClass: (typeof CommandClasses)["Multilevel Sensor"];
|
|
84
45
|
readonly endpoint: number;
|
|
85
46
|
readonly property: "supportedScales";
|
|
86
47
|
readonly propertyKey: number;
|
|
87
48
|
};
|
|
49
|
+
readonly meta: Readonly<{
|
|
50
|
+
readonly type: "any";
|
|
51
|
+
readonly readable: true;
|
|
52
|
+
readonly writeable: true;
|
|
53
|
+
}>;
|
|
88
54
|
}) & {
|
|
89
55
|
is: (valueId: ValueID) => boolean;
|
|
90
|
-
|
|
91
|
-
readonly
|
|
92
|
-
readonly secret: false;
|
|
56
|
+
options: {
|
|
57
|
+
readonly internal: true;
|
|
93
58
|
readonly minVersion: 1;
|
|
59
|
+
readonly secret: false;
|
|
60
|
+
readonly stateful: true;
|
|
94
61
|
readonly supportsEndpoints: true;
|
|
95
62
|
readonly autoCreate: true;
|
|
96
|
-
readonly internal: true;
|
|
97
63
|
};
|
|
98
64
|
};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
65
|
+
value: ((sensorTypeName: string) => {
|
|
66
|
+
id: {
|
|
67
|
+
readonly commandClass: (typeof CommandClasses)["Multilevel Sensor"];
|
|
68
|
+
readonly property: string;
|
|
69
|
+
};
|
|
70
|
+
endpoint: (endpoint?: number) => {
|
|
102
71
|
readonly commandClass: (typeof CommandClasses)["Multilevel Sensor"];
|
|
103
72
|
readonly endpoint: number;
|
|
104
|
-
readonly property:
|
|
73
|
+
readonly property: string;
|
|
105
74
|
};
|
|
106
|
-
readonly
|
|
107
|
-
|
|
108
|
-
readonly
|
|
109
|
-
readonly
|
|
110
|
-
readonly writeable: true;
|
|
111
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
112
|
-
readonly type: "any";
|
|
113
|
-
readonly readable: true;
|
|
114
|
-
readonly writeable: true;
|
|
115
|
-
}>, ("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<{
|
|
116
|
-
readonly type: "any";
|
|
117
|
-
readonly readable: true;
|
|
118
|
-
readonly writeable: true;
|
|
119
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
120
|
-
readonly type: "any";
|
|
75
|
+
readonly meta: {
|
|
76
|
+
readonly label: string;
|
|
77
|
+
readonly writeable: false;
|
|
78
|
+
readonly type: "number";
|
|
121
79
|
readonly readable: true;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
readonly writeable: true;
|
|
127
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
128
|
-
readonly type: "any";
|
|
129
|
-
readonly readable: true;
|
|
130
|
-
readonly writeable: true;
|
|
131
|
-
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
|
|
132
|
-
readonly options: Readonly<(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"]>) extends infer T ? { [K in keyof T as [undefined] extends [(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 : K]: (import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
161
|
-
readonly internal: false;
|
|
162
|
-
readonly minVersion: 1;
|
|
163
|
-
readonly secret: false;
|
|
164
|
-
readonly stateful: true;
|
|
165
|
-
readonly supportsEndpoints: true;
|
|
166
|
-
readonly autoCreate: true;
|
|
167
|
-
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
80
|
+
};
|
|
81
|
+
}) & {
|
|
82
|
+
is: (valueId: ValueID) => boolean;
|
|
83
|
+
options: {
|
|
168
84
|
readonly internal: false;
|
|
169
85
|
readonly minVersion: 1;
|
|
170
86
|
readonly secret: false;
|
|
171
87
|
readonly stateful: true;
|
|
172
88
|
readonly supportsEndpoints: true;
|
|
173
89
|
readonly autoCreate: true;
|
|
174
|
-
}
|
|
90
|
+
};
|
|
175
91
|
};
|
|
176
92
|
}>;
|
|
177
93
|
export declare class MultilevelSensorCCAPI extends PhysicalCCAPI {
|
|
@@ -37,7 +37,7 @@ __export(MultilevelSensorCC_exports, {
|
|
|
37
37
|
MultilevelSensorCCReport: () => MultilevelSensorCCReport,
|
|
38
38
|
MultilevelSensorCCSupportedScaleReport: () => MultilevelSensorCCSupportedScaleReport,
|
|
39
39
|
MultilevelSensorCCSupportedSensorReport: () => MultilevelSensorCCSupportedSensorReport,
|
|
40
|
-
MultilevelSensorCCValues: () => MultilevelSensorCCValues
|
|
40
|
+
MultilevelSensorCCValues: () => import_CCValues_generated.MultilevelSensorCCValues
|
|
41
41
|
});
|
|
42
42
|
module.exports = __toCommonJS(MultilevelSensorCC_exports);
|
|
43
43
|
var __validateArgs = __toESM(require("./MultilevelSensorCC._validateArgs.js"), 1);
|
|
@@ -50,6 +50,7 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
50
50
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
51
51
|
var import_Values = require("../lib/Values.js");
|
|
52
52
|
var import_Types = require("../lib/_Types.js");
|
|
53
|
+
var import_CCValues_generated = require("./_CCValues.generated.js");
|
|
53
54
|
var __runInitializers = function(thisArg, initializers, value) {
|
|
54
55
|
var useValue = arguments.length > 2;
|
|
55
56
|
for (var i = 0; i < initializers.length; i++) {
|
|
@@ -91,28 +92,6 @@ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializ
|
|
|
91
92
|
done = true;
|
|
92
93
|
};
|
|
93
94
|
const { validateArgs_MultilevelSensorCCAPI_get, validateArgs_MultilevelSensorCCAPI_getSupportedScales, validateArgs_MultilevelSensorCCAPI_sendReport } = __validateArgs;
|
|
94
|
-
const MultilevelSensorCCValues = Object.freeze({
|
|
95
|
-
...import_Values.V.defineStaticCCValues(import_safe.CommandClasses["Multilevel Sensor"], {
|
|
96
|
-
...import_Values.V.staticProperty("supportedSensorTypes", void 0, {
|
|
97
|
-
internal: true
|
|
98
|
-
})
|
|
99
|
-
}),
|
|
100
|
-
...import_Values.V.defineDynamicCCValues(import_safe.CommandClasses["Multilevel Sensor"], {
|
|
101
|
-
...import_Values.V.dynamicPropertyAndKeyWithName("supportedScales", "supportedScales", (sensorType) => sensorType, ({ property, propertyKey }) => property === "supportedScales" && typeof propertyKey === "number", void 0, { internal: true }),
|
|
102
|
-
...import_Values.V.dynamicPropertyWithName(
|
|
103
|
-
"value",
|
|
104
|
-
// This should have been the sensor type, but it is too late to change now
|
|
105
|
-
// Maybe we can migrate this without breaking in the future
|
|
106
|
-
(sensorTypeName) => sensorTypeName,
|
|
107
|
-
({ property, propertyKey }) => typeof property === "string" && property !== "supportedSensorTypes" && property !== "supportedScales" && propertyKey == void 0,
|
|
108
|
-
(sensorTypeName) => ({
|
|
109
|
-
// Just the base metadata, to be extended using a config manager
|
|
110
|
-
...import_safe.ValueMetadata.ReadOnlyNumber,
|
|
111
|
-
label: sensorTypeName
|
|
112
|
-
})
|
|
113
|
-
)
|
|
114
|
-
})
|
|
115
|
-
});
|
|
116
95
|
function getPreferredSensorScale(ctx, nodeId, endpointIndex, sensorType, supportedScales) {
|
|
117
96
|
const preferences = ctx.getUserPreferences();
|
|
118
97
|
const sensor = (0, import_core.getSensor)(sensorType);
|
|
@@ -130,7 +109,7 @@ function getPreferredSensorScale(ctx, nodeId, endpointIndex, sensorType, support
|
|
|
130
109
|
}
|
|
131
110
|
if (preferred == void 0) {
|
|
132
111
|
const sensorName = (0, import_core.getSensorName)(sensorType);
|
|
133
|
-
const sensorValue = MultilevelSensorCCValues.value(sensorName);
|
|
112
|
+
const sensorValue = import_CCValues_generated.MultilevelSensorCCValues.value(sensorName);
|
|
134
113
|
const metadata = ctx.tryGetValueDB(nodeId)?.getMetadata(sensorValue.endpoint(endpointIndex));
|
|
135
114
|
const scale = metadata?.ccSpecific?.scale;
|
|
136
115
|
if (typeof scale === "number" && supportedScales.includes(scale)) {
|
|
@@ -309,7 +288,7 @@ let MultilevelSensorCCAPI = (() => {
|
|
|
309
288
|
return MultilevelSensorCCAPI2 = _classThis;
|
|
310
289
|
})();
|
|
311
290
|
let MultilevelSensorCC = (() => {
|
|
312
|
-
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Multilevel Sensor"]), (0, import_CommandClassDecorators.implementedVersion)(11), (0, import_CommandClassDecorators.ccValues)(MultilevelSensorCCValues)];
|
|
291
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Multilevel Sensor"]), (0, import_CommandClassDecorators.implementedVersion)(11), (0, import_CommandClassDecorators.ccValues)(import_CCValues_generated.MultilevelSensorCCValues)];
|
|
313
292
|
let _classDescriptor;
|
|
314
293
|
let _classExtraInitializers = [];
|
|
315
294
|
let _classThis;
|
|
@@ -441,7 +420,7 @@ value: ${mlsResponse.value}${sensorScale?.unit ? ` ${sensorScale.unit}` :
|
|
|
441
420
|
const valueDB = ctx.tryGetValueDB(this.nodeId);
|
|
442
421
|
if (!valueDB)
|
|
443
422
|
return true;
|
|
444
|
-
const values = this.getDefinedValueIDs(ctx).filter((v) => MultilevelSensorCCValues.value.is(v));
|
|
423
|
+
const values = this.getDefinedValueIDs(ctx).filter((v) => import_CCValues_generated.MultilevelSensorCCValues.value.is(v));
|
|
445
424
|
return values.every((v) => {
|
|
446
425
|
const lastUpdated = valueDB.getTimestamp(v);
|
|
447
426
|
return lastUpdated == void 0 || Date.now() - lastUpdated > import_core.timespan.hours(6);
|
|
@@ -452,14 +431,14 @@ value: ${mlsResponse.value}${sensorScale?.unit ? ` ${sensorScale.unit}` :
|
|
|
452
431
|
* This only works AFTER the interview process
|
|
453
432
|
*/
|
|
454
433
|
static getSupportedSensorTypesCached(ctx, endpoint) {
|
|
455
|
-
return ctx.getValueDB(endpoint.nodeId).getValue(MultilevelSensorCCValues.supportedSensorTypes.endpoint(endpoint.index));
|
|
434
|
+
return ctx.getValueDB(endpoint.nodeId).getValue(import_CCValues_generated.MultilevelSensorCCValues.supportedSensorTypes.endpoint(endpoint.index));
|
|
456
435
|
}
|
|
457
436
|
/**
|
|
458
437
|
* Returns which scales are supported for a given sensor type.
|
|
459
438
|
* This only works AFTER the interview process
|
|
460
439
|
*/
|
|
461
440
|
static getSupportedScalesCached(ctx, endpoint, sensorType) {
|
|
462
|
-
return ctx.getValueDB(endpoint.nodeId).getValue(MultilevelSensorCCValues.supportedScales(sensorType).endpoint(endpoint.index));
|
|
441
|
+
return ctx.getValueDB(endpoint.nodeId).getValue(import_CCValues_generated.MultilevelSensorCCValues.supportedScales(sensorType).endpoint(endpoint.index));
|
|
463
442
|
}
|
|
464
443
|
translatePropertyKey(ctx, property, propertyKey) {
|
|
465
444
|
if (property === "values" && typeof propertyKey === "number") {
|
|
@@ -518,11 +497,11 @@ let MultilevelSensorCCReport = (() => {
|
|
|
518
497
|
const ccVersion = (0, import_CommandClass.getEffectiveCCVersion)(ctx, this);
|
|
519
498
|
if (measurementValidation) {
|
|
520
499
|
if (ccVersion >= 5) {
|
|
521
|
-
const supportedSensorTypes = this.getValue(ctx, MultilevelSensorCCValues.supportedSensorTypes);
|
|
500
|
+
const supportedSensorTypes = this.getValue(ctx, import_CCValues_generated.MultilevelSensorCCValues.supportedSensorTypes);
|
|
522
501
|
if (supportedSensorTypes?.length) {
|
|
523
502
|
import_safe.validatePayload.withReason(`Unsupported sensor type ${(0, import_core.getSensorName)(this.type)} or corrupted data`)(supportedSensorTypes.includes(this.type));
|
|
524
503
|
}
|
|
525
|
-
const supportedScales = this.getValue(ctx, MultilevelSensorCCValues.supportedScales(this.type));
|
|
504
|
+
const supportedScales = this.getValue(ctx, import_CCValues_generated.MultilevelSensorCCValues.supportedScales(this.type));
|
|
526
505
|
if (supportedScales?.length) {
|
|
527
506
|
import_safe.validatePayload.withReason(`Unsupported scale ${scale.label} or corrupted data`)(supportedScales.includes(scale.key));
|
|
528
507
|
}
|
|
@@ -532,7 +511,7 @@ let MultilevelSensorCCReport = (() => {
|
|
|
532
511
|
}
|
|
533
512
|
}
|
|
534
513
|
const sensorName = (0, import_core.getSensorName)(this.type);
|
|
535
|
-
const sensorValue = MultilevelSensorCCValues.value(sensorName);
|
|
514
|
+
const sensorValue = import_CCValues_generated.MultilevelSensorCCValues.value(sensorName);
|
|
536
515
|
this.setMetadata(ctx, sensorValue, {
|
|
537
516
|
...sensorValue.meta,
|
|
538
517
|
unit: scale.unit,
|
|
@@ -640,7 +619,7 @@ let MultilevelSensorCCGet = (() => {
|
|
|
640
619
|
return MultilevelSensorCCGet2 = _classThis;
|
|
641
620
|
})();
|
|
642
621
|
let MultilevelSensorCCSupportedSensorReport = (() => {
|
|
643
|
-
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.MultilevelSensorCommand.SupportedSensorReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedSensorTypes", MultilevelSensorCCValues.supportedSensorTypes)];
|
|
622
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.MultilevelSensorCommand.SupportedSensorReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedSensorTypes", import_CCValues_generated.MultilevelSensorCCValues.supportedSensorTypes)];
|
|
644
623
|
let _classDescriptor;
|
|
645
624
|
let _classExtraInitializers = [];
|
|
646
625
|
let _classThis;
|
|
@@ -713,7 +692,7 @@ let MultilevelSensorCCGetSupportedSensor = (() => {
|
|
|
713
692
|
return MultilevelSensorCCGetSupportedSensor2 = _classThis;
|
|
714
693
|
})();
|
|
715
694
|
let MultilevelSensorCCSupportedScaleReport = (() => {
|
|
716
|
-
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.MultilevelSensorCommand.SupportedScaleReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedScales", MultilevelSensorCCValues.supportedScales, (self) => [self.sensorType])];
|
|
695
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.MultilevelSensorCommand.SupportedScaleReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedScales", import_CCValues_generated.MultilevelSensorCCValues.supportedScales, (self) => [self.sensorType])];
|
|
717
696
|
let _classDescriptor;
|
|
718
697
|
let _classExtraInitializers = [];
|
|
719
698
|
let _classThis;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/MultilevelSensorCC.ts"],
|
|
4
|
-
"sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport { type GetDeviceConfig } from \"@zwave-js/config\";\nimport {\n\ttype GetNode,\n\ttype GetSupportedCCVersion,\n\ttype GetValueDB,\n\ttype LogNode,\n\ttype WithAddress,\n\tencodeBitMask,\n\tgetSensor,\n\tgetSensorName,\n\tgetSensorScale,\n\tgetUnknownScale,\n\ttimespan,\n} from \"@zwave-js/core\";\nimport type {\n\tControlsCC,\n\tEndpointId,\n\tGetEndpoint,\n\tMessageOrCCLogEntry,\n\tMessageRecord,\n\tNodeId,\n\tScale,\n\tSinglecastCC,\n\tSupervisionResult,\n\tSupportsCC,\n\tValueID,\n} from \"@zwave-js/core/safe\";\nimport {\n\tCommandClasses,\n\ttype MaybeNotKnown,\n\tMessagePriority,\n\tValueMetadata,\n\tencodeFloatWithScale,\n\tparseBitMask,\n\tparseFloatWithScale,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { type AllOrNone, num2hex } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\tPhysicalCCAPI,\n\ttype PollValueImplementation,\n\tthrowUnsupportedProperty,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\ttype CCResponsePredicate,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n\tgetEffectiveCCVersion,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tMultilevelSensorCommand,\n\ttype MultilevelSensorValue,\n} from \"../lib/_Types.js\";\nimport { type GetUserPreferences } from \"../lib/traits.js\";\n\nexport const MultilevelSensorCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Multilevel Sensor\"], {\n\t\t...V.staticProperty(\"supportedSensorTypes\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t}),\n\n\t...V.defineDynamicCCValues(CommandClasses[\"Multilevel Sensor\"], {\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"supportedScales\",\n\t\t\t\"supportedScales\",\n\t\t\t(sensorType: number) => sensorType,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"supportedScales\"\n\t\t\t\t&& typeof propertyKey === \"number\",\n\t\t\tundefined,\n\t\t\t{ internal: true },\n\t\t),\n\n\t\t...V.dynamicPropertyWithName(\n\t\t\t\"value\",\n\t\t\t// This should have been the sensor type, but it is too late to change now\n\t\t\t// Maybe we can migrate this without breaking in the future\n\t\t\t(sensorTypeName: string) => sensorTypeName,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\ttypeof property === \"string\"\n\t\t\t\t&& property !== \"supportedSensorTypes\"\n\t\t\t\t&& property !== \"supportedScales\"\n\t\t\t\t&& propertyKey == undefined,\n\t\t\t(sensorTypeName: string) => ({\n\t\t\t\t// Just the base metadata, to be extended using a config manager\n\t\t\t\t...ValueMetadata.ReadOnlyNumber,\n\t\t\t\tlabel: sensorTypeName,\n\t\t\t} as const),\n\t\t),\n\t}),\n});\n\n/**\n * Determine the scale to use to query a sensor reading. Uses the user-preferred scale if given,\n * followed by the most recently used scale, otherwile falls back to the first supported one.\n */\nfunction getPreferredSensorScale(\n\tctx: GetValueDB & GetUserPreferences & LogNode,\n\tnodeId: number,\n\tendpointIndex: number,\n\tsensorType: number,\n\tsupportedScales: readonly number[],\n): number {\n\tconst preferences = ctx.getUserPreferences();\n\tconst sensor = getSensor(sensorType);\n\t// If the sensor type is unknown, we have no default. Use the user-provided scale or 0\n\tif (!sensor) {\n\t\tconst preferred = preferences?.scales[sensorType];\n\t\t// We cannot look up strings for unknown sensor types, so this must be a number or we use the fallback\n\t\tif (typeof preferred !== \"number\") return 0;\n\t\treturn preferred;\n\t}\n\n\t// Look up the preference for the scale\n\tlet preferred: number | string | undefined;\n\t// Named scales apply to multiple sensor types. To be able to override the scale for single types\n\t// we need to look at the preferences by sensor type first\n\tpreferred = preferences?.scales[sensorType];\n\t// If the scale is named, we can then try to use the named preference\n\tconst scaleGroupName = sensor.scaleGroupName;\n\tif (preferred == undefined && scaleGroupName) {\n\t\tpreferred = preferences?.scales[scaleGroupName];\n\t}\n\t// Then attempt reading the scale from the corresponding value\n\tif (preferred == undefined) {\n\t\tconst sensorName = getSensorName(sensorType);\n\t\tconst sensorValue = MultilevelSensorCCValues.value(sensorName);\n\t\tconst metadata = ctx\n\t\t\t.tryGetValueDB(nodeId)\n\t\t\t?.getMetadata(sensorValue.endpoint(endpointIndex));\n\t\tconst scale = metadata?.ccSpecific?.scale;\n\t\tif (typeof scale === \"number\" && supportedScales.includes(scale)) {\n\t\t\tpreferred = scale;\n\t\t\tctx.logNode(nodeId, {\n\t\t\t\tendpoint: endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t`No scale preference for sensor type ${sensorType}, using the last-used scale ${preferred}`,\n\t\t\t});\n\t\t}\n\t}\n\t// Then fall back to the first supported scale\n\tif (preferred == undefined) {\n\t\tpreferred = supportedScales[0] ?? 0;\n\t\tctx.logNode(nodeId, {\n\t\t\tendpoint: endpointIndex,\n\t\t\tmessage:\n\t\t\t\t`No scale preference for sensor type ${sensorType}, using the first supported scale ${preferred}`,\n\t\t});\n\t\treturn preferred;\n\t}\n\n\t// If the scale name or unit was given, try to look it up\n\tif (typeof preferred === \"string\") {\n\t\tfor (const [key, scale] of Object.entries(sensor.scales)) {\n\t\t\tif (scale.label === preferred || scale.unit === preferred) {\n\t\t\t\tpreferred = parseInt(key, 10);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (typeof preferred === \"string\") {\n\t\t// Looking up failed\n\t\tctx.logNode(nodeId, {\n\t\t\tendpoint: endpointIndex,\n\t\t\tmessage:\n\t\t\t\t`Preferred scale \"${preferred}\" for sensor type ${sensorType} not found, using the first supported scale ${\n\t\t\t\t\tsupportedScales[0] ?? 0\n\t\t\t\t}`,\n\t\t});\n\t\treturn supportedScales[0] ?? 0;\n\t}\n\n\t// We have a numeric scale key, nothing to look up. Make sure it is supported though\n\tif (!supportedScales.length) {\n\t\t// No info about supported scales, just use the preferred one\n\t\treturn preferred;\n\t} else if (!supportedScales.includes(preferred)) {\n\t\tctx.logNode(nodeId, {\n\t\t\tendpoint: endpointIndex,\n\t\t\tmessage:\n\t\t\t\t`Preferred scale ${preferred} not supported for sensor type ${sensorType}, using the first supported scale`,\n\t\t});\n\t\treturn supportedScales[0];\n\t} else {\n\t\treturn preferred;\n\t}\n}\n\n// @noSetValueAPI This CC is read-only\n\n@API(CommandClasses[\"Multilevel Sensor\"])\nexport class MultilevelSensorCCAPI extends PhysicalCCAPI {\n\tpublic supportsCommand(\n\t\tcmd: MultilevelSensorCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase MultilevelSensorCommand.Get:\n\t\t\tcase MultilevelSensorCommand.Report:\n\t\t\t\treturn true; // This is mandatory\n\t\t\tcase MultilevelSensorCommand.GetSupportedSensor:\n\t\t\tcase MultilevelSensorCommand.GetSupportedScale:\n\t\t\t\treturn this.version >= 5;\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: MultilevelSensorCCAPI, { property }) {\n\t\t\t// Look up the necessary information\n\t\t\tconst valueId: ValueID = {\n\t\t\t\tcommandClass: CommandClasses[\"Multilevel Sensor\"],\n\t\t\t\tendpoint: this.endpoint.index,\n\t\t\t\tproperty,\n\t\t\t};\n\t\t\tconst ccSpecific = this.tryGetValueDB()?.getMetadata(valueId)\n\t\t\t\t?.ccSpecific;\n\t\t\tif (!ccSpecific) {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\n\t\t\tconst { sensorType, scale } = ccSpecific;\n\t\t\treturn this.get(sensorType, scale);\n\t\t};\n\t}\n\n\t/** Query the default sensor value */\n\tpublic async get(): Promise<\n\t\tMaybeNotKnown<MultilevelSensorValue & { type: number }>\n\t>;\n\t/** Query the sensor value for the given sensor type using the preferred sensor scale */\n\tpublic async get(\n\t\tsensorType: number,\n\t): Promise<MaybeNotKnown<MultilevelSensorValue>>;\n\t/** Query the sensor value for the given sensor type using the given sensor scale */\n\tpublic async get(\n\t\tsensorType: number,\n\t\tscale: number,\n\t): Promise<MaybeNotKnown<number>>;\n\n\t@validateArgs()\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get(sensorType?: number, scale?: number) {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultilevelSensorCommand,\n\t\t\tMultilevelSensorCommand.Get,\n\t\t);\n\n\t\t// Figure out the preferred scale if none was given\n\t\tlet preferredScale: number | undefined;\n\t\tif (sensorType != undefined && scale == undefined) {\n\t\t\tconst supportedScales: readonly number[] =\n\t\t\t\tthis.tryGetValueDB()?.getValue({\n\t\t\t\t\tcommandClass: this.ccId,\n\t\t\t\t\tendpoint: this.endpoint.index,\n\t\t\t\t\tproperty: \"supportedScales\",\n\t\t\t\t\tpropertyKey: sensorType,\n\t\t\t\t}) ?? [];\n\n\t\t\tpreferredScale = getPreferredSensorScale(\n\t\t\t\tthis.host,\n\t\t\t\tthis.endpoint.nodeId,\n\t\t\t\tthis.endpoint.index,\n\t\t\t\tsensorType,\n\t\t\t\tsupportedScales,\n\t\t\t);\n\t\t}\n\n\t\tconst cc = new MultilevelSensorCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tsensorType: sensorType!,\n\t\t\tscale: (scale ?? preferredScale)!,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tMultilevelSensorCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (!response) return;\n\n\t\tconst responseScale = getSensorScale(response.type, response.scale);\n\n\t\tif (sensorType == undefined) {\n\t\t\t// Overload #1: return the full response\n\t\t\treturn {\n\t\t\t\ttype: response.type,\n\t\t\t\tvalue: response.value,\n\t\t\t\tscale: responseScale,\n\t\t\t};\n\t\t} else if (scale == undefined) {\n\t\t\t// Overload #2: return value and scale\n\t\t\treturn {\n\t\t\t\tvalue: response.value,\n\t\t\t\tscale: responseScale,\n\t\t\t};\n\t\t} else {\n\t\t\t// Overload #3: return only the value\n\t\t\treturn response.value;\n\t\t}\n\t}\n\n\tpublic async getSupportedSensorTypes(): Promise<\n\t\tMaybeNotKnown<readonly number[]>\n\t> {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultilevelSensorCommand,\n\t\t\tMultilevelSensorCommand.GetSupportedSensor,\n\t\t);\n\n\t\tconst cc = new MultilevelSensorCCGetSupportedSensor({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tMultilevelSensorCCSupportedSensorReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.supportedSensorTypes;\n\t}\n\n\t@validateArgs()\n\tpublic async getSupportedScales(\n\t\tsensorType: number,\n\t): Promise<MaybeNotKnown<readonly number[]>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultilevelSensorCommand,\n\t\t\tMultilevelSensorCommand.GetSupportedScale,\n\t\t);\n\n\t\tconst cc = new MultilevelSensorCCGetSupportedScale({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tsensorType,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tMultilevelSensorCCSupportedScaleReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.supportedScales;\n\t}\n\n\t@validateArgs()\n\tpublic async sendReport(\n\t\tsensorType: number,\n\t\tscale: number | Scale,\n\t\tvalue: number,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultilevelSensorCommand,\n\t\t\tMultilevelSensorCommand.Report,\n\t\t);\n\n\t\tconst cc = new MultilevelSensorCCReport({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\ttype: sensorType,\n\t\t\tscale,\n\t\t\tvalue,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses[\"Multilevel Sensor\"])\n@implementedVersion(11)\n@ccValues(MultilevelSensorCCValues)\nexport class MultilevelSensorCC extends CommandClass {\n\tdeclare ccCommand: MultilevelSensorCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Multilevel Sensor\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\tif (api.version >= 5) {\n\t\t\t// Query the supported sensor types\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"retrieving supported sensor types...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst sensorTypes = await api.getSupportedSensorTypes();\n\t\t\tif (sensorTypes) {\n\t\t\t\tconst logMessage = \"received supported sensor types:\\n\"\n\t\t\t\t\t+ sensorTypes\n\t\t\t\t\t\t.map((t) => getSensorName(t))\n\t\t\t\t\t\t.map((name) => `\u00B7 ${name}`)\n\t\t\t\t\t\t.join(\"\\n\");\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t\"Querying supported sensor types timed out, skipping interview...\",\n\t\t\t\t\tlevel: \"warn\",\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// As well as the supported scales for each sensor\n\n\t\t\tfor (const type of sensorTypes) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: `querying supported scales for ${\n\t\t\t\t\t\tgetSensorName(type)\n\t\t\t\t\t} sensor`,\n\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t});\n\t\t\t\tconst sensorScales = await api.getSupportedScales(type);\n\t\t\t\tif (sensorScales) {\n\t\t\t\t\tconst logMessage = \"received supported scales:\\n\"\n\t\t\t\t\t\t+ sensorScales\n\t\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t\t(s) =>\n\t\t\t\t\t\t\t\t\t(getSensorScale(type, s)\n\t\t\t\t\t\t\t\t\t\t?? getUnknownScale(s)).label,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.map((name) => `\u00B7 ${name}`)\n\t\t\t\t\t\t\t.join(\"\\n\");\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\"Querying supported scales timed out, skipping interview...\",\n\t\t\t\t\t\tlevel: \"warn\",\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\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[\"Multilevel Sensor\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\t\tconst valueDB = this.getValueDB(ctx);\n\n\t\tif (api.version <= 4) {\n\t\t\t// Sensors up to V4 only support a single value\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"querying current sensor reading...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst mlsResponse = await api.get();\n\t\t\tif (mlsResponse) {\n\t\t\t\tconst sensorScale = getSensorScale(\n\t\t\t\t\tmlsResponse.type,\n\t\t\t\t\tmlsResponse.scale.key,\n\t\t\t\t);\n\t\t\t\tconst logMessage = `received current sensor reading:\nsensor type: ${getSensorName(mlsResponse.type)}\nvalue: ${mlsResponse.value}${\n\t\t\t\t\tsensorScale?.unit ? ` ${sensorScale.unit}` : \"\"\n\t\t\t\t}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\t// Query all sensor values\n\t\t\tconst sensorTypes: readonly number[] = valueDB.getValue({\n\t\t\t\tcommandClass: this.ccId,\n\t\t\t\tproperty: \"supportedSensorTypes\",\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t}) || [];\n\n\t\t\tfor (const type of sensorTypes) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: `querying ${\n\t\t\t\t\t\tgetSensorName(type)\n\t\t\t\t\t} sensor reading...`,\n\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t});\n\n\t\t\t\tconst value = await api.get(type);\n\t\t\t\tif (value) {\n\t\t\t\t\tconst logMessage = `received current ${\n\t\t\t\t\t\tgetSensorName(type)\n\t\t\t\t\t} sensor reading: ${value.value} ${value.scale.unit || \"\"}`;\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic shouldRefreshValues(\n\t\tthis: SinglecastCC<this>,\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): boolean {\n\t\t// Poll the device when all of the supported values were last updated longer than 6 hours ago.\n\t\t// This may lead to some values not being updated, but the user may have disabled some unnecessary\n\t\t// reports to reduce traffic.\n\t\tconst valueDB = ctx.tryGetValueDB(this.nodeId);\n\t\tif (!valueDB) return true;\n\n\t\tconst values = this.getDefinedValueIDs(ctx).filter((v) =>\n\t\t\tMultilevelSensorCCValues.value.is(v)\n\t\t);\n\t\treturn values.every((v) => {\n\t\t\tconst lastUpdated = valueDB.getTimestamp(v);\n\t\t\treturn (\n\t\t\t\tlastUpdated == undefined\n\t\t\t\t|| Date.now() - lastUpdated > timespan.hours(6)\n\t\t\t);\n\t\t});\n\t}\n\n\t/**\n\t * Returns which sensor types are supported.\n\t * This only works AFTER the interview process\n\t */\n\tpublic static getSupportedSensorTypesCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t): MaybeNotKnown<number[]> {\n\t\treturn ctx\n\t\t\t.getValueDB(endpoint.nodeId)\n\t\t\t.getValue(\n\t\t\t\tMultilevelSensorCCValues.supportedSensorTypes.endpoint(\n\t\t\t\t\tendpoint.index,\n\t\t\t\t),\n\t\t\t);\n\t}\n\n\t/**\n\t * Returns which scales are supported for a given sensor type.\n\t * This only works AFTER the interview process\n\t */\n\tpublic static getSupportedScalesCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t\tsensorType: number,\n\t): MaybeNotKnown<number[]> {\n\t\treturn ctx\n\t\t\t.getValueDB(endpoint.nodeId)\n\t\t\t.getValue(\n\t\t\t\tMultilevelSensorCCValues.supportedScales(sensorType).endpoint(\n\t\t\t\t\tendpoint.index,\n\t\t\t\t),\n\t\t\t);\n\t}\n\n\tpublic translatePropertyKey(\n\t\tctx: GetValueDB,\n\t\tproperty: string | number,\n\t\tpropertyKey: string | number,\n\t): string | undefined {\n\t\t// TODO: check this\n\t\tif (property === \"values\" && typeof propertyKey === \"number\") {\n\t\t\tconst sensor = getSensor(propertyKey);\n\t\t\tif (sensor) return sensor.label;\n\t\t}\n\t\treturn super.translatePropertyKey(ctx, property, propertyKey);\n\t}\n}\n\n// @publicAPI\nexport interface MultilevelSensorCCReportOptions {\n\ttype: number;\n\tscale: number | Scale;\n\tvalue: number;\n}\n\n@CCCommand(MultilevelSensorCommand.Report)\n@useSupervision()\nexport class MultilevelSensorCCReport extends MultilevelSensorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<MultilevelSensorCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.type = options.type;\n\t\tthis.value = options.value;\n\t\tthis.scale = typeof options.scale === \"number\"\n\t\t\t? options.scale\n\t\t\t: options.scale.key;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultilevelSensorCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst type = raw.payload[0];\n\n\t\t// parseFloatWithScale does its own validation\n\t\tconst { value, scale } = parseFloatWithScale(\n\t\t\traw.payload.subarray(1),\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\ttype,\n\t\t\tvalue,\n\t\t\tscale,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\tconst sensor = getSensor(this.type);\n\t\tconst scale = getSensorScale(\n\t\t\tthis.type,\n\t\t\tthis.scale,\n\t\t) ?? getUnknownScale(this.scale);\n\n\t\t// Filter out unknown sensor types and scales, unless the strict validation is disabled\n\t\tconst measurementValidation = !ctx.getDeviceConfig?.(\n\t\t\tthis.nodeId as number,\n\t\t)?.compat?.disableStrictMeasurementValidation;\n\n\t\tconst ccVersion = getEffectiveCCVersion(ctx, this);\n\n\t\tif (measurementValidation) {\n\t\t\t// Filter out unsupported sensor types and scales if possible\n\t\t\tif (ccVersion >= 5) {\n\t\t\t\tconst supportedSensorTypes = this.getValue<number[]>(\n\t\t\t\t\tctx,\n\t\t\t\t\tMultilevelSensorCCValues.supportedSensorTypes,\n\t\t\t\t);\n\t\t\t\tif (supportedSensorTypes?.length) {\n\t\t\t\t\tvalidatePayload.withReason(\n\t\t\t\t\t\t`Unsupported sensor type ${\n\t\t\t\t\t\t\tgetSensorName(this.type)\n\t\t\t\t\t\t} or corrupted data`,\n\t\t\t\t\t)(supportedSensorTypes.includes(this.type));\n\t\t\t\t}\n\n\t\t\t\tconst supportedScales = this.getValue<number[]>(\n\t\t\t\t\tctx,\n\t\t\t\t\tMultilevelSensorCCValues.supportedScales(this.type),\n\t\t\t\t);\n\t\t\t\tif (supportedScales?.length) {\n\t\t\t\t\tvalidatePayload.withReason(\n\t\t\t\t\t\t`Unsupported scale ${scale.label} or corrupted data`,\n\t\t\t\t\t)(supportedScales.includes(scale.key));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// We support a higher CC version than the device, so any types and scales it uses should be known to us\n\t\t\t\t// Filter out unknown ones.\n\t\t\t\tvalidatePayload.withReason(\n\t\t\t\t\t`Unknown sensor type ${\n\t\t\t\t\t\tnum2hex(\n\t\t\t\t\t\t\tthis.type,\n\t\t\t\t\t\t)\n\t\t\t\t\t} or corrupted data`,\n\t\t\t\t)(!!sensor);\n\t\t\t\tvalidatePayload.withReason(\n\t\t\t\t\t`Unknown scale ${num2hex(this.scale)} or corrupted data`,\n\t\t\t\t)(scale.label !== getUnknownScale(this.scale).label);\n\t\t\t}\n\t\t}\n\n\t\tconst sensorName = getSensorName(this.type);\n\t\tconst sensorValue = MultilevelSensorCCValues.value(sensorName);\n\n\t\tthis.setMetadata(ctx, sensorValue, {\n\t\t\t...sensorValue.meta,\n\t\t\tunit: scale.unit,\n\t\t\tccSpecific: {\n\t\t\t\tsensorType: this.type,\n\t\t\t\tscale: scale.key,\n\t\t\t},\n\t\t});\n\t\tthis.setValue(ctx, sensorValue, this.value);\n\n\t\treturn true;\n\t}\n\n\tpublic type: number;\n\tpublic scale: number;\n\tpublic value: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([this.type]),\n\t\t\tencodeFloatWithScale(this.value, this.scale),\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"sensor type\": getSensorName(this.type),\n\t\t\t\tscale: (getSensorScale(this.type, this.scale)\n\t\t\t\t\t?? getUnknownScale(this.scale)).label,\n\t\t\t\tvalue: this.value,\n\t\t\t},\n\t\t};\n\t}\n}\n\nconst testResponseForMultilevelSensorGet: CCResponsePredicate<\n\tMultilevelSensorCCGet,\n\tMultilevelSensorCCReport\n> = (sent, received) => {\n\t// We expect a Multilevel Sensor Report that matches the requested sensor type (if a type was requested)\n\treturn sent.sensorType == undefined || received.type === sent.sensorType;\n};\n\n// These options are supported starting in V5\n// @publicAPI\nexport type MultilevelSensorCCGetOptions = AllOrNone<{\n\tsensorType: number;\n\tscale: number;\n}>;\n\n@CCCommand(MultilevelSensorCommand.Get)\n@expectedCCResponse(\n\tMultilevelSensorCCReport,\n\ttestResponseForMultilevelSensorGet,\n)\nexport class MultilevelSensorCCGet extends MultilevelSensorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<MultilevelSensorCCGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tif (\"sensorType\" in options) {\n\t\t\tthis.sensorType = options.sensorType;\n\t\t\tthis.scale = options.scale;\n\t\t}\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultilevelSensorCCGet {\n\t\tif (raw.payload.length >= 2) {\n\t\t\tconst sensorType = raw.payload[0];\n\t\t\tconst scale = (raw.payload[1] >> 3) & 0b11;\n\t\t\treturn new this({\n\t\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\t\tsensorType,\n\t\t\t\tscale,\n\t\t\t});\n\t\t} else {\n\t\t\treturn new this({\n\t\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic sensorType: number | undefined;\n\tpublic scale: number | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tif (\n\t\t\tthis.sensorType != undefined\n\t\t\t&& this.scale != undefined\n\t\t) {\n\t\t\tthis.payload = Bytes.from([\n\t\t\t\tthis.sensorType,\n\t\t\t\t(this.scale & 0b11) << 3,\n\t\t\t]);\n\t\t}\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tlet message: MessageRecord = {};\n\t\tif (\n\t\t\tthis.sensorType != undefined\n\t\t\t&& this.scale != undefined\n\t\t) {\n\t\t\tmessage = {\n\t\t\t\t\"sensor type\": getSensorName(\n\t\t\t\t\tthis.sensorType,\n\t\t\t\t),\n\t\t\t\tscale: (getSensorScale(\n\t\t\t\t\tthis.sensorType,\n\t\t\t\t\tthis.scale,\n\t\t\t\t) ?? getUnknownScale(this.scale)).label,\n\t\t\t};\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 MultilevelSensorCCSupportedSensorReportOptions {\n\tsupportedSensorTypes: readonly number[];\n}\n\n@CCCommand(MultilevelSensorCommand.SupportedSensorReport)\n@ccValueProperty(\n\t\"supportedSensorTypes\",\n\tMultilevelSensorCCValues.supportedSensorTypes,\n)\nexport class MultilevelSensorCCSupportedSensorReport\n\textends MultilevelSensorCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<MultilevelSensorCCSupportedSensorReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.supportedSensorTypes = options.supportedSensorTypes;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultilevelSensorCCSupportedSensorReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst supportedSensorTypes = parseBitMask(raw.payload);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportedSensorTypes,\n\t\t});\n\t}\n\n\t// TODO: Use this during interview to precreate values\n\n\tpublic supportedSensorTypes: readonly number[];\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = encodeBitMask(this.supportedSensorTypes);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"supported sensor types\": this.supportedSensorTypes\n\t\t\t\t\t.map((t) => `\\n\u00B7 ${getSensorName(t)}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(MultilevelSensorCommand.GetSupportedSensor)\n@expectedCCResponse(MultilevelSensorCCSupportedSensorReport)\nexport class MultilevelSensorCCGetSupportedSensor extends MultilevelSensorCC {}\n\n// @publicAPI\nexport interface MultilevelSensorCCSupportedScaleReportOptions {\n\tsensorType: number;\n\tsupportedScales: readonly number[];\n}\n\n@CCCommand(MultilevelSensorCommand.SupportedScaleReport)\n@ccValueProperty(\n\t\"supportedScales\",\n\tMultilevelSensorCCValues.supportedScales,\n\t(self) => [self.sensorType],\n)\nexport class MultilevelSensorCCSupportedScaleReport extends MultilevelSensorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<MultilevelSensorCCSupportedScaleReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.sensorType = options.sensorType;\n\t\tthis.supportedScales = options.supportedScales;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultilevelSensorCCSupportedScaleReport {\n\t\tvalidatePayload(raw.payload.length >= 2);\n\t\tconst sensorType = raw.payload[0];\n\t\tconst supportedScales = parseBitMask(\n\t\t\tBytes.from([raw.payload[1] & 0b1111]),\n\t\t\t0,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsensorType,\n\t\t\tsupportedScales,\n\t\t});\n\t}\n\n\tpublic readonly sensorType: number;\n\n\tpublic readonly supportedScales: readonly number[];\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([this.sensorType]),\n\t\t\tencodeBitMask(this.supportedScales, 4, 0),\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"sensor type\": getSensorName(this.sensorType),\n\t\t\t\t\"supported scales\": this.supportedScales\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(s) =>\n\t\t\t\t\t\t\t`\\n\u00B7 ${\n\t\t\t\t\t\t\t\t(getSensorScale(this.sensorType, s)\n\t\t\t\t\t\t\t\t\t?? getUnknownScale(s)).label\n\t\t\t\t\t\t\t}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface MultilevelSensorCCGetSupportedScaleOptions {\n\tsensorType: number;\n}\n\n@CCCommand(MultilevelSensorCommand.GetSupportedScale)\n@expectedCCResponse(MultilevelSensorCCSupportedScaleReport)\nexport class MultilevelSensorCCGetSupportedScale extends MultilevelSensorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<MultilevelSensorCCGetSupportedScaleOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.sensorType = options.sensorType;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultilevelSensorCCGetSupportedScale {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst sensorType = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsensorType,\n\t\t});\n\t}\n\n\tpublic sensorType: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.sensorType]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"sensor type\": getSensorName(this.sensorType),\n\t\t\t},\n\t\t};\n\t}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,kBAYO;AAcP,kBASO;AACP,IAAAA,eAAsB;AACtB,IAAAA,eAAwC;AAExC,iBAMO;AACP,0BAQO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAGO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAM,2BAA2B,OAAO,OAAO;EACrD,GAAG,gBAAE,qBAAqB,2BAAe,mBAAmB,GAAG;IAC9D,GAAG,gBAAE,eAAe,wBAAwB,QAAW;MACtD,UAAU;KACV;GACD;EAED,GAAG,gBAAE,sBAAsB,2BAAe,mBAAmB,GAAG;IAC/D,GAAG,gBAAE,8BACJ,mBACA,mBACA,CAAC,eAAuB,YACxB,CAAC,EAAE,UAAU,YAAW,MACvB,aAAa,qBACV,OAAO,gBAAgB,UAC3B,QACA,EAAE,UAAU,KAAI,CAAE;IAGnB,GAAG,gBAAE;MACJ;;;MAGA,CAAC,mBAA2B;MAC5B,CAAC,EAAE,UAAU,YAAW,MACvB,OAAO,aAAa,YACjB,aAAa,0BACb,aAAa,qBACb,eAAe;MACnB,CAAC,oBAA4B;;QAE5B,GAAG,0BAAc;QACjB,OAAO;;IACG;GAEZ;CACD;AAMD,SAAS,wBACR,KACA,QACA,eACA,YACA,iBAAkC;AAElC,QAAM,cAAc,IAAI,mBAAkB;AAC1C,QAAM,aAAS,uBAAU,UAAU;AAEnC,MAAI,CAAC,QAAQ;AACZ,UAAMC,aAAY,aAAa,OAAO,UAAU;AAEhD,QAAI,OAAOA,eAAc;AAAU,aAAO;AA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K,UAAU;UAC5C,oBAAoB,KAAK,gBACvB,IACA,CAAC,MACA;YACE,4BAAe,KAAK,YAAY,CAAC,SAC9B,6BAAgB,CAAC,GAAG,KACzB,EAAE,EAEH,KAAK,EAAE;;;IAGZ;;;;IAUY,uCAAmC,MAAA;8BAF/C,yCAAU,qCAAwB,iBAAiB,OACnD,kDAAmB,sCAAsC,CAAC;;;;oBACF;2DAAA,YAAkB;WAAA;;;;;;;;AAA3E,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACZ,YACC,SAAgE;AAEhE,YAAM,OAAO;AACb,WAAK,aAAa,QAAQ;IAC3B;IAEO,OAAO,KACb,KACA,KAAqB;AAErB,uCAAgB,IAAI,QAAQ,UAAU,CAAC;AACvC,YAAM,aAAa,IAAI,QAAQ,CAAC;AAEhC,aAAO,IAAI,KAAK;QACf,QAAQ,IAAI;QACZ;OACA;IACF;IAEO;IAEA,UAAU,KAAsB;AACtC,WAAK,UAAU,mBAAM,KAAK,CAAC,KAAK,UAAU,CAAC;AAC3C,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACR,mBAAe,2BAAc,KAAK,UAAU;;;IAG/C;;;;",
|
|
4
|
+
"sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport { type GetDeviceConfig } from \"@zwave-js/config\";\nimport {\n\ttype GetNode,\n\ttype GetSupportedCCVersion,\n\ttype GetValueDB,\n\ttype LogNode,\n\ttype WithAddress,\n\tencodeBitMask,\n\tgetSensor,\n\tgetSensorName,\n\tgetSensorScale,\n\tgetUnknownScale,\n\ttimespan,\n} from \"@zwave-js/core\";\nimport type {\n\tControlsCC,\n\tEndpointId,\n\tGetEndpoint,\n\tMessageOrCCLogEntry,\n\tMessageRecord,\n\tNodeId,\n\tScale,\n\tSinglecastCC,\n\tSupervisionResult,\n\tSupportsCC,\n\tValueID,\n} from \"@zwave-js/core/safe\";\nimport {\n\tCommandClasses,\n\ttype MaybeNotKnown,\n\tMessagePriority,\n\tValueMetadata,\n\tencodeFloatWithScale,\n\tparseBitMask,\n\tparseFloatWithScale,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { type AllOrNone, num2hex } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\tPhysicalCCAPI,\n\ttype PollValueImplementation,\n\tthrowUnsupportedProperty,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\ttype CCResponsePredicate,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n\tgetEffectiveCCVersion,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tMultilevelSensorCommand,\n\ttype MultilevelSensorValue,\n} from \"../lib/_Types.js\";\nimport { type GetUserPreferences } from \"../lib/traits.js\";\n\nexport const MultilevelSensorCCValues = V.defineCCValues(\n\tCommandClasses[\"Multilevel Sensor\"],\n\t{\n\t\t...V.staticProperty(\"supportedSensorTypes\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"supportedScales\",\n\t\t\t\"supportedScales\",\n\t\t\t(sensorType: number) => sensorType,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"supportedScales\"\n\t\t\t\t&& typeof propertyKey === \"number\",\n\t\t\tundefined,\n\t\t\t{ internal: true },\n\t\t),\n\t\t...V.dynamicPropertyWithName(\n\t\t\t\"value\",\n\t\t\t// This should have been the sensor type, but it is too late to change now\n\t\t\t// Maybe we can migrate this without breaking in the future\n\t\t\t(sensorTypeName: string) => sensorTypeName,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\ttypeof property === \"string\"\n\t\t\t\t&& property !== \"supportedSensorTypes\"\n\t\t\t\t&& property !== \"supportedScales\"\n\t\t\t\t&& propertyKey == undefined,\n\t\t\t(sensorTypeName: string) => ({\n\t\t\t\t// Just the base metadata, to be extended using a config manager\n\t\t\t\t...ValueMetadata.ReadOnlyNumber,\n\t\t\t\tlabel: sensorTypeName,\n\t\t\t} as const),\n\t\t),\n\t},\n);\n\n/**\n * Determine the scale to use to query a sensor reading. Uses the user-preferred scale if given,\n * followed by the most recently used scale, otherwile falls back to the first supported one.\n */\nfunction getPreferredSensorScale(\n\tctx: GetValueDB & GetUserPreferences & LogNode,\n\tnodeId: number,\n\tendpointIndex: number,\n\tsensorType: number,\n\tsupportedScales: readonly number[],\n): number {\n\tconst preferences = ctx.getUserPreferences();\n\tconst sensor = getSensor(sensorType);\n\t// If the sensor type is unknown, we have no default. Use the user-provided scale or 0\n\tif (!sensor) {\n\t\tconst preferred = preferences?.scales[sensorType];\n\t\t// We cannot look up strings for unknown sensor types, so this must be a number or we use the fallback\n\t\tif (typeof preferred !== \"number\") return 0;\n\t\treturn preferred;\n\t}\n\n\t// Look up the preference for the scale\n\tlet preferred: number | string | undefined;\n\t// Named scales apply to multiple sensor types. To be able to override the scale for single types\n\t// we need to look at the preferences by sensor type first\n\tpreferred = preferences?.scales[sensorType];\n\t// If the scale is named, we can then try to use the named preference\n\tconst scaleGroupName = sensor.scaleGroupName;\n\tif (preferred == undefined && scaleGroupName) {\n\t\tpreferred = preferences?.scales[scaleGroupName];\n\t}\n\t// Then attempt reading the scale from the corresponding value\n\tif (preferred == undefined) {\n\t\tconst sensorName = getSensorName(sensorType);\n\t\tconst sensorValue = MultilevelSensorCCValues.value(sensorName);\n\t\tconst metadata = ctx\n\t\t\t.tryGetValueDB(nodeId)\n\t\t\t?.getMetadata(sensorValue.endpoint(endpointIndex));\n\t\tconst scale = metadata?.ccSpecific?.scale;\n\t\tif (typeof scale === \"number\" && supportedScales.includes(scale)) {\n\t\t\tpreferred = scale;\n\t\t\tctx.logNode(nodeId, {\n\t\t\t\tendpoint: endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t`No scale preference for sensor type ${sensorType}, using the last-used scale ${preferred}`,\n\t\t\t});\n\t\t}\n\t}\n\t// Then fall back to the first supported scale\n\tif (preferred == undefined) {\n\t\tpreferred = supportedScales[0] ?? 0;\n\t\tctx.logNode(nodeId, {\n\t\t\tendpoint: endpointIndex,\n\t\t\tmessage:\n\t\t\t\t`No scale preference for sensor type ${sensorType}, using the first supported scale ${preferred}`,\n\t\t});\n\t\treturn preferred;\n\t}\n\n\t// If the scale name or unit was given, try to look it up\n\tif (typeof preferred === \"string\") {\n\t\tfor (const [key, scale] of Object.entries(sensor.scales)) {\n\t\t\tif (scale.label === preferred || scale.unit === preferred) {\n\t\t\t\tpreferred = parseInt(key, 10);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (typeof preferred === \"string\") {\n\t\t// Looking up failed\n\t\tctx.logNode(nodeId, {\n\t\t\tendpoint: endpointIndex,\n\t\t\tmessage:\n\t\t\t\t`Preferred scale \"${preferred}\" for sensor type ${sensorType} not found, using the first supported scale ${\n\t\t\t\t\tsupportedScales[0] ?? 0\n\t\t\t\t}`,\n\t\t});\n\t\treturn supportedScales[0] ?? 0;\n\t}\n\n\t// We have a numeric scale key, nothing to look up. Make sure it is supported though\n\tif (!supportedScales.length) {\n\t\t// No info about supported scales, just use the preferred one\n\t\treturn preferred;\n\t} else if (!supportedScales.includes(preferred)) {\n\t\tctx.logNode(nodeId, {\n\t\t\tendpoint: endpointIndex,\n\t\t\tmessage:\n\t\t\t\t`Preferred scale ${preferred} not supported for sensor type ${sensorType}, using the first supported scale`,\n\t\t});\n\t\treturn supportedScales[0];\n\t} else {\n\t\treturn preferred;\n\t}\n}\n\n// @noSetValueAPI This CC is read-only\n\n@API(CommandClasses[\"Multilevel Sensor\"])\nexport class MultilevelSensorCCAPI extends PhysicalCCAPI {\n\tpublic supportsCommand(\n\t\tcmd: MultilevelSensorCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase MultilevelSensorCommand.Get:\n\t\t\tcase MultilevelSensorCommand.Report:\n\t\t\t\treturn true; // This is mandatory\n\t\t\tcase MultilevelSensorCommand.GetSupportedSensor:\n\t\t\tcase MultilevelSensorCommand.GetSupportedScale:\n\t\t\t\treturn this.version >= 5;\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: MultilevelSensorCCAPI, { property }) {\n\t\t\t// Look up the necessary information\n\t\t\tconst valueId: ValueID = {\n\t\t\t\tcommandClass: CommandClasses[\"Multilevel Sensor\"],\n\t\t\t\tendpoint: this.endpoint.index,\n\t\t\t\tproperty,\n\t\t\t};\n\t\t\tconst ccSpecific = this.tryGetValueDB()?.getMetadata(valueId)\n\t\t\t\t?.ccSpecific;\n\t\t\tif (!ccSpecific) {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\n\t\t\tconst { sensorType, scale } = ccSpecific;\n\t\t\treturn this.get(sensorType, scale);\n\t\t};\n\t}\n\n\t/** Query the default sensor value */\n\tpublic async get(): Promise<\n\t\tMaybeNotKnown<MultilevelSensorValue & { type: number }>\n\t>;\n\t/** Query the sensor value for the given sensor type using the preferred sensor scale */\n\tpublic async get(\n\t\tsensorType: number,\n\t): Promise<MaybeNotKnown<MultilevelSensorValue>>;\n\t/** Query the sensor value for the given sensor type using the given sensor scale */\n\tpublic async get(\n\t\tsensorType: number,\n\t\tscale: number,\n\t): Promise<MaybeNotKnown<number>>;\n\n\t@validateArgs()\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get(sensorType?: number, scale?: number) {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultilevelSensorCommand,\n\t\t\tMultilevelSensorCommand.Get,\n\t\t);\n\n\t\t// Figure out the preferred scale if none was given\n\t\tlet preferredScale: number | undefined;\n\t\tif (sensorType != undefined && scale == undefined) {\n\t\t\tconst supportedScales: readonly number[] =\n\t\t\t\tthis.tryGetValueDB()?.getValue({\n\t\t\t\t\tcommandClass: this.ccId,\n\t\t\t\t\tendpoint: this.endpoint.index,\n\t\t\t\t\tproperty: \"supportedScales\",\n\t\t\t\t\tpropertyKey: sensorType,\n\t\t\t\t}) ?? [];\n\n\t\t\tpreferredScale = getPreferredSensorScale(\n\t\t\t\tthis.host,\n\t\t\t\tthis.endpoint.nodeId,\n\t\t\t\tthis.endpoint.index,\n\t\t\t\tsensorType,\n\t\t\t\tsupportedScales,\n\t\t\t);\n\t\t}\n\n\t\tconst cc = new MultilevelSensorCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tsensorType: sensorType!,\n\t\t\tscale: (scale ?? preferredScale)!,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tMultilevelSensorCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (!response) return;\n\n\t\tconst responseScale = getSensorScale(response.type, response.scale);\n\n\t\tif (sensorType == undefined) {\n\t\t\t// Overload #1: return the full response\n\t\t\treturn {\n\t\t\t\ttype: response.type,\n\t\t\t\tvalue: response.value,\n\t\t\t\tscale: responseScale,\n\t\t\t};\n\t\t} else if (scale == undefined) {\n\t\t\t// Overload #2: return value and scale\n\t\t\treturn {\n\t\t\t\tvalue: response.value,\n\t\t\t\tscale: responseScale,\n\t\t\t};\n\t\t} else {\n\t\t\t// Overload #3: return only the value\n\t\t\treturn response.value;\n\t\t}\n\t}\n\n\tpublic async getSupportedSensorTypes(): Promise<\n\t\tMaybeNotKnown<readonly number[]>\n\t> {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultilevelSensorCommand,\n\t\t\tMultilevelSensorCommand.GetSupportedSensor,\n\t\t);\n\n\t\tconst cc = new MultilevelSensorCCGetSupportedSensor({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tMultilevelSensorCCSupportedSensorReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.supportedSensorTypes;\n\t}\n\n\t@validateArgs()\n\tpublic async getSupportedScales(\n\t\tsensorType: number,\n\t): Promise<MaybeNotKnown<readonly number[]>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultilevelSensorCommand,\n\t\t\tMultilevelSensorCommand.GetSupportedScale,\n\t\t);\n\n\t\tconst cc = new MultilevelSensorCCGetSupportedScale({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tsensorType,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tMultilevelSensorCCSupportedScaleReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.supportedScales;\n\t}\n\n\t@validateArgs()\n\tpublic async sendReport(\n\t\tsensorType: number,\n\t\tscale: number | Scale,\n\t\tvalue: number,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tMultilevelSensorCommand,\n\t\t\tMultilevelSensorCommand.Report,\n\t\t);\n\n\t\tconst cc = new MultilevelSensorCCReport({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\ttype: sensorType,\n\t\t\tscale,\n\t\t\tvalue,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses[\"Multilevel Sensor\"])\n@implementedVersion(11)\n@ccValues(MultilevelSensorCCValues)\nexport class MultilevelSensorCC extends CommandClass {\n\tdeclare ccCommand: MultilevelSensorCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Multilevel Sensor\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\tif (api.version >= 5) {\n\t\t\t// Query the supported sensor types\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"retrieving supported sensor types...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst sensorTypes = await api.getSupportedSensorTypes();\n\t\t\tif (sensorTypes) {\n\t\t\t\tconst logMessage = \"received supported sensor types:\\n\"\n\t\t\t\t\t+ sensorTypes\n\t\t\t\t\t\t.map((t) => getSensorName(t))\n\t\t\t\t\t\t.map((name) => `\u00B7 ${name}`)\n\t\t\t\t\t\t.join(\"\\n\");\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t\"Querying supported sensor types timed out, skipping interview...\",\n\t\t\t\t\tlevel: \"warn\",\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// As well as the supported scales for each sensor\n\n\t\t\tfor (const type of sensorTypes) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: `querying supported scales for ${\n\t\t\t\t\t\tgetSensorName(type)\n\t\t\t\t\t} sensor`,\n\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t});\n\t\t\t\tconst sensorScales = await api.getSupportedScales(type);\n\t\t\t\tif (sensorScales) {\n\t\t\t\t\tconst logMessage = \"received supported scales:\\n\"\n\t\t\t\t\t\t+ sensorScales\n\t\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t\t(s) =>\n\t\t\t\t\t\t\t\t\t(getSensorScale(type, s)\n\t\t\t\t\t\t\t\t\t\t?? getUnknownScale(s)).label,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.map((name) => `\u00B7 ${name}`)\n\t\t\t\t\t\t\t.join(\"\\n\");\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\"Querying supported scales timed out, skipping interview...\",\n\t\t\t\t\t\tlevel: \"warn\",\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\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[\"Multilevel Sensor\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\t\tconst valueDB = this.getValueDB(ctx);\n\n\t\tif (api.version <= 4) {\n\t\t\t// Sensors up to V4 only support a single value\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"querying current sensor reading...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst mlsResponse = await api.get();\n\t\t\tif (mlsResponse) {\n\t\t\t\tconst sensorScale = getSensorScale(\n\t\t\t\t\tmlsResponse.type,\n\t\t\t\t\tmlsResponse.scale.key,\n\t\t\t\t);\n\t\t\t\tconst logMessage = `received current sensor reading:\nsensor type: ${getSensorName(mlsResponse.type)}\nvalue: ${mlsResponse.value}${\n\t\t\t\t\tsensorScale?.unit ? ` ${sensorScale.unit}` : \"\"\n\t\t\t\t}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\t// Query all sensor values\n\t\t\tconst sensorTypes: readonly number[] = valueDB.getValue({\n\t\t\t\tcommandClass: this.ccId,\n\t\t\t\tproperty: \"supportedSensorTypes\",\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t}) || [];\n\n\t\t\tfor (const type of sensorTypes) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: `querying ${\n\t\t\t\t\t\tgetSensorName(type)\n\t\t\t\t\t} sensor reading...`,\n\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t});\n\n\t\t\t\tconst value = await api.get(type);\n\t\t\t\tif (value) {\n\t\t\t\t\tconst logMessage = `received current ${\n\t\t\t\t\t\tgetSensorName(type)\n\t\t\t\t\t} sensor reading: ${value.value} ${value.scale.unit || \"\"}`;\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic shouldRefreshValues(\n\t\tthis: SinglecastCC<this>,\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): boolean {\n\t\t// Poll the device when all of the supported values were last updated longer than 6 hours ago.\n\t\t// This may lead to some values not being updated, but the user may have disabled some unnecessary\n\t\t// reports to reduce traffic.\n\t\tconst valueDB = ctx.tryGetValueDB(this.nodeId);\n\t\tif (!valueDB) return true;\n\n\t\tconst values = this.getDefinedValueIDs(ctx).filter((v) =>\n\t\t\tMultilevelSensorCCValues.value.is(v)\n\t\t);\n\t\treturn values.every((v) => {\n\t\t\tconst lastUpdated = valueDB.getTimestamp(v);\n\t\t\treturn (\n\t\t\t\tlastUpdated == undefined\n\t\t\t\t|| Date.now() - lastUpdated > timespan.hours(6)\n\t\t\t);\n\t\t});\n\t}\n\n\t/**\n\t * Returns which sensor types are supported.\n\t * This only works AFTER the interview process\n\t */\n\tpublic static getSupportedSensorTypesCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t): MaybeNotKnown<number[]> {\n\t\treturn ctx\n\t\t\t.getValueDB(endpoint.nodeId)\n\t\t\t.getValue(\n\t\t\t\tMultilevelSensorCCValues.supportedSensorTypes.endpoint(\n\t\t\t\t\tendpoint.index,\n\t\t\t\t),\n\t\t\t);\n\t}\n\n\t/**\n\t * Returns which scales are supported for a given sensor type.\n\t * This only works AFTER the interview process\n\t */\n\tpublic static getSupportedScalesCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t\tsensorType: number,\n\t): MaybeNotKnown<number[]> {\n\t\treturn ctx\n\t\t\t.getValueDB(endpoint.nodeId)\n\t\t\t.getValue(\n\t\t\t\tMultilevelSensorCCValues.supportedScales(sensorType).endpoint(\n\t\t\t\t\tendpoint.index,\n\t\t\t\t),\n\t\t\t);\n\t}\n\n\tpublic translatePropertyKey(\n\t\tctx: GetValueDB,\n\t\tproperty: string | number,\n\t\tpropertyKey: string | number,\n\t): string | undefined {\n\t\t// TODO: check this\n\t\tif (property === \"values\" && typeof propertyKey === \"number\") {\n\t\t\tconst sensor = getSensor(propertyKey);\n\t\t\tif (sensor) return sensor.label;\n\t\t}\n\t\treturn super.translatePropertyKey(ctx, property, propertyKey);\n\t}\n}\n\n// @publicAPI\nexport interface MultilevelSensorCCReportOptions {\n\ttype: number;\n\tscale: number | Scale;\n\tvalue: number;\n}\n\n@CCCommand(MultilevelSensorCommand.Report)\n@useSupervision()\nexport class MultilevelSensorCCReport extends MultilevelSensorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<MultilevelSensorCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.type = options.type;\n\t\tthis.value = options.value;\n\t\tthis.scale = typeof options.scale === \"number\"\n\t\t\t? options.scale\n\t\t\t: options.scale.key;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultilevelSensorCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst type = raw.payload[0];\n\n\t\t// parseFloatWithScale does its own validation\n\t\tconst { value, scale } = parseFloatWithScale(\n\t\t\traw.payload.subarray(1),\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\ttype,\n\t\t\tvalue,\n\t\t\tscale,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\tconst sensor = getSensor(this.type);\n\t\tconst scale = getSensorScale(\n\t\t\tthis.type,\n\t\t\tthis.scale,\n\t\t) ?? getUnknownScale(this.scale);\n\n\t\t// Filter out unknown sensor types and scales, unless the strict validation is disabled\n\t\tconst measurementValidation = !ctx.getDeviceConfig?.(\n\t\t\tthis.nodeId as number,\n\t\t)?.compat?.disableStrictMeasurementValidation;\n\n\t\tconst ccVersion = getEffectiveCCVersion(ctx, this);\n\n\t\tif (measurementValidation) {\n\t\t\t// Filter out unsupported sensor types and scales if possible\n\t\t\tif (ccVersion >= 5) {\n\t\t\t\tconst supportedSensorTypes = this.getValue<number[]>(\n\t\t\t\t\tctx,\n\t\t\t\t\tMultilevelSensorCCValues.supportedSensorTypes,\n\t\t\t\t);\n\t\t\t\tif (supportedSensorTypes?.length) {\n\t\t\t\t\tvalidatePayload.withReason(\n\t\t\t\t\t\t`Unsupported sensor type ${\n\t\t\t\t\t\t\tgetSensorName(this.type)\n\t\t\t\t\t\t} or corrupted data`,\n\t\t\t\t\t)(supportedSensorTypes.includes(this.type));\n\t\t\t\t}\n\n\t\t\t\tconst supportedScales = this.getValue<number[]>(\n\t\t\t\t\tctx,\n\t\t\t\t\tMultilevelSensorCCValues.supportedScales(this.type),\n\t\t\t\t);\n\t\t\t\tif (supportedScales?.length) {\n\t\t\t\t\tvalidatePayload.withReason(\n\t\t\t\t\t\t`Unsupported scale ${scale.label} or corrupted data`,\n\t\t\t\t\t)(supportedScales.includes(scale.key));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// We support a higher CC version than the device, so any types and scales it uses should be known to us\n\t\t\t\t// Filter out unknown ones.\n\t\t\t\tvalidatePayload.withReason(\n\t\t\t\t\t`Unknown sensor type ${\n\t\t\t\t\t\tnum2hex(\n\t\t\t\t\t\t\tthis.type,\n\t\t\t\t\t\t)\n\t\t\t\t\t} or corrupted data`,\n\t\t\t\t)(!!sensor);\n\t\t\t\tvalidatePayload.withReason(\n\t\t\t\t\t`Unknown scale ${num2hex(this.scale)} or corrupted data`,\n\t\t\t\t)(scale.label !== getUnknownScale(this.scale).label);\n\t\t\t}\n\t\t}\n\n\t\tconst sensorName = getSensorName(this.type);\n\t\tconst sensorValue = MultilevelSensorCCValues.value(sensorName);\n\n\t\tthis.setMetadata(ctx, sensorValue, {\n\t\t\t...sensorValue.meta,\n\t\t\tunit: scale.unit,\n\t\t\tccSpecific: {\n\t\t\t\tsensorType: this.type,\n\t\t\t\tscale: scale.key,\n\t\t\t},\n\t\t});\n\t\tthis.setValue(ctx, sensorValue, this.value);\n\n\t\treturn true;\n\t}\n\n\tpublic type: number;\n\tpublic scale: number;\n\tpublic value: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([this.type]),\n\t\t\tencodeFloatWithScale(this.value, this.scale),\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"sensor type\": getSensorName(this.type),\n\t\t\t\tscale: (getSensorScale(this.type, this.scale)\n\t\t\t\t\t?? getUnknownScale(this.scale)).label,\n\t\t\t\tvalue: this.value,\n\t\t\t},\n\t\t};\n\t}\n}\n\nconst testResponseForMultilevelSensorGet: CCResponsePredicate<\n\tMultilevelSensorCCGet,\n\tMultilevelSensorCCReport\n> = (sent, received) => {\n\t// We expect a Multilevel Sensor Report that matches the requested sensor type (if a type was requested)\n\treturn sent.sensorType == undefined || received.type === sent.sensorType;\n};\n\n// These options are supported starting in V5\n// @publicAPI\nexport type MultilevelSensorCCGetOptions = AllOrNone<{\n\tsensorType: number;\n\tscale: number;\n}>;\n\n@CCCommand(MultilevelSensorCommand.Get)\n@expectedCCResponse(\n\tMultilevelSensorCCReport,\n\ttestResponseForMultilevelSensorGet,\n)\nexport class MultilevelSensorCCGet extends MultilevelSensorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<MultilevelSensorCCGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tif (\"sensorType\" in options) {\n\t\t\tthis.sensorType = options.sensorType;\n\t\t\tthis.scale = options.scale;\n\t\t}\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultilevelSensorCCGet {\n\t\tif (raw.payload.length >= 2) {\n\t\t\tconst sensorType = raw.payload[0];\n\t\t\tconst scale = (raw.payload[1] >> 3) & 0b11;\n\t\t\treturn new this({\n\t\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\t\tsensorType,\n\t\t\t\tscale,\n\t\t\t});\n\t\t} else {\n\t\t\treturn new this({\n\t\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic sensorType: number | undefined;\n\tpublic scale: number | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tif (\n\t\t\tthis.sensorType != undefined\n\t\t\t&& this.scale != undefined\n\t\t) {\n\t\t\tthis.payload = Bytes.from([\n\t\t\t\tthis.sensorType,\n\t\t\t\t(this.scale & 0b11) << 3,\n\t\t\t]);\n\t\t}\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tlet message: MessageRecord = {};\n\t\tif (\n\t\t\tthis.sensorType != undefined\n\t\t\t&& this.scale != undefined\n\t\t) {\n\t\t\tmessage = {\n\t\t\t\t\"sensor type\": getSensorName(\n\t\t\t\t\tthis.sensorType,\n\t\t\t\t),\n\t\t\t\tscale: (getSensorScale(\n\t\t\t\t\tthis.sensorType,\n\t\t\t\t\tthis.scale,\n\t\t\t\t) ?? getUnknownScale(this.scale)).label,\n\t\t\t};\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 MultilevelSensorCCSupportedSensorReportOptions {\n\tsupportedSensorTypes: readonly number[];\n}\n\n@CCCommand(MultilevelSensorCommand.SupportedSensorReport)\n@ccValueProperty(\n\t\"supportedSensorTypes\",\n\tMultilevelSensorCCValues.supportedSensorTypes,\n)\nexport class MultilevelSensorCCSupportedSensorReport\n\textends MultilevelSensorCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<MultilevelSensorCCSupportedSensorReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.supportedSensorTypes = options.supportedSensorTypes;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultilevelSensorCCSupportedSensorReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst supportedSensorTypes = parseBitMask(raw.payload);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportedSensorTypes,\n\t\t});\n\t}\n\n\t// TODO: Use this during interview to precreate values\n\n\tpublic supportedSensorTypes: readonly number[];\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = encodeBitMask(this.supportedSensorTypes);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"supported sensor types\": this.supportedSensorTypes\n\t\t\t\t\t.map((t) => `\\n\u00B7 ${getSensorName(t)}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(MultilevelSensorCommand.GetSupportedSensor)\n@expectedCCResponse(MultilevelSensorCCSupportedSensorReport)\nexport class MultilevelSensorCCGetSupportedSensor extends MultilevelSensorCC {}\n\n// @publicAPI\nexport interface MultilevelSensorCCSupportedScaleReportOptions {\n\tsensorType: number;\n\tsupportedScales: readonly number[];\n}\n\n@CCCommand(MultilevelSensorCommand.SupportedScaleReport)\n@ccValueProperty(\n\t\"supportedScales\",\n\tMultilevelSensorCCValues.supportedScales,\n\t(self) => [self.sensorType],\n)\nexport class MultilevelSensorCCSupportedScaleReport extends MultilevelSensorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<MultilevelSensorCCSupportedScaleReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.sensorType = options.sensorType;\n\t\tthis.supportedScales = options.supportedScales;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultilevelSensorCCSupportedScaleReport {\n\t\tvalidatePayload(raw.payload.length >= 2);\n\t\tconst sensorType = raw.payload[0];\n\t\tconst supportedScales = parseBitMask(\n\t\t\tBytes.from([raw.payload[1] & 0b1111]),\n\t\t\t0,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsensorType,\n\t\t\tsupportedScales,\n\t\t});\n\t}\n\n\tpublic readonly sensorType: number;\n\n\tpublic readonly supportedScales: readonly number[];\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([this.sensorType]),\n\t\t\tencodeBitMask(this.supportedScales, 4, 0),\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"sensor type\": getSensorName(this.sensorType),\n\t\t\t\t\"supported scales\": this.supportedScales\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(s) =>\n\t\t\t\t\t\t\t`\\n\u00B7 ${\n\t\t\t\t\t\t\t\t(getSensorScale(this.sensorType, s)\n\t\t\t\t\t\t\t\t\t?? getUnknownScale(s)).label\n\t\t\t\t\t\t\t}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface MultilevelSensorCCGetSupportedScaleOptions {\n\tsensorType: number;\n}\n\n@CCCommand(MultilevelSensorCommand.GetSupportedScale)\n@expectedCCResponse(MultilevelSensorCCSupportedScaleReport)\nexport class MultilevelSensorCCGetSupportedScale extends MultilevelSensorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<MultilevelSensorCCGetSupportedScaleOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.sensorType = options.sensorType;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): MultilevelSensorCCGetSupportedScale {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst sensorType = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsensorType,\n\t\t});\n\t}\n\n\tpublic sensorType: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.sensorType]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"sensor type\": getSensorName(this.sensorType),\n\t\t\t},\n\t\t};\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,kBAYO;AAcP,kBASO;AACP,IAAAA,eAAsB;AACtB,IAAAA,eAAwC;AAExC,iBAMO;AACP,0BAQO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAGO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CP,SAAS,wBACR,KACA,QACA,eACA,YACA,iBAAkC;AAElC,QAAM,cAAc,IAAI,mBAAkB;AAC1C,QAAM,aAAS,uBAAU,UAAU;AAEnC,MAAI,CAAC,QAAQ;AACZ,UAAMC,aAAY,aAAa,OAAO,UAAU;AAEhD,QAAI,OAAOA,eAAc;AAAU,aAAO;AAC1C,WAAOA;EACR;AAGA,MAAI;AAGJ,cAAY,aAAa,OAAO,UAAU;AA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