@zwave-js/cc 15.1.1 → 15.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.d.ts +7 -7
- package/build/cjs/cc/AlarmSensorCC.js +22 -23
- package/build/cjs/cc/AlarmSensorCC.js.map +3 -3
- package/build/cjs/cc/AssociationCC.d.ts +8 -9
- package/build/cjs/cc/AssociationCC.js +29 -29
- package/build/cjs/cc/AssociationCC.js.map +3 -3
- package/build/cjs/cc/AssociationGroupInfoCC.d.ts +7 -7
- package/build/cjs/cc/AssociationGroupInfoCC.js +31 -32
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +3 -3
- package/build/cjs/cc/BarrierOperatorCC.d.ts +8 -8
- package/build/cjs/cc/BarrierOperatorCC.js +35 -36
- package/build/cjs/cc/BarrierOperatorCC.js.map +3 -3
- package/build/cjs/cc/BasicCC.d.ts +4 -4
- package/build/cjs/cc/BasicCC.js +23 -24
- package/build/cjs/cc/BasicCC.js.map +3 -3
- package/build/cjs/cc/BasicWindowCoveringCC._validateArgs.d.ts +3 -0
- package/build/cjs/cc/BasicWindowCoveringCC._validateArgs.js +64 -0
- package/build/cjs/cc/BasicWindowCoveringCC._validateArgs.js.map +7 -0
- package/build/cjs/cc/BasicWindowCoveringCC.d.ts +90 -0
- package/build/cjs/cc/BasicWindowCoveringCC.js +273 -0
- package/build/cjs/cc/BasicWindowCoveringCC.js.map +7 -0
- package/build/cjs/cc/BatteryCC.d.ts +4 -7
- package/build/cjs/cc/BatteryCC.js +18 -20
- package/build/cjs/cc/BatteryCC.js.map +3 -3
- package/build/cjs/cc/BinarySensorCC.d.ts +5 -5
- package/build/cjs/cc/BinarySensorCC.js +20 -21
- package/build/cjs/cc/BinarySensorCC.js.map +3 -3
- package/build/cjs/cc/BinarySwitchCC._validateArgs.js +2 -2
- package/build/cjs/cc/BinarySwitchCC.d.ts +6 -6
- package/build/cjs/cc/BinarySwitchCC.js +26 -26
- package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
- package/build/cjs/cc/CRC16CC.d.ts +3 -3
- package/build/cjs/cc/CRC16CC.js +15 -15
- package/build/cjs/cc/CRC16CC.js.map +3 -3
- package/build/cjs/cc/CentralSceneCC.d.ts +8 -8
- package/build/cjs/cc/CentralSceneCC.js +23 -24
- package/build/cjs/cc/CentralSceneCC.js.map +3 -3
- package/build/cjs/cc/ClimateControlScheduleCC.d.ts +6 -6
- package/build/cjs/cc/ClimateControlScheduleCC.js +19 -20
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +3 -3
- package/build/cjs/cc/ClockCC.d.ts +3 -4
- package/build/cjs/cc/ClockCC.js +13 -14
- package/build/cjs/cc/ClockCC.js.map +3 -3
- package/build/cjs/cc/ColorSwitchCC.d.ts +3 -4
- package/build/cjs/cc/ColorSwitchCC.js +22 -24
- package/build/cjs/cc/ColorSwitchCC.js.map +3 -3
- package/build/cjs/cc/ConfigurationCC.d.ts +3 -3
- package/build/cjs/cc/ConfigurationCC.js +114 -115
- package/build/cjs/cc/ConfigurationCC.js.map +3 -3
- package/build/cjs/cc/DeviceResetLocallyCC.d.ts +2 -2
- package/build/cjs/cc/DeviceResetLocallyCC.js +5 -5
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/cjs/cc/DoorLockCC.d.ts +29 -29
- package/build/cjs/cc/DoorLockCC.js +39 -40
- package/build/cjs/cc/DoorLockCC.js.map +3 -3
- package/build/cjs/cc/DoorLockLoggingCC.d.ts +4 -4
- package/build/cjs/cc/DoorLockLoggingCC.js +13 -14
- package/build/cjs/cc/DoorLockLoggingCC.js.map +3 -3
- package/build/cjs/cc/EnergyProductionCC.d.ts +2 -3
- package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
- package/build/cjs/cc/EntryControlCC.d.ts +8 -8
- package/build/cjs/cc/EntryControlCC.js +41 -42
- package/build/cjs/cc/EntryControlCC.js.map +3 -3
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +9 -10
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +52 -53
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +3 -3
- package/build/cjs/cc/HailCC.js +2 -2
- package/build/cjs/cc/HailCC.js.map +1 -1
- package/build/cjs/cc/HumidityControlModeCC.d.ts +5 -5
- package/build/cjs/cc/HumidityControlModeCC.js +20 -21
- package/build/cjs/cc/HumidityControlModeCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +3 -3
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +9 -9
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlSetpointCC.d.ts +6 -6
- package/build/cjs/cc/HumidityControlSetpointCC.js +43 -44
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +3 -3
- package/build/cjs/cc/InclusionControllerCC.d.ts +2 -3
- package/build/cjs/cc/InclusionControllerCC.js.map +2 -2
- package/build/cjs/cc/IndicatorCC.d.ts +3 -3
- package/build/cjs/cc/IndicatorCC.js +50 -52
- package/build/cjs/cc/IndicatorCC.js.map +3 -3
- package/build/cjs/cc/IrrigationCC.d.ts +3 -3
- package/build/cjs/cc/IrrigationCC.js +74 -75
- package/build/cjs/cc/IrrigationCC.js.map +3 -3
- package/build/cjs/cc/LanguageCC.d.ts +5 -6
- package/build/cjs/cc/LanguageCC.js +14 -15
- package/build/cjs/cc/LanguageCC.js.map +3 -3
- package/build/cjs/cc/LockCC.d.ts +4 -4
- package/build/cjs/cc/LockCC.js +10 -10
- package/build/cjs/cc/LockCC.js.map +3 -3
- package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +3 -3
- package/build/cjs/cc/ManufacturerProprietaryCC.js +10 -10
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +3 -3
- package/build/cjs/cc/ManufacturerSpecificCC.d.ts +7 -8
- package/build/cjs/cc/ManufacturerSpecificCC.js +20 -21
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +3 -3
- package/build/cjs/cc/MeterCC.d.ts +4 -6
- package/build/cjs/cc/MeterCC.js +52 -54
- package/build/cjs/cc/MeterCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelAssociationCC.d.ts +7 -8
- package/build/cjs/cc/MultiChannelAssociationCC.js +34 -35
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelCC.d.ts +11 -11
- package/build/cjs/cc/MultiChannelCC.js +53 -53
- package/build/cjs/cc/MultiChannelCC.js.map +3 -3
- package/build/cjs/cc/MultiCommandCC.d.ts +3 -3
- package/build/cjs/cc/MultiCommandCC.js +13 -13
- package/build/cjs/cc/MultiCommandCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSensorCC.d.ts +4 -7
- package/build/cjs/cc/MultilevelSensorCC.js +26 -28
- package/build/cjs/cc/MultilevelSensorCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSwitchCC._validateArgs.js +3 -3
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +13 -13
- package/build/cjs/cc/MultilevelSwitchCC.js +36 -37
- package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
- package/build/cjs/cc/NoOperationCC.js +4 -4
- package/build/cjs/cc/NoOperationCC.js.map +1 -1
- package/build/cjs/cc/NodeNamingCC.d.ts +5 -5
- package/build/cjs/cc/NodeNamingCC.js +20 -20
- package/build/cjs/cc/NodeNamingCC.js.map +3 -3
- package/build/cjs/cc/NotificationCC.d.ts +4 -5
- package/build/cjs/cc/NotificationCC.js +66 -68
- package/build/cjs/cc/NotificationCC.js.map +3 -3
- package/build/cjs/cc/PowerlevelCC.d.ts +3 -3
- package/build/cjs/cc/PowerlevelCC.js +25 -26
- package/build/cjs/cc/PowerlevelCC.js.map +3 -3
- package/build/cjs/cc/ProtectionCC._validateArgs.js +2 -2
- package/build/cjs/cc/ProtectionCC.d.ts +11 -11
- package/build/cjs/cc/ProtectionCC.js +35 -36
- package/build/cjs/cc/ProtectionCC.js.map +3 -3
- package/build/cjs/cc/SceneActivationCC._validateArgs.js +2 -2
- package/build/cjs/cc/SceneActivationCC.d.ts +5 -6
- package/build/cjs/cc/SceneActivationCC.js +10 -10
- package/build/cjs/cc/SceneActivationCC.js.map +3 -3
- package/build/cjs/cc/SceneActuatorConfigurationCC._validateArgs.js +2 -2
- package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +5 -5
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +19 -20
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +3 -3
- package/build/cjs/cc/SceneControllerConfigurationCC._validateArgs.js +2 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +6 -6
- package/build/cjs/cc/SceneControllerConfigurationCC.js +25 -26
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +3 -3
- package/build/cjs/cc/ScheduleEntryLockCC.d.ts +2 -3
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
- package/build/cjs/cc/Security2CC.d.ts +3 -4
- package/build/cjs/cc/Security2CC.js +60 -62
- package/build/cjs/cc/Security2CC.js.map +3 -3
- package/build/cjs/cc/SecurityCC.d.ts +3 -4
- package/build/cjs/cc/SecurityCC.js +25 -26
- package/build/cjs/cc/SecurityCC.js.map +3 -3
- package/build/cjs/cc/SoundSwitchCC.d.ts +7 -7
- package/build/cjs/cc/SoundSwitchCC.js +28 -29
- package/build/cjs/cc/SoundSwitchCC.js.map +3 -3
- package/build/cjs/cc/SupervisionCC.d.ts +4 -4
- package/build/cjs/cc/SupervisionCC.js +28 -29
- package/build/cjs/cc/SupervisionCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanModeCC.d.ts +6 -6
- package/build/cjs/cc/ThermostatFanModeCC.js +21 -22
- package/build/cjs/cc/ThermostatFanModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanStateCC.d.ts +3 -3
- package/build/cjs/cc/ThermostatFanStateCC.js +9 -9
- package/build/cjs/cc/ThermostatFanStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatModeCC.d.ts +6 -6
- package/build/cjs/cc/ThermostatModeCC.js +30 -31
- package/build/cjs/cc/ThermostatModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +3 -4
- package/build/cjs/cc/ThermostatOperatingStateCC.js +9 -9
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetbackCC.d.ts +3 -3
- package/build/cjs/cc/ThermostatSetbackCC.js +14 -15
- package/build/cjs/cc/ThermostatSetbackCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +6 -6
- package/build/cjs/cc/ThermostatSetpointCC.js +48 -49
- package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
- package/build/cjs/cc/TimeCC.d.ts +3 -4
- package/build/cjs/cc/TimeCC.js +9 -10
- package/build/cjs/cc/TimeCC.js.map +3 -3
- package/build/cjs/cc/TimeParametersCC.d.ts +3 -4
- package/build/cjs/cc/TimeParametersCC.js +2 -2
- package/build/cjs/cc/TimeParametersCC.js.map +2 -2
- package/build/cjs/cc/TransportServiceCC.d.ts +3 -3
- package/build/cjs/cc/TransportServiceCC.js +44 -45
- package/build/cjs/cc/TransportServiceCC.js.map +3 -3
- package/build/cjs/cc/UserCodeCC.d.ts +19 -19
- package/build/cjs/cc/UserCodeCC.js +102 -103
- package/build/cjs/cc/UserCodeCC.js.map +3 -3
- package/build/cjs/cc/VersionCC.d.ts +17 -17
- package/build/cjs/cc/VersionCC.js +46 -47
- package/build/cjs/cc/VersionCC.js.map +3 -3
- package/build/cjs/cc/WakeUpCC.d.ts +6 -6
- package/build/cjs/cc/WakeUpCC.js +16 -17
- package/build/cjs/cc/WakeUpCC.js.map +3 -3
- package/build/cjs/cc/WindowCoveringCC.d.ts +3 -4
- package/build/cjs/cc/WindowCoveringCC.js +17 -18
- package/build/cjs/cc/WindowCoveringCC.js.map +3 -3
- package/build/cjs/cc/ZWavePlusCC.d.ts +8 -8
- package/build/cjs/cc/ZWavePlusCC.js +15 -16
- package/build/cjs/cc/ZWavePlusCC.js.map +3 -3
- package/build/cjs/cc/ZWaveProtocolCC.d.ts +2 -2
- package/build/cjs/cc/ZWaveProtocolCC.js +35 -35
- package/build/cjs/cc/ZWaveProtocolCC.js.map +2 -2
- package/build/cjs/cc/_CCValues.generated.d.ts +124 -0
- package/build/cjs/cc/_CCValues.generated.js +93 -26
- package/build/cjs/cc/_CCValues.generated.js.map +3 -3
- package/build/cjs/cc/index.d.ts +2 -0
- package/build/cjs/cc/index.js +9 -0
- package/build/cjs/cc/index.js.map +2 -2
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +3 -3
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +14 -14
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/cjs/lib/API.d.ts +5 -3
- package/build/cjs/lib/API.js.map +2 -2
- package/build/cjs/lib/CommandClass.d.ts +5 -6
- package/build/cjs/lib/CommandClass.js +45 -45
- package/build/cjs/lib/CommandClass.js.map +3 -3
- package/build/cjs/lib/CommandClassDecorators.d.ts +2 -2
- package/build/cjs/lib/CommandClassDecorators.js +3 -3
- package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
- package/build/cjs/lib/Security2/Extension.d.ts +2 -2
- package/build/cjs/lib/Security2/Extension.js +17 -17
- package/build/cjs/lib/Security2/Extension.js.map +3 -3
- package/build/cjs/lib/SetValueResult.d.ts +1 -1
- package/build/cjs/lib/SetValueResult.js.map +1 -1
- package/build/cjs/lib/Values.d.ts +3 -3
- package/build/cjs/lib/Values.js +6 -6
- package/build/cjs/lib/Values.js.map +2 -2
- package/build/cjs/lib/_Types.d.ts +6 -2
- package/build/cjs/lib/_Types.js +10 -3
- package/build/cjs/lib/_Types.js.map +3 -3
- package/build/cjs/lib/serializers.d.ts +1 -1
- package/build/cjs/lib/serializers.js +5 -5
- package/build/cjs/lib/serializers.js.map +2 -2
- package/build/cjs/lib/traits.d.ts +2 -2
- package/build/cjs/lib/utils.d.ts +2 -2
- package/build/cjs/lib/utils.js +60 -60
- package/build/cjs/lib/utils.js.map +3 -3
- package/build/esm/cc/AlarmSensorCC.d.ts +7 -7
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +2 -3
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts +8 -9
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +2 -2
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts +7 -7
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +2 -3
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts +8 -8
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +2 -3
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts +4 -4
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +2 -3
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BasicWindowCoveringCC._validateArgs.d.ts +3 -0
- package/build/esm/cc/BasicWindowCoveringCC._validateArgs.d.ts.map +1 -0
- package/build/esm/cc/BasicWindowCoveringCC._validateArgs.js +22 -0
- package/build/esm/cc/BasicWindowCoveringCC._validateArgs.js.map +1 -0
- package/build/esm/cc/BasicWindowCoveringCC.d.ts +90 -0
- package/build/esm/cc/BasicWindowCoveringCC.d.ts.map +1 -0
- package/build/esm/cc/BasicWindowCoveringCC.js +215 -0
- package/build/esm/cc/BasicWindowCoveringCC.js.map +1 -0
- package/build/esm/cc/BatteryCC.d.ts +4 -7
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +2 -4
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts +5 -5
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +2 -3
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC._validateArgs.js +1 -1
- package/build/esm/cc/BinarySwitchCC._validateArgs.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts +6 -6
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +2 -2
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.d.ts +3 -3
- package/build/esm/cc/CRC16CC.d.ts.map +1 -1
- package/build/esm/cc/CRC16CC.js +2 -2
- package/build/esm/cc/CRC16CC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts +8 -8
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +2 -3
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts +6 -6
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +2 -3
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.d.ts +3 -4
- package/build/esm/cc/ClockCC.d.ts.map +1 -1
- package/build/esm/cc/ClockCC.js +2 -3
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts +3 -4
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +2 -4
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts +3 -3
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +2 -3
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.d.ts +2 -2
- package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts +29 -29
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +2 -3
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts +4 -4
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +2 -3
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.d.ts +2 -3
- package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts +8 -8
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +2 -3
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +9 -10
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +2 -3
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HailCC.js +1 -1
- package/build/esm/cc/HailCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts +5 -5
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +2 -3
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +3 -3
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +2 -2
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts +6 -6
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +2 -3
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/InclusionControllerCC.d.ts +2 -3
- package/build/esm/cc/InclusionControllerCC.d.ts.map +1 -1
- package/build/esm/cc/InclusionControllerCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.d.ts +3 -3
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
- package/build/esm/cc/IndicatorCC.js +2 -4
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts +3 -3
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +2 -3
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts +5 -6
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +2 -3
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts +4 -4
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +2 -2
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts +3 -3
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +2 -2
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts +7 -8
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +2 -3
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts +4 -6
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +2 -4
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts +7 -8
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +2 -3
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts +11 -11
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +2 -2
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultiCommandCC.d.ts +3 -3
- package/build/esm/cc/MultiCommandCC.d.ts.map +1 -1
- package/build/esm/cc/MultiCommandCC.js +2 -2
- package/build/esm/cc/MultiCommandCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts +4 -7
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +2 -4
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC._validateArgs.js +1 -1
- package/build/esm/cc/MultilevelSwitchCC._validateArgs.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts +13 -13
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +2 -3
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NoOperationCC.js +1 -1
- package/build/esm/cc/NoOperationCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts +5 -5
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +2 -2
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts +4 -5
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +2 -4
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/PowerlevelCC.d.ts +3 -3
- package/build/esm/cc/PowerlevelCC.d.ts.map +1 -1
- package/build/esm/cc/PowerlevelCC.js +2 -3
- package/build/esm/cc/PowerlevelCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC._validateArgs.js +1 -1
- package/build/esm/cc/ProtectionCC._validateArgs.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts +11 -11
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +2 -3
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC._validateArgs.js +1 -1
- package/build/esm/cc/SceneActivationCC._validateArgs.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.d.ts +5 -6
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +2 -2
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC._validateArgs.js +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC._validateArgs.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +5 -5
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +2 -3
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC._validateArgs.js +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC._validateArgs.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts +6 -6
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +2 -3
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts +2 -3
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.d.ts +3 -4
- package/build/esm/cc/Security2CC.d.ts.map +1 -1
- package/build/esm/cc/Security2CC.js +2 -4
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.d.ts +3 -4
- package/build/esm/cc/SecurityCC.d.ts.map +1 -1
- package/build/esm/cc/SecurityCC.js +1 -2
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts +7 -7
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +2 -3
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.d.ts +4 -4
- package/build/esm/cc/SupervisionCC.d.ts.map +1 -1
- package/build/esm/cc/SupervisionCC.js +2 -3
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts +6 -6
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +2 -3
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts +3 -3
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +2 -2
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts +6 -6
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +2 -3
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts +3 -4
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +2 -2
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.d.ts +3 -3
- package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.js +2 -3
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts +6 -6
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +2 -3
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.d.ts +3 -4
- package/build/esm/cc/TimeCC.d.ts.map +1 -1
- package/build/esm/cc/TimeCC.js +1 -2
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts +3 -4
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +1 -1
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.d.ts +3 -3
- package/build/esm/cc/TransportServiceCC.d.ts.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +2 -3
- package/build/esm/cc/TransportServiceCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts +19 -19
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +2 -3
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts +17 -17
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +2 -3
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts +6 -6
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +2 -3
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts +3 -4
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +1 -2
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts +8 -8
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +2 -3
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.d.ts +2 -2
- package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/_CCValues.generated.d.ts +124 -0
- package/build/esm/cc/_CCValues.generated.d.ts.map +1 -1
- package/build/esm/cc/_CCValues.generated.js +75 -4
- package/build/esm/cc/_CCValues.generated.js.map +1 -1
- package/build/esm/cc/index.d.ts +2 -0
- package/build/esm/cc/index.d.ts.map +1 -1
- package/build/esm/cc/index.js +1 -0
- package/build/esm/cc/index.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +3 -3
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/esm/lib/API.d.ts +5 -3
- package/build/esm/lib/API.d.ts.map +1 -1
- package/build/esm/lib/API.js.map +1 -1
- package/build/esm/lib/CommandClass.d.ts +5 -6
- package/build/esm/lib/CommandClass.d.ts.map +1 -1
- package/build/esm/lib/CommandClass.js +2 -2
- package/build/esm/lib/CommandClass.js.map +1 -1
- package/build/esm/lib/CommandClassDecorators.d.ts +2 -2
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
- package/build/esm/lib/CommandClassDecorators.js +1 -1
- package/build/esm/lib/CommandClassDecorators.js.map +1 -1
- package/build/esm/lib/Security2/Extension.d.ts +2 -2
- package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
- package/build/esm/lib/Security2/Extension.js +2 -2
- package/build/esm/lib/Security2/Extension.js.map +1 -1
- package/build/esm/lib/SetValueResult.d.ts +1 -1
- package/build/esm/lib/SetValueResult.d.ts.map +1 -1
- package/build/esm/lib/Values.d.ts +3 -3
- package/build/esm/lib/Values.d.ts.map +1 -1
- package/build/esm/lib/Values.js +1 -1
- package/build/esm/lib/Values.js.map +1 -1
- package/build/esm/lib/_Types.d.ts +6 -2
- package/build/esm/lib/_Types.d.ts.map +1 -1
- package/build/esm/lib/_Types.js +6 -1
- package/build/esm/lib/_Types.js.map +1 -1
- package/build/esm/lib/serializers.d.ts +1 -1
- package/build/esm/lib/serializers.d.ts.map +1 -1
- package/build/esm/lib/serializers.js +1 -1
- package/build/esm/lib/serializers.js.map +1 -1
- package/build/esm/lib/traits.d.ts +2 -2
- package/build/esm/lib/traits.d.ts.map +1 -1
- package/build/esm/lib/utils.d.ts +2 -2
- package/build/esm/lib/utils.d.ts.map +1 -1
- package/build/esm/lib/utils.js +2 -2
- package/build/esm/lib/utils.js.map +1 -1
- package/package.json +6 -6
|
@@ -49,9 +49,8 @@ __export(ConfigurationCC_exports, {
|
|
|
49
49
|
});
|
|
50
50
|
module.exports = __toCommonJS(ConfigurationCC_exports);
|
|
51
51
|
var __validateArgs = __toESM(require("./ConfigurationCC._validateArgs.js"), 1);
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var import_safe3 = require("@zwave-js/shared/safe");
|
|
52
|
+
var import_core = require("@zwave-js/core");
|
|
53
|
+
var import_shared = require("@zwave-js/shared");
|
|
55
54
|
var import_arrays = require("alcalzone-shared/arrays");
|
|
56
55
|
var import_API = require("../lib/API.js");
|
|
57
56
|
var import_CommandClass = require("../lib/CommandClass.js");
|
|
@@ -107,7 +106,7 @@ function configValueToString(value) {
|
|
|
107
106
|
return [...value].join(", ");
|
|
108
107
|
}
|
|
109
108
|
__name(configValueToString, "configValueToString");
|
|
110
|
-
class ConfigurationCCError extends
|
|
109
|
+
class ConfigurationCCError extends import_core.ZWaveError {
|
|
111
110
|
static {
|
|
112
111
|
__name(this, "ConfigurationCCError");
|
|
113
112
|
}
|
|
@@ -131,7 +130,7 @@ function normalizeConfigurationCCAPISetOptions(ctx, endpoint, options) {
|
|
|
131
130
|
const ccc = createConfigurationCCInstance(endpoint);
|
|
132
131
|
const paramInfo = ccc.getParamInformation(ctx, options.parameter, options.bitMask);
|
|
133
132
|
if (!paramInfo.isFromConfig) {
|
|
134
|
-
throw new
|
|
133
|
+
throw new import_core.ZWaveError("Setting a partial configuration parameter requires it to be defined in a device config file!", import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
135
134
|
}
|
|
136
135
|
return {
|
|
137
136
|
parameter: options.parameter,
|
|
@@ -141,7 +140,7 @@ function normalizeConfigurationCCAPISetOptions(ctx, endpoint, options) {
|
|
|
141
140
|
valueFormat: paramInfo.format
|
|
142
141
|
};
|
|
143
142
|
} else if ("valueSize" in options) {
|
|
144
|
-
return (0,
|
|
143
|
+
return (0, import_shared.pick)(options, [
|
|
145
144
|
"parameter",
|
|
146
145
|
"value",
|
|
147
146
|
"valueSize",
|
|
@@ -151,7 +150,7 @@ function normalizeConfigurationCCAPISetOptions(ctx, endpoint, options) {
|
|
|
151
150
|
const ccc = createConfigurationCCInstance(endpoint);
|
|
152
151
|
const paramInfo = ccc.getParamInformation(ctx, options.parameter, options.bitMask);
|
|
153
152
|
if (!paramInfo.isFromConfig) {
|
|
154
|
-
throw new
|
|
153
|
+
throw new import_core.ZWaveError("Setting a configuration parameter without specifying a value size and format requires it to be defined in a device config file!", import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
155
154
|
}
|
|
156
155
|
return {
|
|
157
156
|
parameter: options.parameter,
|
|
@@ -189,12 +188,12 @@ function bulkMergePartialParamValues(ctx, endpoint, options) {
|
|
|
189
188
|
}
|
|
190
189
|
__name(bulkMergePartialParamValues, "bulkMergePartialParamValues");
|
|
191
190
|
function isSignedPartial(bitMask, format) {
|
|
192
|
-
return (0,
|
|
191
|
+
return (0, import_core.getBitMaskWidth)(bitMask) > 1 && (format ?? import_core.ConfigValueFormat.SignedInteger) === import_core.ConfigValueFormat.SignedInteger;
|
|
193
192
|
}
|
|
194
193
|
__name(isSignedPartial, "isSignedPartial");
|
|
195
194
|
function reInterpretSignedValue(value, valueSize, targetFormat) {
|
|
196
|
-
const raw = new
|
|
197
|
-
serializeValue(raw, 0, valueSize,
|
|
195
|
+
const raw = new import_shared.Bytes(valueSize);
|
|
196
|
+
serializeValue(raw, 0, valueSize, import_core.ConfigValueFormat.SignedInteger, value);
|
|
198
197
|
return parseValue(raw, valueSize, targetFormat);
|
|
199
198
|
}
|
|
200
199
|
__name(reInterpretSignedValue, "reInterpretSignedValue");
|
|
@@ -208,7 +207,7 @@ function getParamInformationFromConfigFile(ctx, nodeId, endpointIndex) {
|
|
|
208
207
|
}
|
|
209
208
|
__name(getParamInformationFromConfigFile, "getParamInformationFromConfigFile");
|
|
210
209
|
let ConfigurationCCAPI = (() => {
|
|
211
|
-
let _classDecorators = [(0, import_CommandClassDecorators.API)(
|
|
210
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses.Configuration)];
|
|
212
211
|
let _classDescriptor;
|
|
213
212
|
let _classExtraInitializers = [];
|
|
214
213
|
let _classThis;
|
|
@@ -290,8 +289,8 @@ let ConfigurationCCAPI = (() => {
|
|
|
290
289
|
ccInstance = createConfigurationCCInstance(this.endpoint);
|
|
291
290
|
} else if (this.isMulticast()) {
|
|
292
291
|
const nodes = this.endpoint.node.physicalNodes;
|
|
293
|
-
if (!nodes.every((node) => node.getEndpoint(this.endpoint.index)?.supportsCC(
|
|
294
|
-
throw new
|
|
292
|
+
if (!nodes.every((node) => node.getEndpoint(this.endpoint.index)?.supportsCC(import_core.CommandClasses.Configuration))) {
|
|
293
|
+
throw new import_core.ZWaveError(`The multicast setValue API for Configuration CC requires all virtual target endpoints to support Configuration CC!`, import_core.ZWaveErrorCodes.CC_Invalid);
|
|
295
294
|
}
|
|
296
295
|
const paramInfos = this.endpoint.node.physicalNodes.map((node) => createConfigurationCCInstance(node.getEndpoint(this.endpoint.index)).getParamInformation(this.host, property, propertyKey));
|
|
297
296
|
if (!paramInfos.length || !paramInfos.every((info, index) => {
|
|
@@ -299,27 +298,27 @@ let ConfigurationCCAPI = (() => {
|
|
|
299
298
|
return true;
|
|
300
299
|
return info.valueSize === paramInfos[0].valueSize && info.format === paramInfos[0].format;
|
|
301
300
|
})) {
|
|
302
|
-
throw new
|
|
301
|
+
throw new import_core.ZWaveError(`The multicast setValue API for Configuration CC requires all virtual target nodes to have the same parameter definition!`, import_core.ZWaveErrorCodes.CC_Invalid);
|
|
303
302
|
}
|
|
304
303
|
ccInstance = createConfigurationCCInstance(this.endpoint);
|
|
305
304
|
} else {
|
|
306
|
-
throw new
|
|
305
|
+
throw new import_core.ZWaveError(`The setValue API for Configuration CC is not supported via broadcast!`, import_core.ZWaveErrorCodes.CC_NotSupported);
|
|
307
306
|
}
|
|
308
|
-
let { valueSize, format: valueFormat =
|
|
307
|
+
let { valueSize, format: valueFormat = import_core.ConfigValueFormat.SignedInteger } = ccInstance.getParamInformation(applHost, property);
|
|
309
308
|
let targetValue;
|
|
310
309
|
if (propertyKey) {
|
|
311
310
|
if (!valueSize) {
|
|
312
311
|
valueSize = ccInstance.getParamInformation(applHost, property, propertyKey).valueSize;
|
|
313
312
|
}
|
|
314
313
|
targetValue = ccInstance.composePartialParamValue(applHost, property, propertyKey, value);
|
|
315
|
-
valueFormat =
|
|
314
|
+
valueFormat = import_core.ConfigValueFormat.UnsignedInteger;
|
|
316
315
|
} else {
|
|
317
316
|
targetValue = value;
|
|
318
317
|
}
|
|
319
318
|
if (!valueSize) {
|
|
320
|
-
valueSize = (0,
|
|
319
|
+
valueSize = (0, import_core.getMinIntegerSize)(targetValue, valueFormat === import_core.ConfigValueFormat.SignedInteger);
|
|
321
320
|
if (!valueSize) {
|
|
322
|
-
throw new
|
|
321
|
+
throw new import_core.ZWaveError(`The value ${targetValue} is not valid for configuration parameters!`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
323
322
|
}
|
|
324
323
|
}
|
|
325
324
|
if (!isSafeValue(targetValue, valueSize, valueFormat)) {
|
|
@@ -331,7 +330,7 @@ let ConfigurationCCAPI = (() => {
|
|
|
331
330
|
valueSize,
|
|
332
331
|
valueFormat
|
|
333
332
|
});
|
|
334
|
-
if (!(0,
|
|
333
|
+
if (!(0, import_core.supervisedCommandSucceeded)(result) && this.isSinglecast()) {
|
|
335
334
|
this.schedulePoll(
|
|
336
335
|
{ property, propertyKey },
|
|
337
336
|
targetValue,
|
|
@@ -385,7 +384,7 @@ let ConfigurationCCAPI = (() => {
|
|
|
385
384
|
if (!valueBitMask)
|
|
386
385
|
return response.value;
|
|
387
386
|
const paramInfo = cc.getParamInformation(this.host, response.parameter, valueBitMask);
|
|
388
|
-
return (0,
|
|
387
|
+
return (0, import_core.parsePartial)(response.value, valueBitMask, isSignedPartial(valueBitMask, paramInfo.format));
|
|
389
388
|
}
|
|
390
389
|
this.host.logNode(this.endpoint.nodeId, {
|
|
391
390
|
endpoint: this.endpoint.index,
|
|
@@ -393,7 +392,7 @@ let ConfigurationCCAPI = (() => {
|
|
|
393
392
|
direction: "inbound",
|
|
394
393
|
level: "error"
|
|
395
394
|
});
|
|
396
|
-
throw new ConfigurationCCError(`The first existing parameter on this node is ${response.parameter}`,
|
|
395
|
+
throw new ConfigurationCCError(`The first existing parameter on this node is ${response.parameter}`, import_core.ZWaveErrorCodes.ConfigurationCC_FirstParameterNumber, response.parameter);
|
|
397
396
|
}
|
|
398
397
|
/**
|
|
399
398
|
* Requests the current value of the config parameters from the device.
|
|
@@ -403,7 +402,7 @@ let ConfigurationCCAPI = (() => {
|
|
|
403
402
|
this.assertPhysicalEndpoint(this.endpoint);
|
|
404
403
|
let values;
|
|
405
404
|
const distinctParameters = (0, import_arrays.distinct)(options.map((o) => o.parameter));
|
|
406
|
-
if (this.supportsCommand(import_Types.ConfigurationCommand.BulkGet) && (0,
|
|
405
|
+
if (this.supportsCommand(import_Types.ConfigurationCommand.BulkGet) && (0, import_core.isConsecutiveArray)(distinctParameters)) {
|
|
407
406
|
const cc2 = new ConfigurationCCBulkGet({
|
|
408
407
|
nodeId: this.endpoint.nodeId,
|
|
409
408
|
endpointIndex: this.endpoint.index,
|
|
@@ -433,7 +432,7 @@ let ConfigurationCCAPI = (() => {
|
|
|
433
432
|
let value = values?.get(o.parameter);
|
|
434
433
|
if (typeof value === "number" && o.bitMask) {
|
|
435
434
|
const paramInfo = cc.getParamInformation(this.host, o.parameter, o.bitMask);
|
|
436
|
-
value = (0,
|
|
435
|
+
value = (0, import_core.parsePartial)(value, o.bitMask, isSignedPartial(o.bitMask, paramInfo.format));
|
|
437
436
|
}
|
|
438
437
|
return { ...o, value };
|
|
439
438
|
});
|
|
@@ -469,7 +468,7 @@ let ConfigurationCCAPI = (() => {
|
|
|
469
468
|
async setBulk(values) {
|
|
470
469
|
const normalized = values.map((v) => normalizeConfigurationCCAPISetOptions(this.host, this.endpoint, v));
|
|
471
470
|
const allParams = bulkMergePartialParamValues(this.host, this.endpoint, normalized);
|
|
472
|
-
const canUseBulkSet = this.supportsCommand(import_Types.ConfigurationCommand.BulkSet) && (0,
|
|
471
|
+
const canUseBulkSet = this.supportsCommand(import_Types.ConfigurationCommand.BulkSet) && (0, import_core.isConsecutiveArray)(allParams.map((v) => v.parameter)) && new Set(allParams.map((v) => v.valueFormat)).size === 1 && new Set(allParams.map((v) => v.valueSize)).size === 1;
|
|
473
472
|
if (canUseBulkSet) {
|
|
474
473
|
const cc = new ConfigurationCCBulkSet({
|
|
475
474
|
nodeId: this.endpoint.nodeId,
|
|
@@ -486,7 +485,7 @@ let ConfigurationCCAPI = (() => {
|
|
|
486
485
|
const receivedValues = [...result.values.values()];
|
|
487
486
|
const success = sentValues.length === receivedValues.length && sentValues.every((v, i) => v === receivedValues[i]);
|
|
488
487
|
return {
|
|
489
|
-
status: success ?
|
|
488
|
+
status: success ? import_core.SupervisionStatus.Success : import_core.SupervisionStatus.Fail
|
|
490
489
|
};
|
|
491
490
|
} else {
|
|
492
491
|
return void 0;
|
|
@@ -505,7 +504,7 @@ let ConfigurationCCAPI = (() => {
|
|
|
505
504
|
});
|
|
506
505
|
supervisionResults.push(await this.host.sendCommand(cc, this.commandOptions));
|
|
507
506
|
}
|
|
508
|
-
return (0,
|
|
507
|
+
return (0, import_core.mergeSupervisionResults)(supervisionResults);
|
|
509
508
|
}
|
|
510
509
|
}
|
|
511
510
|
/**
|
|
@@ -518,7 +517,7 @@ let ConfigurationCCAPI = (() => {
|
|
|
518
517
|
return this.resetBulk([parameter]);
|
|
519
518
|
}
|
|
520
519
|
if (this.version <= 3) {
|
|
521
|
-
throw new
|
|
520
|
+
throw new import_core.ZWaveError(`Resetting configuration parameters to default MUST not be done on nodes implementing ConfigurationCC V3 or below!`, import_core.ZWaveErrorCodes.ConfigurationCC_NoResetToDefaultOnLegacyDevices);
|
|
522
521
|
}
|
|
523
522
|
this.assertSupportsCommand(import_Types.ConfigurationCommand, import_Types.ConfigurationCommand.Set);
|
|
524
523
|
const cc = new ConfigurationCCSet({
|
|
@@ -535,7 +534,7 @@ let ConfigurationCCAPI = (() => {
|
|
|
535
534
|
* WARNING: This will throw on legacy devices (ConfigurationCC v3 and below)
|
|
536
535
|
*/
|
|
537
536
|
async resetBulk(parameters) {
|
|
538
|
-
if ((0,
|
|
537
|
+
if ((0, import_core.isConsecutiveArray)(parameters) && this.supportsCommand(import_Types.ConfigurationCommand.BulkSet)) {
|
|
539
538
|
const cc = new ConfigurationCCBulkSet({
|
|
540
539
|
nodeId: this.endpoint.nodeId,
|
|
541
540
|
endpointIndex: this.endpoint.index,
|
|
@@ -575,7 +574,7 @@ let ConfigurationCCAPI = (() => {
|
|
|
575
574
|
});
|
|
576
575
|
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
577
576
|
if (response) {
|
|
578
|
-
return (0,
|
|
577
|
+
return (0, import_shared.pick)(response, [
|
|
579
578
|
"valueSize",
|
|
580
579
|
"valueFormat",
|
|
581
580
|
"minValue",
|
|
@@ -624,7 +623,7 @@ let ConfigurationCCAPI = (() => {
|
|
|
624
623
|
*/
|
|
625
624
|
async scanParametersLegacy() {
|
|
626
625
|
if (this.version >= 3) {
|
|
627
|
-
throw new
|
|
626
|
+
throw new import_core.ZWaveError("Use ConfigurationCC.interview instead of scanning parameters for versions 3 and above.", import_core.ZWaveErrorCodes.ConfigurationCC_NoLegacyScanOnNewDevices);
|
|
628
627
|
}
|
|
629
628
|
this.assertPhysicalEndpoint(this.endpoint);
|
|
630
629
|
this.host.logNode(this.endpoint.nodeId, {
|
|
@@ -658,7 +657,7 @@ let ConfigurationCCAPI = (() => {
|
|
|
658
657
|
});
|
|
659
658
|
}
|
|
660
659
|
} catch (e) {
|
|
661
|
-
if (e instanceof ConfigurationCCError && e.code ===
|
|
660
|
+
if (e instanceof ConfigurationCCError && e.code === import_core.ZWaveErrorCodes.ConfigurationCC_FirstParameterNumber) {
|
|
662
661
|
if (e.argument - 1 > param)
|
|
663
662
|
param = e.argument - 1;
|
|
664
663
|
continue;
|
|
@@ -675,7 +674,7 @@ let ConfigurationCCAPI = (() => {
|
|
|
675
674
|
return ConfigurationCCAPI2 = _classThis;
|
|
676
675
|
})();
|
|
677
676
|
let ConfigurationCC = (() => {
|
|
678
|
-
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(
|
|
677
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_core.CommandClasses.Configuration), (0, import_CommandClassDecorators.implementedVersion)(4), (0, import_CommandClassDecorators.ccValues)(import_CCValues_generated.ConfigurationCCValues)];
|
|
679
678
|
let _classDescriptor;
|
|
680
679
|
let _classExtraInitializers = [];
|
|
681
680
|
let _classThis;
|
|
@@ -697,8 +696,8 @@ let ConfigurationCC = (() => {
|
|
|
697
696
|
async interview(ctx) {
|
|
698
697
|
const node = this.getNode(ctx);
|
|
699
698
|
const endpoint = this.getEndpoint(ctx);
|
|
700
|
-
const api = import_API.CCAPI.create(
|
|
701
|
-
priority:
|
|
699
|
+
const api = import_API.CCAPI.create(import_core.CommandClasses.Configuration, ctx, endpoint).withOptions({
|
|
700
|
+
priority: import_core.MessagePriority.NodeQuery
|
|
702
701
|
});
|
|
703
702
|
ctx.logNode(node.id, {
|
|
704
703
|
endpoint: this.endpointIndex,
|
|
@@ -786,7 +785,7 @@ let ConfigurationCC = (() => {
|
|
|
786
785
|
parameter name: ${name}`;
|
|
787
786
|
}
|
|
788
787
|
logMessage += `
|
|
789
|
-
value format: ${(0,
|
|
788
|
+
value format: ${(0, import_shared.getEnumMemberName)(import_core.ConfigValueFormat, properties.valueFormat)}
|
|
790
789
|
value size: ${properties.valueSize} bytes
|
|
791
790
|
min value: ${properties.minValue?.toString() ?? "undefined"}
|
|
792
791
|
max value: ${properties.maxValue?.toString() ?? "undefined"}
|
|
@@ -814,8 +813,8 @@ alters capabilities: ${!!properties.altersCapabilities}`;
|
|
|
814
813
|
async refreshValues(ctx) {
|
|
815
814
|
const node = this.getNode(ctx);
|
|
816
815
|
const endpoint = this.getEndpoint(ctx);
|
|
817
|
-
const api = import_API.CCAPI.create(
|
|
818
|
-
priority:
|
|
816
|
+
const api = import_API.CCAPI.create(import_core.CommandClasses.Configuration, ctx, endpoint).withOptions({
|
|
817
|
+
priority: import_core.MessagePriority.NodeQuery
|
|
819
818
|
});
|
|
820
819
|
if (api.version < 3) {
|
|
821
820
|
const paramInfo = getParamInformationFromConfigFile(ctx, node.id, this.endpointIndex);
|
|
@@ -914,7 +913,7 @@ alters capabilities: ${!!properties.altersCapabilities}`;
|
|
|
914
913
|
*/
|
|
915
914
|
getParamInformation(ctx, parameter, valueBitMask) {
|
|
916
915
|
return this.getMetadata(ctx, import_CCValues_generated.ConfigurationCCValues.paramInformation(parameter, valueBitMask)) ?? {
|
|
917
|
-
...
|
|
916
|
+
...import_core.ValueMetadata.Any
|
|
918
917
|
};
|
|
919
918
|
}
|
|
920
919
|
/**
|
|
@@ -951,10 +950,10 @@ alters capabilities: ${!!properties.altersCapabilities}`;
|
|
|
951
950
|
const otherValues = valueDB.findValues((id) => id.commandClass === this.ccId && (id.endpoint ?? 0) === this.endpointIndex && id.property === parameter && id.propertyKey != void 0 && !partials.some((p) => id.propertyKey === p.bitMask));
|
|
952
951
|
let ret = 0;
|
|
953
952
|
for (const { propertyKey: bitMask, value: partialValue } of otherValues) {
|
|
954
|
-
ret = (0,
|
|
953
|
+
ret = (0, import_core.encodePartial)(ret, partialValue, bitMask);
|
|
955
954
|
}
|
|
956
955
|
for (const { bitMask, partialValue } of partials) {
|
|
957
|
-
ret = (0,
|
|
956
|
+
ret = (0, import_core.encodePartial)(ret, partialValue, bitMask);
|
|
958
957
|
}
|
|
959
958
|
return ret;
|
|
960
959
|
}
|
|
@@ -973,7 +972,7 @@ alters capabilities: ${!!properties.altersCapabilities}`;
|
|
|
973
972
|
}
|
|
974
973
|
this.setValue(ctx, import_CCValues_generated.ConfigurationCCValues.isParamInformationFromConfig, false);
|
|
975
974
|
for (const [param, info] of config.entries()) {
|
|
976
|
-
const paramInfo = (0,
|
|
975
|
+
const paramInfo = (0, import_core.stripUndefined)({
|
|
977
976
|
// TODO: Make this smarter! (0...1 ==> boolean)
|
|
978
977
|
type: "number",
|
|
979
978
|
valueSize: info.valueSize,
|
|
@@ -981,7 +980,7 @@ alters capabilities: ${!!properties.altersCapabilities}`;
|
|
|
981
980
|
max: info.maxValue,
|
|
982
981
|
default: info.defaultValue,
|
|
983
982
|
unit: info.unit,
|
|
984
|
-
format: info.unsigned ?
|
|
983
|
+
format: info.unsigned ? import_core.ConfigValueFormat.UnsignedInteger : import_core.ConfigValueFormat.SignedInteger,
|
|
985
984
|
readable: !info.writeOnly,
|
|
986
985
|
writeable: !info.readOnly,
|
|
987
986
|
allowManualEntry: info.allowManualEntry,
|
|
@@ -1047,11 +1046,11 @@ let ConfigurationCCReport = (() => {
|
|
|
1047
1046
|
this.valueFormat = options.valueFormat;
|
|
1048
1047
|
}
|
|
1049
1048
|
static from(raw, ctx) {
|
|
1050
|
-
(0,
|
|
1049
|
+
(0, import_core.validatePayload)(raw.payload.length > 2);
|
|
1051
1050
|
const parameter = raw.payload[0];
|
|
1052
1051
|
const valueSize = raw.payload[1] & 7;
|
|
1053
|
-
(0,
|
|
1054
|
-
const value = parseValue(raw.payload.subarray(2), valueSize,
|
|
1052
|
+
(0, import_core.validatePayload)(valueSize >= 1, valueSize <= 4, raw.payload.length >= 2 + valueSize);
|
|
1053
|
+
const value = parseValue(raw.payload.subarray(2), valueSize, import_core.ConfigValueFormat.SignedInteger);
|
|
1055
1054
|
return new this({
|
|
1056
1055
|
nodeId: ctx.sourceNodeId,
|
|
1057
1056
|
parameter,
|
|
@@ -1079,17 +1078,17 @@ let ConfigurationCCReport = (() => {
|
|
|
1079
1078
|
valueSize: this.valueSize
|
|
1080
1079
|
});
|
|
1081
1080
|
if (ccVersion < 3 && !this.paramExistsInConfigFile(ctx, this.parameter) && oldParamInformation.min == void 0 && oldParamInformation.max == void 0) {
|
|
1082
|
-
const isSigned = oldParamInformation.format == void 0 || oldParamInformation.format ===
|
|
1083
|
-
this.extendParamInformation(ctx, this.parameter, void 0, (0,
|
|
1081
|
+
const isSigned = oldParamInformation.format == void 0 || oldParamInformation.format === import_core.ConfigValueFormat.SignedInteger;
|
|
1082
|
+
this.extendParamInformation(ctx, this.parameter, void 0, (0, import_core.getIntegerLimits)(this.valueSize, isSigned));
|
|
1084
1083
|
}
|
|
1085
1084
|
}
|
|
1086
|
-
if (cachedValueFormat != void 0 && cachedValueFormat !==
|
|
1085
|
+
if (cachedValueFormat != void 0 && cachedValueFormat !== import_core.ConfigValueFormat.SignedInteger) {
|
|
1087
1086
|
this.value = reInterpretSignedValue(this.value, this.valueSize, cachedValueFormat);
|
|
1088
1087
|
}
|
|
1089
1088
|
if (partialParams.length > 0) {
|
|
1090
1089
|
for (const param of partialParams) {
|
|
1091
1090
|
if (typeof param.propertyKey === "number") {
|
|
1092
|
-
this.setValue(ctx, import_CCValues_generated.ConfigurationCCValues.paramInformation(this.parameter, param.propertyKey), (0,
|
|
1091
|
+
this.setValue(ctx, import_CCValues_generated.ConfigurationCCValues.paramInformation(this.parameter, param.propertyKey), (0, import_core.parsePartial)(this.value, param.propertyKey, isSignedPartial(param.propertyKey, param.metadata.format)));
|
|
1093
1092
|
}
|
|
1094
1093
|
}
|
|
1095
1094
|
} else {
|
|
@@ -1098,11 +1097,11 @@ let ConfigurationCCReport = (() => {
|
|
|
1098
1097
|
return true;
|
|
1099
1098
|
}
|
|
1100
1099
|
serialize(ctx) {
|
|
1101
|
-
this.payload =
|
|
1102
|
-
|
|
1103
|
-
new
|
|
1100
|
+
this.payload = import_shared.Bytes.concat([
|
|
1101
|
+
import_shared.Bytes.from([this.parameter, this.valueSize & 7]),
|
|
1102
|
+
new import_shared.Bytes(this.valueSize)
|
|
1104
1103
|
]);
|
|
1105
|
-
serializeValue(this.payload, 2, this.valueSize, this.valueFormat ??
|
|
1104
|
+
serializeValue(this.payload, 2, this.valueSize, this.valueFormat ?? import_core.ConfigValueFormat.SignedInteger, this.value);
|
|
1106
1105
|
return super.serialize(ctx);
|
|
1107
1106
|
}
|
|
1108
1107
|
toLogEntry(ctx) {
|
|
@@ -1148,7 +1147,7 @@ let ConfigurationCCGet = (() => {
|
|
|
1148
1147
|
this.allowUnexpectedResponse = options.allowUnexpectedResponse ?? false;
|
|
1149
1148
|
}
|
|
1150
1149
|
static from(raw, ctx) {
|
|
1151
|
-
(0,
|
|
1150
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1);
|
|
1152
1151
|
const parameter = raw.payload[0];
|
|
1153
1152
|
return new this({
|
|
1154
1153
|
nodeId: ctx.sourceNodeId,
|
|
@@ -1158,7 +1157,7 @@ let ConfigurationCCGet = (() => {
|
|
|
1158
1157
|
parameter;
|
|
1159
1158
|
allowUnexpectedResponse;
|
|
1160
1159
|
serialize(ctx) {
|
|
1161
|
-
this.payload =
|
|
1160
|
+
this.payload = import_shared.Bytes.from([this.parameter]);
|
|
1162
1161
|
return super.serialize(ctx);
|
|
1163
1162
|
}
|
|
1164
1163
|
toLogEntry(ctx) {
|
|
@@ -1196,17 +1195,17 @@ let ConfigurationCCSet = (() => {
|
|
|
1196
1195
|
this.resetToDefault = !!options.resetToDefault;
|
|
1197
1196
|
if (!options.resetToDefault) {
|
|
1198
1197
|
this.valueSize = options.valueSize;
|
|
1199
|
-
this.valueFormat = options.valueFormat ??
|
|
1198
|
+
this.valueFormat = options.valueFormat ?? import_core.ConfigValueFormat.SignedInteger;
|
|
1200
1199
|
this.value = options.value;
|
|
1201
1200
|
}
|
|
1202
1201
|
}
|
|
1203
1202
|
static from(raw, ctx) {
|
|
1204
|
-
(0,
|
|
1203
|
+
(0, import_core.validatePayload)(raw.payload.length >= 2);
|
|
1205
1204
|
const parameter = raw.payload[0];
|
|
1206
1205
|
const resetToDefault = !!(raw.payload[1] & 128);
|
|
1207
1206
|
const valueSize = raw.payload[1] & 7;
|
|
1208
|
-
(0,
|
|
1209
|
-
const value = parseValue(raw.payload.subarray(2), valueSize,
|
|
1207
|
+
(0, import_core.validatePayload)(valueSize >= 1, valueSize <= 4, raw.payload.length >= 2 + valueSize);
|
|
1208
|
+
const value = parseValue(raw.payload.subarray(2), valueSize, import_core.ConfigValueFormat.SignedInteger);
|
|
1210
1209
|
return new this({
|
|
1211
1210
|
nodeId: ctx.sourceNodeId,
|
|
1212
1211
|
parameter,
|
|
@@ -1223,7 +1222,7 @@ let ConfigurationCCSet = (() => {
|
|
|
1223
1222
|
serialize(ctx) {
|
|
1224
1223
|
const valueSize = this.resetToDefault ? 1 : this.valueSize;
|
|
1225
1224
|
const payloadLength = 2 + valueSize;
|
|
1226
|
-
this.payload =
|
|
1225
|
+
this.payload = import_shared.Bytes.alloc(payloadLength, 0);
|
|
1227
1226
|
this.payload[0] = this.parameter;
|
|
1228
1227
|
this.payload[1] = (this.resetToDefault ? 128 : 0) | valueSize & 7;
|
|
1229
1228
|
if (!this.resetToDefault) {
|
|
@@ -1247,7 +1246,7 @@ let ConfigurationCCSet = (() => {
|
|
|
1247
1246
|
message["value size"] = this.valueSize;
|
|
1248
1247
|
}
|
|
1249
1248
|
if (this.valueFormat != void 0) {
|
|
1250
|
-
message["value format"] = (0,
|
|
1249
|
+
message["value format"] = (0, import_shared.getEnumMemberName)(import_core.ConfigValueFormat, this.valueFormat);
|
|
1251
1250
|
}
|
|
1252
1251
|
if (this.value != void 0) {
|
|
1253
1252
|
message.value = configValueToString(this.value);
|
|
@@ -1288,24 +1287,24 @@ let ConfigurationCCBulkSet = (() => {
|
|
|
1288
1287
|
super(options);
|
|
1289
1288
|
this._parameters = options.parameters;
|
|
1290
1289
|
if (this._parameters.length < 1) {
|
|
1291
|
-
throw new
|
|
1292
|
-
} else if (!(0,
|
|
1293
|
-
throw new
|
|
1290
|
+
throw new import_core.ZWaveError(`In a ConfigurationCC.BulkSet, parameters must be a non-empty array`, import_core.ZWaveErrorCodes.CC_Invalid);
|
|
1291
|
+
} else if (!(0, import_core.isConsecutiveArray)(this._parameters)) {
|
|
1292
|
+
throw new import_core.ZWaveError(`A ConfigurationCC.BulkSet can only be used for consecutive parameters`, import_core.ZWaveErrorCodes.CC_Invalid);
|
|
1294
1293
|
}
|
|
1295
1294
|
this._handshake = !!options.handshake;
|
|
1296
1295
|
this._resetToDefault = !!options.resetToDefault;
|
|
1297
1296
|
if (!!options.resetToDefault) {
|
|
1298
1297
|
this._valueSize = 1;
|
|
1299
|
-
this._valueFormat =
|
|
1298
|
+
this._valueFormat = import_core.ConfigValueFormat.SignedInteger;
|
|
1300
1299
|
this._values = this._parameters.map(() => 0);
|
|
1301
1300
|
} else {
|
|
1302
1301
|
this._valueSize = options.valueSize;
|
|
1303
|
-
this._valueFormat = options.valueFormat ??
|
|
1302
|
+
this._valueFormat = options.valueFormat ?? import_core.ConfigValueFormat.SignedInteger;
|
|
1304
1303
|
this._values = options.values;
|
|
1305
1304
|
}
|
|
1306
1305
|
}
|
|
1307
1306
|
static from(_raw, _ctx) {
|
|
1308
|
-
throw new
|
|
1307
|
+
throw new import_core.ZWaveError(`${this.name}: deserialization not implemented`, import_core.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
1309
1308
|
}
|
|
1310
1309
|
_parameters;
|
|
1311
1310
|
get parameters() {
|
|
@@ -1334,7 +1333,7 @@ let ConfigurationCCBulkSet = (() => {
|
|
|
1334
1333
|
serialize(ctx) {
|
|
1335
1334
|
const valueSize = this._resetToDefault ? 1 : this.valueSize;
|
|
1336
1335
|
const payloadLength = 4 + valueSize * this.parameters.length;
|
|
1337
|
-
this.payload =
|
|
1336
|
+
this.payload = import_shared.Bytes.alloc(payloadLength, 0);
|
|
1338
1337
|
this.payload.writeUInt16BE(this.parameters[0], 0);
|
|
1339
1338
|
this.payload[2] = this.parameters.length;
|
|
1340
1339
|
this.payload[3] = (this._resetToDefault ? 128 : 0) | (this.handshake ? 64 : 0) | valueSize & 7;
|
|
@@ -1403,18 +1402,18 @@ let ConfigurationCCBulkReport = (() => {
|
|
|
1403
1402
|
}
|
|
1404
1403
|
}
|
|
1405
1404
|
static from(raw, ctx) {
|
|
1406
|
-
(0,
|
|
1405
|
+
(0, import_core.validatePayload)(raw.payload.length >= 5);
|
|
1407
1406
|
const firstParameter = raw.payload.readUInt16BE(0);
|
|
1408
1407
|
const numParams = raw.payload[2];
|
|
1409
1408
|
const reportsToFollow = raw.payload[3];
|
|
1410
1409
|
const defaultValues = !!(raw.payload[4] & 128);
|
|
1411
1410
|
const isHandshakeResponse = !!(raw.payload[4] & 64);
|
|
1412
1411
|
const valueSize = raw.payload[4] & 7;
|
|
1413
|
-
(0,
|
|
1412
|
+
(0, import_core.validatePayload)(raw.payload.length >= 5 + numParams * valueSize);
|
|
1414
1413
|
const values = {};
|
|
1415
1414
|
for (let i = 0; i < numParams; i++) {
|
|
1416
1415
|
const param = firstParameter + i;
|
|
1417
|
-
values[param] = parseValue(raw.payload.subarray(5 + i * valueSize), valueSize,
|
|
1416
|
+
values[param] = parseValue(raw.payload.subarray(5 + i * valueSize), valueSize, import_core.ConfigValueFormat.SignedInteger);
|
|
1418
1417
|
}
|
|
1419
1418
|
return new this({
|
|
1420
1419
|
nodeId: ctx.sourceNodeId,
|
|
@@ -1430,7 +1429,7 @@ let ConfigurationCCBulkReport = (() => {
|
|
|
1430
1429
|
return false;
|
|
1431
1430
|
for (let [parameter, value] of this._values.entries()) {
|
|
1432
1431
|
const oldParamInformation = this.getParamInformation(ctx, parameter);
|
|
1433
|
-
if (oldParamInformation.format != void 0 && oldParamInformation.format !==
|
|
1432
|
+
if (oldParamInformation.format != void 0 && oldParamInformation.format !== import_core.ConfigValueFormat.SignedInteger) {
|
|
1434
1433
|
value = reInterpretSignedValue(value, this.valueSize, oldParamInformation.format);
|
|
1435
1434
|
this._values.set(parameter, value);
|
|
1436
1435
|
}
|
|
@@ -1494,19 +1493,19 @@ let ConfigurationCCBulkGet = (() => {
|
|
|
1494
1493
|
constructor(options) {
|
|
1495
1494
|
super(options);
|
|
1496
1495
|
this._parameters = options.parameters.sort();
|
|
1497
|
-
if (!(0,
|
|
1498
|
-
throw new
|
|
1496
|
+
if (!(0, import_core.isConsecutiveArray)(this.parameters)) {
|
|
1497
|
+
throw new import_core.ZWaveError(`A ConfigurationCC.BulkGet can only be used for consecutive parameters`, import_core.ZWaveErrorCodes.CC_Invalid);
|
|
1499
1498
|
}
|
|
1500
1499
|
}
|
|
1501
1500
|
static from(_raw, _ctx) {
|
|
1502
|
-
throw new
|
|
1501
|
+
throw new import_core.ZWaveError(`${this.name}: deserialization not implemented`, import_core.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
1503
1502
|
}
|
|
1504
1503
|
_parameters;
|
|
1505
1504
|
get parameters() {
|
|
1506
1505
|
return this._parameters;
|
|
1507
1506
|
}
|
|
1508
1507
|
serialize(ctx) {
|
|
1509
|
-
this.payload = new
|
|
1508
|
+
this.payload = new import_shared.Bytes(3);
|
|
1510
1509
|
this.payload.writeUInt16BE(this.parameters[0], 0);
|
|
1511
1510
|
this.payload[2] = this.parameters.length;
|
|
1512
1511
|
return super.serialize(ctx);
|
|
@@ -1547,11 +1546,11 @@ let ConfigurationCCNameReport = (() => {
|
|
|
1547
1546
|
this.reportsToFollow = options.reportsToFollow;
|
|
1548
1547
|
}
|
|
1549
1548
|
static from(raw, ctx) {
|
|
1550
|
-
(0,
|
|
1549
|
+
(0, import_core.validatePayload)(raw.payload.length >= 3);
|
|
1551
1550
|
const parameter = raw.payload.readUInt16BE(0);
|
|
1552
1551
|
const reportsToFollow = raw.payload[2];
|
|
1553
1552
|
if (reportsToFollow > 0) {
|
|
1554
|
-
(0,
|
|
1553
|
+
(0, import_core.validatePayload)(raw.payload.length >= 4);
|
|
1555
1554
|
}
|
|
1556
1555
|
const name = raw.payload.subarray(3).toString("utf8");
|
|
1557
1556
|
return new this({
|
|
@@ -1589,8 +1588,8 @@ let ConfigurationCCNameReport = (() => {
|
|
|
1589
1588
|
return true;
|
|
1590
1589
|
}
|
|
1591
1590
|
serialize(ctx) {
|
|
1592
|
-
const nameBuffer =
|
|
1593
|
-
this.payload = new
|
|
1591
|
+
const nameBuffer = import_shared.Bytes.from(this.name, "utf8");
|
|
1592
|
+
this.payload = new import_shared.Bytes(3 + nameBuffer.length);
|
|
1594
1593
|
this.payload.writeUInt16BE(this.parameter, 0);
|
|
1595
1594
|
this.payload[2] = this.reportsToFollow;
|
|
1596
1595
|
this.payload.set(nameBuffer, 3);
|
|
@@ -1644,7 +1643,7 @@ let ConfigurationCCNameGet = (() => {
|
|
|
1644
1643
|
this.parameter = options.parameter;
|
|
1645
1644
|
}
|
|
1646
1645
|
static from(raw, ctx) {
|
|
1647
|
-
(0,
|
|
1646
|
+
(0, import_core.validatePayload)(raw.payload.length >= 2);
|
|
1648
1647
|
const parameter = raw.payload.readUInt16BE(0);
|
|
1649
1648
|
return new this({
|
|
1650
1649
|
nodeId: ctx.sourceNodeId,
|
|
@@ -1653,7 +1652,7 @@ let ConfigurationCCNameGet = (() => {
|
|
|
1653
1652
|
}
|
|
1654
1653
|
parameter;
|
|
1655
1654
|
serialize(ctx) {
|
|
1656
|
-
this.payload = new
|
|
1655
|
+
this.payload = new import_shared.Bytes(2);
|
|
1657
1656
|
this.payload.writeUInt16BE(this.parameter, 0);
|
|
1658
1657
|
return super.serialize(ctx);
|
|
1659
1658
|
}
|
|
@@ -1693,11 +1692,11 @@ let ConfigurationCCInfoReport = (() => {
|
|
|
1693
1692
|
this.reportsToFollow = options.reportsToFollow;
|
|
1694
1693
|
}
|
|
1695
1694
|
static from(raw, ctx) {
|
|
1696
|
-
(0,
|
|
1695
|
+
(0, import_core.validatePayload)(raw.payload.length >= 3);
|
|
1697
1696
|
const parameter = raw.payload.readUInt16BE(0);
|
|
1698
1697
|
const reportsToFollow = raw.payload[2];
|
|
1699
1698
|
if (reportsToFollow > 0) {
|
|
1700
|
-
(0,
|
|
1699
|
+
(0, import_core.validatePayload)(raw.payload.length >= 4);
|
|
1701
1700
|
}
|
|
1702
1701
|
const info = raw.payload.subarray(3).toString("utf8");
|
|
1703
1702
|
return new this({
|
|
@@ -1735,8 +1734,8 @@ let ConfigurationCCInfoReport = (() => {
|
|
|
1735
1734
|
return true;
|
|
1736
1735
|
}
|
|
1737
1736
|
serialize(ctx) {
|
|
1738
|
-
const infoBuffer =
|
|
1739
|
-
this.payload = new
|
|
1737
|
+
const infoBuffer = import_shared.Bytes.from(this.info, "utf8");
|
|
1738
|
+
this.payload = new import_shared.Bytes(3 + infoBuffer.length);
|
|
1740
1739
|
this.payload.writeUInt16BE(this.parameter, 0);
|
|
1741
1740
|
this.payload[2] = this.reportsToFollow;
|
|
1742
1741
|
this.payload.set(infoBuffer, 3);
|
|
@@ -1790,7 +1789,7 @@ let ConfigurationCCInfoGet = (() => {
|
|
|
1790
1789
|
this.parameter = options.parameter;
|
|
1791
1790
|
}
|
|
1792
1791
|
static from(raw, ctx) {
|
|
1793
|
-
(0,
|
|
1792
|
+
(0, import_core.validatePayload)(raw.payload.length >= 2);
|
|
1794
1793
|
const parameter = raw.payload.readUInt16BE(0);
|
|
1795
1794
|
return new this({
|
|
1796
1795
|
nodeId: ctx.sourceNodeId,
|
|
@@ -1799,7 +1798,7 @@ let ConfigurationCCInfoGet = (() => {
|
|
|
1799
1798
|
}
|
|
1800
1799
|
parameter;
|
|
1801
1800
|
serialize(ctx) {
|
|
1802
|
-
this.payload = new
|
|
1801
|
+
this.payload = new import_shared.Bytes(2);
|
|
1803
1802
|
this.payload.writeUInt16BE(this.parameter, 0);
|
|
1804
1803
|
return super.serialize(ctx);
|
|
1805
1804
|
}
|
|
@@ -1839,11 +1838,11 @@ let ConfigurationCCPropertiesReport = (() => {
|
|
|
1839
1838
|
this.valueFormat = options.valueFormat;
|
|
1840
1839
|
if (this.valueSize > 0) {
|
|
1841
1840
|
if (options.minValue == void 0) {
|
|
1842
|
-
throw new
|
|
1841
|
+
throw new import_core.ZWaveError("The minimum value must be set when the value size is non-zero", import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
1843
1842
|
} else if (options.maxValue == void 0) {
|
|
1844
|
-
throw new
|
|
1843
|
+
throw new import_core.ZWaveError("The maximum value must be set when the value size is non-zero", import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
1845
1844
|
} else if (options.defaultValue == void 0) {
|
|
1846
|
-
throw new
|
|
1845
|
+
throw new import_core.ZWaveError("The default value must be set when the value size is non-zero", import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
1847
1846
|
}
|
|
1848
1847
|
this.minValue = options.minValue;
|
|
1849
1848
|
this.maxValue = options.maxValue;
|
|
@@ -1856,7 +1855,7 @@ let ConfigurationCCPropertiesReport = (() => {
|
|
|
1856
1855
|
this.noBulkSupport = options.noBulkSupport;
|
|
1857
1856
|
}
|
|
1858
1857
|
static from(raw, ctx) {
|
|
1859
|
-
(0,
|
|
1858
|
+
(0, import_core.validatePayload)(raw.payload.length >= 3);
|
|
1860
1859
|
const parameter = raw.payload.readUInt16BE(0);
|
|
1861
1860
|
const valueFormat = (raw.payload[2] & 56) >>> 3;
|
|
1862
1861
|
const valueSize = raw.payload[2] & 7;
|
|
@@ -1872,12 +1871,12 @@ let ConfigurationCCPropertiesReport = (() => {
|
|
|
1872
1871
|
});
|
|
1873
1872
|
}
|
|
1874
1873
|
const nextParameterOffset = 3 + 3 * valueSize;
|
|
1875
|
-
(0,
|
|
1874
|
+
(0, import_core.validatePayload)(raw.payload.length >= nextParameterOffset + 2);
|
|
1876
1875
|
let minValue;
|
|
1877
1876
|
let maxValue;
|
|
1878
1877
|
let defaultValue;
|
|
1879
1878
|
if (valueSize > 0) {
|
|
1880
|
-
if (valueFormat ===
|
|
1879
|
+
if (valueFormat === import_core.ConfigValueFormat.BitField) {
|
|
1881
1880
|
minValue = 0;
|
|
1882
1881
|
} else {
|
|
1883
1882
|
minValue = parseValue(raw.payload.subarray(3), valueSize, valueFormat);
|
|
@@ -1929,9 +1928,9 @@ let ConfigurationCCPropertiesReport = (() => {
|
|
|
1929
1928
|
noBulkSupport: this.noBulkSupport,
|
|
1930
1929
|
isFromConfig: false
|
|
1931
1930
|
};
|
|
1932
|
-
if (this.valueFormat !==
|
|
1931
|
+
if (this.valueFormat !== import_core.ConfigValueFormat.BitField) {
|
|
1933
1932
|
if (!this.paramExistsInConfigFile(ctx, this.parameter)) {
|
|
1934
|
-
const paramInfo = (0,
|
|
1933
|
+
const paramInfo = (0, import_core.stripUndefined)({
|
|
1935
1934
|
...baseInfo,
|
|
1936
1935
|
min: this.minValue,
|
|
1937
1936
|
max: this.maxValue,
|
|
@@ -1947,7 +1946,7 @@ let ConfigurationCCPropertiesReport = (() => {
|
|
|
1947
1946
|
// Only create partials that exist
|
|
1948
1947
|
!!(mask & bits) && !this.paramExistsInConfigFile(ctx, this.parameter, mask)
|
|
1949
1948
|
) {
|
|
1950
|
-
const paramInfo = (0,
|
|
1949
|
+
const paramInfo = (0, import_core.stripUndefined)({
|
|
1951
1950
|
...baseInfo,
|
|
1952
1951
|
min: 0,
|
|
1953
1952
|
max: 1,
|
|
@@ -1973,7 +1972,7 @@ let ConfigurationCCPropertiesReport = (() => {
|
|
|
1973
1972
|
isAdvanced;
|
|
1974
1973
|
noBulkSupport;
|
|
1975
1974
|
serialize(ctx) {
|
|
1976
|
-
this.payload = new
|
|
1975
|
+
this.payload = new import_shared.Bytes(3 + 3 * this.valueSize + 2 + 1);
|
|
1977
1976
|
this.payload.writeUInt16BE(this.parameter, 0);
|
|
1978
1977
|
const options1 = (this.altersCapabilities ? 128 : 0) | (this.isReadonly ? 64 : 0) | (this.valueFormat & 7) << 3 | this.valueSize & 7;
|
|
1979
1978
|
this.payload[2] = options1;
|
|
@@ -1997,7 +1996,7 @@ let ConfigurationCCPropertiesReport = (() => {
|
|
|
1997
1996
|
"parameter #": this.parameter,
|
|
1998
1997
|
"next param #": this.nextParameter,
|
|
1999
1998
|
"value size": this.valueSize,
|
|
2000
|
-
"value format": (0,
|
|
1999
|
+
"value format": (0, import_shared.getEnumMemberName)(import_core.ConfigValueFormat, this.valueFormat)
|
|
2001
2000
|
};
|
|
2002
2001
|
if (this.minValue != void 0) {
|
|
2003
2002
|
message["min value"] = configValueToString(this.minValue);
|
|
@@ -2053,7 +2052,7 @@ let ConfigurationCCPropertiesGet = (() => {
|
|
|
2053
2052
|
this.parameter = options.parameter;
|
|
2054
2053
|
}
|
|
2055
2054
|
static from(raw, ctx) {
|
|
2056
|
-
(0,
|
|
2055
|
+
(0, import_core.validatePayload)(raw.payload.length >= 2);
|
|
2057
2056
|
const parameter = raw.payload.readUInt16BE(0);
|
|
2058
2057
|
return new this({
|
|
2059
2058
|
nodeId: ctx.sourceNodeId,
|
|
@@ -2062,7 +2061,7 @@ let ConfigurationCCPropertiesGet = (() => {
|
|
|
2062
2061
|
}
|
|
2063
2062
|
parameter;
|
|
2064
2063
|
serialize(ctx) {
|
|
2065
|
-
this.payload = new
|
|
2064
|
+
this.payload = new import_shared.Bytes(2);
|
|
2066
2065
|
this.payload.writeUInt16BE(this.parameter, 0);
|
|
2067
2066
|
return super.serialize(ctx);
|
|
2068
2067
|
}
|
|
@@ -2102,13 +2101,13 @@ function isSafeValue(value, size, format) {
|
|
|
2102
2101
|
let minValue;
|
|
2103
2102
|
let maxValue;
|
|
2104
2103
|
switch (format) {
|
|
2105
|
-
case
|
|
2104
|
+
case import_core.ConfigValueFormat.SignedInteger:
|
|
2106
2105
|
minValue = -Math.pow(2, 8 * size - 1);
|
|
2107
2106
|
maxValue = Math.pow(2, 8 * size - 1) - 1;
|
|
2108
2107
|
break;
|
|
2109
|
-
case
|
|
2110
|
-
case
|
|
2111
|
-
case
|
|
2108
|
+
case import_core.ConfigValueFormat.UnsignedInteger:
|
|
2109
|
+
case import_core.ConfigValueFormat.Enumerated:
|
|
2110
|
+
case import_core.ConfigValueFormat.BitField:
|
|
2112
2111
|
minValue = 0;
|
|
2113
2112
|
maxValue = Math.pow(2, 8 * size);
|
|
2114
2113
|
break;
|
|
@@ -2120,17 +2119,17 @@ function isSafeValue(value, size, format) {
|
|
|
2120
2119
|
__name(isSafeValue, "isSafeValue");
|
|
2121
2120
|
function parseValue(raw, size, format) {
|
|
2122
2121
|
switch (format) {
|
|
2123
|
-
case
|
|
2122
|
+
case import_core.ConfigValueFormat.SignedInteger:
|
|
2124
2123
|
return raw.readIntBE(0, size);
|
|
2125
|
-
case
|
|
2126
|
-
case
|
|
2127
|
-
case
|
|
2124
|
+
case import_core.ConfigValueFormat.UnsignedInteger:
|
|
2125
|
+
case import_core.ConfigValueFormat.Enumerated:
|
|
2126
|
+
case import_core.ConfigValueFormat.BitField:
|
|
2128
2127
|
return raw.readUIntBE(0, size);
|
|
2129
2128
|
}
|
|
2130
2129
|
}
|
|
2131
2130
|
__name(parseValue, "parseValue");
|
|
2132
2131
|
function throwInvalidValueError(value, parameter, valueSize, valueFormat) {
|
|
2133
|
-
throw new
|
|
2132
|
+
throw new import_core.ZWaveError(`The value ${value} is invalid for configuration parameter ${parameter} (size = ${valueSize}, format = ${(0, import_shared.getEnumMemberName)(import_core.ConfigValueFormat, valueFormat)})!`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
2134
2133
|
}
|
|
2135
2134
|
__name(throwInvalidValueError, "throwInvalidValueError");
|
|
2136
2135
|
function tryCatchOutOfBoundsError(e, value, parameter, valueSize, valueFormat) {
|
|
@@ -2143,12 +2142,12 @@ function tryCatchOutOfBoundsError(e, value, parameter, valueSize, valueFormat) {
|
|
|
2143
2142
|
__name(tryCatchOutOfBoundsError, "tryCatchOutOfBoundsError");
|
|
2144
2143
|
function serializeValue(payload, offset, size, format, value) {
|
|
2145
2144
|
switch (format) {
|
|
2146
|
-
case
|
|
2145
|
+
case import_core.ConfigValueFormat.SignedInteger:
|
|
2147
2146
|
payload.writeIntBE(value, offset, size);
|
|
2148
2147
|
return;
|
|
2149
|
-
case
|
|
2150
|
-
case
|
|
2151
|
-
case
|
|
2148
|
+
case import_core.ConfigValueFormat.UnsignedInteger:
|
|
2149
|
+
case import_core.ConfigValueFormat.Enumerated:
|
|
2150
|
+
case import_core.ConfigValueFormat.BitField:
|
|
2152
2151
|
payload.writeUIntBE(value, offset, size);
|
|
2153
2152
|
return;
|
|
2154
2153
|
}
|