@zwave-js/cc 15.1.1 → 15.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.d.ts +7 -7
- package/build/cjs/cc/AlarmSensorCC.js +22 -23
- package/build/cjs/cc/AlarmSensorCC.js.map +3 -3
- package/build/cjs/cc/AssociationCC.d.ts +8 -9
- package/build/cjs/cc/AssociationCC.js +29 -29
- package/build/cjs/cc/AssociationCC.js.map +3 -3
- package/build/cjs/cc/AssociationGroupInfoCC.d.ts +7 -7
- package/build/cjs/cc/AssociationGroupInfoCC.js +31 -32
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +3 -3
- package/build/cjs/cc/BarrierOperatorCC.d.ts +8 -8
- package/build/cjs/cc/BarrierOperatorCC.js +35 -36
- package/build/cjs/cc/BarrierOperatorCC.js.map +3 -3
- package/build/cjs/cc/BasicCC.d.ts +4 -4
- package/build/cjs/cc/BasicCC.js +23 -24
- package/build/cjs/cc/BasicCC.js.map +3 -3
- package/build/cjs/cc/BasicWindowCoveringCC._validateArgs.d.ts +3 -0
- package/build/cjs/cc/BasicWindowCoveringCC._validateArgs.js +64 -0
- package/build/cjs/cc/BasicWindowCoveringCC._validateArgs.js.map +7 -0
- package/build/cjs/cc/BasicWindowCoveringCC.d.ts +90 -0
- package/build/cjs/cc/BasicWindowCoveringCC.js +273 -0
- package/build/cjs/cc/BasicWindowCoveringCC.js.map +7 -0
- package/build/cjs/cc/BatteryCC.d.ts +4 -7
- package/build/cjs/cc/BatteryCC.js +18 -20
- package/build/cjs/cc/BatteryCC.js.map +3 -3
- package/build/cjs/cc/BinarySensorCC.d.ts +5 -5
- package/build/cjs/cc/BinarySensorCC.js +20 -21
- package/build/cjs/cc/BinarySensorCC.js.map +3 -3
- package/build/cjs/cc/BinarySwitchCC._validateArgs.js +2 -2
- package/build/cjs/cc/BinarySwitchCC.d.ts +6 -6
- package/build/cjs/cc/BinarySwitchCC.js +26 -26
- package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
- package/build/cjs/cc/CRC16CC.d.ts +3 -3
- package/build/cjs/cc/CRC16CC.js +15 -15
- package/build/cjs/cc/CRC16CC.js.map +3 -3
- package/build/cjs/cc/CentralSceneCC.d.ts +8 -8
- package/build/cjs/cc/CentralSceneCC.js +23 -24
- package/build/cjs/cc/CentralSceneCC.js.map +3 -3
- package/build/cjs/cc/ClimateControlScheduleCC.d.ts +6 -6
- package/build/cjs/cc/ClimateControlScheduleCC.js +19 -20
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +3 -3
- package/build/cjs/cc/ClockCC.d.ts +3 -4
- package/build/cjs/cc/ClockCC.js +13 -14
- package/build/cjs/cc/ClockCC.js.map +3 -3
- package/build/cjs/cc/ColorSwitchCC.d.ts +3 -4
- package/build/cjs/cc/ColorSwitchCC.js +22 -24
- package/build/cjs/cc/ColorSwitchCC.js.map +3 -3
- package/build/cjs/cc/ConfigurationCC.d.ts +3 -3
- package/build/cjs/cc/ConfigurationCC.js +114 -115
- package/build/cjs/cc/ConfigurationCC.js.map +3 -3
- package/build/cjs/cc/DeviceResetLocallyCC.d.ts +2 -2
- package/build/cjs/cc/DeviceResetLocallyCC.js +5 -5
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/cjs/cc/DoorLockCC.d.ts +29 -29
- package/build/cjs/cc/DoorLockCC.js +39 -40
- package/build/cjs/cc/DoorLockCC.js.map +3 -3
- package/build/cjs/cc/DoorLockLoggingCC.d.ts +4 -4
- package/build/cjs/cc/DoorLockLoggingCC.js +13 -14
- package/build/cjs/cc/DoorLockLoggingCC.js.map +3 -3
- package/build/cjs/cc/EnergyProductionCC.d.ts +2 -3
- package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
- package/build/cjs/cc/EntryControlCC.d.ts +8 -8
- package/build/cjs/cc/EntryControlCC.js +41 -42
- package/build/cjs/cc/EntryControlCC.js.map +3 -3
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +9 -10
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +52 -53
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +3 -3
- package/build/cjs/cc/HailCC.js +2 -2
- package/build/cjs/cc/HailCC.js.map +1 -1
- package/build/cjs/cc/HumidityControlModeCC.d.ts +5 -5
- package/build/cjs/cc/HumidityControlModeCC.js +20 -21
- package/build/cjs/cc/HumidityControlModeCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +3 -3
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +9 -9
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlSetpointCC.d.ts +6 -6
- package/build/cjs/cc/HumidityControlSetpointCC.js +43 -44
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +3 -3
- package/build/cjs/cc/InclusionControllerCC.d.ts +2 -3
- package/build/cjs/cc/InclusionControllerCC.js.map +2 -2
- package/build/cjs/cc/IndicatorCC.d.ts +3 -3
- package/build/cjs/cc/IndicatorCC.js +50 -52
- package/build/cjs/cc/IndicatorCC.js.map +3 -3
- package/build/cjs/cc/IrrigationCC.d.ts +3 -3
- package/build/cjs/cc/IrrigationCC.js +74 -75
- package/build/cjs/cc/IrrigationCC.js.map +3 -3
- package/build/cjs/cc/LanguageCC.d.ts +5 -6
- package/build/cjs/cc/LanguageCC.js +14 -15
- package/build/cjs/cc/LanguageCC.js.map +3 -3
- package/build/cjs/cc/LockCC.d.ts +4 -4
- package/build/cjs/cc/LockCC.js +10 -10
- package/build/cjs/cc/LockCC.js.map +3 -3
- package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +3 -3
- package/build/cjs/cc/ManufacturerProprietaryCC.js +10 -10
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +3 -3
- package/build/cjs/cc/ManufacturerSpecificCC.d.ts +7 -8
- package/build/cjs/cc/ManufacturerSpecificCC.js +20 -21
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +3 -3
- package/build/cjs/cc/MeterCC.d.ts +4 -6
- package/build/cjs/cc/MeterCC.js +52 -54
- package/build/cjs/cc/MeterCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelAssociationCC.d.ts +7 -8
- package/build/cjs/cc/MultiChannelAssociationCC.js +34 -35
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelCC.d.ts +11 -11
- package/build/cjs/cc/MultiChannelCC.js +53 -53
- package/build/cjs/cc/MultiChannelCC.js.map +3 -3
- package/build/cjs/cc/MultiCommandCC.d.ts +3 -3
- package/build/cjs/cc/MultiCommandCC.js +13 -13
- package/build/cjs/cc/MultiCommandCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSensorCC.d.ts +4 -7
- package/build/cjs/cc/MultilevelSensorCC.js +26 -28
- package/build/cjs/cc/MultilevelSensorCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSwitchCC._validateArgs.js +3 -3
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +13 -13
- package/build/cjs/cc/MultilevelSwitchCC.js +36 -37
- package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
- package/build/cjs/cc/NoOperationCC.js +4 -4
- package/build/cjs/cc/NoOperationCC.js.map +1 -1
- package/build/cjs/cc/NodeNamingCC.d.ts +5 -5
- package/build/cjs/cc/NodeNamingCC.js +20 -20
- package/build/cjs/cc/NodeNamingCC.js.map +3 -3
- package/build/cjs/cc/NotificationCC.d.ts +4 -5
- package/build/cjs/cc/NotificationCC.js +66 -68
- package/build/cjs/cc/NotificationCC.js.map +3 -3
- package/build/cjs/cc/PowerlevelCC.d.ts +3 -3
- package/build/cjs/cc/PowerlevelCC.js +25 -26
- package/build/cjs/cc/PowerlevelCC.js.map +3 -3
- package/build/cjs/cc/ProtectionCC._validateArgs.js +2 -2
- package/build/cjs/cc/ProtectionCC.d.ts +11 -11
- package/build/cjs/cc/ProtectionCC.js +35 -36
- package/build/cjs/cc/ProtectionCC.js.map +3 -3
- package/build/cjs/cc/SceneActivationCC._validateArgs.js +2 -2
- package/build/cjs/cc/SceneActivationCC.d.ts +5 -6
- package/build/cjs/cc/SceneActivationCC.js +10 -10
- package/build/cjs/cc/SceneActivationCC.js.map +3 -3
- package/build/cjs/cc/SceneActuatorConfigurationCC._validateArgs.js +2 -2
- package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +5 -5
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +19 -20
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +3 -3
- package/build/cjs/cc/SceneControllerConfigurationCC._validateArgs.js +2 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +6 -6
- package/build/cjs/cc/SceneControllerConfigurationCC.js +25 -26
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +3 -3
- package/build/cjs/cc/ScheduleEntryLockCC.d.ts +2 -3
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
- package/build/cjs/cc/Security2CC.d.ts +3 -4
- package/build/cjs/cc/Security2CC.js +60 -62
- package/build/cjs/cc/Security2CC.js.map +3 -3
- package/build/cjs/cc/SecurityCC.d.ts +3 -4
- package/build/cjs/cc/SecurityCC.js +25 -26
- package/build/cjs/cc/SecurityCC.js.map +3 -3
- package/build/cjs/cc/SoundSwitchCC.d.ts +7 -7
- package/build/cjs/cc/SoundSwitchCC.js +28 -29
- package/build/cjs/cc/SoundSwitchCC.js.map +3 -3
- package/build/cjs/cc/SupervisionCC.d.ts +4 -4
- package/build/cjs/cc/SupervisionCC.js +28 -29
- package/build/cjs/cc/SupervisionCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanModeCC.d.ts +6 -6
- package/build/cjs/cc/ThermostatFanModeCC.js +21 -22
- package/build/cjs/cc/ThermostatFanModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanStateCC.d.ts +3 -3
- package/build/cjs/cc/ThermostatFanStateCC.js +9 -9
- package/build/cjs/cc/ThermostatFanStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatModeCC.d.ts +6 -6
- package/build/cjs/cc/ThermostatModeCC.js +30 -31
- package/build/cjs/cc/ThermostatModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +3 -4
- package/build/cjs/cc/ThermostatOperatingStateCC.js +9 -9
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetbackCC.d.ts +3 -3
- package/build/cjs/cc/ThermostatSetbackCC.js +14 -15
- package/build/cjs/cc/ThermostatSetbackCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +6 -6
- package/build/cjs/cc/ThermostatSetpointCC.js +48 -49
- package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
- package/build/cjs/cc/TimeCC.d.ts +3 -4
- package/build/cjs/cc/TimeCC.js +9 -10
- package/build/cjs/cc/TimeCC.js.map +3 -3
- package/build/cjs/cc/TimeParametersCC.d.ts +3 -4
- package/build/cjs/cc/TimeParametersCC.js +2 -2
- package/build/cjs/cc/TimeParametersCC.js.map +2 -2
- package/build/cjs/cc/TransportServiceCC.d.ts +3 -3
- package/build/cjs/cc/TransportServiceCC.js +44 -45
- package/build/cjs/cc/TransportServiceCC.js.map +3 -3
- package/build/cjs/cc/UserCodeCC.d.ts +19 -19
- package/build/cjs/cc/UserCodeCC.js +102 -103
- package/build/cjs/cc/UserCodeCC.js.map +3 -3
- package/build/cjs/cc/VersionCC.d.ts +17 -17
- package/build/cjs/cc/VersionCC.js +46 -47
- package/build/cjs/cc/VersionCC.js.map +3 -3
- package/build/cjs/cc/WakeUpCC.d.ts +6 -6
- package/build/cjs/cc/WakeUpCC.js +16 -17
- package/build/cjs/cc/WakeUpCC.js.map +3 -3
- package/build/cjs/cc/WindowCoveringCC.d.ts +3 -4
- package/build/cjs/cc/WindowCoveringCC.js +17 -18
- package/build/cjs/cc/WindowCoveringCC.js.map +3 -3
- package/build/cjs/cc/ZWavePlusCC.d.ts +8 -8
- package/build/cjs/cc/ZWavePlusCC.js +15 -16
- package/build/cjs/cc/ZWavePlusCC.js.map +3 -3
- package/build/cjs/cc/ZWaveProtocolCC.d.ts +2 -2
- package/build/cjs/cc/ZWaveProtocolCC.js +35 -35
- package/build/cjs/cc/ZWaveProtocolCC.js.map +2 -2
- package/build/cjs/cc/_CCValues.generated.d.ts +124 -0
- package/build/cjs/cc/_CCValues.generated.js +93 -26
- package/build/cjs/cc/_CCValues.generated.js.map +3 -3
- package/build/cjs/cc/index.d.ts +2 -0
- package/build/cjs/cc/index.js +9 -0
- package/build/cjs/cc/index.js.map +2 -2
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +3 -3
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +14 -14
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/cjs/lib/API.d.ts +5 -3
- package/build/cjs/lib/API.js.map +2 -2
- package/build/cjs/lib/CommandClass.d.ts +5 -6
- package/build/cjs/lib/CommandClass.js +45 -45
- package/build/cjs/lib/CommandClass.js.map +3 -3
- package/build/cjs/lib/CommandClassDecorators.d.ts +2 -2
- package/build/cjs/lib/CommandClassDecorators.js +3 -3
- package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
- package/build/cjs/lib/Security2/Extension.d.ts +2 -2
- package/build/cjs/lib/Security2/Extension.js +17 -17
- package/build/cjs/lib/Security2/Extension.js.map +3 -3
- package/build/cjs/lib/SetValueResult.d.ts +1 -1
- package/build/cjs/lib/SetValueResult.js.map +1 -1
- package/build/cjs/lib/Values.d.ts +3 -3
- package/build/cjs/lib/Values.js +6 -6
- package/build/cjs/lib/Values.js.map +2 -2
- package/build/cjs/lib/_Types.d.ts +6 -2
- package/build/cjs/lib/_Types.js +10 -3
- package/build/cjs/lib/_Types.js.map +3 -3
- package/build/cjs/lib/serializers.d.ts +1 -1
- package/build/cjs/lib/serializers.js +5 -5
- package/build/cjs/lib/serializers.js.map +2 -2
- package/build/cjs/lib/traits.d.ts +2 -2
- package/build/cjs/lib/utils.d.ts +2 -2
- package/build/cjs/lib/utils.js +60 -60
- package/build/cjs/lib/utils.js.map +3 -3
- package/build/esm/cc/AlarmSensorCC.d.ts +7 -7
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +2 -3
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts +8 -9
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +2 -2
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts +7 -7
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +2 -3
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts +8 -8
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +2 -3
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts +4 -4
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +2 -3
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BasicWindowCoveringCC._validateArgs.d.ts +3 -0
- package/build/esm/cc/BasicWindowCoveringCC._validateArgs.d.ts.map +1 -0
- package/build/esm/cc/BasicWindowCoveringCC._validateArgs.js +22 -0
- package/build/esm/cc/BasicWindowCoveringCC._validateArgs.js.map +1 -0
- package/build/esm/cc/BasicWindowCoveringCC.d.ts +90 -0
- package/build/esm/cc/BasicWindowCoveringCC.d.ts.map +1 -0
- package/build/esm/cc/BasicWindowCoveringCC.js +215 -0
- package/build/esm/cc/BasicWindowCoveringCC.js.map +1 -0
- package/build/esm/cc/BatteryCC.d.ts +4 -7
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +2 -4
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts +5 -5
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +2 -3
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC._validateArgs.js +1 -1
- package/build/esm/cc/BinarySwitchCC._validateArgs.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts +6 -6
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +2 -2
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.d.ts +3 -3
- package/build/esm/cc/CRC16CC.d.ts.map +1 -1
- package/build/esm/cc/CRC16CC.js +2 -2
- package/build/esm/cc/CRC16CC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts +8 -8
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +2 -3
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts +6 -6
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +2 -3
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.d.ts +3 -4
- package/build/esm/cc/ClockCC.d.ts.map +1 -1
- package/build/esm/cc/ClockCC.js +2 -3
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts +3 -4
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +2 -4
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts +3 -3
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +2 -3
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.d.ts +2 -2
- package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts +29 -29
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +2 -3
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts +4 -4
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +2 -3
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.d.ts +2 -3
- package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts +8 -8
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +2 -3
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +9 -10
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +2 -3
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HailCC.js +1 -1
- package/build/esm/cc/HailCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts +5 -5
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +2 -3
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +3 -3
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +2 -2
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts +6 -6
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +2 -3
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/InclusionControllerCC.d.ts +2 -3
- package/build/esm/cc/InclusionControllerCC.d.ts.map +1 -1
- package/build/esm/cc/InclusionControllerCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.d.ts +3 -3
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
- package/build/esm/cc/IndicatorCC.js +2 -4
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts +3 -3
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +2 -3
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts +5 -6
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +2 -3
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts +4 -4
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +2 -2
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts +3 -3
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +2 -2
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts +7 -8
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +2 -3
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts +4 -6
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +2 -4
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts +7 -8
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +2 -3
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts +11 -11
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +2 -2
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultiCommandCC.d.ts +3 -3
- package/build/esm/cc/MultiCommandCC.d.ts.map +1 -1
- package/build/esm/cc/MultiCommandCC.js +2 -2
- package/build/esm/cc/MultiCommandCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts +4 -7
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +2 -4
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC._validateArgs.js +1 -1
- package/build/esm/cc/MultilevelSwitchCC._validateArgs.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts +13 -13
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +2 -3
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NoOperationCC.js +1 -1
- package/build/esm/cc/NoOperationCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts +5 -5
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +2 -2
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts +4 -5
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +2 -4
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/PowerlevelCC.d.ts +3 -3
- package/build/esm/cc/PowerlevelCC.d.ts.map +1 -1
- package/build/esm/cc/PowerlevelCC.js +2 -3
- package/build/esm/cc/PowerlevelCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC._validateArgs.js +1 -1
- package/build/esm/cc/ProtectionCC._validateArgs.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts +11 -11
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +2 -3
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC._validateArgs.js +1 -1
- package/build/esm/cc/SceneActivationCC._validateArgs.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.d.ts +5 -6
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +2 -2
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC._validateArgs.js +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC._validateArgs.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +5 -5
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +2 -3
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC._validateArgs.js +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC._validateArgs.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts +6 -6
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +2 -3
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts +2 -3
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.d.ts +3 -4
- package/build/esm/cc/Security2CC.d.ts.map +1 -1
- package/build/esm/cc/Security2CC.js +2 -4
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.d.ts +3 -4
- package/build/esm/cc/SecurityCC.d.ts.map +1 -1
- package/build/esm/cc/SecurityCC.js +1 -2
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts +7 -7
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +2 -3
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.d.ts +4 -4
- package/build/esm/cc/SupervisionCC.d.ts.map +1 -1
- package/build/esm/cc/SupervisionCC.js +2 -3
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts +6 -6
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +2 -3
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts +3 -3
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +2 -2
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts +6 -6
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +2 -3
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts +3 -4
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +2 -2
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.d.ts +3 -3
- package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.js +2 -3
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts +6 -6
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +2 -3
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.d.ts +3 -4
- package/build/esm/cc/TimeCC.d.ts.map +1 -1
- package/build/esm/cc/TimeCC.js +1 -2
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts +3 -4
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +1 -1
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.d.ts +3 -3
- package/build/esm/cc/TransportServiceCC.d.ts.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +2 -3
- package/build/esm/cc/TransportServiceCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts +19 -19
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +2 -3
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts +17 -17
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +2 -3
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts +6 -6
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +2 -3
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts +3 -4
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +1 -2
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts +8 -8
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +2 -3
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.d.ts +2 -2
- package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/_CCValues.generated.d.ts +124 -0
- package/build/esm/cc/_CCValues.generated.d.ts.map +1 -1
- package/build/esm/cc/_CCValues.generated.js +75 -4
- package/build/esm/cc/_CCValues.generated.js.map +1 -1
- package/build/esm/cc/index.d.ts +2 -0
- package/build/esm/cc/index.d.ts.map +1 -1
- package/build/esm/cc/index.js +1 -0
- package/build/esm/cc/index.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +3 -3
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/esm/lib/API.d.ts +5 -3
- package/build/esm/lib/API.d.ts.map +1 -1
- package/build/esm/lib/API.js.map +1 -1
- package/build/esm/lib/CommandClass.d.ts +5 -6
- package/build/esm/lib/CommandClass.d.ts.map +1 -1
- package/build/esm/lib/CommandClass.js +2 -2
- package/build/esm/lib/CommandClass.js.map +1 -1
- package/build/esm/lib/CommandClassDecorators.d.ts +2 -2
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
- package/build/esm/lib/CommandClassDecorators.js +1 -1
- package/build/esm/lib/CommandClassDecorators.js.map +1 -1
- package/build/esm/lib/Security2/Extension.d.ts +2 -2
- package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
- package/build/esm/lib/Security2/Extension.js +2 -2
- package/build/esm/lib/Security2/Extension.js.map +1 -1
- package/build/esm/lib/SetValueResult.d.ts +1 -1
- package/build/esm/lib/SetValueResult.d.ts.map +1 -1
- package/build/esm/lib/Values.d.ts +3 -3
- package/build/esm/lib/Values.d.ts.map +1 -1
- package/build/esm/lib/Values.js +1 -1
- package/build/esm/lib/Values.js.map +1 -1
- package/build/esm/lib/_Types.d.ts +6 -2
- package/build/esm/lib/_Types.d.ts.map +1 -1
- package/build/esm/lib/_Types.js +6 -1
- package/build/esm/lib/_Types.js.map +1 -1
- package/build/esm/lib/serializers.d.ts +1 -1
- package/build/esm/lib/serializers.d.ts.map +1 -1
- package/build/esm/lib/serializers.js +1 -1
- package/build/esm/lib/serializers.js.map +1 -1
- package/build/esm/lib/traits.d.ts +2 -2
- package/build/esm/lib/traits.d.ts.map +1 -1
- package/build/esm/lib/utils.d.ts +2 -2
- package/build/esm/lib/utils.d.ts.map +1 -1
- package/build/esm/lib/utils.js +2 -2
- package/build/esm/lib/utils.js.map +1 -1
- package/package.json +6 -6
|
@@ -54,9 +54,8 @@ __export(UserCodeCC_exports, {
|
|
|
54
54
|
});
|
|
55
55
|
module.exports = __toCommonJS(UserCodeCC_exports);
|
|
56
56
|
var __validateArgs = __toESM(require("./UserCodeCC._validateArgs.js"), 1);
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
var import_safe3 = require("@zwave-js/shared/safe");
|
|
57
|
+
var import_core = require("@zwave-js/core");
|
|
58
|
+
var import_shared = require("@zwave-js/shared");
|
|
60
59
|
var import_API = require("../lib/API.js");
|
|
61
60
|
var import_CommandClass = require("../lib/CommandClass.js");
|
|
62
61
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
@@ -105,11 +104,11 @@ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializ
|
|
|
105
104
|
};
|
|
106
105
|
const { validateArgs_UserCodeCCAPI_get, validateArgs_UserCodeCCAPI_set, validateArgs_UserCodeCCAPI_setMany, validateArgs_UserCodeCCAPI_clear, validateArgs_UserCodeCCAPI_setKeypadMode, validateArgs_UserCodeCCAPI_setAdminCode } = __validateArgs;
|
|
107
106
|
function parseExtendedUserCode(payload) {
|
|
108
|
-
(0,
|
|
107
|
+
(0, import_core.validatePayload)(payload.length >= 4);
|
|
109
108
|
const userId = payload.readUInt16BE(0);
|
|
110
109
|
const status = payload[2];
|
|
111
110
|
const codeLength = payload[3] & 15;
|
|
112
|
-
(0,
|
|
111
|
+
(0, import_core.validatePayload)(payload.length >= 4 + codeLength);
|
|
113
112
|
const code = payload.subarray(4, 4 + codeLength).toString("ascii");
|
|
114
113
|
return {
|
|
115
114
|
code: {
|
|
@@ -144,10 +143,10 @@ function setUserCodeMetadata(ctx, userId, userCode) {
|
|
|
144
143
|
]);
|
|
145
144
|
this.ensureMetadata(ctx, statusValue, {
|
|
146
145
|
...statusValue.meta,
|
|
147
|
-
states: (0,
|
|
146
|
+
states: (0, import_core.enumValuesToMetadataStates)(import_Types.UserIDStatus, supportedUserIDStatuses)
|
|
148
147
|
});
|
|
149
148
|
const codeMetadata = {
|
|
150
|
-
...(0,
|
|
149
|
+
...(0, import_shared.isUint8Array)(userCode) ? import_core.ValueMetadata.Buffer : import_core.ValueMetadata.String,
|
|
151
150
|
minLength: 4,
|
|
152
151
|
maxLength: 10,
|
|
153
152
|
label: `User Code (${userId})`
|
|
@@ -180,7 +179,7 @@ function userCodeToLogString(userCode) {
|
|
|
180
179
|
}
|
|
181
180
|
__name(userCodeToLogString, "userCodeToLogString");
|
|
182
181
|
let UserCodeCCAPI = (() => {
|
|
183
|
-
let _classDecorators = [(0, import_CommandClassDecorators.API)(
|
|
182
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses["User Code"])];
|
|
184
183
|
let _classDescriptor;
|
|
185
184
|
let _classExtraInitializers = [];
|
|
186
185
|
let _classThis;
|
|
@@ -279,7 +278,7 @@ let UserCodeCCAPI = (() => {
|
|
|
279
278
|
} else if (typeof propertyKey !== "number") {
|
|
280
279
|
(0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
|
|
281
280
|
}
|
|
282
|
-
if (typeof value !== "string" && !(0,
|
|
281
|
+
if (typeof value !== "string" && !(0, import_shared.isUint8Array)(value)) {
|
|
283
282
|
(0, import_API.throwWrongValueType)(this.ccId, property, "string or Buffer", typeof value);
|
|
284
283
|
}
|
|
285
284
|
let userIdStatus = this.getValueDB().getValue(import_CCValues_generated.UserCodeCCValues.userIdStatus(propertyKey).endpoint(this.endpoint.index));
|
|
@@ -290,7 +289,7 @@ let UserCodeCCAPI = (() => {
|
|
|
290
289
|
} else {
|
|
291
290
|
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
292
291
|
}
|
|
293
|
-
if (this.isSinglecast() && !(0,
|
|
292
|
+
if (this.isSinglecast() && !(0, import_core.supervisedCommandSucceeded)(result)) {
|
|
294
293
|
this.schedulePoll({ property, propertyKey }, value, {
|
|
295
294
|
transition: "fast"
|
|
296
295
|
});
|
|
@@ -341,9 +340,9 @@ let UserCodeCCAPI = (() => {
|
|
|
341
340
|
if (!response) {
|
|
342
341
|
return;
|
|
343
342
|
} else if (multiple) {
|
|
344
|
-
return (0,
|
|
343
|
+
return (0, import_shared.pick)(response, ["userCodes", "nextUserId"]);
|
|
345
344
|
} else {
|
|
346
|
-
return (0,
|
|
345
|
+
return (0, import_shared.pick)(response.userCodes[0], [
|
|
347
346
|
"userIdStatus",
|
|
348
347
|
"userCode"
|
|
349
348
|
]);
|
|
@@ -357,7 +356,7 @@ let UserCodeCCAPI = (() => {
|
|
|
357
356
|
});
|
|
358
357
|
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
359
358
|
if (response)
|
|
360
|
-
return (0,
|
|
359
|
+
return (0, import_shared.pick)(response, ["userIdStatus", "userCode"]);
|
|
361
360
|
}
|
|
362
361
|
}
|
|
363
362
|
/** Configures a single user code */
|
|
@@ -368,7 +367,7 @@ let UserCodeCCAPI = (() => {
|
|
|
368
367
|
this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.Set);
|
|
369
368
|
const numUsers = UserCodeCC.getSupportedUsersCached(this.host, this.endpoint);
|
|
370
369
|
if (numUsers != void 0 && userId > numUsers) {
|
|
371
|
-
throw new
|
|
370
|
+
throw new import_core.ZWaveError(`The user ID must be between 0 and the number of supported users ${numUsers}.`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
372
371
|
}
|
|
373
372
|
const cc = new UserCodeCCSet({
|
|
374
373
|
nodeId: this.endpoint.nodeId,
|
|
@@ -388,29 +387,29 @@ let UserCodeCCAPI = (() => {
|
|
|
388
387
|
const supportsMultipleUserCodeSet = UserCodeCC.supportsMultipleUserCodeSetCached(this.host, this.endpoint) ?? false;
|
|
389
388
|
if (numUsers != void 0) {
|
|
390
389
|
if (codes.some((code) => code.userId < 0 || code.userId > numUsers)) {
|
|
391
|
-
throw new
|
|
390
|
+
throw new import_core.ZWaveError(`All User IDs must be between 0 and the number of supported users ${numUsers}.`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
392
391
|
}
|
|
393
392
|
} else {
|
|
394
393
|
if (codes.some((code) => code.userId < 0)) {
|
|
395
|
-
throw new
|
|
394
|
+
throw new import_core.ZWaveError(`All User IDs must be greater than 0.`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
396
395
|
}
|
|
397
396
|
}
|
|
398
397
|
if (codes.some((code) => code.userId === 0) && codes.length > 1) {
|
|
399
|
-
throw new
|
|
398
|
+
throw new import_core.ZWaveError(`If user ID 0 is used, only one code may be set`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
400
399
|
} else if (codes.some((code) => code.userId === 0 && code.userIdStatus !== import_Types.UserIDStatus.Available)) {
|
|
401
|
-
throw new
|
|
400
|
+
throw new import_core.ZWaveError(`User ID 0 may only be used to clear all user codes`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
402
401
|
} else if (codes.length > 1 && !supportsMultipleUserCodeSet) {
|
|
403
|
-
throw new
|
|
402
|
+
throw new import_core.ZWaveError(`The node does not support setting multiple user codes at once`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
404
403
|
}
|
|
405
404
|
for (const code of codes) {
|
|
406
405
|
if (supportedStatuses != void 0 && !supportedStatuses.includes(code.userIdStatus)) {
|
|
407
|
-
throw new
|
|
406
|
+
throw new import_core.ZWaveError(`The user ID status ${(0, import_shared.getEnumMemberName)(import_Types.UserIDStatus, code.userIdStatus)} is not supported by the node`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
408
407
|
} else if (code.userIdStatus === import_Types.UserIDStatus.Available) {
|
|
409
408
|
code.userCode = void 0;
|
|
410
409
|
} else if (supportedASCIIChars) {
|
|
411
|
-
const userCodeString = typeof code.userCode === "string" ? code.userCode : (0,
|
|
410
|
+
const userCodeString = typeof code.userCode === "string" ? code.userCode : (0, import_shared.uint8ArrayToString)(code.userCode);
|
|
412
411
|
if (!validateCode(userCodeString, supportedASCIIChars)) {
|
|
413
|
-
throw new
|
|
412
|
+
throw new import_core.ZWaveError(`The user code must consist of 4 to 10 of the following characters: ${supportedASCIIChars}`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
414
413
|
}
|
|
415
414
|
}
|
|
416
415
|
}
|
|
@@ -434,7 +433,7 @@ let UserCodeCCAPI = (() => {
|
|
|
434
433
|
this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.Set);
|
|
435
434
|
const numUsers = UserCodeCC.getSupportedUsersCached(this.host, this.endpoint);
|
|
436
435
|
if (numUsers != void 0 && userId > numUsers) {
|
|
437
|
-
throw new
|
|
436
|
+
throw new import_core.ZWaveError(`The user ID must be between 0 and the number of supported users ${numUsers}.`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
438
437
|
}
|
|
439
438
|
const cc = new UserCodeCCSet({
|
|
440
439
|
nodeId: this.endpoint.nodeId,
|
|
@@ -454,7 +453,7 @@ let UserCodeCCAPI = (() => {
|
|
|
454
453
|
});
|
|
455
454
|
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
456
455
|
if (response) {
|
|
457
|
-
return (0,
|
|
456
|
+
return (0, import_shared.pick)(response, [
|
|
458
457
|
"supportsAdminCode",
|
|
459
458
|
"supportsAdminCodeDeactivation",
|
|
460
459
|
"supportsUserCodeChecksum",
|
|
@@ -479,9 +478,9 @@ let UserCodeCCAPI = (() => {
|
|
|
479
478
|
this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.KeypadModeSet);
|
|
480
479
|
const supportedModes = UserCodeCC.getSupportedKeypadModesCached(this.host, this.endpoint);
|
|
481
480
|
if (!supportedModes) {
|
|
482
|
-
throw new
|
|
481
|
+
throw new import_core.ZWaveError(`The keypad mode can only be set after the interview is complete!`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
483
482
|
} else if (!supportedModes.includes(keypadMode)) {
|
|
484
|
-
throw new
|
|
483
|
+
throw new import_core.ZWaveError(`The keypad mode ${(0, import_shared.getEnumMemberName)(import_Types.KeypadMode, keypadMode)} is not supported by the node!`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
485
484
|
}
|
|
486
485
|
const cc = new UserCodeCCKeypadModeSet({
|
|
487
486
|
nodeId: this.endpoint.nodeId,
|
|
@@ -503,15 +502,15 @@ let UserCodeCCAPI = (() => {
|
|
|
503
502
|
this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.AdminCodeSet);
|
|
504
503
|
const supportedASCIIChars = UserCodeCC.getSupportedASCIICharsCached(this.host, this.endpoint);
|
|
505
504
|
if (!supportedASCIIChars) {
|
|
506
|
-
throw new
|
|
505
|
+
throw new import_core.ZWaveError(`The admin code can only be set after the interview is complete!`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
507
506
|
}
|
|
508
507
|
if (!adminCode) {
|
|
509
508
|
const supportsDeactivation = UserCodeCC.supportsAdminCodeDeactivationCached(this.host, this.endpoint);
|
|
510
509
|
if (!supportsDeactivation) {
|
|
511
|
-
throw new
|
|
510
|
+
throw new import_core.ZWaveError(`The node does not support deactivating the admin code!`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
512
511
|
}
|
|
513
512
|
} else if (!validateCode(adminCode, supportedASCIIChars)) {
|
|
514
|
-
throw new
|
|
513
|
+
throw new import_core.ZWaveError(`The admin code must consist of 4 to 10 of the following characters: ${supportedASCIIChars}`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
515
514
|
}
|
|
516
515
|
const cc = new UserCodeCCAdminCodeSet({
|
|
517
516
|
nodeId: this.endpoint.nodeId,
|
|
@@ -537,7 +536,7 @@ let UserCodeCCAPI = (() => {
|
|
|
537
536
|
return UserCodeCCAPI2 = _classThis;
|
|
538
537
|
})();
|
|
539
538
|
let UserCodeCC = (() => {
|
|
540
|
-
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(
|
|
539
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_core.CommandClasses["User Code"]), (0, import_CommandClassDecorators.implementedVersion)(2), (0, import_CommandClassDecorators.ccValues)(import_CCValues_generated.UserCodeCCValues)];
|
|
541
540
|
let _classDescriptor;
|
|
542
541
|
let _classExtraInitializers = [];
|
|
543
542
|
let _classThis;
|
|
@@ -559,8 +558,8 @@ let UserCodeCC = (() => {
|
|
|
559
558
|
async interview(ctx) {
|
|
560
559
|
const node = this.getNode(ctx);
|
|
561
560
|
const endpoint = this.getEndpoint(ctx);
|
|
562
|
-
const api = import_API.CCAPI.create(
|
|
563
|
-
priority:
|
|
561
|
+
const api = import_API.CCAPI.create(import_core.CommandClasses["User Code"], ctx, endpoint).withOptions({
|
|
562
|
+
priority: import_core.MessagePriority.NodeQuery
|
|
564
563
|
});
|
|
565
564
|
ctx.logNode(node.id, {
|
|
566
565
|
endpoint: this.endpointIndex,
|
|
@@ -606,8 +605,8 @@ let UserCodeCC = (() => {
|
|
|
606
605
|
async refreshValues(ctx) {
|
|
607
606
|
const node = this.getNode(ctx);
|
|
608
607
|
const endpoint = this.getEndpoint(ctx);
|
|
609
|
-
const api = import_API.CCAPI.create(
|
|
610
|
-
priority:
|
|
608
|
+
const api = import_API.CCAPI.create(import_core.CommandClasses["User Code"], ctx, endpoint).withOptions({
|
|
609
|
+
priority: import_core.MessagePriority.NodeQuery
|
|
611
610
|
});
|
|
612
611
|
const supportsAdminCode = UserCodeCC2.supportsAdminCodeCached(ctx, endpoint);
|
|
613
612
|
const supportsUserCodeChecksum = this.getValue(ctx, import_CCValues_generated.UserCodeCCValues.supportsUserCodeChecksum) ?? false;
|
|
@@ -767,24 +766,24 @@ let UserCodeCCSet = (() => {
|
|
|
767
766
|
this.userId = options.userId;
|
|
768
767
|
this.userIdStatus = options.userIdStatus;
|
|
769
768
|
if (this.userId < 0) {
|
|
770
|
-
throw new
|
|
769
|
+
throw new import_core.ZWaveError(`${this.constructor.name}: The user ID must be between greater than 0.`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
771
770
|
} else if (this.userId === 0 && this.userIdStatus !== import_Types.UserIDStatus.Available) {
|
|
772
|
-
throw new
|
|
771
|
+
throw new import_core.ZWaveError(`${this.constructor.name}: User ID 0 may only be used to clear all user codes`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
773
772
|
} else if (this.userIdStatus === import_Types.UserIDStatus.Available) {
|
|
774
773
|
this.userCode = "\0".repeat(4);
|
|
775
774
|
} else {
|
|
776
775
|
this.userCode = options.userCode;
|
|
777
776
|
if (this.userCode.length < 4 || this.userCode.length > 10) {
|
|
778
|
-
throw new
|
|
777
|
+
throw new import_core.ZWaveError(`${this.constructor.name}: The user code must have a length of 4 to 10 ${typeof this.userCode === "string" ? "characters" : "bytes"}`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
779
778
|
}
|
|
780
779
|
}
|
|
781
780
|
}
|
|
782
781
|
static from(raw, ctx) {
|
|
783
|
-
(0,
|
|
782
|
+
(0, import_core.validatePayload)(raw.payload.length >= 2);
|
|
784
783
|
const userId = raw.payload[0];
|
|
785
784
|
const userIdStatus = raw.payload[1];
|
|
786
785
|
if (userIdStatus === import_Types.UserIDStatus.StatusNotAvailable) {
|
|
787
|
-
|
|
786
|
+
import_core.validatePayload.fail("Invalid user ID status");
|
|
788
787
|
}
|
|
789
788
|
if (userIdStatus === import_Types.UserIDStatus.Available) {
|
|
790
789
|
return new this({
|
|
@@ -805,9 +804,9 @@ let UserCodeCCSet = (() => {
|
|
|
805
804
|
userIdStatus;
|
|
806
805
|
userCode;
|
|
807
806
|
serialize(ctx) {
|
|
808
|
-
this.payload =
|
|
809
|
-
|
|
810
|
-
typeof this.userCode === "string" ?
|
|
807
|
+
this.payload = import_shared.Bytes.concat([
|
|
808
|
+
import_shared.Bytes.from([this.userId, this.userIdStatus]),
|
|
809
|
+
typeof this.userCode === "string" ? import_shared.Bytes.from(this.userCode, "ascii") : this.userCode
|
|
811
810
|
]);
|
|
812
811
|
return super.serialize(ctx);
|
|
813
812
|
}
|
|
@@ -816,7 +815,7 @@ let UserCodeCCSet = (() => {
|
|
|
816
815
|
...super.toLogEntry(ctx),
|
|
817
816
|
message: {
|
|
818
817
|
"user id": this.userId,
|
|
819
|
-
"id status": (0,
|
|
818
|
+
"id status": (0, import_shared.getEnumMemberName)(import_Types.UserIDStatus, this.userIdStatus),
|
|
820
819
|
"user code": userCodeToLogString(this.userCode)
|
|
821
820
|
}
|
|
822
821
|
};
|
|
@@ -851,22 +850,22 @@ let UserCodeCCReport = (() => {
|
|
|
851
850
|
this.userCode = options.userCode ?? "";
|
|
852
851
|
}
|
|
853
852
|
static from(raw, ctx) {
|
|
854
|
-
(0,
|
|
853
|
+
(0, import_core.validatePayload)(raw.payload.length >= 2);
|
|
855
854
|
const userId = raw.payload[0];
|
|
856
855
|
const userIdStatus = raw.payload[1];
|
|
857
856
|
let userCode;
|
|
858
857
|
if (raw.payload.length === 2 && (userIdStatus === import_Types.UserIDStatus.Available || userIdStatus === import_Types.UserIDStatus.StatusNotAvailable)) {
|
|
859
858
|
userCode = "";
|
|
860
859
|
} else {
|
|
861
|
-
(0,
|
|
860
|
+
(0, import_core.validatePayload)(raw.payload.length >= 6);
|
|
862
861
|
let userCodeBuffer = raw.payload.subarray(2);
|
|
863
862
|
while (userCodeBuffer.at(-1) === 0) {
|
|
864
863
|
userCodeBuffer = userCodeBuffer.subarray(0, -1);
|
|
865
864
|
}
|
|
866
865
|
const userCodeString = userCodeBuffer.toString("utf8");
|
|
867
|
-
if ((0,
|
|
866
|
+
if ((0, import_shared.isPrintableASCII)(userCodeString)) {
|
|
868
867
|
userCode = userCodeString;
|
|
869
|
-
} else if ((0,
|
|
868
|
+
} else if ((0, import_shared.isPrintableASCIIWithWhitespace)(userCodeString)) {
|
|
870
869
|
userCode = userCodeString.trim();
|
|
871
870
|
} else {
|
|
872
871
|
userCode = userCodeBuffer;
|
|
@@ -891,12 +890,12 @@ let UserCodeCCReport = (() => {
|
|
|
891
890
|
serialize(ctx) {
|
|
892
891
|
let userCodeBuffer;
|
|
893
892
|
if (typeof this.userCode === "string") {
|
|
894
|
-
userCodeBuffer =
|
|
893
|
+
userCodeBuffer = import_shared.Bytes.from(this.userCode, "ascii");
|
|
895
894
|
} else {
|
|
896
895
|
userCodeBuffer = this.userCode;
|
|
897
896
|
}
|
|
898
|
-
this.payload =
|
|
899
|
-
|
|
897
|
+
this.payload = import_shared.Bytes.concat([
|
|
898
|
+
import_shared.Bytes.from([this.userId, this.userIdStatus]),
|
|
900
899
|
userCodeBuffer
|
|
901
900
|
]);
|
|
902
901
|
return super.serialize(ctx);
|
|
@@ -906,7 +905,7 @@ let UserCodeCCReport = (() => {
|
|
|
906
905
|
...super.toLogEntry(ctx),
|
|
907
906
|
message: {
|
|
908
907
|
"user id": this.userId,
|
|
909
|
-
"id status": (0,
|
|
908
|
+
"id status": (0, import_shared.getEnumMemberName)(import_Types.UserIDStatus, this.userIdStatus),
|
|
910
909
|
"user code": userCodeToLogString(this.userCode)
|
|
911
910
|
}
|
|
912
911
|
};
|
|
@@ -943,7 +942,7 @@ let UserCodeCCGet = (() => {
|
|
|
943
942
|
this.userId = options.userId;
|
|
944
943
|
}
|
|
945
944
|
static from(raw, ctx) {
|
|
946
|
-
(0,
|
|
945
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1);
|
|
947
946
|
const userId = raw.payload[0];
|
|
948
947
|
return new this({
|
|
949
948
|
nodeId: ctx.sourceNodeId,
|
|
@@ -952,7 +951,7 @@ let UserCodeCCGet = (() => {
|
|
|
952
951
|
}
|
|
953
952
|
userId;
|
|
954
953
|
serialize(ctx) {
|
|
955
|
-
this.payload =
|
|
954
|
+
this.payload = import_shared.Bytes.from([this.userId]);
|
|
956
955
|
return super.serialize(ctx);
|
|
957
956
|
}
|
|
958
957
|
toLogEntry(ctx) {
|
|
@@ -989,7 +988,7 @@ let UserCodeCCUsersNumberReport = (() => {
|
|
|
989
988
|
this.supportedUsers = options.supportedUsers;
|
|
990
989
|
}
|
|
991
990
|
static from(raw, ctx) {
|
|
992
|
-
(0,
|
|
991
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1);
|
|
993
992
|
let supportedUsers;
|
|
994
993
|
if (raw.payload.length >= 3) {
|
|
995
994
|
supportedUsers = raw.payload.readUInt16BE(1);
|
|
@@ -1003,7 +1002,7 @@ let UserCodeCCUsersNumberReport = (() => {
|
|
|
1003
1002
|
}
|
|
1004
1003
|
supportedUsers;
|
|
1005
1004
|
serialize(ctx) {
|
|
1006
|
-
this.payload = new
|
|
1005
|
+
this.payload = new import_shared.Bytes(3);
|
|
1007
1006
|
this.payload[0] = Math.min(255, this.supportedUsers);
|
|
1008
1007
|
this.payload.writeUInt16BE(this.supportedUsers, 1);
|
|
1009
1008
|
return super.serialize(ctx);
|
|
@@ -1073,26 +1072,26 @@ let UserCodeCCCapabilitiesReport = (() => {
|
|
|
1073
1072
|
}
|
|
1074
1073
|
static from(raw, ctx) {
|
|
1075
1074
|
let offset = 0;
|
|
1076
|
-
(0,
|
|
1075
|
+
(0, import_core.validatePayload)(raw.payload.length >= offset + 1);
|
|
1077
1076
|
const supportsAdminCode = !!(raw.payload[offset] & 128);
|
|
1078
1077
|
const supportsAdminCodeDeactivation = !!(raw.payload[offset] & 64);
|
|
1079
1078
|
const statusBitMaskLength = raw.payload[offset] & 31;
|
|
1080
1079
|
offset += 1;
|
|
1081
|
-
(0,
|
|
1082
|
-
const supportedUserIDStatuses = (0,
|
|
1080
|
+
(0, import_core.validatePayload)(raw.payload.length >= offset + statusBitMaskLength + 1);
|
|
1081
|
+
const supportedUserIDStatuses = (0, import_core.parseBitMask)(raw.payload.subarray(offset, offset + statusBitMaskLength), import_Types.UserIDStatus.Available);
|
|
1083
1082
|
offset += statusBitMaskLength;
|
|
1084
1083
|
const supportsUserCodeChecksum = !!(raw.payload[offset] & 128);
|
|
1085
1084
|
const supportsMultipleUserCodeReport = !!(raw.payload[offset] & 64);
|
|
1086
1085
|
const supportsMultipleUserCodeSet = !!(raw.payload[offset] & 32);
|
|
1087
1086
|
const keypadModesBitMaskLength = raw.payload[offset] & 31;
|
|
1088
1087
|
offset += 1;
|
|
1089
|
-
(0,
|
|
1090
|
-
const supportedKeypadModes = (0,
|
|
1088
|
+
(0, import_core.validatePayload)(raw.payload.length >= offset + keypadModesBitMaskLength + 1);
|
|
1089
|
+
const supportedKeypadModes = (0, import_core.parseBitMask)(raw.payload.subarray(offset, offset + keypadModesBitMaskLength), import_Types.KeypadMode.Normal);
|
|
1091
1090
|
offset += keypadModesBitMaskLength;
|
|
1092
1091
|
const keysBitMaskLength = raw.payload[offset] & 31;
|
|
1093
1092
|
offset += 1;
|
|
1094
|
-
(0,
|
|
1095
|
-
const supportedASCIIChars =
|
|
1093
|
+
(0, import_core.validatePayload)(raw.payload.length >= offset + keysBitMaskLength);
|
|
1094
|
+
const supportedASCIIChars = import_shared.Bytes.from((0, import_core.parseBitMask)(raw.payload.subarray(offset, offset + keysBitMaskLength), 0)).toString("ascii");
|
|
1096
1095
|
return new this({
|
|
1097
1096
|
nodeId: ctx.sourceNodeId,
|
|
1098
1097
|
supportsAdminCode,
|
|
@@ -1114,19 +1113,19 @@ let UserCodeCCCapabilitiesReport = (() => {
|
|
|
1114
1113
|
supportedKeypadModes;
|
|
1115
1114
|
supportedASCIIChars;
|
|
1116
1115
|
serialize(ctx) {
|
|
1117
|
-
const supportedStatusesBitmask = (0,
|
|
1116
|
+
const supportedStatusesBitmask = (0, import_core.encodeBitMask)(this.supportedUserIDStatuses, void 0, import_Types.UserIDStatus.Available);
|
|
1118
1117
|
const controlByte1 = (this.supportsAdminCode ? 128 : 0) | (this.supportsAdminCodeDeactivation ? 64 : 0) | supportedStatusesBitmask.length & 31;
|
|
1119
|
-
const supportedKeypadModesBitmask = (0,
|
|
1118
|
+
const supportedKeypadModesBitmask = (0, import_core.encodeBitMask)(this.supportedKeypadModes, void 0, import_Types.KeypadMode.Normal);
|
|
1120
1119
|
const controlByte2 = (this.supportsUserCodeChecksum ? 128 : 0) | (this.supportsMultipleUserCodeReport ? 64 : 0) | (this.supportsMultipleUserCodeSet ? 32 : 0) | supportedKeypadModesBitmask.length & 31;
|
|
1121
1120
|
const keysAsNumbers = [...this.supportedASCIIChars].map((char) => char.charCodeAt(0));
|
|
1122
|
-
const supportedKeysBitmask = (0,
|
|
1121
|
+
const supportedKeysBitmask = (0, import_core.encodeBitMask)(keysAsNumbers, void 0, 0);
|
|
1123
1122
|
const controlByte3 = supportedKeysBitmask.length & 31;
|
|
1124
|
-
this.payload =
|
|
1125
|
-
|
|
1123
|
+
this.payload = import_shared.Bytes.concat([
|
|
1124
|
+
import_shared.Bytes.from([controlByte1]),
|
|
1126
1125
|
supportedStatusesBitmask,
|
|
1127
|
-
|
|
1126
|
+
import_shared.Bytes.from([controlByte2]),
|
|
1128
1127
|
supportedKeypadModesBitmask,
|
|
1129
|
-
|
|
1128
|
+
import_shared.Bytes.from([controlByte3]),
|
|
1130
1129
|
supportedKeysBitmask
|
|
1131
1130
|
]);
|
|
1132
1131
|
return super.serialize(ctx);
|
|
@@ -1141,9 +1140,9 @@ let UserCodeCCCapabilitiesReport = (() => {
|
|
|
1141
1140
|
"supports multiple codes in report": this.supportsMultipleUserCodeReport,
|
|
1142
1141
|
"supports multiple codes in set": this.supportsMultipleUserCodeSet,
|
|
1143
1142
|
"supported user id statuses": this.supportedUserIDStatuses.map((status) => `
|
|
1144
|
-
\xB7 ${(0,
|
|
1143
|
+
\xB7 ${(0, import_shared.getEnumMemberName)(import_Types.UserIDStatus, status)}`).join(""),
|
|
1145
1144
|
"supported keypad modes": this.supportedKeypadModes.map((mode) => `
|
|
1146
|
-
\xB7 ${(0,
|
|
1145
|
+
\xB7 ${(0, import_shared.getEnumMemberName)(import_Types.KeypadMode, mode)}`).join(""),
|
|
1147
1146
|
"supported ASCII chars": this.supportedASCIIChars
|
|
1148
1147
|
}
|
|
1149
1148
|
};
|
|
@@ -1199,7 +1198,7 @@ let UserCodeCCKeypadModeSet = (() => {
|
|
|
1199
1198
|
this.keypadMode = options.keypadMode;
|
|
1200
1199
|
}
|
|
1201
1200
|
static from(raw, ctx) {
|
|
1202
|
-
(0,
|
|
1201
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1);
|
|
1203
1202
|
const keypadMode = raw.payload[0];
|
|
1204
1203
|
return new this({
|
|
1205
1204
|
nodeId: ctx.sourceNodeId,
|
|
@@ -1208,13 +1207,13 @@ let UserCodeCCKeypadModeSet = (() => {
|
|
|
1208
1207
|
}
|
|
1209
1208
|
keypadMode;
|
|
1210
1209
|
serialize(ctx) {
|
|
1211
|
-
this.payload =
|
|
1210
|
+
this.payload = import_shared.Bytes.from([this.keypadMode]);
|
|
1212
1211
|
return super.serialize(ctx);
|
|
1213
1212
|
}
|
|
1214
1213
|
toLogEntry(ctx) {
|
|
1215
1214
|
return {
|
|
1216
1215
|
...super.toLogEntry(ctx),
|
|
1217
|
-
message: { mode: (0,
|
|
1216
|
+
message: { mode: (0, import_shared.getEnumMemberName)(import_Types.KeypadMode, this.keypadMode) }
|
|
1218
1217
|
};
|
|
1219
1218
|
}
|
|
1220
1219
|
};
|
|
@@ -1245,7 +1244,7 @@ let UserCodeCCKeypadModeReport = (() => {
|
|
|
1245
1244
|
this.keypadMode = options.keypadMode;
|
|
1246
1245
|
}
|
|
1247
1246
|
static from(raw, ctx) {
|
|
1248
|
-
(0,
|
|
1247
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1);
|
|
1249
1248
|
const keypadMode = raw.payload[0];
|
|
1250
1249
|
return new this({
|
|
1251
1250
|
nodeId: ctx.sourceNodeId,
|
|
@@ -1259,20 +1258,20 @@ let UserCodeCCKeypadModeReport = (() => {
|
|
|
1259
1258
|
const keypadModeValue = import_CCValues_generated.UserCodeCCValues.keypadMode;
|
|
1260
1259
|
this.setMetadata(ctx, keypadModeValue, {
|
|
1261
1260
|
...keypadModeValue.meta,
|
|
1262
|
-
states: (0,
|
|
1261
|
+
states: (0, import_core.enumValuesToMetadataStates)(import_Types.KeypadMode, supportedKeypadModes)
|
|
1263
1262
|
});
|
|
1264
1263
|
return true;
|
|
1265
1264
|
}
|
|
1266
1265
|
keypadMode;
|
|
1267
1266
|
serialize(ctx) {
|
|
1268
|
-
this.payload =
|
|
1267
|
+
this.payload = import_shared.Bytes.from([this.keypadMode]);
|
|
1269
1268
|
return super.serialize(ctx);
|
|
1270
1269
|
}
|
|
1271
1270
|
toLogEntry(ctx) {
|
|
1272
1271
|
return {
|
|
1273
1272
|
...super.toLogEntry(ctx),
|
|
1274
1273
|
message: {
|
|
1275
|
-
keypadMode: (0,
|
|
1274
|
+
keypadMode: (0, import_shared.getEnumMemberName)(import_Types.KeypadMode, this.keypadMode)
|
|
1276
1275
|
}
|
|
1277
1276
|
};
|
|
1278
1277
|
}
|
|
@@ -1327,9 +1326,9 @@ let UserCodeCCAdminCodeSet = (() => {
|
|
|
1327
1326
|
this.adminCode = options.adminCode;
|
|
1328
1327
|
}
|
|
1329
1328
|
static from(raw, ctx) {
|
|
1330
|
-
(0,
|
|
1329
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1);
|
|
1331
1330
|
const codeLength = raw.payload[0] & 15;
|
|
1332
|
-
(0,
|
|
1331
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1 + codeLength);
|
|
1333
1332
|
const adminCode = raw.payload.subarray(1, 1 + codeLength).toString("ascii");
|
|
1334
1333
|
return new this({
|
|
1335
1334
|
nodeId: ctx.sourceNodeId,
|
|
@@ -1338,9 +1337,9 @@ let UserCodeCCAdminCodeSet = (() => {
|
|
|
1338
1337
|
}
|
|
1339
1338
|
adminCode;
|
|
1340
1339
|
serialize(ctx) {
|
|
1341
|
-
this.payload =
|
|
1342
|
-
|
|
1343
|
-
|
|
1340
|
+
this.payload = import_shared.Bytes.concat([
|
|
1341
|
+
import_shared.Bytes.from([this.adminCode.length & 15]),
|
|
1342
|
+
import_shared.Bytes.from(this.adminCode, "ascii")
|
|
1344
1343
|
]);
|
|
1345
1344
|
return super.serialize(ctx);
|
|
1346
1345
|
}
|
|
@@ -1378,9 +1377,9 @@ let UserCodeCCAdminCodeReport = (() => {
|
|
|
1378
1377
|
this.adminCode = options.adminCode;
|
|
1379
1378
|
}
|
|
1380
1379
|
static from(raw, ctx) {
|
|
1381
|
-
(0,
|
|
1380
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1);
|
|
1382
1381
|
const codeLength = raw.payload[0] & 15;
|
|
1383
|
-
(0,
|
|
1382
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1 + codeLength);
|
|
1384
1383
|
const adminCode = raw.payload.subarray(1, 1 + codeLength).toString("ascii");
|
|
1385
1384
|
return new this({
|
|
1386
1385
|
nodeId: ctx.sourceNodeId,
|
|
@@ -1389,9 +1388,9 @@ let UserCodeCCAdminCodeReport = (() => {
|
|
|
1389
1388
|
}
|
|
1390
1389
|
adminCode;
|
|
1391
1390
|
serialize(ctx) {
|
|
1392
|
-
this.payload =
|
|
1393
|
-
|
|
1394
|
-
|
|
1391
|
+
this.payload = import_shared.Bytes.concat([
|
|
1392
|
+
import_shared.Bytes.from([this.adminCode.length & 15]),
|
|
1393
|
+
import_shared.Bytes.from(this.adminCode, "ascii")
|
|
1395
1394
|
]);
|
|
1396
1395
|
return super.serialize(ctx);
|
|
1397
1396
|
}
|
|
@@ -1452,7 +1451,7 @@ let UserCodeCCUserCodeChecksumReport = (() => {
|
|
|
1452
1451
|
this.userCodeChecksum = options.userCodeChecksum;
|
|
1453
1452
|
}
|
|
1454
1453
|
static from(raw, ctx) {
|
|
1455
|
-
(0,
|
|
1454
|
+
(0, import_core.validatePayload)(raw.payload.length >= 2);
|
|
1456
1455
|
const userCodeChecksum = raw.payload.readUInt16BE(0);
|
|
1457
1456
|
return new this({
|
|
1458
1457
|
nodeId: ctx.sourceNodeId,
|
|
@@ -1461,14 +1460,14 @@ let UserCodeCCUserCodeChecksumReport = (() => {
|
|
|
1461
1460
|
}
|
|
1462
1461
|
userCodeChecksum;
|
|
1463
1462
|
serialize(ctx) {
|
|
1464
|
-
this.payload = new
|
|
1463
|
+
this.payload = new import_shared.Bytes(2);
|
|
1465
1464
|
this.payload.writeUInt16BE(this.userCodeChecksum, 0);
|
|
1466
1465
|
return super.serialize(ctx);
|
|
1467
1466
|
}
|
|
1468
1467
|
toLogEntry(ctx) {
|
|
1469
1468
|
return {
|
|
1470
1469
|
...super.toLogEntry(ctx),
|
|
1471
|
-
message: { "user code checksum": (0,
|
|
1470
|
+
message: { "user code checksum": (0, import_shared.num2hex)(this.userCodeChecksum) }
|
|
1472
1471
|
};
|
|
1473
1472
|
}
|
|
1474
1473
|
};
|
|
@@ -1522,25 +1521,25 @@ let UserCodeCCExtendedUserCodeSet = (() => {
|
|
|
1522
1521
|
this.userCodes = options.userCodes;
|
|
1523
1522
|
}
|
|
1524
1523
|
static from(_raw, _ctx) {
|
|
1525
|
-
throw new
|
|
1524
|
+
throw new import_core.ZWaveError(`${this.name}: deserialization not implemented`, import_core.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
1526
1525
|
}
|
|
1527
1526
|
userCodes;
|
|
1528
1527
|
serialize(ctx) {
|
|
1529
1528
|
const userCodeBuffers = this.userCodes.map((code) => {
|
|
1530
|
-
const ret =
|
|
1531
|
-
|
|
1529
|
+
const ret = import_shared.Bytes.concat([
|
|
1530
|
+
import_shared.Bytes.from([
|
|
1532
1531
|
0,
|
|
1533
1532
|
0,
|
|
1534
1533
|
code.userIdStatus,
|
|
1535
1534
|
code.userCode?.length ?? 0
|
|
1536
1535
|
]),
|
|
1537
|
-
(0,
|
|
1536
|
+
(0, import_shared.isUint8Array)(code.userCode) ? code.userCode : import_shared.Bytes.from(code.userCode ?? "", "ascii")
|
|
1538
1537
|
]);
|
|
1539
1538
|
ret.writeUInt16BE(code.userId, 0);
|
|
1540
1539
|
return ret;
|
|
1541
1540
|
});
|
|
1542
|
-
this.payload =
|
|
1543
|
-
|
|
1541
|
+
this.payload = import_shared.Bytes.concat([
|
|
1542
|
+
import_shared.Bytes.from([this.userCodes.length]),
|
|
1544
1543
|
...userCodeBuffers
|
|
1545
1544
|
]);
|
|
1546
1545
|
return super.serialize(ctx);
|
|
@@ -1548,7 +1547,7 @@ let UserCodeCCExtendedUserCodeSet = (() => {
|
|
|
1548
1547
|
toLogEntry(ctx) {
|
|
1549
1548
|
const message = {};
|
|
1550
1549
|
for (const { userId, userIdStatus, userCode } of this.userCodes) {
|
|
1551
|
-
message[`code #${userId}`] = `${userCodeToLogString(userCode ?? "")} (status: ${(0,
|
|
1550
|
+
message[`code #${userId}`] = `${userCodeToLogString(userCode ?? "")} (status: ${(0, import_shared.getEnumMemberName)(import_Types.UserIDStatus, userIdStatus)})`;
|
|
1552
1551
|
}
|
|
1553
1552
|
return {
|
|
1554
1553
|
...super.toLogEntry(ctx),
|
|
@@ -1584,7 +1583,7 @@ let UserCodeCCExtendedUserCodeReport = (() => {
|
|
|
1584
1583
|
this.nextUserId = options.nextUserId;
|
|
1585
1584
|
}
|
|
1586
1585
|
static from(raw, ctx) {
|
|
1587
|
-
(0,
|
|
1586
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1);
|
|
1588
1587
|
const numCodes = raw.payload[0];
|
|
1589
1588
|
let offset = 1;
|
|
1590
1589
|
const userCodes = [];
|
|
@@ -1593,7 +1592,7 @@ let UserCodeCCExtendedUserCodeReport = (() => {
|
|
|
1593
1592
|
userCodes.push(code);
|
|
1594
1593
|
offset += bytesRead;
|
|
1595
1594
|
}
|
|
1596
|
-
(0,
|
|
1595
|
+
(0, import_core.validatePayload)(raw.payload.length >= offset + 2);
|
|
1597
1596
|
const nextUserId = raw.payload.readUInt16BE(offset);
|
|
1598
1597
|
return new this({
|
|
1599
1598
|
nodeId: ctx.sourceNodeId,
|
|
@@ -1614,7 +1613,7 @@ let UserCodeCCExtendedUserCodeReport = (() => {
|
|
|
1614
1613
|
toLogEntry(ctx) {
|
|
1615
1614
|
const message = {};
|
|
1616
1615
|
for (const { userId, userIdStatus, userCode } of this.userCodes) {
|
|
1617
|
-
message[`code #${userId}`] = `${userCodeToLogString(userCode)} (status: ${(0,
|
|
1616
|
+
message[`code #${userId}`] = `${userCodeToLogString(userCode)} (status: ${(0, import_shared.getEnumMemberName)(import_Types.UserIDStatus, userIdStatus)})`;
|
|
1618
1617
|
}
|
|
1619
1618
|
message["next user id"] = this.nextUserId;
|
|
1620
1619
|
return {
|
|
@@ -1651,12 +1650,12 @@ let UserCodeCCExtendedUserCodeGet = (() => {
|
|
|
1651
1650
|
this.reportMore = !!options.reportMore;
|
|
1652
1651
|
}
|
|
1653
1652
|
static from(_raw, _ctx) {
|
|
1654
|
-
throw new
|
|
1653
|
+
throw new import_core.ZWaveError(`${this.name}: deserialization not implemented`, import_core.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
1655
1654
|
}
|
|
1656
1655
|
userId;
|
|
1657
1656
|
reportMore;
|
|
1658
1657
|
serialize(ctx) {
|
|
1659
|
-
this.payload =
|
|
1658
|
+
this.payload = import_shared.Bytes.from([0, 0, this.reportMore ? 1 : 0]);
|
|
1660
1659
|
this.payload.writeUInt16BE(this.userId, 0);
|
|
1661
1660
|
return super.serialize(ctx);
|
|
1662
1661
|
}
|