@zwave-js/cc 14.0.0-beta.1 → 14.0.0-beta.5
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 +510 -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 +877 -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 +887 -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 +748 -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 +478 -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 +590 -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 +546 -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 +472 -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 +208 -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 +584 -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 +646 -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 +330 -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 +1265 -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 +2477 -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 +168 -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 +1366 -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 +458 -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 +329 -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 +754 -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 +1322 -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 +91 -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 +449 -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 +250 -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 +821 -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 +251 -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 +1395 -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 +2224 -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 +364 -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 +322 -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 +269 -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 +440 -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 +1355 -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 +1090 -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 +1268 -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 +234 -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 +856 -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 +928 -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 +126 -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 +504 -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 +1399 -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 +657 -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 +859 -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 +261 -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 +473 -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 +526 -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 +2043 -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 +1853 -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 +977 -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 +853 -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 +398 -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 +495 -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 +252 -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 +559 -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 +248 -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 +366 -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 +792 -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 +635 -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 +413 -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 +522 -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 +1903 -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 +962 -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 +609 -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 +924 -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 +90 -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 +362 -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 +1638 -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 +533 -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 +108 -0
- package/build/cjs/lib/CommandClassDecorators.js +181 -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.d.ts +106 -0
- package/build/cjs/lib/Security2/Extension.js +424 -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 +490 -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 +847 -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 +889 -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 +751 -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 +468 -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 +578 -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 +515 -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 +441 -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 +187 -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 +541 -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 +607 -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 +294 -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 +1274 -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 +2666 -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 +138 -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 +1372 -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 +414 -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 +289 -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 +717 -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 +1311 -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 +60 -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 +412 -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 +210 -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 +805 -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 +211 -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 +1455 -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 +2239 -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 +325 -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 +282 -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 +252 -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 +404 -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 +1409 -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 +1094 -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 +1312 -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 +206 -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 +872 -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 +935 -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 +92 -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 +464 -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 +1481 -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 +611 -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 +830 -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 +223 -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 +462 -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 +534 -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 +2065 -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 +2041 -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 +989 -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 +796 -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 +396 -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 +463 -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 +212 -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 +530 -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 +208 -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 +333 -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 +786 -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 +590 -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 +385 -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 +523 -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 +1933 -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 +971 -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 +568 -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 +905 -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 +57 -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 +328 -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 +1520 -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 +489 -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 +108 -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 +380 -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 +0 -106
- 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/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,1903 @@
|
|
|
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 UserCodeCC_exports = {};
|
|
20
|
+
__export(UserCodeCC_exports, {
|
|
21
|
+
UserCodeCC: () => UserCodeCC,
|
|
22
|
+
UserCodeCCAPI: () => UserCodeCCAPI,
|
|
23
|
+
UserCodeCCAdminCodeGet: () => UserCodeCCAdminCodeGet,
|
|
24
|
+
UserCodeCCAdminCodeReport: () => UserCodeCCAdminCodeReport,
|
|
25
|
+
UserCodeCCAdminCodeSet: () => UserCodeCCAdminCodeSet,
|
|
26
|
+
UserCodeCCCapabilitiesGet: () => UserCodeCCCapabilitiesGet,
|
|
27
|
+
UserCodeCCCapabilitiesReport: () => UserCodeCCCapabilitiesReport,
|
|
28
|
+
UserCodeCCExtendedUserCodeGet: () => UserCodeCCExtendedUserCodeGet,
|
|
29
|
+
UserCodeCCExtendedUserCodeReport: () => UserCodeCCExtendedUserCodeReport,
|
|
30
|
+
UserCodeCCExtendedUserCodeSet: () => UserCodeCCExtendedUserCodeSet,
|
|
31
|
+
UserCodeCCGet: () => UserCodeCCGet,
|
|
32
|
+
UserCodeCCKeypadModeGet: () => UserCodeCCKeypadModeGet,
|
|
33
|
+
UserCodeCCKeypadModeReport: () => UserCodeCCKeypadModeReport,
|
|
34
|
+
UserCodeCCKeypadModeSet: () => UserCodeCCKeypadModeSet,
|
|
35
|
+
UserCodeCCReport: () => UserCodeCCReport,
|
|
36
|
+
UserCodeCCSet: () => UserCodeCCSet,
|
|
37
|
+
UserCodeCCUserCodeChecksumGet: () => UserCodeCCUserCodeChecksumGet,
|
|
38
|
+
UserCodeCCUserCodeChecksumReport: () => UserCodeCCUserCodeChecksumReport,
|
|
39
|
+
UserCodeCCUsersNumberGet: () => UserCodeCCUsersNumberGet,
|
|
40
|
+
UserCodeCCUsersNumberReport: () => UserCodeCCUsersNumberReport,
|
|
41
|
+
UserCodeCCValues: () => UserCodeCCValues,
|
|
42
|
+
userCodeToLogString: () => userCodeToLogString
|
|
43
|
+
});
|
|
44
|
+
module.exports = __toCommonJS(UserCodeCC_exports);
|
|
45
|
+
var import_safe = require("@zwave-js/core/safe");
|
|
46
|
+
var import_safe2 = require("@zwave-js/shared/safe");
|
|
47
|
+
var import_safe3 = require("@zwave-js/shared/safe");
|
|
48
|
+
var import_API = require("../lib/API.js");
|
|
49
|
+
var import_CommandClass = require("../lib/CommandClass.js");
|
|
50
|
+
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
51
|
+
var import_Values = require("../lib/Values.js");
|
|
52
|
+
var import_Types = require("../lib/_Types.js");
|
|
53
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
54
|
+
function accept(f) {
|
|
55
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
56
|
+
return f;
|
|
57
|
+
}
|
|
58
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
59
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
60
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
61
|
+
var _, done = false;
|
|
62
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
63
|
+
var context = {};
|
|
64
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
65
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
66
|
+
context.addInitializer = function(f) {
|
|
67
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
68
|
+
extraInitializers.push(accept(f || null));
|
|
69
|
+
};
|
|
70
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
71
|
+
if (kind === "accessor") {
|
|
72
|
+
if (result === void 0) continue;
|
|
73
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
74
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
75
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
76
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
77
|
+
} else if (_ = accept(result)) {
|
|
78
|
+
if (kind === "field") initializers.unshift(_);
|
|
79
|
+
else descriptor[key] = _;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
83
|
+
done = true;
|
|
84
|
+
};
|
|
85
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
86
|
+
var useValue = arguments.length > 2;
|
|
87
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
88
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
89
|
+
}
|
|
90
|
+
return useValue ? value : void 0;
|
|
91
|
+
};
|
|
92
|
+
function __assertType(argName, typeName, boundHasError) {
|
|
93
|
+
const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
|
|
94
|
+
if (boundHasError()) {
|
|
95
|
+
throw new ZWaveError2(typeName ? `${argName} is not a ${typeName}` : `${argName} has the wrong type`, ZWaveErrorCodes2.Argument_Invalid);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const __assertType__number = ($o) => {
|
|
99
|
+
function _number($o2) {
|
|
100
|
+
return typeof $o2 !== "number" ? {} : null;
|
|
101
|
+
}
|
|
102
|
+
return _number($o);
|
|
103
|
+
};
|
|
104
|
+
const __assertType__optional_boolean = ($o) => {
|
|
105
|
+
function _boolean($o2) {
|
|
106
|
+
return typeof $o2 !== "boolean" ? {} : null;
|
|
107
|
+
}
|
|
108
|
+
function optional__boolean($o2) {
|
|
109
|
+
if ($o2 !== void 0) {
|
|
110
|
+
const error = _boolean($o2);
|
|
111
|
+
if (error)
|
|
112
|
+
return error;
|
|
113
|
+
}
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
return optional__boolean($o);
|
|
117
|
+
};
|
|
118
|
+
const __assertType__su__1__2__3__4_eu = ($o) => {
|
|
119
|
+
function _1($o2) {
|
|
120
|
+
return $o2 !== 1 ? {} : null;
|
|
121
|
+
}
|
|
122
|
+
function _2($o2) {
|
|
123
|
+
return $o2 !== 2 ? {} : null;
|
|
124
|
+
}
|
|
125
|
+
function _3($o2) {
|
|
126
|
+
return $o2 !== 3 ? {} : null;
|
|
127
|
+
}
|
|
128
|
+
function _4($o2) {
|
|
129
|
+
return $o2 !== 4 ? {} : null;
|
|
130
|
+
}
|
|
131
|
+
function su__1__2__3__4_eu($o2) {
|
|
132
|
+
const conditions = [_1, _2, _3, _4];
|
|
133
|
+
for (const condition of conditions) {
|
|
134
|
+
const error = condition($o2);
|
|
135
|
+
if (!error)
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
return {};
|
|
139
|
+
}
|
|
140
|
+
return su__1__2__3__4_eu($o);
|
|
141
|
+
};
|
|
142
|
+
const __assertType__su__string__uint8array_eu = ($o) => {
|
|
143
|
+
function _string($o2) {
|
|
144
|
+
return typeof $o2 !== "string" ? {} : null;
|
|
145
|
+
}
|
|
146
|
+
function _uint8array($o2) {
|
|
147
|
+
return !require("@zwave-js/shared/safe").isUint8Array($o2) ? {} : null;
|
|
148
|
+
}
|
|
149
|
+
function su__string__uint8array_eu($o2) {
|
|
150
|
+
const conditions = [_string, _uint8array];
|
|
151
|
+
for (const condition of conditions) {
|
|
152
|
+
const error = condition($o2);
|
|
153
|
+
if (!error)
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
return {};
|
|
157
|
+
}
|
|
158
|
+
return su__string__uint8array_eu($o);
|
|
159
|
+
};
|
|
160
|
+
const __assertType__sa_su__3__4__5_eu_ea_2 = ($o) => {
|
|
161
|
+
function _6($o2) {
|
|
162
|
+
return $o2 !== 0 ? {} : null;
|
|
163
|
+
}
|
|
164
|
+
function _7($o2) {
|
|
165
|
+
return $o2 !== 0 ? {} : null;
|
|
166
|
+
}
|
|
167
|
+
function _undefined($o2) {
|
|
168
|
+
return $o2 !== void 0 ? {} : null;
|
|
169
|
+
}
|
|
170
|
+
function _3($o2) {
|
|
171
|
+
if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
|
|
172
|
+
return {};
|
|
173
|
+
if ("userId" in $o2 && $o2["userId"] !== void 0) {
|
|
174
|
+
const error = _6($o2["userId"]);
|
|
175
|
+
if (error)
|
|
176
|
+
return error;
|
|
177
|
+
} else
|
|
178
|
+
return {};
|
|
179
|
+
if ("userIdStatus" in $o2 && $o2["userIdStatus"] !== void 0) {
|
|
180
|
+
const error = _7($o2["userIdStatus"]);
|
|
181
|
+
if (error)
|
|
182
|
+
return error;
|
|
183
|
+
} else
|
|
184
|
+
return {};
|
|
185
|
+
if ("userCode" in $o2 && $o2["userCode"] !== void 0) {
|
|
186
|
+
const error = _undefined($o2["userCode"]);
|
|
187
|
+
if (error)
|
|
188
|
+
return error;
|
|
189
|
+
}
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
function _number($o2) {
|
|
193
|
+
return typeof $o2 !== "number" ? {} : null;
|
|
194
|
+
}
|
|
195
|
+
function _4($o2) {
|
|
196
|
+
if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
|
|
197
|
+
return {};
|
|
198
|
+
if ("userId" in $o2 && $o2["userId"] !== void 0) {
|
|
199
|
+
const error = _number($o2["userId"]);
|
|
200
|
+
if (error)
|
|
201
|
+
return error;
|
|
202
|
+
} else
|
|
203
|
+
return {};
|
|
204
|
+
if ("userIdStatus" in $o2 && $o2["userIdStatus"] !== void 0) {
|
|
205
|
+
const error = _7($o2["userIdStatus"]);
|
|
206
|
+
if (error)
|
|
207
|
+
return error;
|
|
208
|
+
} else
|
|
209
|
+
return {};
|
|
210
|
+
if ("userCode" in $o2 && $o2["userCode"] !== void 0) {
|
|
211
|
+
const error = _undefined($o2["userCode"]);
|
|
212
|
+
if (error)
|
|
213
|
+
return error;
|
|
214
|
+
}
|
|
215
|
+
return null;
|
|
216
|
+
}
|
|
217
|
+
function _9($o2) {
|
|
218
|
+
return $o2 !== 1 ? {} : null;
|
|
219
|
+
}
|
|
220
|
+
function _10($o2) {
|
|
221
|
+
return $o2 !== 2 ? {} : null;
|
|
222
|
+
}
|
|
223
|
+
function _11($o2) {
|
|
224
|
+
return $o2 !== 3 ? {} : null;
|
|
225
|
+
}
|
|
226
|
+
function _12($o2) {
|
|
227
|
+
return $o2 !== 4 ? {} : null;
|
|
228
|
+
}
|
|
229
|
+
function su__9__10__11__12_eu($o2) {
|
|
230
|
+
const conditions = [_9, _10, _11, _12];
|
|
231
|
+
for (const condition of conditions) {
|
|
232
|
+
const error = condition($o2);
|
|
233
|
+
if (!error)
|
|
234
|
+
return null;
|
|
235
|
+
}
|
|
236
|
+
return {};
|
|
237
|
+
}
|
|
238
|
+
function _string($o2) {
|
|
239
|
+
return typeof $o2 !== "string" ? {} : null;
|
|
240
|
+
}
|
|
241
|
+
function _uint8array($o2) {
|
|
242
|
+
return !require("@zwave-js/shared/safe").isUint8Array($o2) ? {} : null;
|
|
243
|
+
}
|
|
244
|
+
function su__string__uint8array_eu($o2) {
|
|
245
|
+
const conditions = [_string, _uint8array];
|
|
246
|
+
for (const condition of conditions) {
|
|
247
|
+
const error = condition($o2);
|
|
248
|
+
if (!error)
|
|
249
|
+
return null;
|
|
250
|
+
}
|
|
251
|
+
return {};
|
|
252
|
+
}
|
|
253
|
+
function _5($o2) {
|
|
254
|
+
if (typeof $o2 !== "object" || $o2 === null || Array.isArray($o2))
|
|
255
|
+
return {};
|
|
256
|
+
if ("userId" in $o2 && $o2["userId"] !== void 0) {
|
|
257
|
+
const error = _number($o2["userId"]);
|
|
258
|
+
if (error)
|
|
259
|
+
return error;
|
|
260
|
+
} else
|
|
261
|
+
return {};
|
|
262
|
+
if ("userIdStatus" in $o2 && $o2["userIdStatus"] !== void 0) {
|
|
263
|
+
const error = su__9__10__11__12_eu($o2["userIdStatus"]);
|
|
264
|
+
if (error)
|
|
265
|
+
return error;
|
|
266
|
+
} else
|
|
267
|
+
return {};
|
|
268
|
+
if ("userCode" in $o2 && $o2["userCode"] !== void 0) {
|
|
269
|
+
const error = su__string__uint8array_eu($o2["userCode"]);
|
|
270
|
+
if (error)
|
|
271
|
+
return error;
|
|
272
|
+
} else
|
|
273
|
+
return {};
|
|
274
|
+
return null;
|
|
275
|
+
}
|
|
276
|
+
function su__3__4__5_eu($o2) {
|
|
277
|
+
const conditions = [_3, _4, _5];
|
|
278
|
+
for (const condition of conditions) {
|
|
279
|
+
const error = condition($o2);
|
|
280
|
+
if (!error)
|
|
281
|
+
return null;
|
|
282
|
+
}
|
|
283
|
+
return {};
|
|
284
|
+
}
|
|
285
|
+
function sa_su__3__4__5_eu_ea_2($o2) {
|
|
286
|
+
if (!Array.isArray($o2))
|
|
287
|
+
return {};
|
|
288
|
+
for (let i = 0; i < $o2.length; i++) {
|
|
289
|
+
const error = su__3__4__5_eu($o2[i]);
|
|
290
|
+
if (error)
|
|
291
|
+
return error;
|
|
292
|
+
}
|
|
293
|
+
return null;
|
|
294
|
+
}
|
|
295
|
+
return sa_su__3__4__5_eu_ea_2($o);
|
|
296
|
+
};
|
|
297
|
+
const __assertType__optional_number = ($o) => {
|
|
298
|
+
function _number($o2) {
|
|
299
|
+
return typeof $o2 !== "number" ? {} : null;
|
|
300
|
+
}
|
|
301
|
+
function optional__number($o2) {
|
|
302
|
+
if ($o2 !== void 0) {
|
|
303
|
+
const error = _number($o2);
|
|
304
|
+
if (error)
|
|
305
|
+
return error;
|
|
306
|
+
}
|
|
307
|
+
return null;
|
|
308
|
+
}
|
|
309
|
+
return optional__number($o);
|
|
310
|
+
};
|
|
311
|
+
const __assertType__KeypadMode = ($o) => {
|
|
312
|
+
function su__1__2__3__4_eu($o2) {
|
|
313
|
+
return ![0, 1, 2, 3].includes($o2) ? {} : null;
|
|
314
|
+
}
|
|
315
|
+
return su__1__2__3__4_eu($o);
|
|
316
|
+
};
|
|
317
|
+
const __assertType__string = ($o) => {
|
|
318
|
+
function _string($o2) {
|
|
319
|
+
return typeof $o2 !== "string" ? {} : null;
|
|
320
|
+
}
|
|
321
|
+
return _string($o);
|
|
322
|
+
};
|
|
323
|
+
const UserCodeCCValues = Object.freeze({
|
|
324
|
+
...import_Values.V.defineStaticCCValues(import_safe.CommandClasses["User Code"], {
|
|
325
|
+
...import_Values.V.staticProperty("supportedUsers", void 0, { internal: true }),
|
|
326
|
+
...import_Values.V.staticProperty("supportsAdminCode", void 0, {
|
|
327
|
+
internal: true
|
|
328
|
+
}),
|
|
329
|
+
...import_Values.V.staticProperty("supportsAdminCodeDeactivation", void 0, {
|
|
330
|
+
internal: true
|
|
331
|
+
}),
|
|
332
|
+
// The following two properties are only kept for compatibility with devices
|
|
333
|
+
// that were interviewed before the rename to admin code
|
|
334
|
+
...import_Values.V.staticPropertyWithName("_deprecated_supportsMasterCode", "supportsMasterCode", void 0, {
|
|
335
|
+
internal: true
|
|
336
|
+
}),
|
|
337
|
+
...import_Values.V.staticPropertyWithName("_deprecated_supportsMasterCodeDeactivation", "supportsMasterCodeDeactivation", void 0, {
|
|
338
|
+
internal: true
|
|
339
|
+
}),
|
|
340
|
+
...import_Values.V.staticProperty("supportsUserCodeChecksum", void 0, {
|
|
341
|
+
internal: true
|
|
342
|
+
}),
|
|
343
|
+
...import_Values.V.staticProperty("supportsMultipleUserCodeReport", void 0, {
|
|
344
|
+
internal: true
|
|
345
|
+
}),
|
|
346
|
+
...import_Values.V.staticProperty("supportsMultipleUserCodeSet", void 0, {
|
|
347
|
+
internal: true
|
|
348
|
+
}),
|
|
349
|
+
...import_Values.V.staticProperty("supportedUserIDStatuses", void 0, {
|
|
350
|
+
internal: true
|
|
351
|
+
}),
|
|
352
|
+
...import_Values.V.staticProperty("supportedKeypadModes", void 0, {
|
|
353
|
+
internal: true
|
|
354
|
+
}),
|
|
355
|
+
...import_Values.V.staticProperty("supportedASCIIChars", void 0, {
|
|
356
|
+
internal: true
|
|
357
|
+
}),
|
|
358
|
+
...import_Values.V.staticProperty("userCodeChecksum", void 0, { internal: true }),
|
|
359
|
+
...import_Values.V.staticProperty("keypadMode", {
|
|
360
|
+
...import_safe.ValueMetadata.ReadOnlyNumber,
|
|
361
|
+
label: "Keypad Mode"
|
|
362
|
+
}, { minVersion: 2 }),
|
|
363
|
+
...import_Values.V.staticProperty("adminCode", {
|
|
364
|
+
...import_safe.ValueMetadata.String,
|
|
365
|
+
label: "Admin Code",
|
|
366
|
+
minLength: 4,
|
|
367
|
+
maxLength: 10
|
|
368
|
+
}, {
|
|
369
|
+
minVersion: 2,
|
|
370
|
+
secret: true
|
|
371
|
+
})
|
|
372
|
+
}),
|
|
373
|
+
...import_Values.V.defineDynamicCCValues(import_safe.CommandClasses["User Code"], {
|
|
374
|
+
...import_Values.V.dynamicPropertyAndKeyWithName("userIdStatus", "userIdStatus", (userId) => userId, ({ property, propertyKey }) => property === "userIdStatus" && typeof propertyKey === "number", (userId) => ({
|
|
375
|
+
...import_safe.ValueMetadata.Number,
|
|
376
|
+
label: `User ID status (${userId})`
|
|
377
|
+
})),
|
|
378
|
+
...import_Values.V.dynamicPropertyAndKeyWithName(
|
|
379
|
+
"userCode",
|
|
380
|
+
"userCode",
|
|
381
|
+
(userId) => userId,
|
|
382
|
+
({ property, propertyKey }) => property === "userCode" && typeof propertyKey === "number",
|
|
383
|
+
// The user code metadata is dynamically created
|
|
384
|
+
void 0,
|
|
385
|
+
{ secret: true }
|
|
386
|
+
)
|
|
387
|
+
})
|
|
388
|
+
});
|
|
389
|
+
function parseExtendedUserCode(payload) {
|
|
390
|
+
(0, import_safe.validatePayload)(payload.length >= 4);
|
|
391
|
+
const userId = payload.readUInt16BE(0);
|
|
392
|
+
const status = payload[2];
|
|
393
|
+
const codeLength = payload[3] & 15;
|
|
394
|
+
(0, import_safe.validatePayload)(payload.length >= 4 + codeLength);
|
|
395
|
+
const code = payload.subarray(4, 4 + codeLength).toString("ascii");
|
|
396
|
+
return {
|
|
397
|
+
code: {
|
|
398
|
+
userId,
|
|
399
|
+
userIdStatus: status,
|
|
400
|
+
userCode: code
|
|
401
|
+
},
|
|
402
|
+
bytesRead: 4 + codeLength
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
function validateCode(code, supportedChars) {
|
|
406
|
+
if (code.length < 4 || code.length > 10)
|
|
407
|
+
return false;
|
|
408
|
+
return [...code].every((char) => supportedChars.includes(char));
|
|
409
|
+
}
|
|
410
|
+
function setUserCodeMetadata(ctx, userId, userCode) {
|
|
411
|
+
const statusValue = UserCodeCCValues.userIdStatus(userId);
|
|
412
|
+
const codeValue = UserCodeCCValues.userCode(userId);
|
|
413
|
+
const ccVersion = (0, import_CommandClass.getEffectiveCCVersion)(ctx, this);
|
|
414
|
+
const supportedUserIDStatuses = this.getValue(ctx, UserCodeCCValues.supportedUserIDStatuses) ?? (ccVersion === 1 ? [
|
|
415
|
+
import_Types.UserIDStatus.Available,
|
|
416
|
+
import_Types.UserIDStatus.Enabled,
|
|
417
|
+
import_Types.UserIDStatus.Disabled
|
|
418
|
+
] : [
|
|
419
|
+
import_Types.UserIDStatus.Available,
|
|
420
|
+
import_Types.UserIDStatus.Enabled,
|
|
421
|
+
import_Types.UserIDStatus.Disabled,
|
|
422
|
+
import_Types.UserIDStatus.Messaging,
|
|
423
|
+
import_Types.UserIDStatus.PassageMode
|
|
424
|
+
]);
|
|
425
|
+
this.ensureMetadata(ctx, statusValue, {
|
|
426
|
+
...statusValue.meta,
|
|
427
|
+
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.UserIDStatus, supportedUserIDStatuses)
|
|
428
|
+
});
|
|
429
|
+
const codeMetadata = {
|
|
430
|
+
...(0, import_safe2.isUint8Array)(userCode) ? import_safe.ValueMetadata.Buffer : import_safe.ValueMetadata.String,
|
|
431
|
+
minLength: 4,
|
|
432
|
+
maxLength: 10,
|
|
433
|
+
label: `User Code (${userId})`
|
|
434
|
+
};
|
|
435
|
+
if (this.getMetadata(ctx, codeValue)?.type !== codeMetadata.type) {
|
|
436
|
+
this.setMetadata(ctx, codeValue, codeMetadata);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
function persistUserCode(ctx, userId, userIdStatus, userCode) {
|
|
440
|
+
const statusValue = UserCodeCCValues.userIdStatus(userId);
|
|
441
|
+
const codeValue = UserCodeCCValues.userCode(userId);
|
|
442
|
+
if (userIdStatus === import_Types.UserIDStatus.StatusNotAvailable) {
|
|
443
|
+
this.removeValue(ctx, statusValue);
|
|
444
|
+
this.removeValue(ctx, codeValue);
|
|
445
|
+
this.removeMetadata(ctx, statusValue);
|
|
446
|
+
this.removeMetadata(ctx, codeValue);
|
|
447
|
+
} else {
|
|
448
|
+
setUserCodeMetadata.call(this, ctx, userId, userCode);
|
|
449
|
+
this.setValue(ctx, statusValue, userIdStatus);
|
|
450
|
+
this.setValue(ctx, codeValue, userCode);
|
|
451
|
+
}
|
|
452
|
+
return true;
|
|
453
|
+
}
|
|
454
|
+
function userCodeToLogString(userCode) {
|
|
455
|
+
if (userCode.length === 0)
|
|
456
|
+
return "(empty)";
|
|
457
|
+
return "*".repeat(userCode.length);
|
|
458
|
+
}
|
|
459
|
+
let UserCodeCCAPI = (() => {
|
|
460
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["User Code"])];
|
|
461
|
+
let _classDescriptor;
|
|
462
|
+
let _classExtraInitializers = [];
|
|
463
|
+
let _classThis;
|
|
464
|
+
let _classSuper = import_API.PhysicalCCAPI;
|
|
465
|
+
var UserCodeCCAPI2 = class extends _classSuper {
|
|
466
|
+
static {
|
|
467
|
+
_classThis = this;
|
|
468
|
+
}
|
|
469
|
+
static {
|
|
470
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
471
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
472
|
+
UserCodeCCAPI2 = _classThis = _classDescriptor.value;
|
|
473
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
474
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
475
|
+
}
|
|
476
|
+
supportsCommand(cmd) {
|
|
477
|
+
switch (cmd) {
|
|
478
|
+
case import_Types.UserCodeCommand.Get:
|
|
479
|
+
case import_Types.UserCodeCommand.Set:
|
|
480
|
+
case import_Types.UserCodeCommand.UsersNumberGet:
|
|
481
|
+
return true;
|
|
482
|
+
// This is mandatory
|
|
483
|
+
case import_Types.UserCodeCommand.CapabilitiesGet:
|
|
484
|
+
case import_Types.UserCodeCommand.KeypadModeSet:
|
|
485
|
+
case import_Types.UserCodeCommand.KeypadModeGet:
|
|
486
|
+
case import_Types.UserCodeCommand.ExtendedUserCodeSet:
|
|
487
|
+
case import_Types.UserCodeCommand.ExtendedUserCodeGet:
|
|
488
|
+
return this.version >= 2;
|
|
489
|
+
case import_Types.UserCodeCommand.AdminCodeSet:
|
|
490
|
+
case import_Types.UserCodeCommand.AdminCodeGet: {
|
|
491
|
+
if (this.version < 2)
|
|
492
|
+
return false;
|
|
493
|
+
return this.tryGetValueDB()?.getValue(UserCodeCCValues.supportsAdminCode.endpoint(this.endpoint.index));
|
|
494
|
+
}
|
|
495
|
+
case import_Types.UserCodeCommand.UserCodeChecksumGet: {
|
|
496
|
+
if (this.version < 2)
|
|
497
|
+
return false;
|
|
498
|
+
return this.tryGetValueDB()?.getValue(UserCodeCCValues.supportsUserCodeChecksum.endpoint(this.endpoint.index));
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
return super.supportsCommand(cmd);
|
|
502
|
+
}
|
|
503
|
+
get [import_API.SET_VALUE]() {
|
|
504
|
+
return async function({ property, propertyKey }, value) {
|
|
505
|
+
let result;
|
|
506
|
+
if (property === "keypadMode") {
|
|
507
|
+
if (typeof value !== "number") {
|
|
508
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
509
|
+
}
|
|
510
|
+
result = await this.setKeypadMode(value);
|
|
511
|
+
} else if (property === "adminCode" || property === "masterCode") {
|
|
512
|
+
if (typeof value !== "string") {
|
|
513
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "string", typeof value);
|
|
514
|
+
}
|
|
515
|
+
result = await this.setAdminCode(value);
|
|
516
|
+
} else if (property === "userIdStatus") {
|
|
517
|
+
if (propertyKey == void 0) {
|
|
518
|
+
(0, import_API.throwMissingPropertyKey)(this.ccId, property);
|
|
519
|
+
} else if (typeof propertyKey !== "number") {
|
|
520
|
+
(0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
|
|
521
|
+
}
|
|
522
|
+
if (typeof value !== "number") {
|
|
523
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
524
|
+
}
|
|
525
|
+
if (value === import_Types.UserIDStatus.Available) {
|
|
526
|
+
result = await this.clear(propertyKey);
|
|
527
|
+
} else {
|
|
528
|
+
const userCode = this.getValueDB().getValue(UserCodeCCValues.userCode(propertyKey).endpoint(this.endpoint.index));
|
|
529
|
+
result = await this.set(propertyKey, value, userCode);
|
|
530
|
+
}
|
|
531
|
+
} else if (property === "userCode") {
|
|
532
|
+
if (propertyKey == void 0) {
|
|
533
|
+
(0, import_API.throwMissingPropertyKey)(this.ccId, property);
|
|
534
|
+
} else if (typeof propertyKey !== "number") {
|
|
535
|
+
(0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
|
|
536
|
+
}
|
|
537
|
+
if (typeof value !== "string" && !(0, import_safe2.isUint8Array)(value)) {
|
|
538
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "string or Buffer", typeof value);
|
|
539
|
+
}
|
|
540
|
+
let userIdStatus = this.getValueDB().getValue(UserCodeCCValues.userIdStatus(propertyKey).endpoint(this.endpoint.index));
|
|
541
|
+
if (userIdStatus === import_Types.UserIDStatus.Available || userIdStatus == void 0) {
|
|
542
|
+
userIdStatus = import_Types.UserIDStatus.Enabled;
|
|
543
|
+
}
|
|
544
|
+
result = await this.set(propertyKey, userIdStatus, value);
|
|
545
|
+
} else {
|
|
546
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
547
|
+
}
|
|
548
|
+
if (this.isSinglecast() && !(0, import_safe.supervisedCommandSucceeded)(result)) {
|
|
549
|
+
this.schedulePoll({ property, propertyKey }, value, {
|
|
550
|
+
transition: "fast"
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
return result;
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
get [import_API.POLL_VALUE]() {
|
|
557
|
+
return async function({ property, propertyKey }) {
|
|
558
|
+
switch (property) {
|
|
559
|
+
case "keypadMode":
|
|
560
|
+
return this.getKeypadMode();
|
|
561
|
+
case "adminCode":
|
|
562
|
+
return this.getAdminCode();
|
|
563
|
+
case "userIdStatus":
|
|
564
|
+
case "userCode": {
|
|
565
|
+
if (propertyKey == void 0) {
|
|
566
|
+
(0, import_API.throwMissingPropertyKey)(this.ccId, property);
|
|
567
|
+
} else if (typeof propertyKey !== "number") {
|
|
568
|
+
(0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
|
|
569
|
+
}
|
|
570
|
+
return (await this.get(propertyKey))?.[property];
|
|
571
|
+
}
|
|
572
|
+
default:
|
|
573
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
574
|
+
}
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
async getUsersCount() {
|
|
578
|
+
this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.UsersNumberGet);
|
|
579
|
+
const cc = new UserCodeCCUsersNumberGet({
|
|
580
|
+
nodeId: this.endpoint.nodeId,
|
|
581
|
+
endpointIndex: this.endpoint.index
|
|
582
|
+
});
|
|
583
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
584
|
+
return response?.supportedUsers;
|
|
585
|
+
}
|
|
586
|
+
async get(userId, multiple = false) {
|
|
587
|
+
__assertType("userId", "number", __assertType__number.bind(void 0, userId));
|
|
588
|
+
__assertType("multiple", "(optional) boolean", __assertType__optional_boolean.bind(void 0, multiple));
|
|
589
|
+
if (userId > 255 || multiple) {
|
|
590
|
+
this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.ExtendedUserCodeGet);
|
|
591
|
+
const cc = new UserCodeCCExtendedUserCodeGet({
|
|
592
|
+
nodeId: this.endpoint.nodeId,
|
|
593
|
+
endpointIndex: this.endpoint.index,
|
|
594
|
+
userId,
|
|
595
|
+
reportMore: multiple
|
|
596
|
+
});
|
|
597
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
598
|
+
if (!response) {
|
|
599
|
+
return;
|
|
600
|
+
} else if (multiple) {
|
|
601
|
+
return (0, import_safe3.pick)(response, ["userCodes", "nextUserId"]);
|
|
602
|
+
} else {
|
|
603
|
+
return (0, import_safe3.pick)(response.userCodes[0], [
|
|
604
|
+
"userIdStatus",
|
|
605
|
+
"userCode"
|
|
606
|
+
]);
|
|
607
|
+
}
|
|
608
|
+
} else {
|
|
609
|
+
this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.Get);
|
|
610
|
+
const cc = new UserCodeCCGet({
|
|
611
|
+
nodeId: this.endpoint.nodeId,
|
|
612
|
+
endpointIndex: this.endpoint.index,
|
|
613
|
+
userId
|
|
614
|
+
});
|
|
615
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
616
|
+
if (response)
|
|
617
|
+
return (0, import_safe3.pick)(response, ["userIdStatus", "userCode"]);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
/** Configures a single user code */
|
|
621
|
+
async set(userId, userIdStatus, userCode) {
|
|
622
|
+
__assertType("userId", "number", __assertType__number.bind(void 0, userId));
|
|
623
|
+
__assertType("userIdStatus", void 0, __assertType__su__1__2__3__4_eu.bind(void 0, userIdStatus));
|
|
624
|
+
__assertType("userCode", void 0, __assertType__su__string__uint8array_eu.bind(void 0, userCode));
|
|
625
|
+
if (userId > 255) {
|
|
626
|
+
return this.setMany([{ userId, userIdStatus, userCode }]);
|
|
627
|
+
}
|
|
628
|
+
this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.Set);
|
|
629
|
+
const numUsers = UserCodeCC.getSupportedUsersCached(this.host, this.endpoint);
|
|
630
|
+
if (numUsers != void 0 && userId > numUsers) {
|
|
631
|
+
throw new import_safe.ZWaveError(`The user ID must be between 0 and the number of supported users ${numUsers}.`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
632
|
+
}
|
|
633
|
+
const cc = new UserCodeCCSet({
|
|
634
|
+
nodeId: this.endpoint.nodeId,
|
|
635
|
+
endpointIndex: this.endpoint.index,
|
|
636
|
+
userId,
|
|
637
|
+
userIdStatus,
|
|
638
|
+
userCode
|
|
639
|
+
});
|
|
640
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
641
|
+
}
|
|
642
|
+
/** Configures multiple user codes */
|
|
643
|
+
async setMany(codes) {
|
|
644
|
+
__assertType("codes", void 0, __assertType__sa_su__3__4__5_eu_ea_2.bind(void 0, codes));
|
|
645
|
+
this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.ExtendedUserCodeSet);
|
|
646
|
+
const numUsers = UserCodeCC.getSupportedUsersCached(this.host, this.endpoint);
|
|
647
|
+
const supportedStatuses = UserCodeCC.getSupportedUserIDStatusesCached(this.host, this.endpoint);
|
|
648
|
+
const supportedASCIIChars = UserCodeCC.getSupportedASCIICharsCached(this.host, this.endpoint);
|
|
649
|
+
const supportsMultipleUserCodeSet = UserCodeCC.supportsMultipleUserCodeSetCached(this.host, this.endpoint) ?? false;
|
|
650
|
+
if (numUsers != void 0) {
|
|
651
|
+
if (codes.some((code) => code.userId < 0 || code.userId > numUsers)) {
|
|
652
|
+
throw new import_safe.ZWaveError(`All User IDs must be between 0 and the number of supported users ${numUsers}.`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
653
|
+
}
|
|
654
|
+
} else {
|
|
655
|
+
if (codes.some((code) => code.userId < 0)) {
|
|
656
|
+
throw new import_safe.ZWaveError(`All User IDs must be greater than 0.`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
if (codes.some((code) => code.userId === 0) && codes.length > 1) {
|
|
660
|
+
throw new import_safe.ZWaveError(`If user ID 0 is used, only one code may be set`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
661
|
+
} else if (codes.some((code) => code.userId === 0 && code.userIdStatus !== import_Types.UserIDStatus.Available)) {
|
|
662
|
+
throw new import_safe.ZWaveError(`User ID 0 may only be used to clear all user codes`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
663
|
+
} else if (codes.length > 1 && !supportsMultipleUserCodeSet) {
|
|
664
|
+
throw new import_safe.ZWaveError(`The node does not support setting multiple user codes at once`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
665
|
+
}
|
|
666
|
+
for (const code of codes) {
|
|
667
|
+
if (supportedStatuses != void 0 && !supportedStatuses.includes(code.userIdStatus)) {
|
|
668
|
+
throw new import_safe.ZWaveError(`The user ID status ${(0, import_safe3.getEnumMemberName)(import_Types.UserIDStatus, code.userIdStatus)} is not supported by the node`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
669
|
+
} else if (code.userIdStatus === import_Types.UserIDStatus.Available) {
|
|
670
|
+
code.userCode = void 0;
|
|
671
|
+
} else if (supportedASCIIChars) {
|
|
672
|
+
const userCodeString = typeof code.userCode === "string" ? code.userCode : (0, import_safe2.uint8ArrayToString)(code.userCode);
|
|
673
|
+
if (!validateCode(userCodeString, supportedASCIIChars)) {
|
|
674
|
+
throw new import_safe.ZWaveError(`The user code must consist of 4 to 10 of the following characters: ${supportedASCIIChars}`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
const cc = new UserCodeCCExtendedUserCodeSet({
|
|
679
|
+
nodeId: this.endpoint.nodeId,
|
|
680
|
+
endpointIndex: this.endpoint.index,
|
|
681
|
+
userCodes: codes
|
|
682
|
+
});
|
|
683
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* Clears one or all user code
|
|
687
|
+
* @param userId The user code to clear. If none or 0 is given, all codes are cleared
|
|
688
|
+
*/
|
|
689
|
+
async clear(userId = 0) {
|
|
690
|
+
__assertType("userId", "(optional) number", __assertType__optional_number.bind(void 0, userId));
|
|
691
|
+
if (this.version > 1 || userId > 255) {
|
|
692
|
+
return this.setMany([
|
|
693
|
+
{ userId, userIdStatus: import_Types.UserIDStatus.Available }
|
|
694
|
+
]);
|
|
695
|
+
} else {
|
|
696
|
+
this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.Set);
|
|
697
|
+
const numUsers = UserCodeCC.getSupportedUsersCached(this.host, this.endpoint);
|
|
698
|
+
if (numUsers != void 0 && userId > numUsers) {
|
|
699
|
+
throw new import_safe.ZWaveError(`The user ID must be between 0 and the number of supported users ${numUsers}.`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
700
|
+
}
|
|
701
|
+
const cc = new UserCodeCCSet({
|
|
702
|
+
nodeId: this.endpoint.nodeId,
|
|
703
|
+
endpointIndex: this.endpoint.index,
|
|
704
|
+
userId,
|
|
705
|
+
userIdStatus: import_Types.UserIDStatus.Available
|
|
706
|
+
});
|
|
707
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
711
|
+
async getCapabilities() {
|
|
712
|
+
this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.CapabilitiesGet);
|
|
713
|
+
const cc = new UserCodeCCCapabilitiesGet({
|
|
714
|
+
nodeId: this.endpoint.nodeId,
|
|
715
|
+
endpointIndex: this.endpoint.index
|
|
716
|
+
});
|
|
717
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
718
|
+
if (response) {
|
|
719
|
+
return (0, import_safe3.pick)(response, [
|
|
720
|
+
"supportsAdminCode",
|
|
721
|
+
"supportsAdminCodeDeactivation",
|
|
722
|
+
"supportsUserCodeChecksum",
|
|
723
|
+
"supportsMultipleUserCodeReport",
|
|
724
|
+
"supportsMultipleUserCodeSet",
|
|
725
|
+
"supportedUserIDStatuses",
|
|
726
|
+
"supportedKeypadModes",
|
|
727
|
+
"supportedASCIIChars"
|
|
728
|
+
]);
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
async getKeypadMode() {
|
|
732
|
+
this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.KeypadModeGet);
|
|
733
|
+
const cc = new UserCodeCCKeypadModeGet({
|
|
734
|
+
nodeId: this.endpoint.nodeId,
|
|
735
|
+
endpointIndex: this.endpoint.index
|
|
736
|
+
});
|
|
737
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
738
|
+
return response?.keypadMode;
|
|
739
|
+
}
|
|
740
|
+
async setKeypadMode(keypadMode) {
|
|
741
|
+
__assertType("keypadMode", "KeypadMode", __assertType__KeypadMode.bind(void 0, keypadMode));
|
|
742
|
+
this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.KeypadModeSet);
|
|
743
|
+
const supportedModes = UserCodeCC.getSupportedKeypadModesCached(this.host, this.endpoint);
|
|
744
|
+
if (!supportedModes) {
|
|
745
|
+
throw new import_safe.ZWaveError(`The keypad mode can only be set after the interview is complete!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
746
|
+
} else if (!supportedModes.includes(keypadMode)) {
|
|
747
|
+
throw new import_safe.ZWaveError(`The keypad mode ${(0, import_safe3.getEnumMemberName)(import_Types.KeypadMode, keypadMode)} is not supported by the node!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
748
|
+
}
|
|
749
|
+
const cc = new UserCodeCCKeypadModeSet({
|
|
750
|
+
nodeId: this.endpoint.nodeId,
|
|
751
|
+
endpointIndex: this.endpoint.index,
|
|
752
|
+
keypadMode
|
|
753
|
+
});
|
|
754
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
755
|
+
}
|
|
756
|
+
async getAdminCode() {
|
|
757
|
+
this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.AdminCodeGet);
|
|
758
|
+
const cc = new UserCodeCCAdminCodeGet({
|
|
759
|
+
nodeId: this.endpoint.nodeId,
|
|
760
|
+
endpointIndex: this.endpoint.index
|
|
761
|
+
});
|
|
762
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
763
|
+
return response?.adminCode;
|
|
764
|
+
}
|
|
765
|
+
async setAdminCode(adminCode) {
|
|
766
|
+
__assertType("adminCode", "string", __assertType__string.bind(void 0, adminCode));
|
|
767
|
+
this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.AdminCodeSet);
|
|
768
|
+
const supportedASCIIChars = UserCodeCC.getSupportedASCIICharsCached(this.host, this.endpoint);
|
|
769
|
+
if (!supportedASCIIChars) {
|
|
770
|
+
throw new import_safe.ZWaveError(`The admin code can only be set after the interview is complete!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
771
|
+
}
|
|
772
|
+
if (!adminCode) {
|
|
773
|
+
const supportsDeactivation = UserCodeCC.supportsAdminCodeDeactivationCached(this.host, this.endpoint);
|
|
774
|
+
if (!supportsDeactivation) {
|
|
775
|
+
throw new import_safe.ZWaveError(`The node does not support deactivating the admin code!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
776
|
+
}
|
|
777
|
+
} else if (!validateCode(adminCode, supportedASCIIChars)) {
|
|
778
|
+
throw new import_safe.ZWaveError(`The admin code must consist of 4 to 10 of the following characters: ${supportedASCIIChars}`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
779
|
+
}
|
|
780
|
+
const cc = new UserCodeCCAdminCodeSet({
|
|
781
|
+
nodeId: this.endpoint.nodeId,
|
|
782
|
+
endpointIndex: this.endpoint.index,
|
|
783
|
+
adminCode
|
|
784
|
+
});
|
|
785
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
786
|
+
}
|
|
787
|
+
async getUserCodeChecksum() {
|
|
788
|
+
this.assertSupportsCommand(import_Types.UserCodeCommand, import_Types.UserCodeCommand.UserCodeChecksumGet);
|
|
789
|
+
const cc = new UserCodeCCUserCodeChecksumGet({
|
|
790
|
+
nodeId: this.endpoint.nodeId,
|
|
791
|
+
endpointIndex: this.endpoint.index
|
|
792
|
+
});
|
|
793
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
794
|
+
return response?.userCodeChecksum;
|
|
795
|
+
}
|
|
796
|
+
};
|
|
797
|
+
return UserCodeCCAPI2 = _classThis;
|
|
798
|
+
})();
|
|
799
|
+
let UserCodeCC = (() => {
|
|
800
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["User Code"]), (0, import_CommandClassDecorators.implementedVersion)(2), (0, import_CommandClassDecorators.ccValues)(UserCodeCCValues)];
|
|
801
|
+
let _classDescriptor;
|
|
802
|
+
let _classExtraInitializers = [];
|
|
803
|
+
let _classThis;
|
|
804
|
+
let _classSuper = import_CommandClass.CommandClass;
|
|
805
|
+
var UserCodeCC2 = class extends _classSuper {
|
|
806
|
+
static {
|
|
807
|
+
_classThis = this;
|
|
808
|
+
}
|
|
809
|
+
static {
|
|
810
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
811
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
812
|
+
UserCodeCC2 = _classThis = _classDescriptor.value;
|
|
813
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
814
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
815
|
+
}
|
|
816
|
+
async interview(ctx) {
|
|
817
|
+
const node = this.getNode(ctx);
|
|
818
|
+
const endpoint = this.getEndpoint(ctx);
|
|
819
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["User Code"], ctx, endpoint).withOptions({
|
|
820
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
821
|
+
});
|
|
822
|
+
ctx.logNode(node.id, {
|
|
823
|
+
endpoint: this.endpointIndex,
|
|
824
|
+
message: `Interviewing ${this.ccName}...`,
|
|
825
|
+
direction: "none"
|
|
826
|
+
});
|
|
827
|
+
if (api.version >= 2) {
|
|
828
|
+
ctx.logNode(node.id, {
|
|
829
|
+
message: "querying capabilities...",
|
|
830
|
+
direction: "outbound"
|
|
831
|
+
});
|
|
832
|
+
const caps = await api.getCapabilities();
|
|
833
|
+
if (!caps) {
|
|
834
|
+
ctx.logNode(node.id, {
|
|
835
|
+
endpoint: this.endpointIndex,
|
|
836
|
+
message: "User Code capabilities query timed out, skipping interview...",
|
|
837
|
+
level: "warn"
|
|
838
|
+
});
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
ctx.logNode(node.id, {
|
|
843
|
+
message: "querying number of user codes...",
|
|
844
|
+
direction: "outbound"
|
|
845
|
+
});
|
|
846
|
+
const supportedUsers = await api.getUsersCount();
|
|
847
|
+
if (supportedUsers == void 0) {
|
|
848
|
+
ctx.logNode(node.id, {
|
|
849
|
+
endpoint: this.endpointIndex,
|
|
850
|
+
message: "Querying number of user codes timed out, skipping interview...",
|
|
851
|
+
level: "warn"
|
|
852
|
+
});
|
|
853
|
+
return;
|
|
854
|
+
}
|
|
855
|
+
for (let userId = 1; userId <= supportedUsers; userId++) {
|
|
856
|
+
setUserCodeMetadata.call(this, ctx, userId);
|
|
857
|
+
}
|
|
858
|
+
if (ctx.getInterviewOptions()?.queryAllUserCodes) {
|
|
859
|
+
await this.refreshValues(ctx);
|
|
860
|
+
}
|
|
861
|
+
this.setInterviewComplete(ctx, true);
|
|
862
|
+
}
|
|
863
|
+
async refreshValues(ctx) {
|
|
864
|
+
const node = this.getNode(ctx);
|
|
865
|
+
const endpoint = this.getEndpoint(ctx);
|
|
866
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["User Code"], ctx, endpoint).withOptions({
|
|
867
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
868
|
+
});
|
|
869
|
+
const supportsAdminCode = UserCodeCC2.supportsAdminCodeCached(ctx, endpoint);
|
|
870
|
+
const supportsUserCodeChecksum = this.getValue(ctx, UserCodeCCValues.supportsUserCodeChecksum) ?? false;
|
|
871
|
+
const supportedKeypadModes = this.getValue(ctx, UserCodeCCValues.supportedKeypadModes) ?? [];
|
|
872
|
+
const supportedUsers = this.getValue(ctx, UserCodeCCValues.supportedUsers) ?? 0;
|
|
873
|
+
const supportsMultipleUserCodeReport = !!this.getValue(ctx, UserCodeCCValues.supportsMultipleUserCodeReport);
|
|
874
|
+
if (api.version >= 2) {
|
|
875
|
+
if (supportsAdminCode) {
|
|
876
|
+
ctx.logNode(node.id, {
|
|
877
|
+
message: "querying admin code...",
|
|
878
|
+
direction: "outbound"
|
|
879
|
+
});
|
|
880
|
+
await api.getAdminCode();
|
|
881
|
+
}
|
|
882
|
+
if (supportedKeypadModes.length > 1) {
|
|
883
|
+
ctx.logNode(node.id, {
|
|
884
|
+
message: "querying active keypad mode...",
|
|
885
|
+
direction: "outbound"
|
|
886
|
+
});
|
|
887
|
+
await api.getKeypadMode();
|
|
888
|
+
}
|
|
889
|
+
const storedUserCodeChecksum = this.getValue(ctx, UserCodeCCValues.userCodeChecksum) ?? 0;
|
|
890
|
+
let currentUserCodeChecksum = 0;
|
|
891
|
+
if (supportsUserCodeChecksum) {
|
|
892
|
+
ctx.logNode(node.id, {
|
|
893
|
+
message: "retrieving current user code checksum...",
|
|
894
|
+
direction: "outbound"
|
|
895
|
+
});
|
|
896
|
+
currentUserCodeChecksum = await api.getUserCodeChecksum();
|
|
897
|
+
}
|
|
898
|
+
if (!supportsUserCodeChecksum || currentUserCodeChecksum !== storedUserCodeChecksum) {
|
|
899
|
+
ctx.logNode(node.id, {
|
|
900
|
+
message: "checksum changed or is not supported, querying all user codes...",
|
|
901
|
+
direction: "outbound"
|
|
902
|
+
});
|
|
903
|
+
if (supportsMultipleUserCodeReport) {
|
|
904
|
+
let nextUserId = 1;
|
|
905
|
+
while (nextUserId > 0 && nextUserId <= supportedUsers) {
|
|
906
|
+
const response = await api.get(nextUserId, true);
|
|
907
|
+
if (response) {
|
|
908
|
+
nextUserId = response.nextUserId;
|
|
909
|
+
} else {
|
|
910
|
+
ctx.logNode(node.id, {
|
|
911
|
+
endpoint: this.endpointIndex,
|
|
912
|
+
message: `Querying user code #${nextUserId} timed out, skipping the remaining interview...`,
|
|
913
|
+
level: "warn"
|
|
914
|
+
});
|
|
915
|
+
break;
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
} else {
|
|
919
|
+
for (let userId = 1; userId <= supportedUsers; userId++) {
|
|
920
|
+
await api.get(userId);
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
} else {
|
|
925
|
+
ctx.logNode(node.id, {
|
|
926
|
+
message: "querying all user codes...",
|
|
927
|
+
direction: "outbound"
|
|
928
|
+
});
|
|
929
|
+
for (let userId = 1; userId <= supportedUsers; userId++) {
|
|
930
|
+
await api.get(userId);
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* Returns the number of supported users.
|
|
936
|
+
* This only works AFTER the interview process
|
|
937
|
+
*/
|
|
938
|
+
static getSupportedUsersCached(ctx, endpoint) {
|
|
939
|
+
return ctx.getValueDB(endpoint.nodeId).getValue(UserCodeCCValues.supportedUsers.endpoint(endpoint.index));
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
* Returns the supported keypad modes.
|
|
943
|
+
* This only works AFTER the interview process
|
|
944
|
+
*/
|
|
945
|
+
static getSupportedKeypadModesCached(ctx, endpoint) {
|
|
946
|
+
return ctx.getValueDB(endpoint.nodeId).getValue(UserCodeCCValues.supportedKeypadModes.endpoint(endpoint.index));
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* Returns the supported user ID statuses.
|
|
950
|
+
* This only works AFTER the interview process
|
|
951
|
+
*/
|
|
952
|
+
static getSupportedUserIDStatusesCached(ctx, endpoint) {
|
|
953
|
+
return ctx.getValueDB(endpoint.nodeId).getValue(UserCodeCCValues.supportedUserIDStatuses.endpoint(endpoint.index));
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
* Returns the supported ASCII characters.
|
|
957
|
+
* This only works AFTER the interview process
|
|
958
|
+
*/
|
|
959
|
+
static getSupportedASCIICharsCached(ctx, endpoint) {
|
|
960
|
+
return ctx.getValueDB(endpoint.nodeId).getValue(UserCodeCCValues.supportedASCIIChars.endpoint(endpoint.index));
|
|
961
|
+
}
|
|
962
|
+
/**
|
|
963
|
+
* Returns whether the admin code functionality is supported.
|
|
964
|
+
* This only works AFTER the interview process
|
|
965
|
+
*/
|
|
966
|
+
static supportsAdminCodeCached(ctx, endpoint) {
|
|
967
|
+
const valueDB = ctx.getValueDB(endpoint.nodeId);
|
|
968
|
+
return valueDB.getValue(UserCodeCCValues.supportsAdminCode.endpoint(endpoint.index)) ?? valueDB.getValue(UserCodeCCValues._deprecated_supportsMasterCode.endpoint(endpoint.index)) ?? false;
|
|
969
|
+
}
|
|
970
|
+
/**
|
|
971
|
+
* Returns whether deactivating the admin code is supported.
|
|
972
|
+
* This only works AFTER the interview process
|
|
973
|
+
*/
|
|
974
|
+
static supportsAdminCodeDeactivationCached(ctx, endpoint) {
|
|
975
|
+
const valueDB = ctx.getValueDB(endpoint.nodeId);
|
|
976
|
+
return valueDB.getValue(UserCodeCCValues.supportsAdminCodeDeactivation.endpoint(endpoint.index)) ?? valueDB.getValue(UserCodeCCValues._deprecated_supportsMasterCodeDeactivation.endpoint(endpoint.index)) ?? false;
|
|
977
|
+
}
|
|
978
|
+
/**
|
|
979
|
+
* Returns whether setting multiple user codes at once is supported.
|
|
980
|
+
* This only works AFTER the interview process
|
|
981
|
+
*/
|
|
982
|
+
static supportsMultipleUserCodeSetCached(ctx, endpoint) {
|
|
983
|
+
return !!ctx.getValueDB(endpoint.nodeId).getValue(UserCodeCCValues.supportsMultipleUserCodeSet.endpoint(endpoint.index));
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
* Returns the current status of a user ID.
|
|
987
|
+
* This only works AFTER the user IDs have been queried.
|
|
988
|
+
*/
|
|
989
|
+
static getUserIdStatusCached(ctx, endpoint, userId) {
|
|
990
|
+
return ctx.getValueDB(endpoint.nodeId).getValue(UserCodeCCValues.userIdStatus(userId).endpoint(endpoint.index));
|
|
991
|
+
}
|
|
992
|
+
/**
|
|
993
|
+
* Returns the current code belonging to a user ID.
|
|
994
|
+
* This only works AFTER the user IDs have been queried.
|
|
995
|
+
*/
|
|
996
|
+
static getUserCodeCached(ctx, endpoint, userId) {
|
|
997
|
+
return ctx.getValueDB(endpoint.nodeId).getValue(UserCodeCCValues.userCode(userId).endpoint(endpoint.index));
|
|
998
|
+
}
|
|
999
|
+
};
|
|
1000
|
+
return UserCodeCC2 = _classThis;
|
|
1001
|
+
})();
|
|
1002
|
+
let UserCodeCCSet = (() => {
|
|
1003
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.Set), (0, import_CommandClassDecorators.useSupervision)()];
|
|
1004
|
+
let _classDescriptor;
|
|
1005
|
+
let _classExtraInitializers = [];
|
|
1006
|
+
let _classThis;
|
|
1007
|
+
let _classSuper = UserCodeCC;
|
|
1008
|
+
var UserCodeCCSet2 = class extends _classSuper {
|
|
1009
|
+
static {
|
|
1010
|
+
_classThis = this;
|
|
1011
|
+
}
|
|
1012
|
+
static {
|
|
1013
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1014
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1015
|
+
UserCodeCCSet2 = _classThis = _classDescriptor.value;
|
|
1016
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1017
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1018
|
+
}
|
|
1019
|
+
constructor(options) {
|
|
1020
|
+
super(options);
|
|
1021
|
+
this.userId = options.userId;
|
|
1022
|
+
this.userIdStatus = options.userIdStatus;
|
|
1023
|
+
if (this.userId < 0) {
|
|
1024
|
+
throw new import_safe.ZWaveError(`${this.constructor.name}: The user ID must be between greater than 0.`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
1025
|
+
} else if (this.userId === 0 && this.userIdStatus !== import_Types.UserIDStatus.Available) {
|
|
1026
|
+
throw new import_safe.ZWaveError(`${this.constructor.name}: User ID 0 may only be used to clear all user codes`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
1027
|
+
} else if (this.userIdStatus === import_Types.UserIDStatus.Available) {
|
|
1028
|
+
this.userCode = "\0".repeat(4);
|
|
1029
|
+
} else {
|
|
1030
|
+
this.userCode = options.userCode;
|
|
1031
|
+
if (this.userCode.length < 4 || this.userCode.length > 10) {
|
|
1032
|
+
throw new import_safe.ZWaveError(`${this.constructor.name}: The user code must have a length of 4 to 10 ${typeof this.userCode === "string" ? "characters" : "bytes"}`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
static from(raw, ctx) {
|
|
1037
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
1038
|
+
const userId = raw.payload[0];
|
|
1039
|
+
const userIdStatus = raw.payload[1];
|
|
1040
|
+
if (userIdStatus === import_Types.UserIDStatus.StatusNotAvailable) {
|
|
1041
|
+
import_safe.validatePayload.fail("Invalid user ID status");
|
|
1042
|
+
}
|
|
1043
|
+
if (userIdStatus === import_Types.UserIDStatus.Available) {
|
|
1044
|
+
return new this({
|
|
1045
|
+
nodeId: ctx.sourceNodeId,
|
|
1046
|
+
userId,
|
|
1047
|
+
userIdStatus
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
const userCode = raw.payload.subarray(2);
|
|
1051
|
+
return new this({
|
|
1052
|
+
nodeId: ctx.sourceNodeId,
|
|
1053
|
+
userId,
|
|
1054
|
+
userIdStatus,
|
|
1055
|
+
userCode
|
|
1056
|
+
});
|
|
1057
|
+
}
|
|
1058
|
+
userId;
|
|
1059
|
+
userIdStatus;
|
|
1060
|
+
userCode;
|
|
1061
|
+
serialize(ctx) {
|
|
1062
|
+
this.payload = import_safe2.Bytes.concat([
|
|
1063
|
+
import_safe2.Bytes.from([this.userId, this.userIdStatus]),
|
|
1064
|
+
typeof this.userCode === "string" ? import_safe2.Bytes.from(this.userCode, "ascii") : this.userCode
|
|
1065
|
+
]);
|
|
1066
|
+
return super.serialize(ctx);
|
|
1067
|
+
}
|
|
1068
|
+
toLogEntry(ctx) {
|
|
1069
|
+
return {
|
|
1070
|
+
...super.toLogEntry(ctx),
|
|
1071
|
+
message: {
|
|
1072
|
+
"user id": this.userId,
|
|
1073
|
+
"id status": (0, import_safe3.getEnumMemberName)(import_Types.UserIDStatus, this.userIdStatus),
|
|
1074
|
+
"user code": userCodeToLogString(this.userCode)
|
|
1075
|
+
}
|
|
1076
|
+
};
|
|
1077
|
+
}
|
|
1078
|
+
};
|
|
1079
|
+
return UserCodeCCSet2 = _classThis;
|
|
1080
|
+
})();
|
|
1081
|
+
let UserCodeCCReport = (() => {
|
|
1082
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.Report)];
|
|
1083
|
+
let _classDescriptor;
|
|
1084
|
+
let _classExtraInitializers = [];
|
|
1085
|
+
let _classThis;
|
|
1086
|
+
let _classSuper = UserCodeCC;
|
|
1087
|
+
var UserCodeCCReport2 = class extends _classSuper {
|
|
1088
|
+
static {
|
|
1089
|
+
_classThis = this;
|
|
1090
|
+
}
|
|
1091
|
+
static {
|
|
1092
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1093
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1094
|
+
UserCodeCCReport2 = _classThis = _classDescriptor.value;
|
|
1095
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1096
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1097
|
+
}
|
|
1098
|
+
constructor(options) {
|
|
1099
|
+
super(options);
|
|
1100
|
+
this.userId = options.userId;
|
|
1101
|
+
this.userIdStatus = options.userIdStatus;
|
|
1102
|
+
this.userCode = options.userCode ?? "";
|
|
1103
|
+
}
|
|
1104
|
+
static from(raw, ctx) {
|
|
1105
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
1106
|
+
const userId = raw.payload[0];
|
|
1107
|
+
const userIdStatus = raw.payload[1];
|
|
1108
|
+
let userCode;
|
|
1109
|
+
if (raw.payload.length === 2 && (userIdStatus === import_Types.UserIDStatus.Available || userIdStatus === import_Types.UserIDStatus.StatusNotAvailable)) {
|
|
1110
|
+
userCode = "";
|
|
1111
|
+
} else {
|
|
1112
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 6);
|
|
1113
|
+
let userCodeBuffer = raw.payload.subarray(2);
|
|
1114
|
+
while (userCodeBuffer.at(-1) === 0) {
|
|
1115
|
+
userCodeBuffer = userCodeBuffer.subarray(0, -1);
|
|
1116
|
+
}
|
|
1117
|
+
const userCodeString = userCodeBuffer.toString("utf8");
|
|
1118
|
+
if ((0, import_safe3.isPrintableASCII)(userCodeString)) {
|
|
1119
|
+
userCode = userCodeString;
|
|
1120
|
+
} else if ((0, import_safe3.isPrintableASCIIWithWhitespace)(userCodeString)) {
|
|
1121
|
+
userCode = userCodeString.trim();
|
|
1122
|
+
} else {
|
|
1123
|
+
userCode = userCodeBuffer;
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
return new this({
|
|
1127
|
+
nodeId: ctx.sourceNodeId,
|
|
1128
|
+
userId,
|
|
1129
|
+
userIdStatus,
|
|
1130
|
+
userCode
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
userId;
|
|
1134
|
+
userIdStatus;
|
|
1135
|
+
userCode;
|
|
1136
|
+
persistValues(ctx) {
|
|
1137
|
+
if (!super.persistValues(ctx))
|
|
1138
|
+
return false;
|
|
1139
|
+
persistUserCode.call(this, ctx, this.userId, this.userIdStatus, this.userCode);
|
|
1140
|
+
return true;
|
|
1141
|
+
}
|
|
1142
|
+
serialize(ctx) {
|
|
1143
|
+
let userCodeBuffer;
|
|
1144
|
+
if (typeof this.userCode === "string") {
|
|
1145
|
+
userCodeBuffer = import_safe2.Bytes.from(this.userCode, "ascii");
|
|
1146
|
+
} else {
|
|
1147
|
+
userCodeBuffer = this.userCode;
|
|
1148
|
+
}
|
|
1149
|
+
this.payload = import_safe2.Bytes.concat([
|
|
1150
|
+
import_safe2.Bytes.from([this.userId, this.userIdStatus]),
|
|
1151
|
+
userCodeBuffer
|
|
1152
|
+
]);
|
|
1153
|
+
return super.serialize(ctx);
|
|
1154
|
+
}
|
|
1155
|
+
toLogEntry(ctx) {
|
|
1156
|
+
return {
|
|
1157
|
+
...super.toLogEntry(ctx),
|
|
1158
|
+
message: {
|
|
1159
|
+
"user id": this.userId,
|
|
1160
|
+
"id status": (0, import_safe3.getEnumMemberName)(import_Types.UserIDStatus, this.userIdStatus),
|
|
1161
|
+
"user code": userCodeToLogString(this.userCode)
|
|
1162
|
+
}
|
|
1163
|
+
};
|
|
1164
|
+
}
|
|
1165
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
1166
|
+
toNotificationEventParameters() {
|
|
1167
|
+
return { userId: this.userId };
|
|
1168
|
+
}
|
|
1169
|
+
};
|
|
1170
|
+
return UserCodeCCReport2 = _classThis;
|
|
1171
|
+
})();
|
|
1172
|
+
let UserCodeCCGet = (() => {
|
|
1173
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.Get), (0, import_CommandClassDecorators.expectedCCResponse)(UserCodeCCReport)];
|
|
1174
|
+
let _classDescriptor;
|
|
1175
|
+
let _classExtraInitializers = [];
|
|
1176
|
+
let _classThis;
|
|
1177
|
+
let _classSuper = UserCodeCC;
|
|
1178
|
+
var UserCodeCCGet2 = class extends _classSuper {
|
|
1179
|
+
static {
|
|
1180
|
+
_classThis = this;
|
|
1181
|
+
}
|
|
1182
|
+
static {
|
|
1183
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1184
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1185
|
+
UserCodeCCGet2 = _classThis = _classDescriptor.value;
|
|
1186
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1187
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1188
|
+
}
|
|
1189
|
+
constructor(options) {
|
|
1190
|
+
super(options);
|
|
1191
|
+
this.userId = options.userId;
|
|
1192
|
+
}
|
|
1193
|
+
static from(raw, ctx) {
|
|
1194
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
1195
|
+
const userId = raw.payload[0];
|
|
1196
|
+
return new this({
|
|
1197
|
+
nodeId: ctx.sourceNodeId,
|
|
1198
|
+
userId
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
userId;
|
|
1202
|
+
serialize(ctx) {
|
|
1203
|
+
this.payload = import_safe2.Bytes.from([this.userId]);
|
|
1204
|
+
return super.serialize(ctx);
|
|
1205
|
+
}
|
|
1206
|
+
toLogEntry(ctx) {
|
|
1207
|
+
return {
|
|
1208
|
+
...super.toLogEntry(ctx),
|
|
1209
|
+
message: { "user id": this.userId }
|
|
1210
|
+
};
|
|
1211
|
+
}
|
|
1212
|
+
};
|
|
1213
|
+
return UserCodeCCGet2 = _classThis;
|
|
1214
|
+
})();
|
|
1215
|
+
let UserCodeCCUsersNumberReport = (() => {
|
|
1216
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.UsersNumberReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedUsers", UserCodeCCValues.supportedUsers)];
|
|
1217
|
+
let _classDescriptor;
|
|
1218
|
+
let _classExtraInitializers = [];
|
|
1219
|
+
let _classThis;
|
|
1220
|
+
let _classSuper = UserCodeCC;
|
|
1221
|
+
var UserCodeCCUsersNumberReport2 = class extends _classSuper {
|
|
1222
|
+
static {
|
|
1223
|
+
_classThis = this;
|
|
1224
|
+
}
|
|
1225
|
+
static {
|
|
1226
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1227
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1228
|
+
UserCodeCCUsersNumberReport2 = _classThis = _classDescriptor.value;
|
|
1229
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1230
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1231
|
+
}
|
|
1232
|
+
constructor(options) {
|
|
1233
|
+
super(options);
|
|
1234
|
+
this.supportedUsers = options.supportedUsers;
|
|
1235
|
+
}
|
|
1236
|
+
static from(raw, ctx) {
|
|
1237
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
1238
|
+
let supportedUsers;
|
|
1239
|
+
if (raw.payload.length >= 3) {
|
|
1240
|
+
supportedUsers = raw.payload.readUInt16BE(1);
|
|
1241
|
+
} else {
|
|
1242
|
+
supportedUsers = raw.payload[0];
|
|
1243
|
+
}
|
|
1244
|
+
return new this({
|
|
1245
|
+
nodeId: ctx.sourceNodeId,
|
|
1246
|
+
supportedUsers
|
|
1247
|
+
});
|
|
1248
|
+
}
|
|
1249
|
+
supportedUsers;
|
|
1250
|
+
serialize(ctx) {
|
|
1251
|
+
this.payload = new import_safe2.Bytes(3);
|
|
1252
|
+
this.payload[0] = Math.min(255, this.supportedUsers);
|
|
1253
|
+
this.payload.writeUInt16BE(this.supportedUsers, 1);
|
|
1254
|
+
return super.serialize(ctx);
|
|
1255
|
+
}
|
|
1256
|
+
toLogEntry(ctx) {
|
|
1257
|
+
return {
|
|
1258
|
+
...super.toLogEntry(ctx),
|
|
1259
|
+
message: { "supported users": this.supportedUsers }
|
|
1260
|
+
};
|
|
1261
|
+
}
|
|
1262
|
+
};
|
|
1263
|
+
return UserCodeCCUsersNumberReport2 = _classThis;
|
|
1264
|
+
})();
|
|
1265
|
+
let UserCodeCCUsersNumberGet = (() => {
|
|
1266
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.UsersNumberGet), (0, import_CommandClassDecorators.expectedCCResponse)(UserCodeCCUsersNumberReport)];
|
|
1267
|
+
let _classDescriptor;
|
|
1268
|
+
let _classExtraInitializers = [];
|
|
1269
|
+
let _classThis;
|
|
1270
|
+
let _classSuper = UserCodeCC;
|
|
1271
|
+
var UserCodeCCUsersNumberGet2 = class extends _classSuper {
|
|
1272
|
+
static {
|
|
1273
|
+
_classThis = this;
|
|
1274
|
+
}
|
|
1275
|
+
static {
|
|
1276
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1277
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1278
|
+
UserCodeCCUsersNumberGet2 = _classThis = _classDescriptor.value;
|
|
1279
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1280
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1281
|
+
}
|
|
1282
|
+
};
|
|
1283
|
+
return UserCodeCCUsersNumberGet2 = _classThis;
|
|
1284
|
+
})();
|
|
1285
|
+
let UserCodeCCCapabilitiesReport = (() => {
|
|
1286
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.CapabilitiesReport), (0, import_CommandClassDecorators.ccValueProperty)("supportsAdminCode", UserCodeCCValues.supportsAdminCode), (0, import_CommandClassDecorators.ccValueProperty)("supportsAdminCodeDeactivation", UserCodeCCValues.supportsAdminCodeDeactivation), (0, import_CommandClassDecorators.ccValueProperty)("supportsUserCodeChecksum", UserCodeCCValues.supportsUserCodeChecksum), (0, import_CommandClassDecorators.ccValueProperty)("supportsMultipleUserCodeReport", UserCodeCCValues.supportsMultipleUserCodeReport), (0, import_CommandClassDecorators.ccValueProperty)("supportsMultipleUserCodeSet", UserCodeCCValues.supportsMultipleUserCodeSet), (0, import_CommandClassDecorators.ccValueProperty)("supportedUserIDStatuses", UserCodeCCValues.supportedUserIDStatuses), (0, import_CommandClassDecorators.ccValueProperty)("supportedKeypadModes", UserCodeCCValues.supportedKeypadModes), (0, import_CommandClassDecorators.ccValueProperty)("supportedASCIIChars", UserCodeCCValues.supportedASCIIChars)];
|
|
1287
|
+
let _classDescriptor;
|
|
1288
|
+
let _classExtraInitializers = [];
|
|
1289
|
+
let _classThis;
|
|
1290
|
+
let _classSuper = UserCodeCC;
|
|
1291
|
+
var UserCodeCCCapabilitiesReport2 = class extends _classSuper {
|
|
1292
|
+
static {
|
|
1293
|
+
_classThis = this;
|
|
1294
|
+
}
|
|
1295
|
+
static {
|
|
1296
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1297
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1298
|
+
UserCodeCCCapabilitiesReport2 = _classThis = _classDescriptor.value;
|
|
1299
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1300
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1301
|
+
}
|
|
1302
|
+
constructor(options) {
|
|
1303
|
+
super(options);
|
|
1304
|
+
this.supportsAdminCode = options.supportsAdminCode;
|
|
1305
|
+
this.supportsAdminCodeDeactivation = options.supportsAdminCodeDeactivation;
|
|
1306
|
+
this.supportsUserCodeChecksum = options.supportsUserCodeChecksum;
|
|
1307
|
+
this.supportsMultipleUserCodeReport = options.supportsMultipleUserCodeReport;
|
|
1308
|
+
this.supportsMultipleUserCodeSet = options.supportsMultipleUserCodeSet;
|
|
1309
|
+
this.supportedUserIDStatuses = options.supportedUserIDStatuses;
|
|
1310
|
+
this.supportedKeypadModes = options.supportedKeypadModes;
|
|
1311
|
+
this.supportedASCIIChars = options.supportedASCIIChars;
|
|
1312
|
+
}
|
|
1313
|
+
static from(raw, ctx) {
|
|
1314
|
+
let offset = 0;
|
|
1315
|
+
(0, import_safe.validatePayload)(raw.payload.length >= offset + 1);
|
|
1316
|
+
const supportsAdminCode = !!(raw.payload[offset] & 128);
|
|
1317
|
+
const supportsAdminCodeDeactivation = !!(raw.payload[offset] & 64);
|
|
1318
|
+
const statusBitMaskLength = raw.payload[offset] & 31;
|
|
1319
|
+
offset += 1;
|
|
1320
|
+
(0, import_safe.validatePayload)(raw.payload.length >= offset + statusBitMaskLength + 1);
|
|
1321
|
+
const supportedUserIDStatuses = (0, import_safe.parseBitMask)(raw.payload.subarray(offset, offset + statusBitMaskLength), import_Types.UserIDStatus.Available);
|
|
1322
|
+
offset += statusBitMaskLength;
|
|
1323
|
+
const supportsUserCodeChecksum = !!(raw.payload[offset] & 128);
|
|
1324
|
+
const supportsMultipleUserCodeReport = !!(raw.payload[offset] & 64);
|
|
1325
|
+
const supportsMultipleUserCodeSet = !!(raw.payload[offset] & 32);
|
|
1326
|
+
const keypadModesBitMaskLength = raw.payload[offset] & 31;
|
|
1327
|
+
offset += 1;
|
|
1328
|
+
(0, import_safe.validatePayload)(raw.payload.length >= offset + keypadModesBitMaskLength + 1);
|
|
1329
|
+
const supportedKeypadModes = (0, import_safe.parseBitMask)(raw.payload.subarray(offset, offset + keypadModesBitMaskLength), import_Types.KeypadMode.Normal);
|
|
1330
|
+
offset += keypadModesBitMaskLength;
|
|
1331
|
+
const keysBitMaskLength = raw.payload[offset] & 31;
|
|
1332
|
+
offset += 1;
|
|
1333
|
+
(0, import_safe.validatePayload)(raw.payload.length >= offset + keysBitMaskLength);
|
|
1334
|
+
const supportedASCIIChars = import_safe2.Bytes.from((0, import_safe.parseBitMask)(raw.payload.subarray(offset, offset + keysBitMaskLength), 0)).toString("ascii");
|
|
1335
|
+
return new this({
|
|
1336
|
+
nodeId: ctx.sourceNodeId,
|
|
1337
|
+
supportsAdminCode,
|
|
1338
|
+
supportsAdminCodeDeactivation,
|
|
1339
|
+
supportedUserIDStatuses,
|
|
1340
|
+
supportsUserCodeChecksum,
|
|
1341
|
+
supportsMultipleUserCodeReport,
|
|
1342
|
+
supportsMultipleUserCodeSet,
|
|
1343
|
+
supportedKeypadModes,
|
|
1344
|
+
supportedASCIIChars
|
|
1345
|
+
});
|
|
1346
|
+
}
|
|
1347
|
+
supportsAdminCode;
|
|
1348
|
+
supportsAdminCodeDeactivation;
|
|
1349
|
+
supportsUserCodeChecksum;
|
|
1350
|
+
supportsMultipleUserCodeReport;
|
|
1351
|
+
supportsMultipleUserCodeSet;
|
|
1352
|
+
supportedUserIDStatuses;
|
|
1353
|
+
supportedKeypadModes;
|
|
1354
|
+
supportedASCIIChars;
|
|
1355
|
+
serialize(ctx) {
|
|
1356
|
+
const supportedStatusesBitmask = (0, import_safe.encodeBitMask)(this.supportedUserIDStatuses, void 0, import_Types.UserIDStatus.Available);
|
|
1357
|
+
const controlByte1 = (this.supportsAdminCode ? 128 : 0) | (this.supportsAdminCodeDeactivation ? 64 : 0) | supportedStatusesBitmask.length & 31;
|
|
1358
|
+
const supportedKeypadModesBitmask = (0, import_safe.encodeBitMask)(this.supportedKeypadModes, void 0, import_Types.KeypadMode.Normal);
|
|
1359
|
+
const controlByte2 = (this.supportsUserCodeChecksum ? 128 : 0) | (this.supportsMultipleUserCodeReport ? 64 : 0) | (this.supportsMultipleUserCodeSet ? 32 : 0) | supportedKeypadModesBitmask.length & 31;
|
|
1360
|
+
const keysAsNumbers = [...this.supportedASCIIChars].map((char) => char.charCodeAt(0));
|
|
1361
|
+
const supportedKeysBitmask = (0, import_safe.encodeBitMask)(keysAsNumbers, void 0, 0);
|
|
1362
|
+
const controlByte3 = supportedKeysBitmask.length & 31;
|
|
1363
|
+
this.payload = import_safe2.Bytes.concat([
|
|
1364
|
+
import_safe2.Bytes.from([controlByte1]),
|
|
1365
|
+
supportedStatusesBitmask,
|
|
1366
|
+
import_safe2.Bytes.from([controlByte2]),
|
|
1367
|
+
supportedKeypadModesBitmask,
|
|
1368
|
+
import_safe2.Bytes.from([controlByte3]),
|
|
1369
|
+
supportedKeysBitmask
|
|
1370
|
+
]);
|
|
1371
|
+
return super.serialize(ctx);
|
|
1372
|
+
}
|
|
1373
|
+
toLogEntry(ctx) {
|
|
1374
|
+
return {
|
|
1375
|
+
...super.toLogEntry(ctx),
|
|
1376
|
+
message: {
|
|
1377
|
+
"supports admin code": this.supportsAdminCode,
|
|
1378
|
+
"supports admin code deactivation": this.supportsAdminCodeDeactivation,
|
|
1379
|
+
"supports user code checksum": this.supportsUserCodeChecksum,
|
|
1380
|
+
"supports multiple codes in report": this.supportsMultipleUserCodeReport,
|
|
1381
|
+
"supports multiple codes in set": this.supportsMultipleUserCodeSet,
|
|
1382
|
+
"supported user id statuses": this.supportedUserIDStatuses.map((status) => `
|
|
1383
|
+
\xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.UserIDStatus, status)}`).join(""),
|
|
1384
|
+
"supported keypad modes": this.supportedKeypadModes.map((mode) => `
|
|
1385
|
+
\xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.KeypadMode, mode)}`).join(""),
|
|
1386
|
+
"supported ASCII chars": this.supportedASCIIChars
|
|
1387
|
+
}
|
|
1388
|
+
};
|
|
1389
|
+
}
|
|
1390
|
+
};
|
|
1391
|
+
return UserCodeCCCapabilitiesReport2 = _classThis;
|
|
1392
|
+
})();
|
|
1393
|
+
let UserCodeCCCapabilitiesGet = (() => {
|
|
1394
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.CapabilitiesGet), (0, import_CommandClassDecorators.expectedCCResponse)(UserCodeCCCapabilitiesReport)];
|
|
1395
|
+
let _classDescriptor;
|
|
1396
|
+
let _classExtraInitializers = [];
|
|
1397
|
+
let _classThis;
|
|
1398
|
+
let _classSuper = UserCodeCC;
|
|
1399
|
+
var UserCodeCCCapabilitiesGet2 = class extends _classSuper {
|
|
1400
|
+
static {
|
|
1401
|
+
_classThis = this;
|
|
1402
|
+
}
|
|
1403
|
+
static {
|
|
1404
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1405
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1406
|
+
UserCodeCCCapabilitiesGet2 = _classThis = _classDescriptor.value;
|
|
1407
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1408
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1409
|
+
}
|
|
1410
|
+
};
|
|
1411
|
+
return UserCodeCCCapabilitiesGet2 = _classThis;
|
|
1412
|
+
})();
|
|
1413
|
+
let UserCodeCCKeypadModeSet = (() => {
|
|
1414
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.KeypadModeSet), (0, import_CommandClassDecorators.useSupervision)()];
|
|
1415
|
+
let _classDescriptor;
|
|
1416
|
+
let _classExtraInitializers = [];
|
|
1417
|
+
let _classThis;
|
|
1418
|
+
let _classSuper = UserCodeCC;
|
|
1419
|
+
var UserCodeCCKeypadModeSet2 = class extends _classSuper {
|
|
1420
|
+
static {
|
|
1421
|
+
_classThis = this;
|
|
1422
|
+
}
|
|
1423
|
+
static {
|
|
1424
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1425
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1426
|
+
UserCodeCCKeypadModeSet2 = _classThis = _classDescriptor.value;
|
|
1427
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1428
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1429
|
+
}
|
|
1430
|
+
constructor(options) {
|
|
1431
|
+
super(options);
|
|
1432
|
+
this.keypadMode = options.keypadMode;
|
|
1433
|
+
}
|
|
1434
|
+
static from(raw, ctx) {
|
|
1435
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
1436
|
+
const keypadMode = raw.payload[0];
|
|
1437
|
+
return new this({
|
|
1438
|
+
nodeId: ctx.sourceNodeId,
|
|
1439
|
+
keypadMode
|
|
1440
|
+
});
|
|
1441
|
+
}
|
|
1442
|
+
keypadMode;
|
|
1443
|
+
serialize(ctx) {
|
|
1444
|
+
this.payload = import_safe2.Bytes.from([this.keypadMode]);
|
|
1445
|
+
return super.serialize(ctx);
|
|
1446
|
+
}
|
|
1447
|
+
toLogEntry(ctx) {
|
|
1448
|
+
return {
|
|
1449
|
+
...super.toLogEntry(ctx),
|
|
1450
|
+
message: { mode: (0, import_safe3.getEnumMemberName)(import_Types.KeypadMode, this.keypadMode) }
|
|
1451
|
+
};
|
|
1452
|
+
}
|
|
1453
|
+
};
|
|
1454
|
+
return UserCodeCCKeypadModeSet2 = _classThis;
|
|
1455
|
+
})();
|
|
1456
|
+
let UserCodeCCKeypadModeReport = (() => {
|
|
1457
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.KeypadModeReport), (0, import_CommandClassDecorators.ccValueProperty)("keypadMode", UserCodeCCValues.keypadMode)];
|
|
1458
|
+
let _classDescriptor;
|
|
1459
|
+
let _classExtraInitializers = [];
|
|
1460
|
+
let _classThis;
|
|
1461
|
+
let _classSuper = UserCodeCC;
|
|
1462
|
+
var UserCodeCCKeypadModeReport2 = class extends _classSuper {
|
|
1463
|
+
static {
|
|
1464
|
+
_classThis = this;
|
|
1465
|
+
}
|
|
1466
|
+
static {
|
|
1467
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1468
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1469
|
+
UserCodeCCKeypadModeReport2 = _classThis = _classDescriptor.value;
|
|
1470
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1471
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1472
|
+
}
|
|
1473
|
+
constructor(options) {
|
|
1474
|
+
super(options);
|
|
1475
|
+
this.keypadMode = options.keypadMode;
|
|
1476
|
+
}
|
|
1477
|
+
static from(raw, ctx) {
|
|
1478
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
1479
|
+
const keypadMode = raw.payload[0];
|
|
1480
|
+
return new this({
|
|
1481
|
+
nodeId: ctx.sourceNodeId,
|
|
1482
|
+
keypadMode
|
|
1483
|
+
});
|
|
1484
|
+
}
|
|
1485
|
+
persistValues(ctx) {
|
|
1486
|
+
if (!super.persistValues(ctx))
|
|
1487
|
+
return false;
|
|
1488
|
+
const supportedKeypadModes = this.getValue(ctx, UserCodeCCValues.supportedKeypadModes) ?? [this.keypadMode];
|
|
1489
|
+
const keypadModeValue = UserCodeCCValues.keypadMode;
|
|
1490
|
+
this.setMetadata(ctx, keypadModeValue, {
|
|
1491
|
+
...keypadModeValue.meta,
|
|
1492
|
+
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.KeypadMode, supportedKeypadModes)
|
|
1493
|
+
});
|
|
1494
|
+
return true;
|
|
1495
|
+
}
|
|
1496
|
+
keypadMode;
|
|
1497
|
+
serialize(ctx) {
|
|
1498
|
+
this.payload = import_safe2.Bytes.from([this.keypadMode]);
|
|
1499
|
+
return super.serialize(ctx);
|
|
1500
|
+
}
|
|
1501
|
+
toLogEntry(ctx) {
|
|
1502
|
+
return {
|
|
1503
|
+
...super.toLogEntry(ctx),
|
|
1504
|
+
message: {
|
|
1505
|
+
keypadMode: (0, import_safe3.getEnumMemberName)(import_Types.KeypadMode, this.keypadMode)
|
|
1506
|
+
}
|
|
1507
|
+
};
|
|
1508
|
+
}
|
|
1509
|
+
};
|
|
1510
|
+
return UserCodeCCKeypadModeReport2 = _classThis;
|
|
1511
|
+
})();
|
|
1512
|
+
let UserCodeCCKeypadModeGet = (() => {
|
|
1513
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.KeypadModeGet), (0, import_CommandClassDecorators.expectedCCResponse)(UserCodeCCKeypadModeReport)];
|
|
1514
|
+
let _classDescriptor;
|
|
1515
|
+
let _classExtraInitializers = [];
|
|
1516
|
+
let _classThis;
|
|
1517
|
+
let _classSuper = UserCodeCC;
|
|
1518
|
+
var UserCodeCCKeypadModeGet2 = class extends _classSuper {
|
|
1519
|
+
static {
|
|
1520
|
+
_classThis = this;
|
|
1521
|
+
}
|
|
1522
|
+
static {
|
|
1523
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1524
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1525
|
+
UserCodeCCKeypadModeGet2 = _classThis = _classDescriptor.value;
|
|
1526
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1527
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1528
|
+
}
|
|
1529
|
+
};
|
|
1530
|
+
return UserCodeCCKeypadModeGet2 = _classThis;
|
|
1531
|
+
})();
|
|
1532
|
+
let UserCodeCCAdminCodeSet = (() => {
|
|
1533
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.AdminCodeSet), (0, import_CommandClassDecorators.useSupervision)()];
|
|
1534
|
+
let _classDescriptor;
|
|
1535
|
+
let _classExtraInitializers = [];
|
|
1536
|
+
let _classThis;
|
|
1537
|
+
let _classSuper = UserCodeCC;
|
|
1538
|
+
var UserCodeCCAdminCodeSet2 = class extends _classSuper {
|
|
1539
|
+
static {
|
|
1540
|
+
_classThis = this;
|
|
1541
|
+
}
|
|
1542
|
+
static {
|
|
1543
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1544
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1545
|
+
UserCodeCCAdminCodeSet2 = _classThis = _classDescriptor.value;
|
|
1546
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1547
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1548
|
+
}
|
|
1549
|
+
constructor(options) {
|
|
1550
|
+
super(options);
|
|
1551
|
+
this.adminCode = options.adminCode;
|
|
1552
|
+
}
|
|
1553
|
+
static from(raw, ctx) {
|
|
1554
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
1555
|
+
const codeLength = raw.payload[0] & 15;
|
|
1556
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1 + codeLength);
|
|
1557
|
+
const adminCode = raw.payload.subarray(1, 1 + codeLength).toString("ascii");
|
|
1558
|
+
return new this({
|
|
1559
|
+
nodeId: ctx.sourceNodeId,
|
|
1560
|
+
adminCode
|
|
1561
|
+
});
|
|
1562
|
+
}
|
|
1563
|
+
adminCode;
|
|
1564
|
+
serialize(ctx) {
|
|
1565
|
+
this.payload = import_safe2.Bytes.concat([
|
|
1566
|
+
import_safe2.Bytes.from([this.adminCode.length & 15]),
|
|
1567
|
+
import_safe2.Bytes.from(this.adminCode, "ascii")
|
|
1568
|
+
]);
|
|
1569
|
+
return super.serialize(ctx);
|
|
1570
|
+
}
|
|
1571
|
+
toLogEntry(ctx) {
|
|
1572
|
+
return {
|
|
1573
|
+
...super.toLogEntry(ctx),
|
|
1574
|
+
message: { "admin code": userCodeToLogString(this.adminCode) }
|
|
1575
|
+
};
|
|
1576
|
+
}
|
|
1577
|
+
};
|
|
1578
|
+
return UserCodeCCAdminCodeSet2 = _classThis;
|
|
1579
|
+
})();
|
|
1580
|
+
let UserCodeCCAdminCodeReport = (() => {
|
|
1581
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.AdminCodeReport), (0, import_CommandClassDecorators.ccValueProperty)("adminCode", UserCodeCCValues.adminCode)];
|
|
1582
|
+
let _classDescriptor;
|
|
1583
|
+
let _classExtraInitializers = [];
|
|
1584
|
+
let _classThis;
|
|
1585
|
+
let _classSuper = UserCodeCC;
|
|
1586
|
+
var UserCodeCCAdminCodeReport2 = class extends _classSuper {
|
|
1587
|
+
static {
|
|
1588
|
+
_classThis = this;
|
|
1589
|
+
}
|
|
1590
|
+
static {
|
|
1591
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1592
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1593
|
+
UserCodeCCAdminCodeReport2 = _classThis = _classDescriptor.value;
|
|
1594
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1595
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1596
|
+
}
|
|
1597
|
+
constructor(options) {
|
|
1598
|
+
super(options);
|
|
1599
|
+
this.adminCode = options.adminCode;
|
|
1600
|
+
}
|
|
1601
|
+
static from(raw, ctx) {
|
|
1602
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
1603
|
+
const codeLength = raw.payload[0] & 15;
|
|
1604
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1 + codeLength);
|
|
1605
|
+
const adminCode = raw.payload.subarray(1, 1 + codeLength).toString("ascii");
|
|
1606
|
+
return new this({
|
|
1607
|
+
nodeId: ctx.sourceNodeId,
|
|
1608
|
+
adminCode
|
|
1609
|
+
});
|
|
1610
|
+
}
|
|
1611
|
+
adminCode;
|
|
1612
|
+
serialize(ctx) {
|
|
1613
|
+
this.payload = import_safe2.Bytes.concat([
|
|
1614
|
+
import_safe2.Bytes.from([this.adminCode.length & 15]),
|
|
1615
|
+
import_safe2.Bytes.from(this.adminCode, "ascii")
|
|
1616
|
+
]);
|
|
1617
|
+
return super.serialize(ctx);
|
|
1618
|
+
}
|
|
1619
|
+
toLogEntry(ctx) {
|
|
1620
|
+
return {
|
|
1621
|
+
...super.toLogEntry(ctx),
|
|
1622
|
+
message: { "admin code": userCodeToLogString(this.adminCode) }
|
|
1623
|
+
};
|
|
1624
|
+
}
|
|
1625
|
+
};
|
|
1626
|
+
return UserCodeCCAdminCodeReport2 = _classThis;
|
|
1627
|
+
})();
|
|
1628
|
+
let UserCodeCCAdminCodeGet = (() => {
|
|
1629
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.AdminCodeGet), (0, import_CommandClassDecorators.expectedCCResponse)(UserCodeCCAdminCodeReport)];
|
|
1630
|
+
let _classDescriptor;
|
|
1631
|
+
let _classExtraInitializers = [];
|
|
1632
|
+
let _classThis;
|
|
1633
|
+
let _classSuper = UserCodeCC;
|
|
1634
|
+
var UserCodeCCAdminCodeGet2 = class extends _classSuper {
|
|
1635
|
+
static {
|
|
1636
|
+
_classThis = this;
|
|
1637
|
+
}
|
|
1638
|
+
static {
|
|
1639
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1640
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1641
|
+
UserCodeCCAdminCodeGet2 = _classThis = _classDescriptor.value;
|
|
1642
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1643
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1644
|
+
}
|
|
1645
|
+
};
|
|
1646
|
+
return UserCodeCCAdminCodeGet2 = _classThis;
|
|
1647
|
+
})();
|
|
1648
|
+
let UserCodeCCUserCodeChecksumReport = (() => {
|
|
1649
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.UserCodeChecksumReport), (0, import_CommandClassDecorators.ccValueProperty)("userCodeChecksum", UserCodeCCValues.userCodeChecksum)];
|
|
1650
|
+
let _classDescriptor;
|
|
1651
|
+
let _classExtraInitializers = [];
|
|
1652
|
+
let _classThis;
|
|
1653
|
+
let _classSuper = UserCodeCC;
|
|
1654
|
+
var UserCodeCCUserCodeChecksumReport2 = class extends _classSuper {
|
|
1655
|
+
static {
|
|
1656
|
+
_classThis = this;
|
|
1657
|
+
}
|
|
1658
|
+
static {
|
|
1659
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1660
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1661
|
+
UserCodeCCUserCodeChecksumReport2 = _classThis = _classDescriptor.value;
|
|
1662
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1663
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1664
|
+
}
|
|
1665
|
+
constructor(options) {
|
|
1666
|
+
super(options);
|
|
1667
|
+
this.userCodeChecksum = options.userCodeChecksum;
|
|
1668
|
+
}
|
|
1669
|
+
static from(raw, ctx) {
|
|
1670
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
1671
|
+
const userCodeChecksum = raw.payload.readUInt16BE(0);
|
|
1672
|
+
return new this({
|
|
1673
|
+
nodeId: ctx.sourceNodeId,
|
|
1674
|
+
userCodeChecksum
|
|
1675
|
+
});
|
|
1676
|
+
}
|
|
1677
|
+
userCodeChecksum;
|
|
1678
|
+
serialize(ctx) {
|
|
1679
|
+
this.payload = new import_safe2.Bytes(2);
|
|
1680
|
+
this.payload.writeUInt16BE(this.userCodeChecksum, 0);
|
|
1681
|
+
return super.serialize(ctx);
|
|
1682
|
+
}
|
|
1683
|
+
toLogEntry(ctx) {
|
|
1684
|
+
return {
|
|
1685
|
+
...super.toLogEntry(ctx),
|
|
1686
|
+
message: { "user code checksum": (0, import_safe3.num2hex)(this.userCodeChecksum) }
|
|
1687
|
+
};
|
|
1688
|
+
}
|
|
1689
|
+
};
|
|
1690
|
+
return UserCodeCCUserCodeChecksumReport2 = _classThis;
|
|
1691
|
+
})();
|
|
1692
|
+
let UserCodeCCUserCodeChecksumGet = (() => {
|
|
1693
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.UserCodeChecksumGet), (0, import_CommandClassDecorators.expectedCCResponse)(UserCodeCCUserCodeChecksumReport)];
|
|
1694
|
+
let _classDescriptor;
|
|
1695
|
+
let _classExtraInitializers = [];
|
|
1696
|
+
let _classThis;
|
|
1697
|
+
let _classSuper = UserCodeCC;
|
|
1698
|
+
var UserCodeCCUserCodeChecksumGet2 = class extends _classSuper {
|
|
1699
|
+
static {
|
|
1700
|
+
_classThis = this;
|
|
1701
|
+
}
|
|
1702
|
+
static {
|
|
1703
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1704
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1705
|
+
UserCodeCCUserCodeChecksumGet2 = _classThis = _classDescriptor.value;
|
|
1706
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1707
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1708
|
+
}
|
|
1709
|
+
};
|
|
1710
|
+
return UserCodeCCUserCodeChecksumGet2 = _classThis;
|
|
1711
|
+
})();
|
|
1712
|
+
let UserCodeCCExtendedUserCodeSet = (() => {
|
|
1713
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.ExtendedUserCodeSet), (0, import_CommandClassDecorators.useSupervision)()];
|
|
1714
|
+
let _classDescriptor;
|
|
1715
|
+
let _classExtraInitializers = [];
|
|
1716
|
+
let _classThis;
|
|
1717
|
+
let _classSuper = UserCodeCC;
|
|
1718
|
+
var UserCodeCCExtendedUserCodeSet2 = class extends _classSuper {
|
|
1719
|
+
static {
|
|
1720
|
+
_classThis = this;
|
|
1721
|
+
}
|
|
1722
|
+
static {
|
|
1723
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1724
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1725
|
+
UserCodeCCExtendedUserCodeSet2 = _classThis = _classDescriptor.value;
|
|
1726
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1727
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1728
|
+
}
|
|
1729
|
+
constructor(options) {
|
|
1730
|
+
super(options);
|
|
1731
|
+
this.userCodes = options.userCodes;
|
|
1732
|
+
}
|
|
1733
|
+
static from(_raw, _ctx) {
|
|
1734
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
1735
|
+
}
|
|
1736
|
+
userCodes;
|
|
1737
|
+
serialize(ctx) {
|
|
1738
|
+
const userCodeBuffers = this.userCodes.map((code) => {
|
|
1739
|
+
const ret = import_safe2.Bytes.concat([
|
|
1740
|
+
import_safe2.Bytes.from([
|
|
1741
|
+
0,
|
|
1742
|
+
0,
|
|
1743
|
+
code.userIdStatus,
|
|
1744
|
+
code.userCode?.length ?? 0
|
|
1745
|
+
]),
|
|
1746
|
+
(0, import_safe2.isUint8Array)(code.userCode) ? code.userCode : import_safe2.Bytes.from(code.userCode ?? "", "ascii")
|
|
1747
|
+
]);
|
|
1748
|
+
ret.writeUInt16BE(code.userId, 0);
|
|
1749
|
+
return ret;
|
|
1750
|
+
});
|
|
1751
|
+
this.payload = import_safe2.Bytes.concat([
|
|
1752
|
+
import_safe2.Bytes.from([this.userCodes.length]),
|
|
1753
|
+
...userCodeBuffers
|
|
1754
|
+
]);
|
|
1755
|
+
return super.serialize(ctx);
|
|
1756
|
+
}
|
|
1757
|
+
toLogEntry(ctx) {
|
|
1758
|
+
const message = {};
|
|
1759
|
+
for (const { userId, userIdStatus, userCode } of this.userCodes) {
|
|
1760
|
+
message[`code #${userId}`] = `${userCodeToLogString(userCode ?? "")} (status: ${(0, import_safe3.getEnumMemberName)(import_Types.UserIDStatus, userIdStatus)})`;
|
|
1761
|
+
}
|
|
1762
|
+
return {
|
|
1763
|
+
...super.toLogEntry(ctx),
|
|
1764
|
+
message
|
|
1765
|
+
};
|
|
1766
|
+
}
|
|
1767
|
+
};
|
|
1768
|
+
return UserCodeCCExtendedUserCodeSet2 = _classThis;
|
|
1769
|
+
})();
|
|
1770
|
+
let UserCodeCCExtendedUserCodeReport = (() => {
|
|
1771
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.ExtendedUserCodeReport)];
|
|
1772
|
+
let _classDescriptor;
|
|
1773
|
+
let _classExtraInitializers = [];
|
|
1774
|
+
let _classThis;
|
|
1775
|
+
let _classSuper = UserCodeCC;
|
|
1776
|
+
var UserCodeCCExtendedUserCodeReport2 = class extends _classSuper {
|
|
1777
|
+
static {
|
|
1778
|
+
_classThis = this;
|
|
1779
|
+
}
|
|
1780
|
+
static {
|
|
1781
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1782
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1783
|
+
UserCodeCCExtendedUserCodeReport2 = _classThis = _classDescriptor.value;
|
|
1784
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1785
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1786
|
+
}
|
|
1787
|
+
constructor(options) {
|
|
1788
|
+
super(options);
|
|
1789
|
+
this.userCodes = options.userCodes;
|
|
1790
|
+
this.nextUserId = options.nextUserId;
|
|
1791
|
+
}
|
|
1792
|
+
static from(raw, ctx) {
|
|
1793
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
1794
|
+
const numCodes = raw.payload[0];
|
|
1795
|
+
let offset = 1;
|
|
1796
|
+
const userCodes = [];
|
|
1797
|
+
for (let i = 0; i < numCodes; i++) {
|
|
1798
|
+
const { code, bytesRead } = parseExtendedUserCode(raw.payload.subarray(offset));
|
|
1799
|
+
userCodes.push(code);
|
|
1800
|
+
offset += bytesRead;
|
|
1801
|
+
}
|
|
1802
|
+
(0, import_safe.validatePayload)(raw.payload.length >= offset + 2);
|
|
1803
|
+
const nextUserId = raw.payload.readUInt16BE(offset);
|
|
1804
|
+
return new this({
|
|
1805
|
+
nodeId: ctx.sourceNodeId,
|
|
1806
|
+
userCodes,
|
|
1807
|
+
nextUserId
|
|
1808
|
+
});
|
|
1809
|
+
}
|
|
1810
|
+
persistValues(ctx) {
|
|
1811
|
+
if (!super.persistValues(ctx))
|
|
1812
|
+
return false;
|
|
1813
|
+
for (const { userId, userIdStatus, userCode } of this.userCodes) {
|
|
1814
|
+
persistUserCode.call(this, ctx, userId, userIdStatus, userCode);
|
|
1815
|
+
}
|
|
1816
|
+
return true;
|
|
1817
|
+
}
|
|
1818
|
+
userCodes;
|
|
1819
|
+
nextUserId;
|
|
1820
|
+
toLogEntry(ctx) {
|
|
1821
|
+
const message = {};
|
|
1822
|
+
for (const { userId, userIdStatus, userCode } of this.userCodes) {
|
|
1823
|
+
message[`code #${userId}`] = `${userCodeToLogString(userCode)} (status: ${(0, import_safe3.getEnumMemberName)(import_Types.UserIDStatus, userIdStatus)})`;
|
|
1824
|
+
}
|
|
1825
|
+
message["next user id"] = this.nextUserId;
|
|
1826
|
+
return {
|
|
1827
|
+
...super.toLogEntry(ctx),
|
|
1828
|
+
message
|
|
1829
|
+
};
|
|
1830
|
+
}
|
|
1831
|
+
};
|
|
1832
|
+
return UserCodeCCExtendedUserCodeReport2 = _classThis;
|
|
1833
|
+
})();
|
|
1834
|
+
let UserCodeCCExtendedUserCodeGet = (() => {
|
|
1835
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.UserCodeCommand.ExtendedUserCodeGet), (0, import_CommandClassDecorators.expectedCCResponse)(UserCodeCCExtendedUserCodeReport)];
|
|
1836
|
+
let _classDescriptor;
|
|
1837
|
+
let _classExtraInitializers = [];
|
|
1838
|
+
let _classThis;
|
|
1839
|
+
let _classSuper = UserCodeCC;
|
|
1840
|
+
var UserCodeCCExtendedUserCodeGet2 = class extends _classSuper {
|
|
1841
|
+
static {
|
|
1842
|
+
_classThis = this;
|
|
1843
|
+
}
|
|
1844
|
+
static {
|
|
1845
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1846
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1847
|
+
UserCodeCCExtendedUserCodeGet2 = _classThis = _classDescriptor.value;
|
|
1848
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1849
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1850
|
+
}
|
|
1851
|
+
constructor(options) {
|
|
1852
|
+
super(options);
|
|
1853
|
+
this.userId = options.userId;
|
|
1854
|
+
this.reportMore = !!options.reportMore;
|
|
1855
|
+
}
|
|
1856
|
+
static from(_raw, _ctx) {
|
|
1857
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
1858
|
+
}
|
|
1859
|
+
userId;
|
|
1860
|
+
reportMore;
|
|
1861
|
+
serialize(ctx) {
|
|
1862
|
+
this.payload = import_safe2.Bytes.from([0, 0, this.reportMore ? 1 : 0]);
|
|
1863
|
+
this.payload.writeUInt16BE(this.userId, 0);
|
|
1864
|
+
return super.serialize(ctx);
|
|
1865
|
+
}
|
|
1866
|
+
toLogEntry(ctx) {
|
|
1867
|
+
return {
|
|
1868
|
+
...super.toLogEntry(ctx),
|
|
1869
|
+
message: {
|
|
1870
|
+
"user id": this.userId,
|
|
1871
|
+
"report more": this.reportMore
|
|
1872
|
+
}
|
|
1873
|
+
};
|
|
1874
|
+
}
|
|
1875
|
+
};
|
|
1876
|
+
return UserCodeCCExtendedUserCodeGet2 = _classThis;
|
|
1877
|
+
})();
|
|
1878
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1879
|
+
0 && (module.exports = {
|
|
1880
|
+
UserCodeCC,
|
|
1881
|
+
UserCodeCCAPI,
|
|
1882
|
+
UserCodeCCAdminCodeGet,
|
|
1883
|
+
UserCodeCCAdminCodeReport,
|
|
1884
|
+
UserCodeCCAdminCodeSet,
|
|
1885
|
+
UserCodeCCCapabilitiesGet,
|
|
1886
|
+
UserCodeCCCapabilitiesReport,
|
|
1887
|
+
UserCodeCCExtendedUserCodeGet,
|
|
1888
|
+
UserCodeCCExtendedUserCodeReport,
|
|
1889
|
+
UserCodeCCExtendedUserCodeSet,
|
|
1890
|
+
UserCodeCCGet,
|
|
1891
|
+
UserCodeCCKeypadModeGet,
|
|
1892
|
+
UserCodeCCKeypadModeReport,
|
|
1893
|
+
UserCodeCCKeypadModeSet,
|
|
1894
|
+
UserCodeCCReport,
|
|
1895
|
+
UserCodeCCSet,
|
|
1896
|
+
UserCodeCCUserCodeChecksumGet,
|
|
1897
|
+
UserCodeCCUserCodeChecksumReport,
|
|
1898
|
+
UserCodeCCUsersNumberGet,
|
|
1899
|
+
UserCodeCCUsersNumberReport,
|
|
1900
|
+
UserCodeCCValues,
|
|
1901
|
+
userCodeToLogString
|
|
1902
|
+
});
|
|
1903
|
+
//# sourceMappingURL=UserCodeCC.js.map
|