@zwave-js/cc 14.0.0-beta.1 → 14.0.0-beta.4
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 +194 -0
- package/build/cjs/cc/AlarmSensorCC.js +395 -0
- package/build/cjs/cc/AlarmSensorCC.js.map +7 -0
- package/build/cjs/cc/AssociationCC.d.ts +253 -0
- package/build/cjs/cc/AssociationCC.js +711 -0
- package/build/cjs/cc/AssociationCC.js.map +7 -0
- package/build/cjs/cc/AssociationGroupInfoCC.d.ts +230 -0
- package/build/cjs/cc/AssociationGroupInfoCC.js +746 -0
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +7 -0
- package/build/cjs/cc/BarrierOperatorCC.d.ts +243 -0
- package/build/cjs/cc/BarrierOperatorCC.js +582 -0
- package/build/cjs/cc/BarrierOperatorCC.js.map +7 -0
- package/build/cjs/cc/BasicCC.d.ts +191 -0
- package/build/cjs/cc/BasicCC.js +384 -0
- package/build/cjs/cc/BasicCC.js.map +7 -0
- package/build/cjs/cc/BatteryCC.d.ts +406 -0
- package/build/cjs/cc/BatteryCC.js +508 -0
- package/build/cjs/cc/BatteryCC.js.map +7 -0
- package/build/cjs/cc/BinarySensorCC.d.ts +122 -0
- package/build/cjs/cc/BinarySensorCC.js +431 -0
- package/build/cjs/cc/BinarySensorCC.js.map +7 -0
- package/build/cjs/cc/BinarySwitchCC.d.ts +139 -0
- package/build/cjs/cc/BinarySwitchCC.js +378 -0
- package/build/cjs/cc/BinarySwitchCC.js.map +7 -0
- package/build/cjs/cc/CRC16CC.d.ts +29 -0
- package/build/cjs/cc/CRC16CC.js +133 -0
- package/build/cjs/cc/CRC16CC.js.map +7 -0
- package/build/cjs/cc/CentralSceneCC.d.ts +210 -0
- package/build/cjs/cc/CentralSceneCC.js +449 -0
- package/build/cjs/cc/CentralSceneCC.js.map +7 -0
- package/build/cjs/cc/ClimateControlScheduleCC.d.ts +177 -0
- package/build/cjs/cc/ClimateControlScheduleCC.js +480 -0
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +7 -0
- package/build/cjs/cc/ClockCC.d.ts +47 -0
- package/build/cjs/cc/ClockCC.js +226 -0
- package/build/cjs/cc/ClockCC.js.map +7 -0
- package/build/cjs/cc/ColorSwitchCC.d.ts +339 -0
- package/build/cjs/cc/ColorSwitchCC.js +1117 -0
- package/build/cjs/cc/ColorSwitchCC.js.map +7 -0
- package/build/cjs/cc/ConfigurationCC.d.ts +396 -0
- package/build/cjs/cc/ConfigurationCC.js +2230 -0
- package/build/cjs/cc/ConfigurationCC.js.map +7 -0
- package/build/cjs/cc/DeviceResetLocallyCC.d.ts +17 -0
- package/build/cjs/cc/DeviceResetLocallyCC.js +92 -0
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +7 -0
- package/build/cjs/cc/DoorLockCC.d.ts +837 -0
- package/build/cjs/cc/DoorLockCC.js +1239 -0
- package/build/cjs/cc/DoorLockCC.js.map +7 -0
- package/build/cjs/cc/DoorLockLoggingCC.d.ts +77 -0
- package/build/cjs/cc/DoorLockLoggingCC.js +343 -0
- package/build/cjs/cc/DoorLockLoggingCC.js.map +7 -0
- package/build/cjs/cc/EnergyProductionCC.d.ts +77 -0
- package/build/cjs/cc/EnergyProductionCC.js +240 -0
- package/build/cjs/cc/EnergyProductionCC.js.map +7 -0
- package/build/cjs/cc/EntryControlCC.d.ts +231 -0
- package/build/cjs/cc/EntryControlCC.js +593 -0
- package/build/cjs/cc/EntryControlCC.js.map +7 -0
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +359 -0
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +1122 -0
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +7 -0
- package/build/cjs/cc/HailCC.d.ts +6 -0
- package/build/cjs/cc/HailCC.js +45 -0
- package/build/cjs/cc/HailCC.js.map +7 -0
- package/build/cjs/cc/HumidityControlModeCC.d.ts +111 -0
- package/build/cjs/cc/HumidityControlModeCC.js +323 -0
- package/build/cjs/cc/HumidityControlModeCC.js.map +7 -0
- package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +60 -0
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +164 -0
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +7 -0
- package/build/cjs/cc/HumidityControlSetpointCC.d.ts +209 -0
- package/build/cjs/cc/HumidityControlSetpointCC.js +634 -0
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +7 -0
- package/build/cjs/cc/InclusionControllerCC.d.ts +42 -0
- package/build/cjs/cc/InclusionControllerCC.js +160 -0
- package/build/cjs/cc/InclusionControllerCC.js.map +7 -0
- package/build/cjs/cc/IndicatorCC.d.ts +338 -0
- package/build/cjs/cc/IndicatorCC.js +1234 -0
- package/build/cjs/cc/IndicatorCC.js.map +7 -0
- package/build/cjs/cc/IrrigationCC.d.ts +1496 -0
- package/build/cjs/cc/IrrigationCC.js +1978 -0
- package/build/cjs/cc/IrrigationCC.js.map +7 -0
- package/build/cjs/cc/LanguageCC.d.ts +101 -0
- package/build/cjs/cc/LanguageCC.js +267 -0
- package/build/cjs/cc/LanguageCC.js.map +7 -0
- package/build/cjs/cc/LockCC.d.ts +73 -0
- package/build/cjs/cc/LockCC.js +222 -0
- package/build/cjs/cc/LockCC.js.map +7 -0
- package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +32 -0
- package/build/cjs/cc/ManufacturerProprietaryCC.js +209 -0
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +7 -0
- package/build/cjs/cc/ManufacturerSpecificCC.d.ts +171 -0
- package/build/cjs/cc/ManufacturerSpecificCC.js +334 -0
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +7 -0
- package/build/cjs/cc/MeterCC.d.ts +318 -0
- package/build/cjs/cc/MeterCC.js +1235 -0
- package/build/cjs/cc/MeterCC.js.map +7 -0
- package/build/cjs/cc/MultiChannelAssociationCC.d.ts +241 -0
- package/build/cjs/cc/MultiChannelAssociationCC.js +956 -0
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +7 -0
- package/build/cjs/cc/MultiChannelCC.d.ts +394 -0
- package/build/cjs/cc/MultiChannelCC.js +1050 -0
- package/build/cjs/cc/MultiChannelCC.js.map +7 -0
- package/build/cjs/cc/MultiCommandCC.d.ts +27 -0
- package/build/cjs/cc/MultiCommandCC.js +159 -0
- package/build/cjs/cc/MultiCommandCC.js.map +7 -0
- package/build/cjs/cc/MultilevelSensorCC.d.ts +185 -0
- package/build/cjs/cc/MultilevelSensorCC.js +716 -0
- package/build/cjs/cc/MultilevelSensorCC.js.map +7 -0
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +357 -0
- package/build/cjs/cc/MultilevelSwitchCC.js +780 -0
- package/build/cjs/cc/MultilevelSwitchCC.js.map +7 -0
- package/build/cjs/cc/NoOperationCC.d.ts +9 -0
- package/build/cjs/cc/NoOperationCC.js +64 -0
- package/build/cjs/cc/NoOperationCC.js.map +7 -0
- package/build/cjs/cc/NodeNamingCC.d.ts +118 -0
- package/build/cjs/cc/NodeNamingCC.js +364 -0
- package/build/cjs/cc/NodeNamingCC.js.map +7 -0
- package/build/cjs/cc/NotificationCC.d.ts +479 -0
- package/build/cjs/cc/NotificationCC.js +1245 -0
- package/build/cjs/cc/NotificationCC.js.map +7 -0
- package/build/cjs/cc/PowerlevelCC.d.ts +82 -0
- package/build/cjs/cc/PowerlevelCC.js +510 -0
- package/build/cjs/cc/PowerlevelCC.js.map +7 -0
- package/build/cjs/cc/ProtectionCC.d.ts +325 -0
- package/build/cjs/cc/ProtectionCC.js +667 -0
- package/build/cjs/cc/ProtectionCC.js.map +7 -0
- package/build/cjs/cc/SceneActivationCC.d.ts +89 -0
- package/build/cjs/cc/SceneActivationCC.js +193 -0
- package/build/cjs/cc/SceneActivationCC.js.map +7 -0
- package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +120 -0
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +370 -0
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +7 -0
- package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +129 -0
- package/build/cjs/cc/SceneControllerConfigurationCC.js +423 -0
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +7 -0
- package/build/cjs/cc/ScheduleEntryLockCC.d.ts +434 -0
- package/build/cjs/cc/ScheduleEntryLockCC.js +1763 -0
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +7 -0
- package/build/cjs/cc/Security2CC.d.ts +251 -0
- package/build/cjs/cc/Security2CC.js +1589 -0
- package/build/cjs/cc/Security2CC.js.map +7 -0
- package/build/cjs/cc/SecurityCC.d.ts +128 -0
- package/build/cjs/cc/SecurityCC.js +757 -0
- package/build/cjs/cc/SecurityCC.js.map +7 -0
- package/build/cjs/cc/SoundSwitchCC.d.ts +232 -0
- package/build/cjs/cc/SoundSwitchCC.js +661 -0
- package/build/cjs/cc/SoundSwitchCC.js.map +7 -0
- package/build/cjs/cc/SupervisionCC.d.ts +104 -0
- package/build/cjs/cc/SupervisionCC.js +308 -0
- package/build/cjs/cc/SupervisionCC.js.map +7 -0
- package/build/cjs/cc/ThermostatFanModeCC.d.ts +141 -0
- package/build/cjs/cc/ThermostatFanModeCC.js +372 -0
- package/build/cjs/cc/ThermostatFanModeCC.js.map +7 -0
- package/build/cjs/cc/ThermostatFanStateCC.d.ts +60 -0
- package/build/cjs/cc/ThermostatFanStateCC.js +166 -0
- package/build/cjs/cc/ThermostatFanStateCC.js.map +7 -0
- package/build/cjs/cc/ThermostatModeCC.d.ts +150 -0
- package/build/cjs/cc/ThermostatModeCC.js +436 -0
- package/build/cjs/cc/ThermostatModeCC.js.map +7 -0
- package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +61 -0
- package/build/cjs/cc/ThermostatOperatingStateCC.js +162 -0
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +7 -0
- package/build/cjs/cc/ThermostatSetbackCC.d.ts +46 -0
- package/build/cjs/cc/ThermostatSetbackCC.js +262 -0
- package/build/cjs/cc/ThermostatSetbackCC.js.map +7 -0
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +197 -0
- package/build/cjs/cc/ThermostatSetpointCC.js +638 -0
- package/build/cjs/cc/ThermostatSetpointCC.js.map +7 -0
- package/build/cjs/cc/TimeCC.d.ts +88 -0
- package/build/cjs/cc/TimeCC.js +473 -0
- package/build/cjs/cc/TimeCC.js.map +7 -0
- package/build/cjs/cc/TimeParametersCC.d.ts +72 -0
- package/build/cjs/cc/TimeParametersCC.js +313 -0
- package/build/cjs/cc/TimeParametersCC.js.map +7 -0
- package/build/cjs/cc/TransportServiceCC.d.ts +107 -0
- package/build/cjs/cc/TransportServiceCC.js +404 -0
- package/build/cjs/cc/TransportServiceCC.js.map +7 -0
- package/build/cjs/cc/UserCodeCC.d.ts +683 -0
- package/build/cjs/cc/UserCodeCC.js +1620 -0
- package/build/cjs/cc/UserCodeCC.js.map +7 -0
- package/build/cjs/cc/VersionCC.d.ts +469 -0
- package/build/cjs/cc/VersionCC.js +828 -0
- package/build/cjs/cc/VersionCC.js.map +7 -0
- package/build/cjs/cc/WakeUpCC.d.ts +150 -0
- package/build/cjs/cc/WakeUpCC.js +456 -0
- package/build/cjs/cc/WakeUpCC.js.map +7 -0
- package/build/cjs/cc/WindowCoveringCC.d.ts +315 -0
- package/build/cjs/cc/WindowCoveringCC.js +776 -0
- package/build/cjs/cc/WindowCoveringCC.js.map +7 -0
- package/build/cjs/cc/ZWaveLongRangeCC.d.ts +4 -0
- package/build/cjs/cc/ZWaveLongRangeCC.js +43 -0
- package/build/cjs/cc/ZWaveLongRangeCC.js.map +7 -0
- package/build/cjs/cc/ZWavePlusCC.d.ts +163 -0
- package/build/cjs/cc/ZWavePlusCC.js +288 -0
- package/build/cjs/cc/ZWavePlusCC.js.map +7 -0
- package/build/cjs/cc/ZWaveProtocolCC.d.ts +344 -0
- package/build/cjs/cc/ZWaveProtocolCC.js +1071 -0
- package/build/cjs/cc/ZWaveProtocolCC.js.map +7 -0
- package/build/cjs/cc/index.d.ts +132 -0
- package/build/cjs/cc/index.js +1180 -0
- package/build/cjs/cc/index.js.map +7 -0
- package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +64 -0
- package/build/cjs/cc/manufacturerProprietary/Decorators.js +76 -0
- package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +7 -0
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +79 -0
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +412 -0
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +7 -0
- package/build/cjs/index.d.ts +15 -0
- package/build/cjs/index.js +77 -0
- package/build/cjs/index.js.map +7 -0
- package/build/cjs/index_safe.d.ts +3 -0
- package/build/cjs/index_safe.js +25 -0
- package/build/cjs/index_safe.js.map +7 -0
- package/build/cjs/lib/API.d.ts +271 -0
- package/build/cjs/lib/API.js +413 -0
- package/build/cjs/lib/API.js.map +7 -0
- package/build/cjs/lib/CommandClass.d.ts +234 -0
- package/build/cjs/lib/CommandClass.js +692 -0
- package/build/cjs/lib/CommandClass.js.map +7 -0
- package/build/cjs/lib/CommandClassDecorators.d.ts +112 -0
- package/build/cjs/lib/CommandClassDecorators.js +182 -0
- package/build/cjs/lib/CommandClassDecorators.js.map +7 -0
- package/build/cjs/lib/EncapsulatingCommandClass.d.ts +22 -0
- package/build/cjs/lib/EncapsulatingCommandClass.js +71 -0
- package/build/cjs/lib/EncapsulatingCommandClass.js.map +7 -0
- package/build/cjs/lib/ICommandClassContainer.js +17 -0
- package/build/cjs/lib/ICommandClassContainer.js.map +7 -0
- package/build/cjs/lib/NotificationEventPayload.d.ts +10 -0
- package/build/cjs/lib/NotificationEventPayload.js +31 -0
- package/build/cjs/lib/NotificationEventPayload.js.map +7 -0
- package/build/cjs/lib/Security2/Extension.js +333 -0
- package/build/cjs/lib/Security2/Extension.js.map +7 -0
- package/build/cjs/lib/Security2/shared.js +69 -0
- package/build/cjs/lib/Security2/shared.js.map +7 -0
- package/build/cjs/lib/SetValueResult.js +65 -0
- package/build/cjs/lib/SetValueResult.js.map +7 -0
- package/build/cjs/lib/Values.d.ts +223 -0
- package/build/cjs/lib/Values.js +191 -0
- package/build/cjs/lib/Values.js.map +7 -0
- package/build/cjs/lib/_Types.js +1676 -0
- package/build/cjs/lib/_Types.js.map +7 -0
- package/build/cjs/lib/serializers.d.ts +34 -0
- package/build/cjs/lib/serializers.js +110 -0
- package/build/cjs/lib/serializers.js.map +7 -0
- package/build/cjs/lib/utils.d.ts +17 -0
- package/build/cjs/lib/utils.js +678 -0
- package/build/cjs/lib/utils.js.map +7 -0
- package/build/cjs/package.json +3 -0
- package/build/esm/cc/AlarmSensorCC.d.ts +194 -0
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -0
- package/build/esm/cc/AlarmSensorCC.js +392 -0
- package/build/esm/cc/AlarmSensorCC.js.map +1 -0
- package/build/esm/cc/AssociationCC.d.ts +253 -0
- package/build/esm/cc/AssociationCC.d.ts.map +1 -0
- package/build/esm/cc/AssociationCC.js +706 -0
- package/build/esm/cc/AssociationCC.js.map +1 -0
- package/build/esm/cc/AssociationGroupInfoCC.d.ts +230 -0
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -0
- package/build/esm/cc/AssociationGroupInfoCC.js +769 -0
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -0
- package/build/esm/cc/BarrierOperatorCC.d.ts +243 -0
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -0
- package/build/esm/cc/BarrierOperatorCC.js +610 -0
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -0
- package/build/esm/cc/BasicCC.d.ts +191 -0
- package/build/esm/cc/BasicCC.d.ts.map +1 -0
- package/build/esm/cc/BasicCC.js +390 -0
- package/build/esm/cc/BasicCC.js.map +1 -0
- package/build/esm/cc/BatteryCC.d.ts +406 -0
- package/build/esm/cc/BatteryCC.d.ts.map +1 -0
- package/build/esm/cc/BatteryCC.js +513 -0
- package/build/esm/cc/BatteryCC.js.map +1 -0
- package/build/esm/cc/BinarySensorCC.d.ts +122 -0
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -0
- package/build/esm/cc/BinarySensorCC.js +417 -0
- package/build/esm/cc/BinarySensorCC.js.map +1 -0
- package/build/esm/cc/BinarySwitchCC.d.ts +139 -0
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -0
- package/build/esm/cc/BinarySwitchCC.js +362 -0
- package/build/esm/cc/BinarySwitchCC.js.map +1 -0
- package/build/esm/cc/CRC16CC.d.ts +29 -0
- package/build/esm/cc/CRC16CC.d.ts.map +1 -0
- package/build/esm/cc/CRC16CC.js +123 -0
- package/build/esm/cc/CRC16CC.js.map +1 -0
- package/build/esm/cc/CentralSceneCC.d.ts +210 -0
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -0
- package/build/esm/cc/CentralSceneCC.js +427 -0
- package/build/esm/cc/CentralSceneCC.js.map +1 -0
- package/build/esm/cc/ClimateControlScheduleCC.d.ts +177 -0
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -0
- package/build/esm/cc/ClimateControlScheduleCC.js +466 -0
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -0
- package/build/esm/cc/ClockCC.d.ts +47 -0
- package/build/esm/cc/ClockCC.d.ts.map +1 -0
- package/build/esm/cc/ClockCC.js +205 -0
- package/build/esm/cc/ClockCC.js.map +1 -0
- package/build/esm/cc/ColorSwitchCC.d.ts +339 -0
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -0
- package/build/esm/cc/ColorSwitchCC.js +1149 -0
- package/build/esm/cc/ColorSwitchCC.js.map +1 -0
- package/build/esm/cc/ConfigurationCC.d.ts +396 -0
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -0
- package/build/esm/cc/ConfigurationCC.js +2454 -0
- package/build/esm/cc/ConfigurationCC.js.map +1 -0
- package/build/esm/cc/DeviceResetLocallyCC.d.ts +17 -0
- package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -0
- package/build/esm/cc/DeviceResetLocallyCC.js +73 -0
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -0
- package/build/esm/cc/DoorLockCC.d.ts +837 -0
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -0
- package/build/esm/cc/DoorLockCC.js +1270 -0
- package/build/esm/cc/DoorLockCC.js.map +1 -0
- package/build/esm/cc/DoorLockLoggingCC.d.ts +77 -0
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -0
- package/build/esm/cc/DoorLockLoggingCC.js +316 -0
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -0
- package/build/esm/cc/EnergyProductionCC.d.ts +77 -0
- package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -0
- package/build/esm/cc/EnergyProductionCC.js +213 -0
- package/build/esm/cc/EnergyProductionCC.js.map +1 -0
- package/build/esm/cc/EntryControlCC.d.ts +231 -0
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -0
- package/build/esm/cc/EntryControlCC.js +581 -0
- package/build/esm/cc/EntryControlCC.js.map +1 -0
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +359 -0
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -0
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +1142 -0
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -0
- package/build/esm/cc/HailCC.d.ts +6 -0
- package/build/esm/cc/HailCC.d.ts.map +1 -0
- package/build/esm/cc/HailCC.js +21 -0
- package/build/esm/cc/HailCC.js.map +1 -0
- package/build/esm/cc/HumidityControlModeCC.d.ts +111 -0
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -0
- package/build/esm/cc/HumidityControlModeCC.js +305 -0
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -0
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +60 -0
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -0
- package/build/esm/cc/HumidityControlOperatingStateCC.js +137 -0
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -0
- package/build/esm/cc/HumidityControlSetpointCC.d.ts +209 -0
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -0
- package/build/esm/cc/HumidityControlSetpointCC.js +645 -0
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -0
- package/build/esm/cc/InclusionControllerCC.d.ts +42 -0
- package/build/esm/cc/InclusionControllerCC.d.ts.map +1 -0
- package/build/esm/cc/InclusionControllerCC.js +133 -0
- package/build/esm/cc/InclusionControllerCC.js.map +1 -0
- package/build/esm/cc/IndicatorCC.d.ts +338 -0
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -0
- package/build/esm/cc/IndicatorCC.js +1317 -0
- package/build/esm/cc/IndicatorCC.js.map +1 -0
- package/build/esm/cc/IrrigationCC.d.ts +1496 -0
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -0
- package/build/esm/cc/IrrigationCC.js +2038 -0
- package/build/esm/cc/IrrigationCC.js.map +1 -0
- package/build/esm/cc/LanguageCC.d.ts +101 -0
- package/build/esm/cc/LanguageCC.d.ts.map +1 -0
- package/build/esm/cc/LanguageCC.js +243 -0
- package/build/esm/cc/LanguageCC.js.map +1 -0
- package/build/esm/cc/LockCC.d.ts +73 -0
- package/build/esm/cc/LockCC.d.ts.map +1 -0
- package/build/esm/cc/LockCC.js +197 -0
- package/build/esm/cc/LockCC.js.map +1 -0
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts +32 -0
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -0
- package/build/esm/cc/ManufacturerProprietaryCC.js +201 -0
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -0
- package/build/esm/cc/ManufacturerSpecificCC.d.ts +171 -0
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -0
- package/build/esm/cc/ManufacturerSpecificCC.js +315 -0
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -0
- package/build/esm/cc/MeterCC.d.ts +318 -0
- package/build/esm/cc/MeterCC.d.ts.map +1 -0
- package/build/esm/cc/MeterCC.js +1308 -0
- package/build/esm/cc/MeterCC.js.map +1 -0
- package/build/esm/cc/MultiChannelAssociationCC.d.ts +241 -0
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -0
- package/build/esm/cc/MultiChannelAssociationCC.js +981 -0
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -0
- package/build/esm/cc/MultiChannelCC.d.ts +394 -0
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -0
- package/build/esm/cc/MultiChannelCC.js +1127 -0
- package/build/esm/cc/MultiChannelCC.js.map +1 -0
- package/build/esm/cc/MultiCommandCC.d.ts +27 -0
- package/build/esm/cc/MultiCommandCC.d.ts.map +1 -0
- package/build/esm/cc/MultiCommandCC.js +142 -0
- package/build/esm/cc/MultiCommandCC.js.map +1 -0
- package/build/esm/cc/MultilevelSensorCC.d.ts +185 -0
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -0
- package/build/esm/cc/MultilevelSensorCC.js +753 -0
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -0
- package/build/esm/cc/MultilevelSwitchCC.d.ts +357 -0
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -0
- package/build/esm/cc/MultilevelSwitchCC.js +810 -0
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -0
- package/build/esm/cc/NoOperationCC.d.ts +9 -0
- package/build/esm/cc/NoOperationCC.d.ts.map +1 -0
- package/build/esm/cc/NoOperationCC.js +39 -0
- package/build/esm/cc/NoOperationCC.js.map +1 -0
- package/build/esm/cc/NodeNamingCC.d.ts +118 -0
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -0
- package/build/esm/cc/NodeNamingCC.js +345 -0
- package/build/esm/cc/NodeNamingCC.js.map +1 -0
- package/build/esm/cc/NotificationCC.d.ts +479 -0
- package/build/esm/cc/NotificationCC.d.ts.map +1 -0
- package/build/esm/cc/NotificationCC.js +1350 -0
- package/build/esm/cc/NotificationCC.js.map +1 -0
- package/build/esm/cc/PowerlevelCC.d.ts +82 -0
- package/build/esm/cc/PowerlevelCC.d.ts.map +1 -0
- package/build/esm/cc/PowerlevelCC.js +485 -0
- package/build/esm/cc/PowerlevelCC.js.map +1 -0
- package/build/esm/cc/ProtectionCC.d.ts +325 -0
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -0
- package/build/esm/cc/ProtectionCC.js +669 -0
- package/build/esm/cc/ProtectionCC.js.map +1 -0
- package/build/esm/cc/SceneActivationCC.d.ts +89 -0
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -0
- package/build/esm/cc/SceneActivationCC.js +166 -0
- package/build/esm/cc/SceneActivationCC.js.map +1 -0
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +120 -0
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -0
- package/build/esm/cc/SceneActuatorConfigurationCC.js +374 -0
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -0
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts +129 -0
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -0
- package/build/esm/cc/SceneControllerConfigurationCC.js +446 -0
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -0
- package/build/esm/cc/ScheduleEntryLockCC.d.ts +434 -0
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -0
- package/build/esm/cc/ScheduleEntryLockCC.js +1826 -0
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -0
- package/build/esm/cc/Security2CC.d.ts +251 -0
- package/build/esm/cc/Security2CC.d.ts.map +1 -0
- package/build/esm/cc/Security2CC.js +1814 -0
- package/build/esm/cc/Security2CC.js.map +1 -0
- package/build/esm/cc/SecurityCC.d.ts +128 -0
- package/build/esm/cc/SecurityCC.d.ts.map +1 -0
- package/build/esm/cc/SecurityCC.js +800 -0
- package/build/esm/cc/SecurityCC.js.map +1 -0
- package/build/esm/cc/SoundSwitchCC.d.ts +232 -0
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -0
- package/build/esm/cc/SoundSwitchCC.js +633 -0
- package/build/esm/cc/SoundSwitchCC.js.map +1 -0
- package/build/esm/cc/SupervisionCC.d.ts +104 -0
- package/build/esm/cc/SupervisionCC.d.ts.map +1 -0
- package/build/esm/cc/SupervisionCC.js +319 -0
- package/build/esm/cc/SupervisionCC.js.map +1 -0
- package/build/esm/cc/ThermostatFanModeCC.d.ts +141 -0
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatFanModeCC.js +359 -0
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -0
- package/build/esm/cc/ThermostatFanStateCC.d.ts +60 -0
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatFanStateCC.js +139 -0
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -0
- package/build/esm/cc/ThermostatModeCC.d.ts +150 -0
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatModeCC.js +426 -0
- package/build/esm/cc/ThermostatModeCC.js.map +1 -0
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts +61 -0
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatOperatingStateCC.js +135 -0
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -0
- package/build/esm/cc/ThermostatSetbackCC.d.ts +46 -0
- package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatSetbackCC.js +244 -0
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -0
- package/build/esm/cc/ThermostatSetpointCC.d.ts +197 -0
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatSetpointCC.js +655 -0
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -0
- package/build/esm/cc/TimeCC.d.ts +88 -0
- package/build/esm/cc/TimeCC.d.ts.map +1 -0
- package/build/esm/cc/TimeCC.js +451 -0
- package/build/esm/cc/TimeCC.js.map +1 -0
- package/build/esm/cc/TimeParametersCC.d.ts +72 -0
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -0
- package/build/esm/cc/TimeParametersCC.js +300 -0
- package/build/esm/cc/TimeParametersCC.js.map +1 -0
- package/build/esm/cc/TransportServiceCC.d.ts +107 -0
- package/build/esm/cc/TransportServiceCC.d.ts.map +1 -0
- package/build/esm/cc/TransportServiceCC.js +422 -0
- package/build/esm/cc/TransportServiceCC.js.map +1 -0
- package/build/esm/cc/UserCodeCC.d.ts +683 -0
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -0
- package/build/esm/cc/UserCodeCC.js +1695 -0
- package/build/esm/cc/UserCodeCC.js.map +1 -0
- package/build/esm/cc/VersionCC.d.ts +469 -0
- package/build/esm/cc/VersionCC.d.ts.map +1 -0
- package/build/esm/cc/VersionCC.js +862 -0
- package/build/esm/cc/VersionCC.js.map +1 -0
- package/build/esm/cc/WakeUpCC.d.ts +150 -0
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -0
- package/build/esm/cc/WakeUpCC.js +438 -0
- package/build/esm/cc/WakeUpCC.js.map +1 -0
- package/build/esm/cc/WindowCoveringCC.d.ts +315 -0
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -0
- package/build/esm/cc/WindowCoveringCC.js +780 -0
- package/build/esm/cc/WindowCoveringCC.js.map +1 -0
- package/build/esm/cc/ZWaveLongRangeCC.d.ts +4 -0
- package/build/esm/cc/ZWaveLongRangeCC.d.ts.map +1 -0
- package/build/esm/cc/ZWaveLongRangeCC.js +17 -0
- package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -0
- package/build/esm/cc/ZWavePlusCC.d.ts +163 -0
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -0
- package/build/esm/cc/ZWavePlusCC.js +267 -0
- package/build/esm/cc/ZWavePlusCC.js.map +1 -0
- package/build/esm/cc/ZWaveProtocolCC.d.ts +344 -0
- package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -0
- package/build/esm/cc/ZWaveProtocolCC.js +1030 -0
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -0
- package/build/esm/cc/index.d.ts +132 -0
- package/build/esm/cc/index.d.ts.map +1 -0
- package/build/esm/cc/index.js +71 -0
- package/build/esm/cc/index.js.map +1 -0
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +64 -0
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -0
- package/build/esm/cc/manufacturerProprietary/Decorators.js +79 -0
- package/build/esm/cc/manufacturerProprietary/Decorators.js.map +1 -0
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +79 -0
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -0
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +385 -0
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -0
- package/build/esm/index.d.ts +15 -0
- package/build/esm/index.d.ts.map +1 -0
- package/build/esm/index.js +14 -0
- package/build/esm/index.js.map +1 -0
- package/build/esm/index_safe.d.ts +3 -0
- package/build/esm/index_safe.d.ts.map +1 -0
- package/build/esm/index_safe.js +4 -0
- package/build/esm/index_safe.js.map +1 -0
- package/build/esm/lib/API.d.ts +271 -0
- package/build/esm/lib/API.d.ts.map +1 -0
- package/build/esm/lib/API.js +448 -0
- package/build/esm/lib/API.js.map +1 -0
- package/build/esm/lib/CommandClass.d.ts +234 -0
- package/build/esm/lib/CommandClass.d.ts.map +1 -0
- package/build/esm/lib/CommandClass.js +781 -0
- package/build/esm/lib/CommandClass.js.map +1 -0
- package/build/esm/lib/CommandClassDecorators.d.ts +112 -0
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -0
- package/build/esm/lib/CommandClassDecorators.js +229 -0
- package/build/esm/lib/CommandClassDecorators.js.map +1 -0
- package/build/esm/lib/EncapsulatingCommandClass.d.ts +22 -0
- package/build/esm/lib/EncapsulatingCommandClass.d.ts.map +1 -0
- package/build/esm/lib/EncapsulatingCommandClass.js +56 -0
- package/build/esm/lib/EncapsulatingCommandClass.js.map +1 -0
- package/build/esm/lib/ICommandClassContainer.d.ts +2 -0
- package/build/esm/lib/ICommandClassContainer.d.ts.map +1 -0
- package/build/esm/lib/ICommandClassContainer.js +2 -0
- package/build/esm/lib/ICommandClassContainer.js.map +1 -0
- package/build/esm/lib/NotificationEventPayload.d.ts +10 -0
- package/build/esm/lib/NotificationEventPayload.d.ts.map +1 -0
- package/build/esm/lib/NotificationEventPayload.js +7 -0
- package/build/esm/lib/NotificationEventPayload.js.map +1 -0
- package/build/esm/lib/Security2/Extension.d.ts +106 -0
- package/build/esm/lib/Security2/Extension.d.ts.map +1 -0
- package/build/esm/lib/Security2/Extension.js +296 -0
- package/build/esm/lib/Security2/Extension.js.map +1 -0
- package/build/esm/lib/Security2/shared.d.ts +37 -0
- package/build/esm/lib/Security2/shared.d.ts.map +1 -0
- package/build/esm/lib/Security2/shared.js +40 -0
- package/build/esm/lib/Security2/shared.js.map +1 -0
- package/build/esm/lib/SetValueResult.d.ts +55 -0
- package/build/esm/lib/SetValueResult.d.ts.map +1 -0
- package/build/esm/lib/SetValueResult.js +53 -0
- package/build/esm/lib/SetValueResult.js.map +1 -0
- package/build/esm/lib/Values.d.ts +223 -0
- package/build/esm/lib/Values.d.ts.map +1 -0
- package/build/esm/lib/Values.js +169 -0
- package/build/esm/lib/Values.js.map +1 -0
- package/build/esm/lib/_Types.d.ts +1461 -0
- package/build/esm/lib/_Types.d.ts.map +1 -0
- package/build/esm/lib/_Types.js +1432 -0
- package/build/esm/lib/_Types.js.map +1 -0
- package/build/esm/lib/serializers.d.ts +34 -0
- package/build/esm/lib/serializers.d.ts.map +1 -0
- package/build/esm/lib/serializers.js +98 -0
- package/build/esm/lib/serializers.js.map +1 -0
- package/build/esm/lib/utils.d.ts +17 -0
- package/build/esm/lib/utils.d.ts.map +1 -0
- package/build/esm/lib/utils.js +847 -0
- package/build/esm/lib/utils.js.map +1 -0
- package/build/esm/package.json +3 -0
- package/package.json +28 -23
- package/build/cc/AlarmSensorCC.d.ts +0 -194
- package/build/cc/AlarmSensorCC.d.ts.map +0 -1
- package/build/cc/AlarmSensorCC.js +0 -395
- package/build/cc/AlarmSensorCC.js.map +0 -1
- package/build/cc/AssociationCC.d.ts +0 -253
- package/build/cc/AssociationCC.d.ts.map +0 -1
- package/build/cc/AssociationCC.js +0 -732
- package/build/cc/AssociationCC.js.map +0 -1
- package/build/cc/AssociationGroupInfoCC.d.ts +0 -230
- package/build/cc/AssociationGroupInfoCC.d.ts.map +0 -1
- package/build/cc/AssociationGroupInfoCC.js +0 -772
- package/build/cc/AssociationGroupInfoCC.js.map +0 -1
- package/build/cc/BarrierOperatorCC.d.ts +0 -243
- package/build/cc/BarrierOperatorCC.d.ts.map +0 -1
- package/build/cc/BarrierOperatorCC.js +0 -613
- package/build/cc/BarrierOperatorCC.js.map +0 -1
- package/build/cc/BasicCC.d.ts +0 -191
- package/build/cc/BasicCC.d.ts.map +0 -1
- package/build/cc/BasicCC.js +0 -393
- package/build/cc/BasicCC.js.map +0 -1
- package/build/cc/BatteryCC.d.ts +0 -406
- package/build/cc/BatteryCC.d.ts.map +0 -1
- package/build/cc/BatteryCC.js +0 -516
- package/build/cc/BatteryCC.js.map +0 -1
- package/build/cc/BinarySensorCC.d.ts +0 -122
- package/build/cc/BinarySensorCC.d.ts.map +0 -1
- package/build/cc/BinarySensorCC.js +0 -420
- package/build/cc/BinarySensorCC.js.map +0 -1
- package/build/cc/BinarySwitchCC.d.ts +0 -139
- package/build/cc/BinarySwitchCC.d.ts.map +0 -1
- package/build/cc/BinarySwitchCC.js +0 -365
- package/build/cc/BinarySwitchCC.js.map +0 -1
- package/build/cc/CRC16CC.d.ts +0 -29
- package/build/cc/CRC16CC.d.ts.map +0 -1
- package/build/cc/CRC16CC.js +0 -126
- package/build/cc/CRC16CC.js.map +0 -1
- package/build/cc/CentralSceneCC.d.ts +0 -210
- package/build/cc/CentralSceneCC.d.ts.map +0 -1
- package/build/cc/CentralSceneCC.js +0 -453
- package/build/cc/CentralSceneCC.js.map +0 -1
- package/build/cc/ClimateControlScheduleCC.d.ts +0 -177
- package/build/cc/ClimateControlScheduleCC.d.ts.map +0 -1
- package/build/cc/ClimateControlScheduleCC.js +0 -469
- package/build/cc/ClimateControlScheduleCC.js.map +0 -1
- package/build/cc/ClockCC.d.ts +0 -47
- package/build/cc/ClockCC.d.ts.map +0 -1
- package/build/cc/ClockCC.js +0 -208
- package/build/cc/ClockCC.js.map +0 -1
- package/build/cc/ColorSwitchCC.d.ts +0 -339
- package/build/cc/ColorSwitchCC.d.ts.map +0 -1
- package/build/cc/ColorSwitchCC.js +0 -1152
- package/build/cc/ColorSwitchCC.js.map +0 -1
- package/build/cc/ConfigurationCC.d.ts +0 -396
- package/build/cc/ConfigurationCC.d.ts.map +0 -1
- package/build/cc/ConfigurationCC.js +0 -2458
- package/build/cc/ConfigurationCC.js.map +0 -1
- package/build/cc/DeviceResetLocallyCC.d.ts +0 -17
- package/build/cc/DeviceResetLocallyCC.d.ts.map +0 -1
- package/build/cc/DeviceResetLocallyCC.js +0 -76
- package/build/cc/DeviceResetLocallyCC.js.map +0 -1
- package/build/cc/DoorLockCC.d.ts +0 -837
- package/build/cc/DoorLockCC.d.ts.map +0 -1
- package/build/cc/DoorLockCC.js +0 -1273
- package/build/cc/DoorLockCC.js.map +0 -1
- package/build/cc/DoorLockLoggingCC.d.ts +0 -77
- package/build/cc/DoorLockLoggingCC.d.ts.map +0 -1
- package/build/cc/DoorLockLoggingCC.js +0 -319
- package/build/cc/DoorLockLoggingCC.js.map +0 -1
- package/build/cc/EnergyProductionCC.d.ts +0 -77
- package/build/cc/EnergyProductionCC.d.ts.map +0 -1
- package/build/cc/EnergyProductionCC.js +0 -216
- package/build/cc/EnergyProductionCC.js.map +0 -1
- package/build/cc/EntryControlCC.d.ts +0 -231
- package/build/cc/EntryControlCC.d.ts.map +0 -1
- package/build/cc/EntryControlCC.js +0 -607
- package/build/cc/EntryControlCC.js.map +0 -1
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts +0 -359
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts.map +0 -1
- package/build/cc/FirmwareUpdateMetaDataCC.js +0 -1145
- package/build/cc/FirmwareUpdateMetaDataCC.js.map +0 -1
- package/build/cc/HailCC.d.ts +0 -6
- package/build/cc/HailCC.d.ts.map +0 -1
- package/build/cc/HailCC.js +0 -24
- package/build/cc/HailCC.js.map +0 -1
- package/build/cc/HumidityControlModeCC.d.ts +0 -111
- package/build/cc/HumidityControlModeCC.d.ts.map +0 -1
- package/build/cc/HumidityControlModeCC.js +0 -308
- package/build/cc/HumidityControlModeCC.js.map +0 -1
- package/build/cc/HumidityControlOperatingStateCC.d.ts +0 -60
- package/build/cc/HumidityControlOperatingStateCC.d.ts.map +0 -1
- package/build/cc/HumidityControlOperatingStateCC.js +0 -140
- package/build/cc/HumidityControlOperatingStateCC.js.map +0 -1
- package/build/cc/HumidityControlSetpointCC.d.ts +0 -209
- package/build/cc/HumidityControlSetpointCC.d.ts.map +0 -1
- package/build/cc/HumidityControlSetpointCC.js +0 -648
- package/build/cc/HumidityControlSetpointCC.js.map +0 -1
- package/build/cc/InclusionControllerCC.d.ts +0 -42
- package/build/cc/InclusionControllerCC.d.ts.map +0 -1
- package/build/cc/InclusionControllerCC.js +0 -136
- package/build/cc/InclusionControllerCC.js.map +0 -1
- package/build/cc/IndicatorCC.d.ts +0 -338
- package/build/cc/IndicatorCC.d.ts.map +0 -1
- package/build/cc/IndicatorCC.js +0 -1320
- package/build/cc/IndicatorCC.js.map +0 -1
- package/build/cc/IrrigationCC.d.ts +0 -1496
- package/build/cc/IrrigationCC.d.ts.map +0 -1
- package/build/cc/IrrigationCC.js +0 -2041
- package/build/cc/IrrigationCC.js.map +0 -1
- package/build/cc/LanguageCC.d.ts +0 -101
- package/build/cc/LanguageCC.d.ts.map +0 -1
- package/build/cc/LanguageCC.js +0 -246
- package/build/cc/LanguageCC.js.map +0 -1
- package/build/cc/LockCC.d.ts +0 -73
- package/build/cc/LockCC.d.ts.map +0 -1
- package/build/cc/LockCC.js +0 -200
- package/build/cc/LockCC.js.map +0 -1
- package/build/cc/ManufacturerProprietaryCC.d.ts +0 -32
- package/build/cc/ManufacturerProprietaryCC.d.ts.map +0 -1
- package/build/cc/ManufacturerProprietaryCC.js +0 -204
- package/build/cc/ManufacturerProprietaryCC.js.map +0 -1
- package/build/cc/ManufacturerSpecificCC.d.ts +0 -171
- package/build/cc/ManufacturerSpecificCC.d.ts.map +0 -1
- package/build/cc/ManufacturerSpecificCC.js +0 -318
- package/build/cc/ManufacturerSpecificCC.js.map +0 -1
- package/build/cc/MeterCC.d.ts +0 -318
- package/build/cc/MeterCC.d.ts.map +0 -1
- package/build/cc/MeterCC.js +0 -1312
- package/build/cc/MeterCC.js.map +0 -1
- package/build/cc/MultiChannelAssociationCC.d.ts +0 -241
- package/build/cc/MultiChannelAssociationCC.d.ts.map +0 -1
- package/build/cc/MultiChannelAssociationCC.js +0 -1007
- package/build/cc/MultiChannelAssociationCC.js.map +0 -1
- package/build/cc/MultiChannelCC.d.ts +0 -394
- package/build/cc/MultiChannelCC.d.ts.map +0 -1
- package/build/cc/MultiChannelCC.js +0 -1130
- package/build/cc/MultiChannelCC.js.map +0 -1
- package/build/cc/MultiCommandCC.d.ts +0 -27
- package/build/cc/MultiCommandCC.d.ts.map +0 -1
- package/build/cc/MultiCommandCC.js +0 -145
- package/build/cc/MultiCommandCC.js.map +0 -1
- package/build/cc/MultilevelSensorCC.d.ts +0 -185
- package/build/cc/MultilevelSensorCC.d.ts.map +0 -1
- package/build/cc/MultilevelSensorCC.js +0 -756
- package/build/cc/MultilevelSensorCC.js.map +0 -1
- package/build/cc/MultilevelSwitchCC.d.ts +0 -357
- package/build/cc/MultilevelSwitchCC.d.ts.map +0 -1
- package/build/cc/MultilevelSwitchCC.js +0 -813
- package/build/cc/MultilevelSwitchCC.js.map +0 -1
- package/build/cc/NoOperationCC.d.ts +0 -9
- package/build/cc/NoOperationCC.d.ts.map +0 -1
- package/build/cc/NoOperationCC.js +0 -42
- package/build/cc/NoOperationCC.js.map +0 -1
- package/build/cc/NodeNamingCC.d.ts +0 -118
- package/build/cc/NodeNamingCC.d.ts.map +0 -1
- package/build/cc/NodeNamingCC.js +0 -348
- package/build/cc/NodeNamingCC.js.map +0 -1
- package/build/cc/NotificationCC.d.ts +0 -479
- package/build/cc/NotificationCC.d.ts.map +0 -1
- package/build/cc/NotificationCC.js +0 -1379
- package/build/cc/NotificationCC.js.map +0 -1
- package/build/cc/PowerlevelCC.d.ts +0 -82
- package/build/cc/PowerlevelCC.d.ts.map +0 -1
- package/build/cc/PowerlevelCC.js +0 -488
- package/build/cc/PowerlevelCC.js.map +0 -1
- package/build/cc/ProtectionCC.d.ts +0 -325
- package/build/cc/ProtectionCC.d.ts.map +0 -1
- package/build/cc/ProtectionCC.js +0 -672
- package/build/cc/ProtectionCC.js.map +0 -1
- package/build/cc/SceneActivationCC.d.ts +0 -89
- package/build/cc/SceneActivationCC.d.ts.map +0 -1
- package/build/cc/SceneActivationCC.js +0 -169
- package/build/cc/SceneActivationCC.js.map +0 -1
- package/build/cc/SceneActuatorConfigurationCC.d.ts +0 -120
- package/build/cc/SceneActuatorConfigurationCC.d.ts.map +0 -1
- package/build/cc/SceneActuatorConfigurationCC.js +0 -377
- package/build/cc/SceneActuatorConfigurationCC.js.map +0 -1
- package/build/cc/SceneControllerConfigurationCC.d.ts +0 -129
- package/build/cc/SceneControllerConfigurationCC.d.ts.map +0 -1
- package/build/cc/SceneControllerConfigurationCC.js +0 -449
- package/build/cc/SceneControllerConfigurationCC.js.map +0 -1
- package/build/cc/ScheduleEntryLockCC.d.ts +0 -434
- package/build/cc/ScheduleEntryLockCC.d.ts.map +0 -1
- package/build/cc/ScheduleEntryLockCC.js +0 -1829
- package/build/cc/ScheduleEntryLockCC.js.map +0 -1
- package/build/cc/Security2CC.d.ts +0 -251
- package/build/cc/Security2CC.d.ts.map +0 -1
- package/build/cc/Security2CC.js +0 -1817
- package/build/cc/Security2CC.js.map +0 -1
- package/build/cc/SecurityCC.d.ts +0 -128
- package/build/cc/SecurityCC.d.ts.map +0 -1
- package/build/cc/SecurityCC.js +0 -803
- package/build/cc/SecurityCC.js.map +0 -1
- package/build/cc/SoundSwitchCC.d.ts +0 -232
- package/build/cc/SoundSwitchCC.d.ts.map +0 -1
- package/build/cc/SoundSwitchCC.js +0 -636
- package/build/cc/SoundSwitchCC.js.map +0 -1
- package/build/cc/SupervisionCC.d.ts +0 -104
- package/build/cc/SupervisionCC.d.ts.map +0 -1
- package/build/cc/SupervisionCC.js +0 -322
- package/build/cc/SupervisionCC.js.map +0 -1
- package/build/cc/ThermostatFanModeCC.d.ts +0 -141
- package/build/cc/ThermostatFanModeCC.d.ts.map +0 -1
- package/build/cc/ThermostatFanModeCC.js +0 -362
- package/build/cc/ThermostatFanModeCC.js.map +0 -1
- package/build/cc/ThermostatFanStateCC.d.ts +0 -60
- package/build/cc/ThermostatFanStateCC.d.ts.map +0 -1
- package/build/cc/ThermostatFanStateCC.js +0 -142
- package/build/cc/ThermostatFanStateCC.js.map +0 -1
- package/build/cc/ThermostatModeCC.d.ts +0 -150
- package/build/cc/ThermostatModeCC.d.ts.map +0 -1
- package/build/cc/ThermostatModeCC.js +0 -429
- package/build/cc/ThermostatModeCC.js.map +0 -1
- package/build/cc/ThermostatOperatingStateCC.d.ts +0 -61
- package/build/cc/ThermostatOperatingStateCC.d.ts.map +0 -1
- package/build/cc/ThermostatOperatingStateCC.js +0 -138
- package/build/cc/ThermostatOperatingStateCC.js.map +0 -1
- package/build/cc/ThermostatSetbackCC.d.ts +0 -46
- package/build/cc/ThermostatSetbackCC.d.ts.map +0 -1
- package/build/cc/ThermostatSetbackCC.js +0 -247
- package/build/cc/ThermostatSetbackCC.js.map +0 -1
- package/build/cc/ThermostatSetpointCC.d.ts +0 -197
- package/build/cc/ThermostatSetpointCC.d.ts.map +0 -1
- package/build/cc/ThermostatSetpointCC.js +0 -658
- package/build/cc/ThermostatSetpointCC.js.map +0 -1
- package/build/cc/TimeCC.d.ts +0 -88
- package/build/cc/TimeCC.d.ts.map +0 -1
- package/build/cc/TimeCC.js +0 -454
- package/build/cc/TimeCC.js.map +0 -1
- package/build/cc/TimeParametersCC.d.ts +0 -72
- package/build/cc/TimeParametersCC.d.ts.map +0 -1
- package/build/cc/TimeParametersCC.js +0 -303
- package/build/cc/TimeParametersCC.js.map +0 -1
- package/build/cc/TransportServiceCC.d.ts +0 -107
- package/build/cc/TransportServiceCC.d.ts.map +0 -1
- package/build/cc/TransportServiceCC.js +0 -426
- package/build/cc/TransportServiceCC.js.map +0 -1
- package/build/cc/UserCodeCC.d.ts +0 -683
- package/build/cc/UserCodeCC.d.ts.map +0 -1
- package/build/cc/UserCodeCC.js +0 -1699
- package/build/cc/UserCodeCC.js.map +0 -1
- package/build/cc/VersionCC.d.ts +0 -469
- package/build/cc/VersionCC.d.ts.map +0 -1
- package/build/cc/VersionCC.js +0 -865
- package/build/cc/VersionCC.js.map +0 -1
- package/build/cc/WakeUpCC.d.ts +0 -150
- package/build/cc/WakeUpCC.d.ts.map +0 -1
- package/build/cc/WakeUpCC.js +0 -441
- package/build/cc/WakeUpCC.js.map +0 -1
- package/build/cc/WindowCoveringCC.d.ts +0 -315
- package/build/cc/WindowCoveringCC.d.ts.map +0 -1
- package/build/cc/WindowCoveringCC.js +0 -783
- package/build/cc/WindowCoveringCC.js.map +0 -1
- package/build/cc/ZWaveLongRangeCC.d.ts +0 -4
- package/build/cc/ZWaveLongRangeCC.d.ts.map +0 -1
- package/build/cc/ZWaveLongRangeCC.js +0 -20
- package/build/cc/ZWaveLongRangeCC.js.map +0 -1
- package/build/cc/ZWavePlusCC.d.ts +0 -163
- package/build/cc/ZWavePlusCC.d.ts.map +0 -1
- package/build/cc/ZWavePlusCC.js +0 -270
- package/build/cc/ZWavePlusCC.js.map +0 -1
- package/build/cc/ZWaveProtocolCC.d.ts +0 -344
- package/build/cc/ZWaveProtocolCC.d.ts.map +0 -1
- package/build/cc/ZWaveProtocolCC.js +0 -1033
- package/build/cc/ZWaveProtocolCC.js.map +0 -1
- package/build/cc/index.d.ts +0 -132
- package/build/cc/index.d.ts.map +0 -1
- package/build/cc/index.js +0 -627
- package/build/cc/index.js.map +0 -1
- package/build/cc/manufacturerProprietary/Decorators.d.ts +0 -64
- package/build/cc/manufacturerProprietary/Decorators.d.ts.map +0 -1
- package/build/cc/manufacturerProprietary/Decorators.js +0 -83
- package/build/cc/manufacturerProprietary/Decorators.js.map +0 -1
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts +0 -79
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts.map +0 -1
- package/build/cc/manufacturerProprietary/FibaroCC.js +0 -392
- package/build/cc/manufacturerProprietary/FibaroCC.js.map +0 -1
- package/build/index.d.ts +0 -15
- package/build/index.d.ts.map +0 -1
- package/build/index.js +0 -52
- package/build/index.js.map +0 -1
- package/build/index_safe.d.ts +0 -3
- package/build/index_safe.d.ts.map +0 -1
- package/build/index_safe.js +0 -20
- package/build/index_safe.js.map +0 -1
- package/build/lib/API.d.ts +0 -271
- package/build/lib/API.d.ts.map +0 -1
- package/build/lib/API.js +0 -458
- package/build/lib/API.js.map +0 -1
- package/build/lib/CommandClass.d.ts +0 -234
- package/build/lib/CommandClass.d.ts.map +0 -1
- package/build/lib/CommandClass.js +0 -788
- package/build/lib/CommandClass.js.map +0 -1
- package/build/lib/CommandClassDecorators.d.ts +0 -112
- package/build/lib/CommandClassDecorators.d.ts.map +0 -1
- package/build/lib/CommandClassDecorators.js +0 -243
- package/build/lib/CommandClassDecorators.js.map +0 -1
- package/build/lib/EncapsulatingCommandClass.d.ts +0 -22
- package/build/lib/EncapsulatingCommandClass.d.ts.map +0 -1
- package/build/lib/EncapsulatingCommandClass.js +0 -61
- package/build/lib/EncapsulatingCommandClass.js.map +0 -1
- package/build/lib/ICommandClassContainer.d.ts.map +0 -1
- package/build/lib/ICommandClassContainer.js +0 -3
- package/build/lib/ICommandClassContainer.js.map +0 -1
- package/build/lib/NotificationEventPayload.d.ts +0 -10
- package/build/lib/NotificationEventPayload.d.ts.map +0 -1
- package/build/lib/NotificationEventPayload.js +0 -10
- package/build/lib/NotificationEventPayload.js.map +0 -1
- package/build/lib/Security2/Extension.d.ts.map +0 -1
- package/build/lib/Security2/Extension.js +0 -303
- package/build/lib/Security2/Extension.js.map +0 -1
- package/build/lib/Security2/shared.d.ts.map +0 -1
- package/build/lib/Security2/shared.js +0 -43
- package/build/lib/Security2/shared.js.map +0 -1
- package/build/lib/SetValueResult.d.ts.map +0 -1
- package/build/lib/SetValueResult.js +0 -60
- package/build/lib/SetValueResult.js.map +0 -1
- package/build/lib/Values.d.ts +0 -223
- package/build/lib/Values.d.ts.map +0 -1
- package/build/lib/Values.js +0 -172
- package/build/lib/Values.js.map +0 -1
- package/build/lib/_Types.d.ts.map +0 -1
- package/build/lib/_Types.js +0 -1443
- package/build/lib/_Types.js.map +0 -1
- package/build/lib/serializers.d.ts +0 -34
- package/build/lib/serializers.d.ts.map +0 -1
- package/build/lib/serializers.js +0 -107
- package/build/lib/serializers.js.map +0 -1
- package/build/lib/utils.d.ts +0 -17
- package/build/lib/utils.d.ts.map +0 -1
- package/build/lib/utils.js +0 -860
- package/build/lib/utils.js.map +0 -1
- /package/build/{lib → cjs/lib}/ICommandClassContainer.d.ts +0 -0
- /package/build/{lib → cjs/lib}/Security2/Extension.d.ts +0 -0
- /package/build/{lib → cjs/lib}/Security2/shared.d.ts +0 -0
- /package/build/{lib → cjs/lib}/SetValueResult.d.ts +0 -0
- /package/build/{lib → cjs/lib}/_Types.d.ts +0 -0
|
@@ -0,0 +1,2230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var ConfigurationCC_exports = {};
|
|
20
|
+
__export(ConfigurationCC_exports, {
|
|
21
|
+
ConfigurationCC: () => ConfigurationCC,
|
|
22
|
+
ConfigurationCCAPI: () => ConfigurationCCAPI,
|
|
23
|
+
ConfigurationCCBulkGet: () => ConfigurationCCBulkGet,
|
|
24
|
+
ConfigurationCCBulkReport: () => ConfigurationCCBulkReport,
|
|
25
|
+
ConfigurationCCBulkSet: () => ConfigurationCCBulkSet,
|
|
26
|
+
ConfigurationCCDefaultReset: () => ConfigurationCCDefaultReset,
|
|
27
|
+
ConfigurationCCError: () => ConfigurationCCError,
|
|
28
|
+
ConfigurationCCGet: () => ConfigurationCCGet,
|
|
29
|
+
ConfigurationCCInfoGet: () => ConfigurationCCInfoGet,
|
|
30
|
+
ConfigurationCCInfoReport: () => ConfigurationCCInfoReport,
|
|
31
|
+
ConfigurationCCNameGet: () => ConfigurationCCNameGet,
|
|
32
|
+
ConfigurationCCNameReport: () => ConfigurationCCNameReport,
|
|
33
|
+
ConfigurationCCPropertiesGet: () => ConfigurationCCPropertiesGet,
|
|
34
|
+
ConfigurationCCPropertiesReport: () => ConfigurationCCPropertiesReport,
|
|
35
|
+
ConfigurationCCReport: () => ConfigurationCCReport,
|
|
36
|
+
ConfigurationCCSet: () => ConfigurationCCSet,
|
|
37
|
+
ConfigurationCCValues: () => ConfigurationCCValues
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(ConfigurationCC_exports);
|
|
40
|
+
var import_safe = require("@zwave-js/core/safe");
|
|
41
|
+
var import_safe2 = require("@zwave-js/shared/safe");
|
|
42
|
+
var import_safe3 = require("@zwave-js/shared/safe");
|
|
43
|
+
var import_arrays = require("alcalzone-shared/arrays/index.js");
|
|
44
|
+
var import_objects = require("alcalzone-shared/objects/index.js");
|
|
45
|
+
var import_strings = require("alcalzone-shared/strings/index.js");
|
|
46
|
+
var import_API = require("../lib/API.js");
|
|
47
|
+
var import_CommandClass = require("../lib/CommandClass.js");
|
|
48
|
+
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
49
|
+
var import_Values = require("../lib/Values.js");
|
|
50
|
+
var import_Types = require("../lib/_Types.js");
|
|
51
|
+
var __decorate = function(decorators, target, key, desc) {
|
|
52
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
53
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
54
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
55
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
56
|
+
};
|
|
57
|
+
var ConfigurationCCReport_1, ConfigurationCCGet_1, ConfigurationCCSet_1, ConfigurationCCBulkReport_1, ConfigurationCCNameReport_1, ConfigurationCCNameGet_1, ConfigurationCCInfoReport_1, ConfigurationCCInfoGet_1, ConfigurationCCPropertiesReport_1, ConfigurationCCPropertiesGet_1;
|
|
58
|
+
function __assertType(argName, typeName, boundHasError) {
|
|
59
|
+
const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
|
|
60
|
+
if (boundHasError()) {
|
|
61
|
+
throw new ZWaveError2(typeName ? `${argName} is not a ${typeName}` : `${argName} has the wrong type`, ZWaveErrorCodes2.Argument_Invalid);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const __assertType__number = ($o) => {
|
|
65
|
+
function _number($o2) {
|
|
66
|
+
return typeof $o2 !== "number" ? {} : null;
|
|
67
|
+
}
|
|
68
|
+
return _number($o);
|
|
69
|
+
};
|
|
70
|
+
const __assertType__optional__0 = ($o) => {
|
|
71
|
+
function _number($o2) {
|
|
72
|
+
return typeof $o2 !== "number" ? {} : null;
|
|
73
|
+
}
|
|
74
|
+
function _boolean($o2) {
|
|
75
|
+
return typeof $o2 !== "boolean" ? {} : null;
|
|
76
|
+
}
|
|
77
|
+
function _0($o2) {
|
|
78
|
+
if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
|
|
79
|
+
return {};
|
|
80
|
+
if ("valueBitMask" in $o2 && $o2["valueBitMask"] !== void 0) {
|
|
81
|
+
const error = _number($o2["valueBitMask"]);
|
|
82
|
+
if (error)
|
|
83
|
+
return error;
|
|
84
|
+
}
|
|
85
|
+
if ("allowUnexpectedResponse" in $o2 && $o2["allowUnexpectedResponse"] !== void 0) {
|
|
86
|
+
const error = _boolean($o2["allowUnexpectedResponse"]);
|
|
87
|
+
if (error)
|
|
88
|
+
return error;
|
|
89
|
+
}
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
function optional__0($o2) {
|
|
93
|
+
if ($o2 !== void 0) {
|
|
94
|
+
const error = _0($o2);
|
|
95
|
+
if (error)
|
|
96
|
+
return error;
|
|
97
|
+
}
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
return optional__0($o);
|
|
101
|
+
};
|
|
102
|
+
const __assertType__sa__2_ea_2 = ($o) => {
|
|
103
|
+
function _number($o2) {
|
|
104
|
+
return typeof $o2 !== "number" ? {} : null;
|
|
105
|
+
}
|
|
106
|
+
function _2($o2) {
|
|
107
|
+
if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
|
|
108
|
+
return {};
|
|
109
|
+
if ("parameter" in $o2 && $o2["parameter"] !== void 0) {
|
|
110
|
+
const error = _number($o2["parameter"]);
|
|
111
|
+
if (error)
|
|
112
|
+
return error;
|
|
113
|
+
} else
|
|
114
|
+
return {};
|
|
115
|
+
if ("bitMask" in $o2 && $o2["bitMask"] !== void 0) {
|
|
116
|
+
const error = _number($o2["bitMask"]);
|
|
117
|
+
if (error)
|
|
118
|
+
return error;
|
|
119
|
+
}
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
function sa__2_ea_2($o2) {
|
|
123
|
+
if (!Array.isArray($o2))
|
|
124
|
+
return {};
|
|
125
|
+
for (let i = 0; i < $o2.length; i++) {
|
|
126
|
+
const error = _2($o2[i]);
|
|
127
|
+
if (error)
|
|
128
|
+
return error;
|
|
129
|
+
}
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
return sa__2_ea_2($o);
|
|
133
|
+
};
|
|
134
|
+
const __assertType__ConfigurationCCAPISetOptions = ($o) => {
|
|
135
|
+
function _number($o2) {
|
|
136
|
+
return typeof $o2 !== "number" ? {} : null;
|
|
137
|
+
}
|
|
138
|
+
function _2($o2) {
|
|
139
|
+
if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
|
|
140
|
+
return {};
|
|
141
|
+
if ("parameter" in $o2 && $o2["parameter"] !== void 0) {
|
|
142
|
+
const error = _number($o2["parameter"]);
|
|
143
|
+
if (error)
|
|
144
|
+
return error;
|
|
145
|
+
} else
|
|
146
|
+
return {};
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
function _undefined($o2) {
|
|
150
|
+
return $o2 !== void 0 ? {} : null;
|
|
151
|
+
}
|
|
152
|
+
function _3($o2) {
|
|
153
|
+
if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
|
|
154
|
+
return {};
|
|
155
|
+
if ("bitMask" in $o2 && $o2["bitMask"] !== void 0) {
|
|
156
|
+
const error = _undefined($o2["bitMask"]);
|
|
157
|
+
if (error)
|
|
158
|
+
return error;
|
|
159
|
+
}
|
|
160
|
+
if ("value" in $o2 && $o2["value"] !== void 0) {
|
|
161
|
+
const error = _number($o2["value"]);
|
|
162
|
+
if (error)
|
|
163
|
+
return error;
|
|
164
|
+
} else
|
|
165
|
+
return {};
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
function si__2__3_ei($o2) {
|
|
169
|
+
const conditions = [_2, _3];
|
|
170
|
+
for (const condition of conditions) {
|
|
171
|
+
const error = condition($o2);
|
|
172
|
+
if (error)
|
|
173
|
+
return error;
|
|
174
|
+
}
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
function _9($o2) {
|
|
178
|
+
return $o2 !== 1 ? {} : null;
|
|
179
|
+
}
|
|
180
|
+
function _10($o2) {
|
|
181
|
+
return $o2 !== 2 ? {} : null;
|
|
182
|
+
}
|
|
183
|
+
function _11($o2) {
|
|
184
|
+
return $o2 !== 4 ? {} : null;
|
|
185
|
+
}
|
|
186
|
+
function su__9__10__11_eu($o2) {
|
|
187
|
+
const conditions = [_9, _10, _11];
|
|
188
|
+
for (const condition of conditions) {
|
|
189
|
+
const error = condition($o2);
|
|
190
|
+
if (!error)
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
return {};
|
|
194
|
+
}
|
|
195
|
+
function su__13__14__15__16_eu($o2) {
|
|
196
|
+
return ![0, 1, 2, 3].includes($o2) ? {} : null;
|
|
197
|
+
}
|
|
198
|
+
function _5($o2) {
|
|
199
|
+
if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
|
|
200
|
+
return {};
|
|
201
|
+
if ("bitMask" in $o2 && $o2["bitMask"] !== void 0) {
|
|
202
|
+
const error = _undefined($o2["bitMask"]);
|
|
203
|
+
if (error)
|
|
204
|
+
return error;
|
|
205
|
+
}
|
|
206
|
+
if ("value" in $o2 && $o2["value"] !== void 0) {
|
|
207
|
+
const error = _number($o2["value"]);
|
|
208
|
+
if (error)
|
|
209
|
+
return error;
|
|
210
|
+
} else
|
|
211
|
+
return {};
|
|
212
|
+
if ("valueSize" in $o2 && $o2["valueSize"] !== void 0) {
|
|
213
|
+
const error = su__9__10__11_eu($o2["valueSize"]);
|
|
214
|
+
if (error)
|
|
215
|
+
return error;
|
|
216
|
+
} else
|
|
217
|
+
return {};
|
|
218
|
+
if ("valueFormat" in $o2 && $o2["valueFormat"] !== void 0) {
|
|
219
|
+
const error = su__13__14__15__16_eu($o2["valueFormat"]);
|
|
220
|
+
if (error)
|
|
221
|
+
return error;
|
|
222
|
+
} else
|
|
223
|
+
return {};
|
|
224
|
+
return null;
|
|
225
|
+
}
|
|
226
|
+
function si__2__5_ei($o2) {
|
|
227
|
+
const conditions = [_2, _5];
|
|
228
|
+
for (const condition of conditions) {
|
|
229
|
+
const error = condition($o2);
|
|
230
|
+
if (error)
|
|
231
|
+
return error;
|
|
232
|
+
}
|
|
233
|
+
return null;
|
|
234
|
+
}
|
|
235
|
+
function _7($o2) {
|
|
236
|
+
if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
|
|
237
|
+
return {};
|
|
238
|
+
if ("bitMask" in $o2 && $o2["bitMask"] !== void 0) {
|
|
239
|
+
const error = _number($o2["bitMask"]);
|
|
240
|
+
if (error)
|
|
241
|
+
return error;
|
|
242
|
+
} else
|
|
243
|
+
return {};
|
|
244
|
+
if ("value" in $o2 && $o2["value"] !== void 0) {
|
|
245
|
+
const error = _number($o2["value"]);
|
|
246
|
+
if (error)
|
|
247
|
+
return error;
|
|
248
|
+
} else
|
|
249
|
+
return {};
|
|
250
|
+
return null;
|
|
251
|
+
}
|
|
252
|
+
function si__2__7_ei($o2) {
|
|
253
|
+
const conditions = [_2, _7];
|
|
254
|
+
for (const condition of conditions) {
|
|
255
|
+
const error = condition($o2);
|
|
256
|
+
if (error)
|
|
257
|
+
return error;
|
|
258
|
+
}
|
|
259
|
+
return null;
|
|
260
|
+
}
|
|
261
|
+
function su_si__2__3_ei_si__2__5_ei_si__2__7_ei_eu($o2) {
|
|
262
|
+
const conditions = [si__2__3_ei, si__2__5_ei, si__2__7_ei];
|
|
263
|
+
for (const condition of conditions) {
|
|
264
|
+
const error = condition($o2);
|
|
265
|
+
if (!error)
|
|
266
|
+
return null;
|
|
267
|
+
}
|
|
268
|
+
return {};
|
|
269
|
+
}
|
|
270
|
+
return su_si__2__3_ei_si__2__5_ei_si__2__7_ei_eu($o);
|
|
271
|
+
};
|
|
272
|
+
const __assertType__sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2 = ($o) => {
|
|
273
|
+
function _number($o2) {
|
|
274
|
+
return typeof $o2 !== "number" ? {} : null;
|
|
275
|
+
}
|
|
276
|
+
function _4($o2) {
|
|
277
|
+
if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
|
|
278
|
+
return {};
|
|
279
|
+
if ("parameter" in $o2 && $o2["parameter"] !== void 0) {
|
|
280
|
+
const error = _number($o2["parameter"]);
|
|
281
|
+
if (error)
|
|
282
|
+
return error;
|
|
283
|
+
} else
|
|
284
|
+
return {};
|
|
285
|
+
return null;
|
|
286
|
+
}
|
|
287
|
+
function _undefined($o2) {
|
|
288
|
+
return $o2 !== void 0 ? {} : null;
|
|
289
|
+
}
|
|
290
|
+
function _5($o2) {
|
|
291
|
+
if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
|
|
292
|
+
return {};
|
|
293
|
+
if ("bitMask" in $o2 && $o2["bitMask"] !== void 0) {
|
|
294
|
+
const error = _undefined($o2["bitMask"]);
|
|
295
|
+
if (error)
|
|
296
|
+
return error;
|
|
297
|
+
}
|
|
298
|
+
if ("value" in $o2 && $o2["value"] !== void 0) {
|
|
299
|
+
const error = _number($o2["value"]);
|
|
300
|
+
if (error)
|
|
301
|
+
return error;
|
|
302
|
+
} else
|
|
303
|
+
return {};
|
|
304
|
+
return null;
|
|
305
|
+
}
|
|
306
|
+
function si__4__5_ei($o2) {
|
|
307
|
+
const conditions = [_4, _5];
|
|
308
|
+
for (const condition of conditions) {
|
|
309
|
+
const error = condition($o2);
|
|
310
|
+
if (error)
|
|
311
|
+
return error;
|
|
312
|
+
}
|
|
313
|
+
return null;
|
|
314
|
+
}
|
|
315
|
+
function _11($o2) {
|
|
316
|
+
return $o2 !== 1 ? {} : null;
|
|
317
|
+
}
|
|
318
|
+
function _12($o2) {
|
|
319
|
+
return $o2 !== 2 ? {} : null;
|
|
320
|
+
}
|
|
321
|
+
function _13($o2) {
|
|
322
|
+
return $o2 !== 4 ? {} : null;
|
|
323
|
+
}
|
|
324
|
+
function su__11__12__13_eu($o2) {
|
|
325
|
+
const conditions = [_11, _12, _13];
|
|
326
|
+
for (const condition of conditions) {
|
|
327
|
+
const error = condition($o2);
|
|
328
|
+
if (!error)
|
|
329
|
+
return null;
|
|
330
|
+
}
|
|
331
|
+
return {};
|
|
332
|
+
}
|
|
333
|
+
function su__15__16__17__18_eu($o2) {
|
|
334
|
+
return ![0, 1, 2, 3].includes($o2) ? {} : null;
|
|
335
|
+
}
|
|
336
|
+
function _7($o2) {
|
|
337
|
+
if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
|
|
338
|
+
return {};
|
|
339
|
+
if ("bitMask" in $o2 && $o2["bitMask"] !== void 0) {
|
|
340
|
+
const error = _undefined($o2["bitMask"]);
|
|
341
|
+
if (error)
|
|
342
|
+
return error;
|
|
343
|
+
}
|
|
344
|
+
if ("value" in $o2 && $o2["value"] !== void 0) {
|
|
345
|
+
const error = _number($o2["value"]);
|
|
346
|
+
if (error)
|
|
347
|
+
return error;
|
|
348
|
+
} else
|
|
349
|
+
return {};
|
|
350
|
+
if ("valueSize" in $o2 && $o2["valueSize"] !== void 0) {
|
|
351
|
+
const error = su__11__12__13_eu($o2["valueSize"]);
|
|
352
|
+
if (error)
|
|
353
|
+
return error;
|
|
354
|
+
} else
|
|
355
|
+
return {};
|
|
356
|
+
if ("valueFormat" in $o2 && $o2["valueFormat"] !== void 0) {
|
|
357
|
+
const error = su__15__16__17__18_eu($o2["valueFormat"]);
|
|
358
|
+
if (error)
|
|
359
|
+
return error;
|
|
360
|
+
} else
|
|
361
|
+
return {};
|
|
362
|
+
return null;
|
|
363
|
+
}
|
|
364
|
+
function si__4__7_ei($o2) {
|
|
365
|
+
const conditions = [_4, _7];
|
|
366
|
+
for (const condition of conditions) {
|
|
367
|
+
const error = condition($o2);
|
|
368
|
+
if (error)
|
|
369
|
+
return error;
|
|
370
|
+
}
|
|
371
|
+
return null;
|
|
372
|
+
}
|
|
373
|
+
function _9($o2) {
|
|
374
|
+
if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
|
|
375
|
+
return {};
|
|
376
|
+
if ("bitMask" in $o2 && $o2["bitMask"] !== void 0) {
|
|
377
|
+
const error = _number($o2["bitMask"]);
|
|
378
|
+
if (error)
|
|
379
|
+
return error;
|
|
380
|
+
} else
|
|
381
|
+
return {};
|
|
382
|
+
if ("value" in $o2 && $o2["value"] !== void 0) {
|
|
383
|
+
const error = _number($o2["value"]);
|
|
384
|
+
if (error)
|
|
385
|
+
return error;
|
|
386
|
+
} else
|
|
387
|
+
return {};
|
|
388
|
+
return null;
|
|
389
|
+
}
|
|
390
|
+
function si__4__9_ei($o2) {
|
|
391
|
+
const conditions = [_4, _9];
|
|
392
|
+
for (const condition of conditions) {
|
|
393
|
+
const error = condition($o2);
|
|
394
|
+
if (error)
|
|
395
|
+
return error;
|
|
396
|
+
}
|
|
397
|
+
return null;
|
|
398
|
+
}
|
|
399
|
+
function su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu($o2) {
|
|
400
|
+
const conditions = [si__4__5_ei, si__4__7_ei, si__4__9_ei];
|
|
401
|
+
for (const condition of conditions) {
|
|
402
|
+
const error = condition($o2);
|
|
403
|
+
if (!error)
|
|
404
|
+
return null;
|
|
405
|
+
}
|
|
406
|
+
return {};
|
|
407
|
+
}
|
|
408
|
+
function sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2($o2) {
|
|
409
|
+
if (!Array.isArray($o2))
|
|
410
|
+
return {};
|
|
411
|
+
for (let i = 0; i < $o2.length; i++) {
|
|
412
|
+
const error = su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu($o2[i]);
|
|
413
|
+
if (error)
|
|
414
|
+
return error;
|
|
415
|
+
}
|
|
416
|
+
return null;
|
|
417
|
+
}
|
|
418
|
+
return sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2($o);
|
|
419
|
+
};
|
|
420
|
+
const __assertType__sa__number_ea_2 = ($o) => {
|
|
421
|
+
function _number($o2) {
|
|
422
|
+
return typeof $o2 !== "number" ? {} : null;
|
|
423
|
+
}
|
|
424
|
+
function sa__number_ea_2($o2) {
|
|
425
|
+
if (!Array.isArray($o2))
|
|
426
|
+
return {};
|
|
427
|
+
for (let i = 0; i < $o2.length; i++) {
|
|
428
|
+
const error = _number($o2[i]);
|
|
429
|
+
if (error)
|
|
430
|
+
return error;
|
|
431
|
+
}
|
|
432
|
+
return null;
|
|
433
|
+
}
|
|
434
|
+
return sa__number_ea_2($o);
|
|
435
|
+
};
|
|
436
|
+
function configValueToString(value) {
|
|
437
|
+
if (typeof value === "number")
|
|
438
|
+
return value.toString();
|
|
439
|
+
else
|
|
440
|
+
return [...value].join(", ");
|
|
441
|
+
}
|
|
442
|
+
class ConfigurationCCError extends import_safe.ZWaveError {
|
|
443
|
+
message;
|
|
444
|
+
code;
|
|
445
|
+
argument;
|
|
446
|
+
constructor(message, code, argument) {
|
|
447
|
+
super(message, code);
|
|
448
|
+
this.message = message;
|
|
449
|
+
this.code = code;
|
|
450
|
+
this.argument = argument;
|
|
451
|
+
Object.setPrototypeOf(this, ConfigurationCCError.prototype);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
const ConfigurationCCValues = Object.freeze({
|
|
455
|
+
...import_Values.V.defineStaticCCValues(import_safe.CommandClasses.Configuration, {
|
|
456
|
+
...import_Values.V.staticProperty(
|
|
457
|
+
"isParamInformationFromConfig",
|
|
458
|
+
void 0,
|
|
459
|
+
// meta
|
|
460
|
+
{ internal: true, supportsEndpoints: false }
|
|
461
|
+
)
|
|
462
|
+
}),
|
|
463
|
+
...import_Values.V.defineDynamicCCValues(import_safe.CommandClasses.Configuration, {
|
|
464
|
+
...import_Values.V.dynamicPropertyAndKeyWithName(
|
|
465
|
+
"paramInformation",
|
|
466
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
467
|
+
(parameter, bitMask) => parameter,
|
|
468
|
+
(parameter, bitMask) => bitMask,
|
|
469
|
+
({ property, propertyKey }) => typeof property === "number" && (typeof propertyKey === "number" || propertyKey == void 0),
|
|
470
|
+
// Metadata is determined dynamically depending on other factors
|
|
471
|
+
void 0
|
|
472
|
+
)
|
|
473
|
+
})
|
|
474
|
+
});
|
|
475
|
+
function createConfigurationCCInstance(endpoint) {
|
|
476
|
+
return import_CommandClass.CommandClass.createInstanceUnchecked(endpoint.virtual ? endpoint.node.physicalNodes[0] : endpoint, ConfigurationCC);
|
|
477
|
+
}
|
|
478
|
+
function normalizeConfigurationCCAPISetOptions(ctx, endpoint, options) {
|
|
479
|
+
if ("bitMask" in options && options.bitMask) {
|
|
480
|
+
const ccc = createConfigurationCCInstance(endpoint);
|
|
481
|
+
const paramInfo = ccc.getParamInformation(ctx, options.parameter, options.bitMask);
|
|
482
|
+
if (!paramInfo.isFromConfig) {
|
|
483
|
+
throw new import_safe.ZWaveError("Setting a partial configuration parameter requires it to be defined in a device config file!", import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
484
|
+
}
|
|
485
|
+
return {
|
|
486
|
+
parameter: options.parameter,
|
|
487
|
+
bitMask: options.bitMask,
|
|
488
|
+
value: options.value,
|
|
489
|
+
valueSize: paramInfo.valueSize,
|
|
490
|
+
valueFormat: paramInfo.format
|
|
491
|
+
};
|
|
492
|
+
} else if ("valueSize" in options) {
|
|
493
|
+
return (0, import_safe3.pick)(options, [
|
|
494
|
+
"parameter",
|
|
495
|
+
"value",
|
|
496
|
+
"valueSize",
|
|
497
|
+
"valueFormat"
|
|
498
|
+
]);
|
|
499
|
+
} else {
|
|
500
|
+
const ccc = createConfigurationCCInstance(endpoint);
|
|
501
|
+
const paramInfo = ccc.getParamInformation(ctx, options.parameter, options.bitMask);
|
|
502
|
+
if (!paramInfo.isFromConfig) {
|
|
503
|
+
throw new import_safe.ZWaveError("Setting a configuration parameter without specifying a value size and format requires it to be defined in a device config file!", import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
504
|
+
}
|
|
505
|
+
return {
|
|
506
|
+
parameter: options.parameter,
|
|
507
|
+
value: options.value,
|
|
508
|
+
valueSize: paramInfo.valueSize,
|
|
509
|
+
valueFormat: paramInfo.format
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
function bulkMergePartialParamValues(ctx, endpoint, options) {
|
|
514
|
+
const allParams = options.filter((o) => o.bitMask == void 0);
|
|
515
|
+
const unmergedPartials = /* @__PURE__ */ new Map();
|
|
516
|
+
for (const partial of options.filter((o) => o.bitMask != void 0)) {
|
|
517
|
+
if (!unmergedPartials.has(partial.parameter)) {
|
|
518
|
+
unmergedPartials.set(partial.parameter, []);
|
|
519
|
+
}
|
|
520
|
+
unmergedPartials.get(partial.parameter).push(partial);
|
|
521
|
+
}
|
|
522
|
+
if (unmergedPartials.size) {
|
|
523
|
+
const ccc = createConfigurationCCInstance(endpoint);
|
|
524
|
+
for (const [parameter, partials] of unmergedPartials) {
|
|
525
|
+
allParams.push({
|
|
526
|
+
parameter,
|
|
527
|
+
value: ccc.composePartialParamValues(ctx, parameter, partials.map((p) => ({
|
|
528
|
+
bitMask: p.bitMask,
|
|
529
|
+
partialValue: p.value
|
|
530
|
+
}))),
|
|
531
|
+
valueSize: partials[0].valueSize,
|
|
532
|
+
valueFormat: partials[0].valueFormat
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
return allParams;
|
|
537
|
+
}
|
|
538
|
+
function isSignedPartial(bitMask, format) {
|
|
539
|
+
return (0, import_safe.getBitMaskWidth)(bitMask) > 1 && (format ?? import_safe.ConfigValueFormat.SignedInteger) === import_safe.ConfigValueFormat.SignedInteger;
|
|
540
|
+
}
|
|
541
|
+
function reInterpretSignedValue(value, valueSize, targetFormat) {
|
|
542
|
+
const raw = new import_safe2.Bytes(valueSize);
|
|
543
|
+
serializeValue(raw, 0, valueSize, import_safe.ConfigValueFormat.SignedInteger, value);
|
|
544
|
+
return parseValue(raw, valueSize, targetFormat);
|
|
545
|
+
}
|
|
546
|
+
function getParamInformationFromConfigFile(ctx, nodeId, endpointIndex) {
|
|
547
|
+
const deviceConfig = ctx.getDeviceConfig?.(nodeId);
|
|
548
|
+
if (endpointIndex === 0) {
|
|
549
|
+
return deviceConfig?.paramInformation ?? deviceConfig?.endpoints?.get(0)?.paramInformation;
|
|
550
|
+
} else {
|
|
551
|
+
return deviceConfig?.endpoints?.get(endpointIndex)?.paramInformation;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
let ConfigurationCCAPI = class ConfigurationCCAPI2 extends import_API.CCAPI {
|
|
555
|
+
supportsCommand(cmd) {
|
|
556
|
+
switch (cmd) {
|
|
557
|
+
case import_Types.ConfigurationCommand.Get:
|
|
558
|
+
case import_Types.ConfigurationCommand.Set:
|
|
559
|
+
return true;
|
|
560
|
+
// This is mandatory
|
|
561
|
+
case import_Types.ConfigurationCommand.BulkGet:
|
|
562
|
+
case import_Types.ConfigurationCommand.BulkSet:
|
|
563
|
+
return this.version >= 2;
|
|
564
|
+
case import_Types.ConfigurationCommand.NameGet:
|
|
565
|
+
case import_Types.ConfigurationCommand.InfoGet:
|
|
566
|
+
case import_Types.ConfigurationCommand.PropertiesGet:
|
|
567
|
+
return this.version >= 3;
|
|
568
|
+
case import_Types.ConfigurationCommand.DefaultReset:
|
|
569
|
+
return this.version >= 4;
|
|
570
|
+
}
|
|
571
|
+
return super.supportsCommand(cmd);
|
|
572
|
+
}
|
|
573
|
+
get [import_API.SET_VALUE]() {
|
|
574
|
+
return async function({ property, propertyKey }, value) {
|
|
575
|
+
if (typeof property !== "number") {
|
|
576
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
577
|
+
}
|
|
578
|
+
if (propertyKey != void 0 && typeof propertyKey !== "number") {
|
|
579
|
+
(0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
|
|
580
|
+
}
|
|
581
|
+
if (typeof value !== "number") {
|
|
582
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
583
|
+
}
|
|
584
|
+
let ccInstance;
|
|
585
|
+
const applHost = this.host;
|
|
586
|
+
if (this.isSinglecast()) {
|
|
587
|
+
ccInstance = createConfigurationCCInstance(this.endpoint);
|
|
588
|
+
} else if (this.isMulticast()) {
|
|
589
|
+
const nodes = this.endpoint.node.physicalNodes;
|
|
590
|
+
if (!nodes.every((node) => node.getEndpoint(this.endpoint.index)?.supportsCC(import_safe.CommandClasses.Configuration))) {
|
|
591
|
+
throw new import_safe.ZWaveError(`The multicast setValue API for Configuration CC requires all virtual target endpoints to support Configuration CC!`, import_safe.ZWaveErrorCodes.CC_Invalid);
|
|
592
|
+
}
|
|
593
|
+
const paramInfos = this.endpoint.node.physicalNodes.map((node) => createConfigurationCCInstance(node.getEndpoint(this.endpoint.index)).getParamInformation(this.host, property, propertyKey));
|
|
594
|
+
if (!paramInfos.length || !paramInfos.every((info, index) => {
|
|
595
|
+
if (index === 0)
|
|
596
|
+
return true;
|
|
597
|
+
return info.valueSize === paramInfos[0].valueSize && info.format === paramInfos[0].format;
|
|
598
|
+
})) {
|
|
599
|
+
throw new import_safe.ZWaveError(`The multicast setValue API for Configuration CC requires all virtual target nodes to have the same parameter definition!`, import_safe.ZWaveErrorCodes.CC_Invalid);
|
|
600
|
+
}
|
|
601
|
+
ccInstance = createConfigurationCCInstance(this.endpoint);
|
|
602
|
+
} else {
|
|
603
|
+
throw new import_safe.ZWaveError(`The setValue API for Configuration CC is not supported via broadcast!`, import_safe.ZWaveErrorCodes.CC_NotSupported);
|
|
604
|
+
}
|
|
605
|
+
let { valueSize, format: valueFormat = import_safe.ConfigValueFormat.SignedInteger } = ccInstance.getParamInformation(applHost, property);
|
|
606
|
+
let targetValue;
|
|
607
|
+
if (propertyKey) {
|
|
608
|
+
if (!valueSize) {
|
|
609
|
+
valueSize = ccInstance.getParamInformation(applHost, property, propertyKey).valueSize;
|
|
610
|
+
}
|
|
611
|
+
targetValue = ccInstance.composePartialParamValue(applHost, property, propertyKey, value);
|
|
612
|
+
valueFormat = import_safe.ConfigValueFormat.UnsignedInteger;
|
|
613
|
+
} else {
|
|
614
|
+
targetValue = value;
|
|
615
|
+
}
|
|
616
|
+
if (!valueSize) {
|
|
617
|
+
valueSize = (0, import_safe.getMinIntegerSize)(targetValue, valueFormat === import_safe.ConfigValueFormat.SignedInteger);
|
|
618
|
+
if (!valueSize) {
|
|
619
|
+
throw new import_safe.ZWaveError(`The value ${targetValue} is not valid for configuration parameters!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
if (!isSafeValue(targetValue, valueSize, valueFormat)) {
|
|
623
|
+
throwInvalidValueError(targetValue, property, valueSize, valueFormat);
|
|
624
|
+
}
|
|
625
|
+
const result = await this.set({
|
|
626
|
+
parameter: property,
|
|
627
|
+
value: targetValue,
|
|
628
|
+
valueSize,
|
|
629
|
+
valueFormat
|
|
630
|
+
});
|
|
631
|
+
if (!(0, import_safe.supervisedCommandSucceeded)(result) && this.isSinglecast()) {
|
|
632
|
+
this.schedulePoll(
|
|
633
|
+
{ property, propertyKey },
|
|
634
|
+
targetValue,
|
|
635
|
+
// Configuration changes are instant
|
|
636
|
+
{ transition: "fast" }
|
|
637
|
+
);
|
|
638
|
+
}
|
|
639
|
+
return result;
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
get [import_API.POLL_VALUE]() {
|
|
643
|
+
return async function({ property, propertyKey }) {
|
|
644
|
+
if (typeof property !== "number") {
|
|
645
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
646
|
+
}
|
|
647
|
+
if (propertyKey != void 0 && typeof propertyKey !== "number") {
|
|
648
|
+
(0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
|
|
649
|
+
}
|
|
650
|
+
return this.get(property, { valueBitMask: propertyKey });
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
/**
|
|
654
|
+
* Requests the current value of a given config parameter from the device.
|
|
655
|
+
* This may timeout and return `undefined` if the node does not respond.
|
|
656
|
+
* If the node replied with a different parameter number, a `ConfigurationCCError`
|
|
657
|
+
* is thrown with the `argument` property set to the reported parameter number.
|
|
658
|
+
*/
|
|
659
|
+
async get(parameter, options) {
|
|
660
|
+
__assertType("parameter", "number", __assertType__number.bind(void 0, parameter));
|
|
661
|
+
__assertType("options", void 0, __assertType__optional__0.bind(void 0, options));
|
|
662
|
+
this.assertPhysicalEndpoint(this.endpoint);
|
|
663
|
+
if (parameter > 255) {
|
|
664
|
+
const result = await this.getBulk([
|
|
665
|
+
{
|
|
666
|
+
parameter,
|
|
667
|
+
bitMask: options?.valueBitMask
|
|
668
|
+
}
|
|
669
|
+
]);
|
|
670
|
+
return result.find((r) => r.parameter === parameter)?.value;
|
|
671
|
+
}
|
|
672
|
+
this.assertSupportsCommand(import_Types.ConfigurationCommand, import_Types.ConfigurationCommand.Get);
|
|
673
|
+
const { valueBitMask, allowUnexpectedResponse } = options ?? {};
|
|
674
|
+
const cc = new ConfigurationCCGet({
|
|
675
|
+
nodeId: this.endpoint.nodeId,
|
|
676
|
+
endpointIndex: this.endpoint.index,
|
|
677
|
+
parameter,
|
|
678
|
+
allowUnexpectedResponse
|
|
679
|
+
});
|
|
680
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
681
|
+
if (!response)
|
|
682
|
+
return;
|
|
683
|
+
if (response.parameter === parameter) {
|
|
684
|
+
if (!valueBitMask)
|
|
685
|
+
return response.value;
|
|
686
|
+
const paramInfo = cc.getParamInformation(this.host, response.parameter, valueBitMask);
|
|
687
|
+
return (0, import_safe.parsePartial)(response.value, valueBitMask, isSignedPartial(valueBitMask, paramInfo.format));
|
|
688
|
+
}
|
|
689
|
+
this.host.logNode(this.endpoint.nodeId, {
|
|
690
|
+
endpoint: this.endpoint.index,
|
|
691
|
+
message: `Received unexpected ConfigurationReport (param = ${response.parameter}, value = ${response.value.toString()})`,
|
|
692
|
+
direction: "inbound",
|
|
693
|
+
level: "error"
|
|
694
|
+
});
|
|
695
|
+
throw new ConfigurationCCError(`The first existing parameter on this node is ${response.parameter}`, import_safe.ZWaveErrorCodes.ConfigurationCC_FirstParameterNumber, response.parameter);
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* Requests the current value of the config parameters from the device.
|
|
699
|
+
* When the node does not respond due to a timeout, the `value` in the returned array will be `undefined`.
|
|
700
|
+
*/
|
|
701
|
+
async getBulk(options) {
|
|
702
|
+
__assertType("options", void 0, __assertType__sa__2_ea_2.bind(void 0, options));
|
|
703
|
+
this.assertPhysicalEndpoint(this.endpoint);
|
|
704
|
+
let values;
|
|
705
|
+
const distinctParameters = (0, import_arrays.distinct)(options.map((o) => o.parameter));
|
|
706
|
+
if (this.supportsCommand(import_Types.ConfigurationCommand.BulkGet) && (0, import_safe.isConsecutiveArray)(distinctParameters)) {
|
|
707
|
+
const cc2 = new ConfigurationCCBulkGet({
|
|
708
|
+
nodeId: this.endpoint.nodeId,
|
|
709
|
+
endpointIndex: this.endpoint.index,
|
|
710
|
+
parameters: distinctParameters
|
|
711
|
+
});
|
|
712
|
+
const response = await this.host.sendCommand(cc2, this.commandOptions);
|
|
713
|
+
if (response)
|
|
714
|
+
values = response.values;
|
|
715
|
+
} else {
|
|
716
|
+
this.assertSupportsCommand(import_Types.ConfigurationCommand, import_Types.ConfigurationCommand.Get);
|
|
717
|
+
const _values = /* @__PURE__ */ new Map();
|
|
718
|
+
for (const parameter of distinctParameters) {
|
|
719
|
+
const cc2 = new ConfigurationCCGet({
|
|
720
|
+
nodeId: this.endpoint.nodeId,
|
|
721
|
+
endpointIndex: this.endpoint.index,
|
|
722
|
+
parameter
|
|
723
|
+
});
|
|
724
|
+
const response = await this.host.sendCommand(cc2, this.commandOptions);
|
|
725
|
+
if (response) {
|
|
726
|
+
_values.set(response.parameter, response.value);
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
values = _values;
|
|
730
|
+
}
|
|
731
|
+
const cc = createConfigurationCCInstance(this.endpoint);
|
|
732
|
+
return options.map((o) => {
|
|
733
|
+
let value = values?.get(o.parameter);
|
|
734
|
+
if (typeof value === "number" && o.bitMask) {
|
|
735
|
+
const paramInfo = cc.getParamInformation(this.host, o.parameter, o.bitMask);
|
|
736
|
+
value = (0, import_safe.parsePartial)(value, o.bitMask, isSignedPartial(o.bitMask, paramInfo.format));
|
|
737
|
+
}
|
|
738
|
+
return { ...o, value };
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Sets a new value for a given config parameter of the device.
|
|
743
|
+
*/
|
|
744
|
+
async set(options) {
|
|
745
|
+
__assertType("options", "ConfigurationCCAPISetOptions", __assertType__ConfigurationCCAPISetOptions.bind(void 0, options));
|
|
746
|
+
if (options.parameter > 255) {
|
|
747
|
+
return this.setBulk([options]);
|
|
748
|
+
}
|
|
749
|
+
this.assertSupportsCommand(import_Types.ConfigurationCommand, import_Types.ConfigurationCommand.Set);
|
|
750
|
+
const normalized = normalizeConfigurationCCAPISetOptions(this.host, this.endpoint, options);
|
|
751
|
+
let value = normalized.value;
|
|
752
|
+
if (normalized.bitMask) {
|
|
753
|
+
const ccc = createConfigurationCCInstance(this.endpoint);
|
|
754
|
+
value = ccc.composePartialParamValue(this.host, normalized.parameter, normalized.bitMask, normalized.value);
|
|
755
|
+
}
|
|
756
|
+
const cc = new ConfigurationCCSet({
|
|
757
|
+
nodeId: this.endpoint.nodeId,
|
|
758
|
+
endpointIndex: this.endpoint.index,
|
|
759
|
+
resetToDefault: false,
|
|
760
|
+
parameter: normalized.parameter,
|
|
761
|
+
value,
|
|
762
|
+
valueSize: normalized.valueSize,
|
|
763
|
+
valueFormat: normalized.valueFormat
|
|
764
|
+
});
|
|
765
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* Sets new values for multiple config parameters of the device. Uses the `BulkSet` command if supported, otherwise falls back to individual `Set` commands.
|
|
769
|
+
*/
|
|
770
|
+
async setBulk(values) {
|
|
771
|
+
__assertType("values", void 0, __assertType__sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2.bind(void 0, values));
|
|
772
|
+
const normalized = values.map((v) => normalizeConfigurationCCAPISetOptions(this.host, this.endpoint, v));
|
|
773
|
+
const allParams = bulkMergePartialParamValues(this.host, this.endpoint, normalized);
|
|
774
|
+
const canUseBulkSet = this.supportsCommand(import_Types.ConfigurationCommand.BulkSet) && (0, import_safe.isConsecutiveArray)(allParams.map((v) => v.parameter)) && new Set(allParams.map((v) => v.valueFormat)).size === 1 && new Set(allParams.map((v) => v.valueSize)).size === 1;
|
|
775
|
+
if (canUseBulkSet) {
|
|
776
|
+
const cc = new ConfigurationCCBulkSet({
|
|
777
|
+
nodeId: this.endpoint.nodeId,
|
|
778
|
+
endpointIndex: this.endpoint.index,
|
|
779
|
+
parameters: allParams.map((v) => v.parameter),
|
|
780
|
+
valueSize: allParams[0].valueSize,
|
|
781
|
+
valueFormat: allParams[0].valueFormat,
|
|
782
|
+
values: allParams.map((v) => v.value),
|
|
783
|
+
handshake: true
|
|
784
|
+
});
|
|
785
|
+
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
786
|
+
if (result) {
|
|
787
|
+
const sentValues = cc.values;
|
|
788
|
+
const receivedValues = [...result.values.values()];
|
|
789
|
+
const success = sentValues.length === receivedValues.length && sentValues.every((v, i) => v === receivedValues[i]);
|
|
790
|
+
return {
|
|
791
|
+
status: success ? import_safe.SupervisionStatus.Success : import_safe.SupervisionStatus.Fail
|
|
792
|
+
};
|
|
793
|
+
} else {
|
|
794
|
+
return void 0;
|
|
795
|
+
}
|
|
796
|
+
} else {
|
|
797
|
+
this.assertSupportsCommand(import_Types.ConfigurationCommand, import_Types.ConfigurationCommand.Set);
|
|
798
|
+
const supervisionResults = [];
|
|
799
|
+
for (const { parameter, value, valueSize, valueFormat } of allParams) {
|
|
800
|
+
const cc = new ConfigurationCCSet({
|
|
801
|
+
nodeId: this.endpoint.nodeId,
|
|
802
|
+
endpointIndex: this.endpoint.index,
|
|
803
|
+
parameter,
|
|
804
|
+
value,
|
|
805
|
+
valueSize,
|
|
806
|
+
valueFormat
|
|
807
|
+
});
|
|
808
|
+
supervisionResults.push(await this.host.sendCommand(cc, this.commandOptions));
|
|
809
|
+
}
|
|
810
|
+
return (0, import_safe.mergeSupervisionResults)(supervisionResults);
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* Resets a configuration parameter to its default value.
|
|
815
|
+
*
|
|
816
|
+
* WARNING: This will throw on legacy devices (ConfigurationCC v3 and below)
|
|
817
|
+
*/
|
|
818
|
+
async reset(parameter) {
|
|
819
|
+
__assertType("parameter", "number", __assertType__number.bind(void 0, parameter));
|
|
820
|
+
if (parameter > 255) {
|
|
821
|
+
return this.resetBulk([parameter]);
|
|
822
|
+
}
|
|
823
|
+
if (this.version <= 3) {
|
|
824
|
+
throw new import_safe.ZWaveError(`Resetting configuration parameters to default MUST not be done on nodes implementing ConfigurationCC V3 or below!`, import_safe.ZWaveErrorCodes.ConfigurationCC_NoResetToDefaultOnLegacyDevices);
|
|
825
|
+
}
|
|
826
|
+
this.assertSupportsCommand(import_Types.ConfigurationCommand, import_Types.ConfigurationCommand.Set);
|
|
827
|
+
const cc = new ConfigurationCCSet({
|
|
828
|
+
nodeId: this.endpoint.nodeId,
|
|
829
|
+
endpointIndex: this.endpoint.index,
|
|
830
|
+
parameter,
|
|
831
|
+
resetToDefault: true
|
|
832
|
+
});
|
|
833
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
834
|
+
}
|
|
835
|
+
/**
|
|
836
|
+
* Resets multiple configuration parameters to their default value. Uses BulkSet if supported, otherwise falls back to individual Set commands.
|
|
837
|
+
*
|
|
838
|
+
* WARNING: This will throw on legacy devices (ConfigurationCC v3 and below)
|
|
839
|
+
*/
|
|
840
|
+
async resetBulk(parameters) {
|
|
841
|
+
__assertType("parameters", void 0, __assertType__sa__number_ea_2.bind(void 0, parameters));
|
|
842
|
+
if ((0, import_safe.isConsecutiveArray)(parameters) && this.supportsCommand(import_Types.ConfigurationCommand.BulkSet)) {
|
|
843
|
+
const cc = new ConfigurationCCBulkSet({
|
|
844
|
+
nodeId: this.endpoint.nodeId,
|
|
845
|
+
endpointIndex: this.endpoint.index,
|
|
846
|
+
parameters,
|
|
847
|
+
resetToDefault: true
|
|
848
|
+
});
|
|
849
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
850
|
+
} else {
|
|
851
|
+
this.assertSupportsCommand(import_Types.ConfigurationCommand, import_Types.ConfigurationCommand.Set);
|
|
852
|
+
const CCs = (0, import_arrays.distinct)(parameters).map((parameter) => new ConfigurationCCSet({
|
|
853
|
+
nodeId: this.endpoint.nodeId,
|
|
854
|
+
endpointIndex: this.endpoint.index,
|
|
855
|
+
parameter,
|
|
856
|
+
resetToDefault: true
|
|
857
|
+
}));
|
|
858
|
+
for (const cc of CCs) {
|
|
859
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
/** Resets all configuration parameters to their default value */
|
|
864
|
+
async resetAll() {
|
|
865
|
+
this.assertPhysicalEndpoint(this.endpoint);
|
|
866
|
+
this.assertSupportsCommand(import_Types.ConfigurationCommand, import_Types.ConfigurationCommand.DefaultReset);
|
|
867
|
+
const cc = new ConfigurationCCDefaultReset({
|
|
868
|
+
nodeId: this.endpoint.nodeId,
|
|
869
|
+
endpointIndex: this.endpoint.index
|
|
870
|
+
});
|
|
871
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
872
|
+
}
|
|
873
|
+
async getProperties(parameter) {
|
|
874
|
+
__assertType("parameter", "number", __assertType__number.bind(void 0, parameter));
|
|
875
|
+
this.assertPhysicalEndpoint(this.endpoint);
|
|
876
|
+
const cc = new ConfigurationCCPropertiesGet({
|
|
877
|
+
nodeId: this.endpoint.nodeId,
|
|
878
|
+
endpointIndex: this.endpoint.index,
|
|
879
|
+
parameter
|
|
880
|
+
});
|
|
881
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
882
|
+
if (response) {
|
|
883
|
+
return (0, import_safe3.pick)(response, [
|
|
884
|
+
"valueSize",
|
|
885
|
+
"valueFormat",
|
|
886
|
+
"minValue",
|
|
887
|
+
"maxValue",
|
|
888
|
+
"defaultValue",
|
|
889
|
+
"nextParameter",
|
|
890
|
+
"altersCapabilities",
|
|
891
|
+
"isReadonly",
|
|
892
|
+
"isAdvanced",
|
|
893
|
+
"noBulkSupport"
|
|
894
|
+
]);
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
/** Requests the name of a configuration parameter from the node */
|
|
898
|
+
async getName(parameter) {
|
|
899
|
+
__assertType("parameter", "number", __assertType__number.bind(void 0, parameter));
|
|
900
|
+
this.assertPhysicalEndpoint(this.endpoint);
|
|
901
|
+
const cc = new ConfigurationCCNameGet({
|
|
902
|
+
nodeId: this.endpoint.nodeId,
|
|
903
|
+
endpointIndex: this.endpoint.index,
|
|
904
|
+
parameter
|
|
905
|
+
});
|
|
906
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
907
|
+
return response?.name;
|
|
908
|
+
}
|
|
909
|
+
/** Requests usage info for a configuration parameter from the node */
|
|
910
|
+
async getInfo(parameter) {
|
|
911
|
+
__assertType("parameter", "number", __assertType__number.bind(void 0, parameter));
|
|
912
|
+
this.assertPhysicalEndpoint(this.endpoint);
|
|
913
|
+
const cc = new ConfigurationCCInfoGet({
|
|
914
|
+
nodeId: this.endpoint.nodeId,
|
|
915
|
+
endpointIndex: this.endpoint.index,
|
|
916
|
+
parameter
|
|
917
|
+
});
|
|
918
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
919
|
+
return response?.info;
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* This scans the node for the existing parameters. Found parameters will be reported
|
|
923
|
+
* through the `value added` and `value updated` events.
|
|
924
|
+
*
|
|
925
|
+
* WARNING: This method throws for newer devices.
|
|
926
|
+
*
|
|
927
|
+
* WARNING: On nodes implementing V1 and V2, this process may take
|
|
928
|
+
* **up to an hour**, depending on the configured timeout.
|
|
929
|
+
*
|
|
930
|
+
* WARNING: On nodes implementing V2, all parameters after 255 will be ignored.
|
|
931
|
+
*/
|
|
932
|
+
async scanParametersLegacy() {
|
|
933
|
+
if (this.version >= 3) {
|
|
934
|
+
throw new import_safe.ZWaveError("Use ConfigurationCC.interview instead of scanning parameters for versions 3 and above.", import_safe.ZWaveErrorCodes.ConfigurationCC_NoLegacyScanOnNewDevices);
|
|
935
|
+
}
|
|
936
|
+
this.assertPhysicalEndpoint(this.endpoint);
|
|
937
|
+
this.host.logNode(this.endpoint.nodeId, {
|
|
938
|
+
endpoint: this.endpoint.index,
|
|
939
|
+
message: `Scanning available parameters...`
|
|
940
|
+
});
|
|
941
|
+
const ccInstance = createConfigurationCCInstance(this.endpoint);
|
|
942
|
+
for (let param = 1; param <= 255; param++) {
|
|
943
|
+
let originalValue;
|
|
944
|
+
this.host.logNode(this.endpoint.nodeId, {
|
|
945
|
+
endpoint: this.endpoint.index,
|
|
946
|
+
message: ` trying param ${param}...`,
|
|
947
|
+
direction: "outbound"
|
|
948
|
+
});
|
|
949
|
+
try {
|
|
950
|
+
originalValue = await this.get(param, {
|
|
951
|
+
// When requesting a non-existing parameter, a node SHOULD respond with the
|
|
952
|
+
// first available parameter. We use this for the first param only,
|
|
953
|
+
// because delayed responses might otherwise confuse the interview process
|
|
954
|
+
allowUnexpectedResponse: param === 1
|
|
955
|
+
});
|
|
956
|
+
if (originalValue != void 0) {
|
|
957
|
+
const logMessage = ` Param ${param}:
|
|
958
|
+
readable = true
|
|
959
|
+
valueSize = ${ccInstance.getParamInformation(this.host, param).valueSize}
|
|
960
|
+
value = ${originalValue.toString()}`;
|
|
961
|
+
this.host.logNode(this.endpoint.nodeId, {
|
|
962
|
+
endpoint: this.endpoint.index,
|
|
963
|
+
message: logMessage,
|
|
964
|
+
direction: "inbound"
|
|
965
|
+
});
|
|
966
|
+
}
|
|
967
|
+
} catch (e) {
|
|
968
|
+
if (e instanceof ConfigurationCCError && e.code === import_safe.ZWaveErrorCodes.ConfigurationCC_FirstParameterNumber) {
|
|
969
|
+
if (e.argument - 1 > param)
|
|
970
|
+
param = e.argument - 1;
|
|
971
|
+
continue;
|
|
972
|
+
}
|
|
973
|
+
throw e;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
};
|
|
978
|
+
ConfigurationCCAPI = __decorate([
|
|
979
|
+
(0, import_CommandClassDecorators.API)(import_safe.CommandClasses.Configuration)
|
|
980
|
+
], ConfigurationCCAPI);
|
|
981
|
+
let ConfigurationCC = class ConfigurationCC2 extends import_CommandClass.CommandClass {
|
|
982
|
+
async interview(ctx) {
|
|
983
|
+
const node = this.getNode(ctx);
|
|
984
|
+
const endpoint = this.getEndpoint(ctx);
|
|
985
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses.Configuration, ctx, endpoint).withOptions({
|
|
986
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
987
|
+
});
|
|
988
|
+
ctx.logNode(node.id, {
|
|
989
|
+
endpoint: this.endpointIndex,
|
|
990
|
+
message: `Interviewing ${this.ccName}...`,
|
|
991
|
+
direction: "none"
|
|
992
|
+
});
|
|
993
|
+
const deviceConfig = ctx.getDeviceConfig?.(node.id);
|
|
994
|
+
const paramInfo = getParamInformationFromConfigFile(ctx, node.id, this.endpointIndex);
|
|
995
|
+
if (paramInfo) {
|
|
996
|
+
ctx.logNode(node.id, {
|
|
997
|
+
endpoint: this.endpointIndex,
|
|
998
|
+
message: `${this.constructor.name}: Loading configuration parameters from device config`,
|
|
999
|
+
direction: "none"
|
|
1000
|
+
});
|
|
1001
|
+
this.deserializeParamInformationFromConfig(ctx, paramInfo);
|
|
1002
|
+
}
|
|
1003
|
+
const documentedParamNumbers = new Set(Array.from(paramInfo?.keys() ?? []).map((k) => k.parameter));
|
|
1004
|
+
if (api.version >= 3) {
|
|
1005
|
+
ctx.logNode(node.id, {
|
|
1006
|
+
endpoint: this.endpointIndex,
|
|
1007
|
+
message: "finding first configuration parameter...",
|
|
1008
|
+
direction: "outbound"
|
|
1009
|
+
});
|
|
1010
|
+
const param0props = await api.getProperties(0);
|
|
1011
|
+
let param;
|
|
1012
|
+
if (param0props) {
|
|
1013
|
+
param = param0props.nextParameter;
|
|
1014
|
+
if (param === 0) {
|
|
1015
|
+
ctx.logNode(node.id, {
|
|
1016
|
+
endpoint: this.endpointIndex,
|
|
1017
|
+
message: `didn't report any config params, trying #1 just to be sure...`,
|
|
1018
|
+
direction: "inbound"
|
|
1019
|
+
});
|
|
1020
|
+
param = 1;
|
|
1021
|
+
}
|
|
1022
|
+
} else {
|
|
1023
|
+
ctx.logNode(node.id, {
|
|
1024
|
+
endpoint: this.endpointIndex,
|
|
1025
|
+
message: "Finding first configuration parameter timed out, skipping interview...",
|
|
1026
|
+
level: "warn"
|
|
1027
|
+
});
|
|
1028
|
+
return;
|
|
1029
|
+
}
|
|
1030
|
+
while (param > 0) {
|
|
1031
|
+
ctx.logNode(node.id, {
|
|
1032
|
+
endpoint: this.endpointIndex,
|
|
1033
|
+
message: `querying parameter #${param} information...`,
|
|
1034
|
+
direction: "outbound"
|
|
1035
|
+
});
|
|
1036
|
+
const props = await api.getProperties(param).catch(
|
|
1037
|
+
// If querying the properties fails, don't abort the entire interview
|
|
1038
|
+
() => void 0
|
|
1039
|
+
);
|
|
1040
|
+
if (!props) {
|
|
1041
|
+
ctx.logNode(node.id, {
|
|
1042
|
+
endpoint: this.endpointIndex,
|
|
1043
|
+
message: `Querying parameter #${param} information timed out, skipping scan...`,
|
|
1044
|
+
level: "warn"
|
|
1045
|
+
});
|
|
1046
|
+
break;
|
|
1047
|
+
}
|
|
1048
|
+
const { nextParameter, ...properties } = props;
|
|
1049
|
+
let logMessage;
|
|
1050
|
+
if (properties.valueSize === 0) {
|
|
1051
|
+
logMessage = `Parameter #${param} is unsupported. Next parameter: ${nextParameter}`;
|
|
1052
|
+
} else {
|
|
1053
|
+
let name;
|
|
1054
|
+
if (!documentedParamNumbers.has(param)) {
|
|
1055
|
+
if (!deviceConfig?.compat?.skipConfigurationNameQuery) {
|
|
1056
|
+
name = await api.getName(param).catch(
|
|
1057
|
+
// If querying the name fails, don't abort the entire interview
|
|
1058
|
+
() => void 0
|
|
1059
|
+
);
|
|
1060
|
+
}
|
|
1061
|
+
if (!deviceConfig?.compat?.skipConfigurationInfoQuery) {
|
|
1062
|
+
await api.getInfo(param).catch(
|
|
1063
|
+
// If querying the info fails, don't abort the entire interview
|
|
1064
|
+
() => void 0
|
|
1065
|
+
);
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
logMessage = `received information for parameter #${param}:`;
|
|
1069
|
+
if (name) {
|
|
1070
|
+
logMessage += `
|
|
1071
|
+
parameter name: ${name}`;
|
|
1072
|
+
}
|
|
1073
|
+
logMessage += `
|
|
1074
|
+
value format: ${(0, import_safe3.getEnumMemberName)(import_safe.ConfigValueFormat, properties.valueFormat)}
|
|
1075
|
+
value size: ${properties.valueSize} bytes
|
|
1076
|
+
min value: ${properties.minValue?.toString() ?? "undefined"}
|
|
1077
|
+
max value: ${properties.maxValue?.toString() ?? "undefined"}
|
|
1078
|
+
default value: ${properties.defaultValue?.toString() ?? "undefined"}
|
|
1079
|
+
is read-only: ${!!properties.isReadonly}
|
|
1080
|
+
is advanced (UI): ${!!properties.isAdvanced}
|
|
1081
|
+
has bulk support: ${!properties.noBulkSupport}
|
|
1082
|
+
alters capabilities: ${!!properties.altersCapabilities}`;
|
|
1083
|
+
}
|
|
1084
|
+
ctx.logNode(node.id, {
|
|
1085
|
+
endpoint: this.endpointIndex,
|
|
1086
|
+
message: logMessage,
|
|
1087
|
+
direction: "inbound"
|
|
1088
|
+
});
|
|
1089
|
+
if (nextParameter > param) {
|
|
1090
|
+
param = nextParameter;
|
|
1091
|
+
} else {
|
|
1092
|
+
break;
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
await this.refreshValues(ctx);
|
|
1097
|
+
this.setInterviewComplete(ctx, true);
|
|
1098
|
+
}
|
|
1099
|
+
async refreshValues(ctx) {
|
|
1100
|
+
const node = this.getNode(ctx);
|
|
1101
|
+
const endpoint = this.getEndpoint(ctx);
|
|
1102
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses.Configuration, ctx, endpoint).withOptions({
|
|
1103
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
1104
|
+
});
|
|
1105
|
+
if (api.version < 3) {
|
|
1106
|
+
const paramInfo = getParamInformationFromConfigFile(ctx, node.id, this.endpointIndex);
|
|
1107
|
+
if (paramInfo?.size) {
|
|
1108
|
+
const alreadyQueried = /* @__PURE__ */ new Set();
|
|
1109
|
+
for (const param of paramInfo.keys()) {
|
|
1110
|
+
if (paramInfo.get(param)?.writeOnly)
|
|
1111
|
+
continue;
|
|
1112
|
+
if (alreadyQueried.has(param.parameter))
|
|
1113
|
+
continue;
|
|
1114
|
+
alreadyQueried.add(param.parameter);
|
|
1115
|
+
ctx.logNode(node.id, {
|
|
1116
|
+
endpoint: this.endpointIndex,
|
|
1117
|
+
message: `querying parameter #${param.parameter} value...`,
|
|
1118
|
+
direction: "outbound"
|
|
1119
|
+
});
|
|
1120
|
+
const paramValue = await api.get(param.parameter);
|
|
1121
|
+
if (typeof paramValue === "number") {
|
|
1122
|
+
ctx.logNode(node.id, {
|
|
1123
|
+
endpoint: this.endpointIndex,
|
|
1124
|
+
message: `parameter #${param.parameter} has value: ${paramValue}`,
|
|
1125
|
+
direction: "inbound"
|
|
1126
|
+
});
|
|
1127
|
+
} else if (!paramValue) {
|
|
1128
|
+
ctx.logNode(node.id, {
|
|
1129
|
+
endpoint: this.endpointIndex,
|
|
1130
|
+
message: `received no value for parameter #${param.parameter}`,
|
|
1131
|
+
direction: "inbound",
|
|
1132
|
+
level: "warn"
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
} else {
|
|
1137
|
+
ctx.logNode(node.id, {
|
|
1138
|
+
endpoint: this.endpointIndex,
|
|
1139
|
+
message: `${this.constructor.name}: skipping interview because CC version is < 3 and there is no config file`,
|
|
1140
|
+
direction: "none"
|
|
1141
|
+
});
|
|
1142
|
+
}
|
|
1143
|
+
} else {
|
|
1144
|
+
const parameters = (0, import_arrays.distinct)(this.getDefinedValueIDs(ctx).map((v) => v.property).filter((p) => typeof p === "number"));
|
|
1145
|
+
for (const param of parameters) {
|
|
1146
|
+
if (this.getParamInformation(ctx, param).readable !== false) {
|
|
1147
|
+
ctx.logNode(node.id, {
|
|
1148
|
+
endpoint: this.endpointIndex,
|
|
1149
|
+
message: `querying parameter #${param} value...`,
|
|
1150
|
+
direction: "outbound"
|
|
1151
|
+
});
|
|
1152
|
+
await api.get(param);
|
|
1153
|
+
} else {
|
|
1154
|
+
ctx.logNode(node.id, {
|
|
1155
|
+
endpoint: this.endpointIndex,
|
|
1156
|
+
message: `not querying parameter #${param} value, because it is writeonly`,
|
|
1157
|
+
direction: "none"
|
|
1158
|
+
});
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
/**
|
|
1164
|
+
* Whether this node's param information was loaded from a config file.
|
|
1165
|
+
* If this is true, we don't trust what the node reports
|
|
1166
|
+
*/
|
|
1167
|
+
paramExistsInConfigFile(ctx, parameter, valueBitMask) {
|
|
1168
|
+
if (this.getValue(ctx, ConfigurationCCValues.isParamInformationFromConfig) !== true) {
|
|
1169
|
+
return false;
|
|
1170
|
+
}
|
|
1171
|
+
const paramInformation = getParamInformationFromConfigFile(ctx, this.nodeId, this.endpointIndex);
|
|
1172
|
+
if (!paramInformation)
|
|
1173
|
+
return false;
|
|
1174
|
+
if (paramInformation.has({ parameter, valueBitMask })) {
|
|
1175
|
+
return true;
|
|
1176
|
+
} else if (valueBitMask == void 0) {
|
|
1177
|
+
for (const key of paramInformation.keys()) {
|
|
1178
|
+
if (key.parameter === parameter)
|
|
1179
|
+
return true;
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
return false;
|
|
1183
|
+
}
|
|
1184
|
+
/**
|
|
1185
|
+
* @internal
|
|
1186
|
+
* Stores config parameter metadata for this CC's node
|
|
1187
|
+
*/
|
|
1188
|
+
extendParamInformation(ctx, parameter, valueBitMask, info) {
|
|
1189
|
+
if (valueBitMask === void 0 && this.paramExistsInConfigFile(ctx, parameter)) {
|
|
1190
|
+
return;
|
|
1191
|
+
}
|
|
1192
|
+
const metadata = this.getParamInformation(ctx, parameter, valueBitMask);
|
|
1193
|
+
Object.assign(metadata, info);
|
|
1194
|
+
this.setMetadata(ctx, ConfigurationCCValues.paramInformation(parameter, valueBitMask), metadata);
|
|
1195
|
+
}
|
|
1196
|
+
/**
|
|
1197
|
+
* @internal
|
|
1198
|
+
* Returns stored config parameter metadata for this CC's node
|
|
1199
|
+
*/
|
|
1200
|
+
getParamInformation(ctx, parameter, valueBitMask) {
|
|
1201
|
+
return this.getMetadata(ctx, ConfigurationCCValues.paramInformation(parameter, valueBitMask)) ?? {
|
|
1202
|
+
...import_safe.ValueMetadata.Any
|
|
1203
|
+
};
|
|
1204
|
+
}
|
|
1205
|
+
/**
|
|
1206
|
+
* **INTERNAL:** Returns the param info that was queried for this node. This returns the information that was returned by the node
|
|
1207
|
+
* and does not include partial parameters.
|
|
1208
|
+
*/
|
|
1209
|
+
getQueriedParamInfos(ctx) {
|
|
1210
|
+
const parameters = (0, import_arrays.distinct)(this.getDefinedValueIDs(ctx).map((v) => v.property).filter((p) => typeof p === "number"));
|
|
1211
|
+
return (0, import_objects.composeObject)(parameters.map((p) => [
|
|
1212
|
+
p,
|
|
1213
|
+
this.getParamInformation(ctx, p)
|
|
1214
|
+
]));
|
|
1215
|
+
}
|
|
1216
|
+
/**
|
|
1217
|
+
* Returns stored config parameter metadata for all partial config params addressed with the given parameter number
|
|
1218
|
+
*/
|
|
1219
|
+
getPartialParamInfos(ctx, parameter) {
|
|
1220
|
+
const valueDB = this.getValueDB(ctx);
|
|
1221
|
+
return valueDB.findMetadata((id) => id.commandClass === this.ccId && (id.endpoint ?? 0) === this.endpointIndex && id.property === parameter && id.propertyKey != void 0);
|
|
1222
|
+
}
|
|
1223
|
+
/**
|
|
1224
|
+
* Computes the full value of a parameter after applying a partial param value
|
|
1225
|
+
*/
|
|
1226
|
+
composePartialParamValue(ctx, parameter, bitMask, partialValue) {
|
|
1227
|
+
return this.composePartialParamValues(ctx, parameter, [
|
|
1228
|
+
{ bitMask, partialValue }
|
|
1229
|
+
]);
|
|
1230
|
+
}
|
|
1231
|
+
/**
|
|
1232
|
+
* Computes the full value of a parameter after applying multiple partial param values
|
|
1233
|
+
*/
|
|
1234
|
+
composePartialParamValues(ctx, parameter, partials) {
|
|
1235
|
+
const valueDB = this.getValueDB(ctx);
|
|
1236
|
+
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));
|
|
1237
|
+
let ret = 0;
|
|
1238
|
+
for (const { propertyKey: bitMask, value: partialValue } of otherValues) {
|
|
1239
|
+
ret = (0, import_safe.encodePartial)(ret, partialValue, bitMask);
|
|
1240
|
+
}
|
|
1241
|
+
for (const { bitMask, partialValue } of partials) {
|
|
1242
|
+
ret = (0, import_safe.encodePartial)(ret, partialValue, bitMask);
|
|
1243
|
+
}
|
|
1244
|
+
return ret;
|
|
1245
|
+
}
|
|
1246
|
+
/** Deserializes the config parameter info from a config file */
|
|
1247
|
+
deserializeParamInformationFromConfig(ctx, config) {
|
|
1248
|
+
const valueDB = this.getValueDB(ctx);
|
|
1249
|
+
for (const meta of valueDB.getAllMetadata(this.ccId)) {
|
|
1250
|
+
if (typeof meta.property === "number" && (meta.endpoint ?? 0) === this.endpointIndex) {
|
|
1251
|
+
valueDB.setMetadata(
|
|
1252
|
+
meta,
|
|
1253
|
+
void 0,
|
|
1254
|
+
// Don't emit the added/updated events, as this will spam applications with untranslated events
|
|
1255
|
+
{ noEvent: true }
|
|
1256
|
+
);
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
this.setValue(ctx, ConfigurationCCValues.isParamInformationFromConfig, false);
|
|
1260
|
+
for (const [param, info] of config.entries()) {
|
|
1261
|
+
const paramInfo = (0, import_safe.stripUndefined)({
|
|
1262
|
+
// TODO: Make this smarter! (0...1 ==> boolean)
|
|
1263
|
+
type: "number",
|
|
1264
|
+
valueSize: info.valueSize,
|
|
1265
|
+
min: info.minValue,
|
|
1266
|
+
max: info.maxValue,
|
|
1267
|
+
default: info.defaultValue,
|
|
1268
|
+
unit: info.unit,
|
|
1269
|
+
format: info.unsigned ? import_safe.ConfigValueFormat.UnsignedInteger : import_safe.ConfigValueFormat.SignedInteger,
|
|
1270
|
+
readable: !info.writeOnly,
|
|
1271
|
+
writeable: !info.readOnly,
|
|
1272
|
+
allowManualEntry: info.allowManualEntry,
|
|
1273
|
+
states: info.options.length > 0 ? (0, import_objects.composeObject)(info.options.map(({ label, value }) => [
|
|
1274
|
+
value.toString(),
|
|
1275
|
+
label
|
|
1276
|
+
])) : void 0,
|
|
1277
|
+
label: info.label,
|
|
1278
|
+
description: info.description,
|
|
1279
|
+
isFromConfig: true
|
|
1280
|
+
});
|
|
1281
|
+
this.extendParamInformation(ctx, param.parameter, param.valueBitMask, paramInfo);
|
|
1282
|
+
}
|
|
1283
|
+
this.setValue(ctx, ConfigurationCCValues.isParamInformationFromConfig, true);
|
|
1284
|
+
}
|
|
1285
|
+
translatePropertyKey(ctx, property, propertyKey) {
|
|
1286
|
+
if (typeof property === "number" && (propertyKey == void 0 || typeof propertyKey === "number")) {
|
|
1287
|
+
return void 0;
|
|
1288
|
+
}
|
|
1289
|
+
return super.translateProperty(ctx, property, propertyKey);
|
|
1290
|
+
}
|
|
1291
|
+
translateProperty(ctx, property, propertyKey) {
|
|
1292
|
+
if (typeof property === "number" && (propertyKey == void 0 || typeof propertyKey === "number")) {
|
|
1293
|
+
const paramInfo = this.getParamInformation(ctx, property, propertyKey);
|
|
1294
|
+
if (paramInfo.label)
|
|
1295
|
+
return paramInfo.label;
|
|
1296
|
+
let ret = `param${(0, import_strings.padStart)(property.toString(), 3, "0")}`;
|
|
1297
|
+
if (propertyKey != void 0) {
|
|
1298
|
+
ret += "_" + propertyKey.toString();
|
|
1299
|
+
}
|
|
1300
|
+
return ret;
|
|
1301
|
+
}
|
|
1302
|
+
return super.translateProperty(ctx, property, propertyKey);
|
|
1303
|
+
}
|
|
1304
|
+
};
|
|
1305
|
+
ConfigurationCC = __decorate([
|
|
1306
|
+
(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses.Configuration),
|
|
1307
|
+
(0, import_CommandClassDecorators.implementedVersion)(4),
|
|
1308
|
+
(0, import_CommandClassDecorators.ccValues)(ConfigurationCCValues)
|
|
1309
|
+
], ConfigurationCC);
|
|
1310
|
+
let ConfigurationCCReport = ConfigurationCCReport_1 = class ConfigurationCCReport2 extends ConfigurationCC {
|
|
1311
|
+
constructor(options) {
|
|
1312
|
+
super(options);
|
|
1313
|
+
this.parameter = options.parameter;
|
|
1314
|
+
this.value = options.value;
|
|
1315
|
+
this.valueSize = options.valueSize;
|
|
1316
|
+
this.valueFormat = options.valueFormat;
|
|
1317
|
+
}
|
|
1318
|
+
static from(raw, ctx) {
|
|
1319
|
+
(0, import_safe.validatePayload)(raw.payload.length > 2);
|
|
1320
|
+
const parameter = raw.payload[0];
|
|
1321
|
+
const valueSize = raw.payload[1] & 7;
|
|
1322
|
+
(0, import_safe.validatePayload)(valueSize >= 1, valueSize <= 4, raw.payload.length >= 2 + valueSize);
|
|
1323
|
+
const value = parseValue(raw.payload.subarray(2), valueSize, import_safe.ConfigValueFormat.SignedInteger);
|
|
1324
|
+
return new ConfigurationCCReport_1({
|
|
1325
|
+
nodeId: ctx.sourceNodeId,
|
|
1326
|
+
parameter,
|
|
1327
|
+
valueSize,
|
|
1328
|
+
value
|
|
1329
|
+
});
|
|
1330
|
+
}
|
|
1331
|
+
parameter;
|
|
1332
|
+
value;
|
|
1333
|
+
valueSize;
|
|
1334
|
+
valueFormat;
|
|
1335
|
+
// only used for serialization
|
|
1336
|
+
persistValues(ctx) {
|
|
1337
|
+
if (!super.persistValues(ctx))
|
|
1338
|
+
return false;
|
|
1339
|
+
const ccVersion = (0, import_CommandClass.getEffectiveCCVersion)(ctx, this);
|
|
1340
|
+
const partialParams = this.getPartialParamInfos(ctx, this.parameter);
|
|
1341
|
+
let cachedValueFormat;
|
|
1342
|
+
if (partialParams.length > 0) {
|
|
1343
|
+
cachedValueFormat = partialParams[0].metadata.format;
|
|
1344
|
+
} else {
|
|
1345
|
+
const oldParamInformation = this.getParamInformation(ctx, this.parameter);
|
|
1346
|
+
cachedValueFormat = oldParamInformation.format;
|
|
1347
|
+
this.extendParamInformation(ctx, this.parameter, void 0, {
|
|
1348
|
+
valueSize: this.valueSize
|
|
1349
|
+
});
|
|
1350
|
+
if (ccVersion < 3 && !this.paramExistsInConfigFile(ctx, this.parameter) && oldParamInformation.min == void 0 && oldParamInformation.max == void 0) {
|
|
1351
|
+
const isSigned = oldParamInformation.format == void 0 || oldParamInformation.format === import_safe.ConfigValueFormat.SignedInteger;
|
|
1352
|
+
this.extendParamInformation(ctx, this.parameter, void 0, (0, import_safe.getIntegerLimits)(this.valueSize, isSigned));
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
if (cachedValueFormat != void 0 && cachedValueFormat !== import_safe.ConfigValueFormat.SignedInteger) {
|
|
1356
|
+
this.value = reInterpretSignedValue(this.value, this.valueSize, cachedValueFormat);
|
|
1357
|
+
}
|
|
1358
|
+
if (partialParams.length > 0) {
|
|
1359
|
+
for (const param of partialParams) {
|
|
1360
|
+
if (typeof param.propertyKey === "number") {
|
|
1361
|
+
this.setValue(ctx, ConfigurationCCValues.paramInformation(this.parameter, param.propertyKey), (0, import_safe.parsePartial)(this.value, param.propertyKey, isSignedPartial(param.propertyKey, param.metadata.format)));
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
} else {
|
|
1365
|
+
this.setValue(ctx, ConfigurationCCValues.paramInformation(this.parameter), this.value);
|
|
1366
|
+
}
|
|
1367
|
+
return true;
|
|
1368
|
+
}
|
|
1369
|
+
serialize(ctx) {
|
|
1370
|
+
this.payload = import_safe2.Bytes.concat([
|
|
1371
|
+
import_safe2.Bytes.from([this.parameter, this.valueSize & 7]),
|
|
1372
|
+
new import_safe2.Bytes(this.valueSize)
|
|
1373
|
+
]);
|
|
1374
|
+
serializeValue(this.payload, 2, this.valueSize, this.valueFormat ?? import_safe.ConfigValueFormat.SignedInteger, this.value);
|
|
1375
|
+
return super.serialize(ctx);
|
|
1376
|
+
}
|
|
1377
|
+
toLogEntry(ctx) {
|
|
1378
|
+
return {
|
|
1379
|
+
...super.toLogEntry(ctx),
|
|
1380
|
+
message: {
|
|
1381
|
+
"parameter #": this.parameter,
|
|
1382
|
+
"value size": this.valueSize,
|
|
1383
|
+
value: configValueToString(this.value)
|
|
1384
|
+
}
|
|
1385
|
+
};
|
|
1386
|
+
}
|
|
1387
|
+
};
|
|
1388
|
+
ConfigurationCCReport = ConfigurationCCReport_1 = __decorate([
|
|
1389
|
+
(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.Report)
|
|
1390
|
+
], ConfigurationCCReport);
|
|
1391
|
+
function testResponseForConfigurationGet(sent, received) {
|
|
1392
|
+
return sent.parameter === received.parameter || sent.allowUnexpectedResponse;
|
|
1393
|
+
}
|
|
1394
|
+
let ConfigurationCCGet = ConfigurationCCGet_1 = class ConfigurationCCGet2 extends ConfigurationCC {
|
|
1395
|
+
constructor(options) {
|
|
1396
|
+
super(options);
|
|
1397
|
+
this.parameter = options.parameter;
|
|
1398
|
+
this.allowUnexpectedResponse = options.allowUnexpectedResponse ?? false;
|
|
1399
|
+
}
|
|
1400
|
+
static from(raw, ctx) {
|
|
1401
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
1402
|
+
const parameter = raw.payload[0];
|
|
1403
|
+
return new ConfigurationCCGet_1({
|
|
1404
|
+
nodeId: ctx.sourceNodeId,
|
|
1405
|
+
parameter
|
|
1406
|
+
});
|
|
1407
|
+
}
|
|
1408
|
+
parameter;
|
|
1409
|
+
allowUnexpectedResponse;
|
|
1410
|
+
serialize(ctx) {
|
|
1411
|
+
this.payload = import_safe2.Bytes.from([this.parameter]);
|
|
1412
|
+
return super.serialize(ctx);
|
|
1413
|
+
}
|
|
1414
|
+
toLogEntry(ctx) {
|
|
1415
|
+
return {
|
|
1416
|
+
...super.toLogEntry(ctx),
|
|
1417
|
+
message: { "parameter #": this.parameter }
|
|
1418
|
+
};
|
|
1419
|
+
}
|
|
1420
|
+
};
|
|
1421
|
+
ConfigurationCCGet = ConfigurationCCGet_1 = __decorate([
|
|
1422
|
+
(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.Get),
|
|
1423
|
+
(0, import_CommandClassDecorators.expectedCCResponse)(ConfigurationCCReport, testResponseForConfigurationGet)
|
|
1424
|
+
], ConfigurationCCGet);
|
|
1425
|
+
let ConfigurationCCSet = ConfigurationCCSet_1 = class ConfigurationCCSet2 extends ConfigurationCC {
|
|
1426
|
+
constructor(options) {
|
|
1427
|
+
super(options);
|
|
1428
|
+
this.parameter = options.parameter;
|
|
1429
|
+
this.resetToDefault = !!options.resetToDefault;
|
|
1430
|
+
if (!options.resetToDefault) {
|
|
1431
|
+
this.valueSize = options.valueSize;
|
|
1432
|
+
this.valueFormat = options.valueFormat ?? import_safe.ConfigValueFormat.SignedInteger;
|
|
1433
|
+
this.value = options.value;
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
static from(raw, ctx) {
|
|
1437
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
1438
|
+
const parameter = raw.payload[0];
|
|
1439
|
+
const resetToDefault = !!(raw.payload[1] & 128);
|
|
1440
|
+
const valueSize = raw.payload[1] & 7;
|
|
1441
|
+
(0, import_safe.validatePayload)(valueSize >= 1, valueSize <= 4, raw.payload.length >= 2 + valueSize);
|
|
1442
|
+
const value = parseValue(raw.payload.subarray(2), valueSize, import_safe.ConfigValueFormat.SignedInteger);
|
|
1443
|
+
return new ConfigurationCCSet_1({
|
|
1444
|
+
nodeId: ctx.sourceNodeId,
|
|
1445
|
+
parameter,
|
|
1446
|
+
resetToDefault,
|
|
1447
|
+
valueSize,
|
|
1448
|
+
value
|
|
1449
|
+
});
|
|
1450
|
+
}
|
|
1451
|
+
resetToDefault;
|
|
1452
|
+
parameter;
|
|
1453
|
+
valueSize;
|
|
1454
|
+
valueFormat;
|
|
1455
|
+
value;
|
|
1456
|
+
serialize(ctx) {
|
|
1457
|
+
const valueSize = this.resetToDefault ? 1 : this.valueSize;
|
|
1458
|
+
const payloadLength = 2 + valueSize;
|
|
1459
|
+
this.payload = import_safe2.Bytes.alloc(payloadLength, 0);
|
|
1460
|
+
this.payload[0] = this.parameter;
|
|
1461
|
+
this.payload[1] = (this.resetToDefault ? 128 : 0) | valueSize & 7;
|
|
1462
|
+
if (!this.resetToDefault) {
|
|
1463
|
+
if (typeof this.value === "number" && !isSafeValue(this.value, valueSize, this.valueFormat)) {
|
|
1464
|
+
throwInvalidValueError(this.value, this.parameter, valueSize, this.valueFormat);
|
|
1465
|
+
}
|
|
1466
|
+
try {
|
|
1467
|
+
serializeValue(this.payload, 2, valueSize, this.valueFormat, this.value);
|
|
1468
|
+
} catch (e) {
|
|
1469
|
+
tryCatchOutOfBoundsError(e, this.value, this.parameter, valueSize, this.valueFormat);
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
return super.serialize(ctx);
|
|
1473
|
+
}
|
|
1474
|
+
toLogEntry(ctx) {
|
|
1475
|
+
const message = {
|
|
1476
|
+
"parameter #": this.parameter,
|
|
1477
|
+
"reset to default": this.resetToDefault
|
|
1478
|
+
};
|
|
1479
|
+
if (this.valueSize != void 0) {
|
|
1480
|
+
message["value size"] = this.valueSize;
|
|
1481
|
+
}
|
|
1482
|
+
if (this.valueFormat != void 0) {
|
|
1483
|
+
message["value format"] = (0, import_safe3.getEnumMemberName)(import_safe.ConfigValueFormat, this.valueFormat);
|
|
1484
|
+
}
|
|
1485
|
+
if (this.value != void 0) {
|
|
1486
|
+
message.value = configValueToString(this.value);
|
|
1487
|
+
}
|
|
1488
|
+
return {
|
|
1489
|
+
...super.toLogEntry(ctx),
|
|
1490
|
+
message
|
|
1491
|
+
};
|
|
1492
|
+
}
|
|
1493
|
+
};
|
|
1494
|
+
ConfigurationCCSet = ConfigurationCCSet_1 = __decorate([
|
|
1495
|
+
(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.Set),
|
|
1496
|
+
(0, import_CommandClassDecorators.useSupervision)()
|
|
1497
|
+
], ConfigurationCCSet);
|
|
1498
|
+
function getResponseForBulkSet(cc) {
|
|
1499
|
+
return cc.handshake ? ConfigurationCCBulkReport : void 0;
|
|
1500
|
+
}
|
|
1501
|
+
let ConfigurationCCBulkSet = class ConfigurationCCBulkSet2 extends ConfigurationCC {
|
|
1502
|
+
constructor(options) {
|
|
1503
|
+
super(options);
|
|
1504
|
+
this._parameters = options.parameters;
|
|
1505
|
+
if (this._parameters.length < 1) {
|
|
1506
|
+
throw new import_safe.ZWaveError(`In a ConfigurationCC.BulkSet, parameters must be a non-empty array`, import_safe.ZWaveErrorCodes.CC_Invalid);
|
|
1507
|
+
} else if (!(0, import_safe.isConsecutiveArray)(this._parameters)) {
|
|
1508
|
+
throw new import_safe.ZWaveError(`A ConfigurationCC.BulkSet can only be used for consecutive parameters`, import_safe.ZWaveErrorCodes.CC_Invalid);
|
|
1509
|
+
}
|
|
1510
|
+
this._handshake = !!options.handshake;
|
|
1511
|
+
this._resetToDefault = !!options.resetToDefault;
|
|
1512
|
+
if (!!options.resetToDefault) {
|
|
1513
|
+
this._valueSize = 1;
|
|
1514
|
+
this._valueFormat = import_safe.ConfigValueFormat.SignedInteger;
|
|
1515
|
+
this._values = this._parameters.map(() => 0);
|
|
1516
|
+
} else {
|
|
1517
|
+
this._valueSize = options.valueSize;
|
|
1518
|
+
this._valueFormat = options.valueFormat ?? import_safe.ConfigValueFormat.SignedInteger;
|
|
1519
|
+
this._values = options.values;
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
static from(_raw, _ctx) {
|
|
1523
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
1524
|
+
}
|
|
1525
|
+
_parameters;
|
|
1526
|
+
get parameters() {
|
|
1527
|
+
return this._parameters;
|
|
1528
|
+
}
|
|
1529
|
+
_resetToDefault;
|
|
1530
|
+
get resetToDefault() {
|
|
1531
|
+
return this._resetToDefault;
|
|
1532
|
+
}
|
|
1533
|
+
_valueSize;
|
|
1534
|
+
get valueSize() {
|
|
1535
|
+
return this._valueSize;
|
|
1536
|
+
}
|
|
1537
|
+
_valueFormat;
|
|
1538
|
+
get valueFormat() {
|
|
1539
|
+
return this._valueFormat;
|
|
1540
|
+
}
|
|
1541
|
+
_values;
|
|
1542
|
+
get values() {
|
|
1543
|
+
return this._values;
|
|
1544
|
+
}
|
|
1545
|
+
_handshake;
|
|
1546
|
+
get handshake() {
|
|
1547
|
+
return this._handshake;
|
|
1548
|
+
}
|
|
1549
|
+
serialize(ctx) {
|
|
1550
|
+
const valueSize = this._resetToDefault ? 1 : this.valueSize;
|
|
1551
|
+
const payloadLength = 4 + valueSize * this.parameters.length;
|
|
1552
|
+
this.payload = import_safe2.Bytes.alloc(payloadLength, 0);
|
|
1553
|
+
this.payload.writeUInt16BE(this.parameters[0], 0);
|
|
1554
|
+
this.payload[2] = this.parameters.length;
|
|
1555
|
+
this.payload[3] = (this._resetToDefault ? 128 : 0) | (this.handshake ? 64 : 0) | valueSize & 7;
|
|
1556
|
+
if (!this._resetToDefault) {
|
|
1557
|
+
for (let i = 0; i < this.parameters.length; i++) {
|
|
1558
|
+
const value = this._values[i];
|
|
1559
|
+
const param = this._parameters[i];
|
|
1560
|
+
if (!isSafeValue(value, valueSize, this._valueFormat)) {
|
|
1561
|
+
throwInvalidValueError(value, param, valueSize, this._valueFormat);
|
|
1562
|
+
}
|
|
1563
|
+
try {
|
|
1564
|
+
serializeValue(this.payload, 4 + i * valueSize, valueSize, this._valueFormat, value);
|
|
1565
|
+
} catch (e) {
|
|
1566
|
+
tryCatchOutOfBoundsError(e, value, param, valueSize, this._valueFormat);
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
return super.serialize(ctx);
|
|
1571
|
+
}
|
|
1572
|
+
toLogEntry(ctx) {
|
|
1573
|
+
const message = {
|
|
1574
|
+
handshake: this.handshake,
|
|
1575
|
+
"reset to default": this.resetToDefault,
|
|
1576
|
+
"value size": this.valueSize
|
|
1577
|
+
};
|
|
1578
|
+
if (this._values.length > 0) {
|
|
1579
|
+
message.values = this._values.map((value, i) => `
|
|
1580
|
+
\xB7 #${this._parameters[i]}: ${configValueToString(value)}`).join("");
|
|
1581
|
+
}
|
|
1582
|
+
return {
|
|
1583
|
+
...super.toLogEntry(ctx),
|
|
1584
|
+
message
|
|
1585
|
+
};
|
|
1586
|
+
}
|
|
1587
|
+
};
|
|
1588
|
+
ConfigurationCCBulkSet = __decorate([
|
|
1589
|
+
(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.BulkSet),
|
|
1590
|
+
(0, import_CommandClassDecorators.expectedCCResponse)(getResponseForBulkSet),
|
|
1591
|
+
(0, import_CommandClassDecorators.useSupervision)()
|
|
1592
|
+
], ConfigurationCCBulkSet);
|
|
1593
|
+
let ConfigurationCCBulkReport = ConfigurationCCBulkReport_1 = class ConfigurationCCBulkReport2 extends ConfigurationCC {
|
|
1594
|
+
constructor(options) {
|
|
1595
|
+
super(options);
|
|
1596
|
+
this.reportsToFollow = options.reportsToFollow;
|
|
1597
|
+
this.defaultValues = options.defaultValues;
|
|
1598
|
+
this.isHandshakeResponse = options.isHandshakeResponse;
|
|
1599
|
+
this.valueSize = options.valueSize;
|
|
1600
|
+
for (const [param, value] of Object.entries(options.values)) {
|
|
1601
|
+
this._values.set(parseInt(param), value);
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
static from(raw, ctx) {
|
|
1605
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 5);
|
|
1606
|
+
const firstParameter = raw.payload.readUInt16BE(0);
|
|
1607
|
+
const numParams = raw.payload[2];
|
|
1608
|
+
const reportsToFollow = raw.payload[3];
|
|
1609
|
+
const defaultValues = !!(raw.payload[4] & 128);
|
|
1610
|
+
const isHandshakeResponse = !!(raw.payload[4] & 64);
|
|
1611
|
+
const valueSize = raw.payload[4] & 7;
|
|
1612
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 5 + numParams * valueSize);
|
|
1613
|
+
const values = {};
|
|
1614
|
+
for (let i = 0; i < numParams; i++) {
|
|
1615
|
+
const param = firstParameter + i;
|
|
1616
|
+
values[param] = parseValue(raw.payload.subarray(5 + i * valueSize), valueSize, import_safe.ConfigValueFormat.SignedInteger);
|
|
1617
|
+
}
|
|
1618
|
+
return new ConfigurationCCBulkReport_1({
|
|
1619
|
+
nodeId: ctx.sourceNodeId,
|
|
1620
|
+
reportsToFollow,
|
|
1621
|
+
defaultValues,
|
|
1622
|
+
isHandshakeResponse,
|
|
1623
|
+
valueSize,
|
|
1624
|
+
values
|
|
1625
|
+
});
|
|
1626
|
+
}
|
|
1627
|
+
persistValues(ctx) {
|
|
1628
|
+
if (!super.persistValues(ctx))
|
|
1629
|
+
return false;
|
|
1630
|
+
for (let [parameter, value] of this._values.entries()) {
|
|
1631
|
+
const oldParamInformation = this.getParamInformation(ctx, parameter);
|
|
1632
|
+
if (oldParamInformation.format != void 0 && oldParamInformation.format !== import_safe.ConfigValueFormat.SignedInteger) {
|
|
1633
|
+
value = reInterpretSignedValue(value, this.valueSize, oldParamInformation.format);
|
|
1634
|
+
this._values.set(parameter, value);
|
|
1635
|
+
}
|
|
1636
|
+
this.setValue(ctx, ConfigurationCCValues.paramInformation(parameter), value);
|
|
1637
|
+
}
|
|
1638
|
+
return true;
|
|
1639
|
+
}
|
|
1640
|
+
reportsToFollow;
|
|
1641
|
+
defaultValues;
|
|
1642
|
+
isHandshakeResponse;
|
|
1643
|
+
valueSize;
|
|
1644
|
+
_values = /* @__PURE__ */ new Map();
|
|
1645
|
+
get values() {
|
|
1646
|
+
return this._values;
|
|
1647
|
+
}
|
|
1648
|
+
getPartialCCSessionId() {
|
|
1649
|
+
return {};
|
|
1650
|
+
}
|
|
1651
|
+
expectMoreMessages() {
|
|
1652
|
+
return this.reportsToFollow > 0;
|
|
1653
|
+
}
|
|
1654
|
+
toLogEntry(ctx) {
|
|
1655
|
+
const message = {
|
|
1656
|
+
"handshake response": this.isHandshakeResponse,
|
|
1657
|
+
"default values": this.defaultValues,
|
|
1658
|
+
"value size": this.valueSize,
|
|
1659
|
+
"reports to follow": this.reportsToFollow
|
|
1660
|
+
};
|
|
1661
|
+
if (this._values.size > 0) {
|
|
1662
|
+
message.values = [...this._values].map(([param, value]) => `
|
|
1663
|
+
\xB7 #${param}: ${configValueToString(value)}`).join("");
|
|
1664
|
+
}
|
|
1665
|
+
return {
|
|
1666
|
+
...super.toLogEntry(ctx),
|
|
1667
|
+
message
|
|
1668
|
+
};
|
|
1669
|
+
}
|
|
1670
|
+
};
|
|
1671
|
+
ConfigurationCCBulkReport = ConfigurationCCBulkReport_1 = __decorate([
|
|
1672
|
+
(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.BulkReport)
|
|
1673
|
+
], ConfigurationCCBulkReport);
|
|
1674
|
+
let ConfigurationCCBulkGet = class ConfigurationCCBulkGet2 extends ConfigurationCC {
|
|
1675
|
+
constructor(options) {
|
|
1676
|
+
super(options);
|
|
1677
|
+
this._parameters = options.parameters.sort();
|
|
1678
|
+
if (!(0, import_safe.isConsecutiveArray)(this.parameters)) {
|
|
1679
|
+
throw new import_safe.ZWaveError(`A ConfigurationCC.BulkGet can only be used for consecutive parameters`, import_safe.ZWaveErrorCodes.CC_Invalid);
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1682
|
+
static from(_raw, _ctx) {
|
|
1683
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
1684
|
+
}
|
|
1685
|
+
_parameters;
|
|
1686
|
+
get parameters() {
|
|
1687
|
+
return this._parameters;
|
|
1688
|
+
}
|
|
1689
|
+
serialize(ctx) {
|
|
1690
|
+
this.payload = new import_safe2.Bytes(3);
|
|
1691
|
+
this.payload.writeUInt16BE(this.parameters[0], 0);
|
|
1692
|
+
this.payload[2] = this.parameters.length;
|
|
1693
|
+
return super.serialize(ctx);
|
|
1694
|
+
}
|
|
1695
|
+
toLogEntry(ctx) {
|
|
1696
|
+
return {
|
|
1697
|
+
...super.toLogEntry(ctx),
|
|
1698
|
+
message: { parameters: this.parameters.join(", ") }
|
|
1699
|
+
};
|
|
1700
|
+
}
|
|
1701
|
+
};
|
|
1702
|
+
ConfigurationCCBulkGet = __decorate([
|
|
1703
|
+
(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.BulkGet),
|
|
1704
|
+
(0, import_CommandClassDecorators.expectedCCResponse)(ConfigurationCCBulkReport)
|
|
1705
|
+
], ConfigurationCCBulkGet);
|
|
1706
|
+
let ConfigurationCCNameReport = ConfigurationCCNameReport_1 = class ConfigurationCCNameReport2 extends ConfigurationCC {
|
|
1707
|
+
constructor(options) {
|
|
1708
|
+
super(options);
|
|
1709
|
+
this.parameter = options.parameter;
|
|
1710
|
+
this.name = options.name;
|
|
1711
|
+
this.reportsToFollow = options.reportsToFollow;
|
|
1712
|
+
}
|
|
1713
|
+
static from(raw, ctx) {
|
|
1714
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 3);
|
|
1715
|
+
const parameter = raw.payload.readUInt16BE(0);
|
|
1716
|
+
const reportsToFollow = raw.payload[2];
|
|
1717
|
+
if (reportsToFollow > 0) {
|
|
1718
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 4);
|
|
1719
|
+
}
|
|
1720
|
+
const name = raw.payload.subarray(3).toString("utf8");
|
|
1721
|
+
return new ConfigurationCCNameReport_1({
|
|
1722
|
+
nodeId: ctx.sourceNodeId,
|
|
1723
|
+
parameter,
|
|
1724
|
+
reportsToFollow,
|
|
1725
|
+
name
|
|
1726
|
+
});
|
|
1727
|
+
}
|
|
1728
|
+
parameter;
|
|
1729
|
+
name;
|
|
1730
|
+
reportsToFollow;
|
|
1731
|
+
persistValues(ctx) {
|
|
1732
|
+
if (!super.persistValues(ctx))
|
|
1733
|
+
return false;
|
|
1734
|
+
const partialParams = this.getPartialParamInfos(ctx, this.parameter);
|
|
1735
|
+
if (partialParams.length === 0) {
|
|
1736
|
+
this.extendParamInformation(ctx, this.parameter, void 0, {
|
|
1737
|
+
label: this.name
|
|
1738
|
+
});
|
|
1739
|
+
} else {
|
|
1740
|
+
for (const param of partialParams) {
|
|
1741
|
+
const paramNumber = param.property;
|
|
1742
|
+
const bitMask = param.propertyKey;
|
|
1743
|
+
const bitNumber = Math.log2(bitMask) % 1 === 0 ? Math.log2(bitMask) : void 0;
|
|
1744
|
+
let label = `${this.name} - ${bitMask}`;
|
|
1745
|
+
if (bitNumber != void 0) {
|
|
1746
|
+
label += ` (bit ${bitNumber})`;
|
|
1747
|
+
}
|
|
1748
|
+
this.extendParamInformation(ctx, paramNumber, bitMask, {
|
|
1749
|
+
label
|
|
1750
|
+
});
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
return true;
|
|
1754
|
+
}
|
|
1755
|
+
serialize(ctx) {
|
|
1756
|
+
const nameBuffer = import_safe2.Bytes.from(this.name, "utf8");
|
|
1757
|
+
this.payload = new import_safe2.Bytes(3 + nameBuffer.length);
|
|
1758
|
+
this.payload.writeUInt16BE(this.parameter, 0);
|
|
1759
|
+
this.payload[2] = this.reportsToFollow;
|
|
1760
|
+
this.payload.set(nameBuffer, 3);
|
|
1761
|
+
return super.serialize(ctx);
|
|
1762
|
+
}
|
|
1763
|
+
getPartialCCSessionId() {
|
|
1764
|
+
return { parameter: this.parameter };
|
|
1765
|
+
}
|
|
1766
|
+
expectMoreMessages() {
|
|
1767
|
+
return this.reportsToFollow > 0;
|
|
1768
|
+
}
|
|
1769
|
+
mergePartialCCs(partials, _ctx) {
|
|
1770
|
+
this.name = [...partials, this].map((report) => report.name).reduce((prev, cur) => prev + cur, "");
|
|
1771
|
+
}
|
|
1772
|
+
toLogEntry(ctx) {
|
|
1773
|
+
return {
|
|
1774
|
+
...super.toLogEntry(ctx),
|
|
1775
|
+
message: {
|
|
1776
|
+
"parameter #": this.parameter,
|
|
1777
|
+
name: this.name,
|
|
1778
|
+
"reports to follow": this.reportsToFollow
|
|
1779
|
+
}
|
|
1780
|
+
};
|
|
1781
|
+
}
|
|
1782
|
+
};
|
|
1783
|
+
ConfigurationCCNameReport = ConfigurationCCNameReport_1 = __decorate([
|
|
1784
|
+
(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.NameReport)
|
|
1785
|
+
], ConfigurationCCNameReport);
|
|
1786
|
+
let ConfigurationCCNameGet = ConfigurationCCNameGet_1 = class ConfigurationCCNameGet2 extends ConfigurationCC {
|
|
1787
|
+
constructor(options) {
|
|
1788
|
+
super(options);
|
|
1789
|
+
this.parameter = options.parameter;
|
|
1790
|
+
}
|
|
1791
|
+
static from(raw, ctx) {
|
|
1792
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
1793
|
+
const parameter = raw.payload.readUInt16BE(0);
|
|
1794
|
+
return new ConfigurationCCNameGet_1({
|
|
1795
|
+
nodeId: ctx.sourceNodeId,
|
|
1796
|
+
parameter
|
|
1797
|
+
});
|
|
1798
|
+
}
|
|
1799
|
+
parameter;
|
|
1800
|
+
serialize(ctx) {
|
|
1801
|
+
this.payload = new import_safe2.Bytes(2);
|
|
1802
|
+
this.payload.writeUInt16BE(this.parameter, 0);
|
|
1803
|
+
return super.serialize(ctx);
|
|
1804
|
+
}
|
|
1805
|
+
toLogEntry(ctx) {
|
|
1806
|
+
return {
|
|
1807
|
+
...super.toLogEntry(ctx),
|
|
1808
|
+
message: { "parameter #": this.parameter }
|
|
1809
|
+
};
|
|
1810
|
+
}
|
|
1811
|
+
};
|
|
1812
|
+
ConfigurationCCNameGet = ConfigurationCCNameGet_1 = __decorate([
|
|
1813
|
+
(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.NameGet),
|
|
1814
|
+
(0, import_CommandClassDecorators.expectedCCResponse)(ConfigurationCCNameReport)
|
|
1815
|
+
], ConfigurationCCNameGet);
|
|
1816
|
+
let ConfigurationCCInfoReport = ConfigurationCCInfoReport_1 = class ConfigurationCCInfoReport2 extends ConfigurationCC {
|
|
1817
|
+
constructor(options) {
|
|
1818
|
+
super(options);
|
|
1819
|
+
this.parameter = options.parameter;
|
|
1820
|
+
this.info = options.info;
|
|
1821
|
+
this.reportsToFollow = options.reportsToFollow;
|
|
1822
|
+
}
|
|
1823
|
+
static from(raw, ctx) {
|
|
1824
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 3);
|
|
1825
|
+
const parameter = raw.payload.readUInt16BE(0);
|
|
1826
|
+
const reportsToFollow = raw.payload[2];
|
|
1827
|
+
if (reportsToFollow > 0) {
|
|
1828
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 4);
|
|
1829
|
+
}
|
|
1830
|
+
const info = raw.payload.subarray(3).toString("utf8");
|
|
1831
|
+
return new ConfigurationCCInfoReport_1({
|
|
1832
|
+
nodeId: ctx.sourceNodeId,
|
|
1833
|
+
parameter,
|
|
1834
|
+
reportsToFollow,
|
|
1835
|
+
info
|
|
1836
|
+
});
|
|
1837
|
+
}
|
|
1838
|
+
parameter;
|
|
1839
|
+
info;
|
|
1840
|
+
reportsToFollow;
|
|
1841
|
+
persistValues(ctx) {
|
|
1842
|
+
if (!super.persistValues(ctx))
|
|
1843
|
+
return false;
|
|
1844
|
+
const partialParams = this.getPartialParamInfos(ctx, this.parameter).sort((a, b) => (a.propertyKey ?? 0) - (b.propertyKey ?? 0));
|
|
1845
|
+
if (partialParams.length === 0) {
|
|
1846
|
+
this.extendParamInformation(ctx, this.parameter, void 0, {
|
|
1847
|
+
description: this.info
|
|
1848
|
+
});
|
|
1849
|
+
} else {
|
|
1850
|
+
let firstParamLabel;
|
|
1851
|
+
for (const param of partialParams) {
|
|
1852
|
+
const paramNumber = param.property;
|
|
1853
|
+
const bitMask = param.propertyKey;
|
|
1854
|
+
const description = firstParamLabel ? `Refer to ${firstParamLabel}` : this.info;
|
|
1855
|
+
this.extendParamInformation(ctx, paramNumber, bitMask, {
|
|
1856
|
+
description
|
|
1857
|
+
});
|
|
1858
|
+
if (firstParamLabel == void 0) {
|
|
1859
|
+
firstParamLabel = this.getParamInformation(ctx, paramNumber, bitMask).label ?? `parameter ${paramNumber} - ${bitMask}`;
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
return true;
|
|
1864
|
+
}
|
|
1865
|
+
serialize(ctx) {
|
|
1866
|
+
const infoBuffer = import_safe2.Bytes.from(this.info, "utf8");
|
|
1867
|
+
this.payload = new import_safe2.Bytes(3 + infoBuffer.length);
|
|
1868
|
+
this.payload.writeUInt16BE(this.parameter, 0);
|
|
1869
|
+
this.payload[2] = this.reportsToFollow;
|
|
1870
|
+
this.payload.set(infoBuffer, 3);
|
|
1871
|
+
return super.serialize(ctx);
|
|
1872
|
+
}
|
|
1873
|
+
getPartialCCSessionId() {
|
|
1874
|
+
return { parameter: this.parameter };
|
|
1875
|
+
}
|
|
1876
|
+
expectMoreMessages() {
|
|
1877
|
+
return this.reportsToFollow > 0;
|
|
1878
|
+
}
|
|
1879
|
+
mergePartialCCs(partials, _ctx) {
|
|
1880
|
+
this.info = [...partials, this].map((report) => report.info).reduce((prev, cur) => prev + cur, "");
|
|
1881
|
+
}
|
|
1882
|
+
toLogEntry(ctx) {
|
|
1883
|
+
return {
|
|
1884
|
+
...super.toLogEntry(ctx),
|
|
1885
|
+
message: {
|
|
1886
|
+
"parameter #": this.parameter,
|
|
1887
|
+
info: this.info,
|
|
1888
|
+
"reports to follow": this.reportsToFollow
|
|
1889
|
+
}
|
|
1890
|
+
};
|
|
1891
|
+
}
|
|
1892
|
+
};
|
|
1893
|
+
ConfigurationCCInfoReport = ConfigurationCCInfoReport_1 = __decorate([
|
|
1894
|
+
(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.InfoReport)
|
|
1895
|
+
], ConfigurationCCInfoReport);
|
|
1896
|
+
let ConfigurationCCInfoGet = ConfigurationCCInfoGet_1 = class ConfigurationCCInfoGet2 extends ConfigurationCC {
|
|
1897
|
+
constructor(options) {
|
|
1898
|
+
super(options);
|
|
1899
|
+
this.parameter = options.parameter;
|
|
1900
|
+
}
|
|
1901
|
+
static from(raw, ctx) {
|
|
1902
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
1903
|
+
const parameter = raw.payload.readUInt16BE(0);
|
|
1904
|
+
return new ConfigurationCCInfoGet_1({
|
|
1905
|
+
nodeId: ctx.sourceNodeId,
|
|
1906
|
+
parameter
|
|
1907
|
+
});
|
|
1908
|
+
}
|
|
1909
|
+
parameter;
|
|
1910
|
+
serialize(ctx) {
|
|
1911
|
+
this.payload = new import_safe2.Bytes(2);
|
|
1912
|
+
this.payload.writeUInt16BE(this.parameter, 0);
|
|
1913
|
+
return super.serialize(ctx);
|
|
1914
|
+
}
|
|
1915
|
+
toLogEntry(ctx) {
|
|
1916
|
+
return {
|
|
1917
|
+
...super.toLogEntry(ctx),
|
|
1918
|
+
message: { "parameter #": this.parameter }
|
|
1919
|
+
};
|
|
1920
|
+
}
|
|
1921
|
+
};
|
|
1922
|
+
ConfigurationCCInfoGet = ConfigurationCCInfoGet_1 = __decorate([
|
|
1923
|
+
(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.InfoGet),
|
|
1924
|
+
(0, import_CommandClassDecorators.expectedCCResponse)(ConfigurationCCInfoReport)
|
|
1925
|
+
], ConfigurationCCInfoGet);
|
|
1926
|
+
let ConfigurationCCPropertiesReport = ConfigurationCCPropertiesReport_1 = class ConfigurationCCPropertiesReport2 extends ConfigurationCC {
|
|
1927
|
+
constructor(options) {
|
|
1928
|
+
super(options);
|
|
1929
|
+
this.parameter = options.parameter;
|
|
1930
|
+
this.valueSize = options.valueSize;
|
|
1931
|
+
this.valueFormat = options.valueFormat;
|
|
1932
|
+
if (this.valueSize > 0) {
|
|
1933
|
+
if (options.minValue == void 0) {
|
|
1934
|
+
throw new import_safe.ZWaveError("The minimum value must be set when the value size is non-zero", import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
1935
|
+
} else if (options.maxValue == void 0) {
|
|
1936
|
+
throw new import_safe.ZWaveError("The maximum value must be set when the value size is non-zero", import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
1937
|
+
} else if (options.defaultValue == void 0) {
|
|
1938
|
+
throw new import_safe.ZWaveError("The default value must be set when the value size is non-zero", import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
1939
|
+
}
|
|
1940
|
+
this.minValue = options.minValue;
|
|
1941
|
+
this.maxValue = options.maxValue;
|
|
1942
|
+
this.defaultValue = options.defaultValue;
|
|
1943
|
+
}
|
|
1944
|
+
this.nextParameter = options.nextParameter;
|
|
1945
|
+
this.altersCapabilities = options.altersCapabilities;
|
|
1946
|
+
this.isReadonly = options.isReadonly;
|
|
1947
|
+
this.isAdvanced = options.isAdvanced;
|
|
1948
|
+
this.noBulkSupport = options.noBulkSupport;
|
|
1949
|
+
}
|
|
1950
|
+
static from(raw, ctx) {
|
|
1951
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 3);
|
|
1952
|
+
const parameter = raw.payload.readUInt16BE(0);
|
|
1953
|
+
const valueFormat = (raw.payload[2] & 56) >>> 3;
|
|
1954
|
+
const valueSize = raw.payload[2] & 7;
|
|
1955
|
+
let nextParameter;
|
|
1956
|
+
if (valueSize === 0 && raw.payload.length < 5) {
|
|
1957
|
+
nextParameter = 0;
|
|
1958
|
+
return new ConfigurationCCPropertiesReport_1({
|
|
1959
|
+
nodeId: ctx.sourceNodeId,
|
|
1960
|
+
parameter,
|
|
1961
|
+
valueFormat,
|
|
1962
|
+
valueSize,
|
|
1963
|
+
nextParameter
|
|
1964
|
+
});
|
|
1965
|
+
}
|
|
1966
|
+
const nextParameterOffset = 3 + 3 * valueSize;
|
|
1967
|
+
(0, import_safe.validatePayload)(raw.payload.length >= nextParameterOffset + 2);
|
|
1968
|
+
let minValue;
|
|
1969
|
+
let maxValue;
|
|
1970
|
+
let defaultValue;
|
|
1971
|
+
if (valueSize > 0) {
|
|
1972
|
+
if (valueFormat === import_safe.ConfigValueFormat.BitField) {
|
|
1973
|
+
minValue = 0;
|
|
1974
|
+
} else {
|
|
1975
|
+
minValue = parseValue(raw.payload.subarray(3), valueSize, valueFormat);
|
|
1976
|
+
}
|
|
1977
|
+
maxValue = parseValue(raw.payload.subarray(3 + valueSize), valueSize, valueFormat);
|
|
1978
|
+
defaultValue = parseValue(raw.payload.subarray(3 + 2 * valueSize), valueSize, valueFormat);
|
|
1979
|
+
}
|
|
1980
|
+
nextParameter = raw.payload.readUInt16BE(nextParameterOffset);
|
|
1981
|
+
let altersCapabilities;
|
|
1982
|
+
let isReadonly;
|
|
1983
|
+
let isAdvanced;
|
|
1984
|
+
let noBulkSupport;
|
|
1985
|
+
if (raw.payload.length >= nextParameterOffset + 3) {
|
|
1986
|
+
const options1 = raw.payload[2];
|
|
1987
|
+
const options2 = raw.payload[3 + 3 * valueSize + 2];
|
|
1988
|
+
altersCapabilities = !!(options1 & 128);
|
|
1989
|
+
isReadonly = !!(options1 & 64);
|
|
1990
|
+
isAdvanced = !!(options2 & 1);
|
|
1991
|
+
noBulkSupport = !!(options2 & 2);
|
|
1992
|
+
}
|
|
1993
|
+
return new ConfigurationCCPropertiesReport_1({
|
|
1994
|
+
nodeId: ctx.sourceNodeId,
|
|
1995
|
+
parameter,
|
|
1996
|
+
valueFormat,
|
|
1997
|
+
valueSize,
|
|
1998
|
+
nextParameter,
|
|
1999
|
+
minValue,
|
|
2000
|
+
maxValue,
|
|
2001
|
+
defaultValue,
|
|
2002
|
+
altersCapabilities,
|
|
2003
|
+
isReadonly,
|
|
2004
|
+
isAdvanced,
|
|
2005
|
+
noBulkSupport
|
|
2006
|
+
});
|
|
2007
|
+
}
|
|
2008
|
+
persistValues(ctx) {
|
|
2009
|
+
if (!super.persistValues(ctx))
|
|
2010
|
+
return false;
|
|
2011
|
+
if (this.valueSize > 0) {
|
|
2012
|
+
const baseInfo = {
|
|
2013
|
+
type: "number",
|
|
2014
|
+
format: this.valueFormat,
|
|
2015
|
+
valueSize: this.valueSize,
|
|
2016
|
+
requiresReInclusion: this.altersCapabilities,
|
|
2017
|
+
readable: true,
|
|
2018
|
+
writeable: !this.isReadonly,
|
|
2019
|
+
allowManualEntry: true,
|
|
2020
|
+
isAdvanced: this.isAdvanced,
|
|
2021
|
+
noBulkSupport: this.noBulkSupport,
|
|
2022
|
+
isFromConfig: false
|
|
2023
|
+
};
|
|
2024
|
+
if (this.valueFormat !== import_safe.ConfigValueFormat.BitField) {
|
|
2025
|
+
if (!this.paramExistsInConfigFile(ctx, this.parameter)) {
|
|
2026
|
+
const paramInfo = (0, import_safe.stripUndefined)({
|
|
2027
|
+
...baseInfo,
|
|
2028
|
+
min: this.minValue,
|
|
2029
|
+
max: this.maxValue,
|
|
2030
|
+
default: this.defaultValue
|
|
2031
|
+
});
|
|
2032
|
+
this.extendParamInformation(ctx, this.parameter, void 0, paramInfo);
|
|
2033
|
+
}
|
|
2034
|
+
} else {
|
|
2035
|
+
const bits = this.maxValue;
|
|
2036
|
+
let mask = 1;
|
|
2037
|
+
while (mask <= bits) {
|
|
2038
|
+
if (
|
|
2039
|
+
// Only create partials that exist
|
|
2040
|
+
!!(mask & bits) && !this.paramExistsInConfigFile(ctx, this.parameter, mask)
|
|
2041
|
+
) {
|
|
2042
|
+
const paramInfo = (0, import_safe.stripUndefined)({
|
|
2043
|
+
...baseInfo,
|
|
2044
|
+
min: 0,
|
|
2045
|
+
max: 1,
|
|
2046
|
+
default: this.defaultValue & mask ? 1 : 0
|
|
2047
|
+
});
|
|
2048
|
+
this.extendParamInformation(ctx, this.parameter, mask, paramInfo);
|
|
2049
|
+
}
|
|
2050
|
+
mask *= 2;
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
}
|
|
2054
|
+
return true;
|
|
2055
|
+
}
|
|
2056
|
+
parameter;
|
|
2057
|
+
valueSize;
|
|
2058
|
+
valueFormat;
|
|
2059
|
+
minValue;
|
|
2060
|
+
maxValue;
|
|
2061
|
+
defaultValue;
|
|
2062
|
+
nextParameter;
|
|
2063
|
+
altersCapabilities;
|
|
2064
|
+
isReadonly;
|
|
2065
|
+
isAdvanced;
|
|
2066
|
+
noBulkSupport;
|
|
2067
|
+
serialize(ctx) {
|
|
2068
|
+
this.payload = new import_safe2.Bytes(3 + 3 * this.valueSize + 2 + 1);
|
|
2069
|
+
this.payload.writeUInt16BE(this.parameter, 0);
|
|
2070
|
+
const options1 = (this.altersCapabilities ? 128 : 0) | (this.isReadonly ? 64 : 0) | (this.valueFormat & 7) << 3 | this.valueSize & 7;
|
|
2071
|
+
this.payload[2] = options1;
|
|
2072
|
+
let offset = 3;
|
|
2073
|
+
if (this.valueSize > 0) {
|
|
2074
|
+
serializeValue(this.payload, offset, this.valueSize, this.valueFormat, this.minValue);
|
|
2075
|
+
offset += this.valueSize;
|
|
2076
|
+
serializeValue(this.payload, offset, this.valueSize, this.valueFormat, this.maxValue);
|
|
2077
|
+
offset += this.valueSize;
|
|
2078
|
+
serializeValue(this.payload, offset, this.valueSize, this.valueFormat, this.defaultValue);
|
|
2079
|
+
offset += this.valueSize;
|
|
2080
|
+
}
|
|
2081
|
+
this.payload.writeUInt16BE(this.nextParameter, offset);
|
|
2082
|
+
offset += 2;
|
|
2083
|
+
const options2 = (this.isAdvanced ? 1 : 0) | (this.noBulkSupport ? 2 : 0);
|
|
2084
|
+
this.payload[offset] = options2;
|
|
2085
|
+
return super.serialize(ctx);
|
|
2086
|
+
}
|
|
2087
|
+
toLogEntry(ctx) {
|
|
2088
|
+
const message = {
|
|
2089
|
+
"parameter #": this.parameter,
|
|
2090
|
+
"next param #": this.nextParameter,
|
|
2091
|
+
"value size": this.valueSize,
|
|
2092
|
+
"value format": (0, import_safe3.getEnumMemberName)(import_safe.ConfigValueFormat, this.valueFormat)
|
|
2093
|
+
};
|
|
2094
|
+
if (this.minValue != void 0) {
|
|
2095
|
+
message["min value"] = configValueToString(this.minValue);
|
|
2096
|
+
}
|
|
2097
|
+
if (this.maxValue != void 0) {
|
|
2098
|
+
message["max value"] = configValueToString(this.maxValue);
|
|
2099
|
+
}
|
|
2100
|
+
if (this.defaultValue != void 0) {
|
|
2101
|
+
message["default value"] = configValueToString(this.defaultValue);
|
|
2102
|
+
}
|
|
2103
|
+
if (this.altersCapabilities != void 0) {
|
|
2104
|
+
message["alters capabilities"] = this.altersCapabilities;
|
|
2105
|
+
}
|
|
2106
|
+
if (this.isReadonly != void 0) {
|
|
2107
|
+
message.readonly = this.isReadonly;
|
|
2108
|
+
}
|
|
2109
|
+
if (this.isAdvanced != void 0) {
|
|
2110
|
+
message.advanced = this.isAdvanced;
|
|
2111
|
+
}
|
|
2112
|
+
if (this.noBulkSupport != void 0) {
|
|
2113
|
+
message["bulk support"] = !this.noBulkSupport;
|
|
2114
|
+
}
|
|
2115
|
+
return {
|
|
2116
|
+
...super.toLogEntry(ctx),
|
|
2117
|
+
message
|
|
2118
|
+
};
|
|
2119
|
+
}
|
|
2120
|
+
};
|
|
2121
|
+
ConfigurationCCPropertiesReport = ConfigurationCCPropertiesReport_1 = __decorate([
|
|
2122
|
+
(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.PropertiesReport)
|
|
2123
|
+
], ConfigurationCCPropertiesReport);
|
|
2124
|
+
let ConfigurationCCPropertiesGet = ConfigurationCCPropertiesGet_1 = class ConfigurationCCPropertiesGet2 extends ConfigurationCC {
|
|
2125
|
+
constructor(options) {
|
|
2126
|
+
super(options);
|
|
2127
|
+
this.parameter = options.parameter;
|
|
2128
|
+
}
|
|
2129
|
+
static from(raw, ctx) {
|
|
2130
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
2131
|
+
const parameter = raw.payload.readUInt16BE(0);
|
|
2132
|
+
return new ConfigurationCCPropertiesGet_1({
|
|
2133
|
+
nodeId: ctx.sourceNodeId,
|
|
2134
|
+
parameter
|
|
2135
|
+
});
|
|
2136
|
+
}
|
|
2137
|
+
parameter;
|
|
2138
|
+
serialize(ctx) {
|
|
2139
|
+
this.payload = new import_safe2.Bytes(2);
|
|
2140
|
+
this.payload.writeUInt16BE(this.parameter, 0);
|
|
2141
|
+
return super.serialize(ctx);
|
|
2142
|
+
}
|
|
2143
|
+
toLogEntry(ctx) {
|
|
2144
|
+
return {
|
|
2145
|
+
...super.toLogEntry(ctx),
|
|
2146
|
+
message: { "parameter #": this.parameter }
|
|
2147
|
+
};
|
|
2148
|
+
}
|
|
2149
|
+
};
|
|
2150
|
+
ConfigurationCCPropertiesGet = ConfigurationCCPropertiesGet_1 = __decorate([
|
|
2151
|
+
(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.PropertiesGet),
|
|
2152
|
+
(0, import_CommandClassDecorators.expectedCCResponse)(ConfigurationCCPropertiesReport)
|
|
2153
|
+
], ConfigurationCCPropertiesGet);
|
|
2154
|
+
let ConfigurationCCDefaultReset = class ConfigurationCCDefaultReset2 extends ConfigurationCC {
|
|
2155
|
+
};
|
|
2156
|
+
ConfigurationCCDefaultReset = __decorate([
|
|
2157
|
+
(0, import_CommandClassDecorators.CCCommand)(import_Types.ConfigurationCommand.DefaultReset)
|
|
2158
|
+
], ConfigurationCCDefaultReset);
|
|
2159
|
+
function isSafeValue(value, size, format) {
|
|
2160
|
+
let minValue;
|
|
2161
|
+
let maxValue;
|
|
2162
|
+
switch (format) {
|
|
2163
|
+
case import_safe.ConfigValueFormat.SignedInteger:
|
|
2164
|
+
minValue = -Math.pow(2, 8 * size - 1);
|
|
2165
|
+
maxValue = Math.pow(2, 8 * size - 1) - 1;
|
|
2166
|
+
break;
|
|
2167
|
+
case import_safe.ConfigValueFormat.UnsignedInteger:
|
|
2168
|
+
case import_safe.ConfigValueFormat.Enumerated:
|
|
2169
|
+
case import_safe.ConfigValueFormat.BitField:
|
|
2170
|
+
minValue = 0;
|
|
2171
|
+
maxValue = Math.pow(2, 8 * size);
|
|
2172
|
+
break;
|
|
2173
|
+
default:
|
|
2174
|
+
throw new Error("not implemented");
|
|
2175
|
+
}
|
|
2176
|
+
return minValue <= value && value <= maxValue;
|
|
2177
|
+
}
|
|
2178
|
+
function parseValue(raw, size, format) {
|
|
2179
|
+
switch (format) {
|
|
2180
|
+
case import_safe.ConfigValueFormat.SignedInteger:
|
|
2181
|
+
return raw.readIntBE(0, size);
|
|
2182
|
+
case import_safe.ConfigValueFormat.UnsignedInteger:
|
|
2183
|
+
case import_safe.ConfigValueFormat.Enumerated:
|
|
2184
|
+
case import_safe.ConfigValueFormat.BitField:
|
|
2185
|
+
return raw.readUIntBE(0, size);
|
|
2186
|
+
}
|
|
2187
|
+
}
|
|
2188
|
+
function throwInvalidValueError(value, parameter, valueSize, valueFormat) {
|
|
2189
|
+
throw new import_safe.ZWaveError(`The value ${value} is invalid for configuration parameter ${parameter} (size = ${valueSize}, format = ${(0, import_safe3.getEnumMemberName)(import_safe.ConfigValueFormat, valueFormat)})!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
2190
|
+
}
|
|
2191
|
+
function tryCatchOutOfBoundsError(e, value, parameter, valueSize, valueFormat) {
|
|
2192
|
+
if (e.message.includes("out of bounds")) {
|
|
2193
|
+
throwInvalidValueError(value, parameter, valueSize, valueFormat);
|
|
2194
|
+
} else {
|
|
2195
|
+
throw e;
|
|
2196
|
+
}
|
|
2197
|
+
}
|
|
2198
|
+
function serializeValue(payload, offset, size, format, value) {
|
|
2199
|
+
switch (format) {
|
|
2200
|
+
case import_safe.ConfigValueFormat.SignedInteger:
|
|
2201
|
+
payload.writeIntBE(value, offset, size);
|
|
2202
|
+
return;
|
|
2203
|
+
case import_safe.ConfigValueFormat.UnsignedInteger:
|
|
2204
|
+
case import_safe.ConfigValueFormat.Enumerated:
|
|
2205
|
+
case import_safe.ConfigValueFormat.BitField:
|
|
2206
|
+
payload.writeUIntBE(value, offset, size);
|
|
2207
|
+
return;
|
|
2208
|
+
}
|
|
2209
|
+
}
|
|
2210
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
2211
|
+
0 && (module.exports = {
|
|
2212
|
+
ConfigurationCC,
|
|
2213
|
+
ConfigurationCCAPI,
|
|
2214
|
+
ConfigurationCCBulkGet,
|
|
2215
|
+
ConfigurationCCBulkReport,
|
|
2216
|
+
ConfigurationCCBulkSet,
|
|
2217
|
+
ConfigurationCCDefaultReset,
|
|
2218
|
+
ConfigurationCCError,
|
|
2219
|
+
ConfigurationCCGet,
|
|
2220
|
+
ConfigurationCCInfoGet,
|
|
2221
|
+
ConfigurationCCInfoReport,
|
|
2222
|
+
ConfigurationCCNameGet,
|
|
2223
|
+
ConfigurationCCNameReport,
|
|
2224
|
+
ConfigurationCCPropertiesGet,
|
|
2225
|
+
ConfigurationCCPropertiesReport,
|
|
2226
|
+
ConfigurationCCReport,
|
|
2227
|
+
ConfigurationCCSet,
|
|
2228
|
+
ConfigurationCCValues
|
|
2229
|
+
});
|
|
2230
|
+
//# sourceMappingURL=ConfigurationCC.js.map
|