@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,2065 @@
|
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
27
|
+
};
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
+
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
34
|
+
};
|
|
35
|
+
function __assertType(argName, typeName, boundHasError) {
|
|
36
|
+
const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
|
|
37
|
+
if (boundHasError()) {
|
|
38
|
+
throw new ZWaveError(typeName ? `${argName} is not a ${typeName}` : `${argName} has the wrong type`, ZWaveErrorCodes.Argument_Invalid);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const __assertType__boolean = $o => {
|
|
42
|
+
function _boolean($o) {
|
|
43
|
+
return typeof $o !== "boolean" ? {} : null;
|
|
44
|
+
}
|
|
45
|
+
return _boolean($o);
|
|
46
|
+
};
|
|
47
|
+
const __assertType__optional_number = $o => {
|
|
48
|
+
function _number($o) {
|
|
49
|
+
return typeof $o !== "number" ? {} : null;
|
|
50
|
+
}
|
|
51
|
+
function optional__number($o) {
|
|
52
|
+
if ($o !== undefined) {
|
|
53
|
+
const error = _number($o);
|
|
54
|
+
if (error)
|
|
55
|
+
return error;
|
|
56
|
+
}
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
return optional__number($o);
|
|
60
|
+
};
|
|
61
|
+
const __assertType__ScheduleEntryLockSlotId = $o => {
|
|
62
|
+
function _number($o) {
|
|
63
|
+
return typeof $o !== "number" ? {} : null;
|
|
64
|
+
}
|
|
65
|
+
function _0($o) {
|
|
66
|
+
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
67
|
+
return {};
|
|
68
|
+
if ("userId" in $o && $o["userId"] !== undefined) {
|
|
69
|
+
const error = _number($o["userId"]);
|
|
70
|
+
if (error)
|
|
71
|
+
return error;
|
|
72
|
+
}
|
|
73
|
+
else
|
|
74
|
+
return {};
|
|
75
|
+
if ("slotId" in $o && $o["slotId"] !== undefined) {
|
|
76
|
+
const error = _number($o["slotId"]);
|
|
77
|
+
if (error)
|
|
78
|
+
return error;
|
|
79
|
+
}
|
|
80
|
+
else
|
|
81
|
+
return {};
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
return _0($o);
|
|
85
|
+
};
|
|
86
|
+
const __assertType__optional_ScheduleEntryLockWeekDaySchedule = $o => {
|
|
87
|
+
function su__2__3__4__5__6__7__8_eu($o) {
|
|
88
|
+
return ![0, 1, 2, 3, 4, 5, 6].includes($o) ? {} : null;
|
|
89
|
+
}
|
|
90
|
+
function _number($o) {
|
|
91
|
+
return typeof $o !== "number" ? {} : null;
|
|
92
|
+
}
|
|
93
|
+
function _0($o) {
|
|
94
|
+
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
95
|
+
return {};
|
|
96
|
+
if ("weekday" in $o && $o["weekday"] !== undefined) {
|
|
97
|
+
const error = su__2__3__4__5__6__7__8_eu($o["weekday"]);
|
|
98
|
+
if (error)
|
|
99
|
+
return error;
|
|
100
|
+
}
|
|
101
|
+
else
|
|
102
|
+
return {};
|
|
103
|
+
if ("startHour" in $o && $o["startHour"] !== undefined) {
|
|
104
|
+
const error = _number($o["startHour"]);
|
|
105
|
+
if (error)
|
|
106
|
+
return error;
|
|
107
|
+
}
|
|
108
|
+
else
|
|
109
|
+
return {};
|
|
110
|
+
if ("startMinute" in $o && $o["startMinute"] !== undefined) {
|
|
111
|
+
const error = _number($o["startMinute"]);
|
|
112
|
+
if (error)
|
|
113
|
+
return error;
|
|
114
|
+
}
|
|
115
|
+
else
|
|
116
|
+
return {};
|
|
117
|
+
if ("stopHour" in $o && $o["stopHour"] !== undefined) {
|
|
118
|
+
const error = _number($o["stopHour"]);
|
|
119
|
+
if (error)
|
|
120
|
+
return error;
|
|
121
|
+
}
|
|
122
|
+
else
|
|
123
|
+
return {};
|
|
124
|
+
if ("stopMinute" in $o && $o["stopMinute"] !== undefined) {
|
|
125
|
+
const error = _number($o["stopMinute"]);
|
|
126
|
+
if (error)
|
|
127
|
+
return error;
|
|
128
|
+
}
|
|
129
|
+
else
|
|
130
|
+
return {};
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
function optional__0($o) {
|
|
134
|
+
if ($o !== undefined) {
|
|
135
|
+
const error = _0($o);
|
|
136
|
+
if (error)
|
|
137
|
+
return error;
|
|
138
|
+
}
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
return optional__0($o);
|
|
142
|
+
};
|
|
143
|
+
const __assertType__optional_ScheduleEntryLockYearDaySchedule = $o => {
|
|
144
|
+
function _number($o) {
|
|
145
|
+
return typeof $o !== "number" ? {} : null;
|
|
146
|
+
}
|
|
147
|
+
function _0($o) {
|
|
148
|
+
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
149
|
+
return {};
|
|
150
|
+
if ("startYear" in $o && $o["startYear"] !== undefined) {
|
|
151
|
+
const error = _number($o["startYear"]);
|
|
152
|
+
if (error)
|
|
153
|
+
return error;
|
|
154
|
+
}
|
|
155
|
+
else
|
|
156
|
+
return {};
|
|
157
|
+
if ("startMonth" in $o && $o["startMonth"] !== undefined) {
|
|
158
|
+
const error = _number($o["startMonth"]);
|
|
159
|
+
if (error)
|
|
160
|
+
return error;
|
|
161
|
+
}
|
|
162
|
+
else
|
|
163
|
+
return {};
|
|
164
|
+
if ("startDay" in $o && $o["startDay"] !== undefined) {
|
|
165
|
+
const error = _number($o["startDay"]);
|
|
166
|
+
if (error)
|
|
167
|
+
return error;
|
|
168
|
+
}
|
|
169
|
+
else
|
|
170
|
+
return {};
|
|
171
|
+
if ("startHour" in $o && $o["startHour"] !== undefined) {
|
|
172
|
+
const error = _number($o["startHour"]);
|
|
173
|
+
if (error)
|
|
174
|
+
return error;
|
|
175
|
+
}
|
|
176
|
+
else
|
|
177
|
+
return {};
|
|
178
|
+
if ("startMinute" in $o && $o["startMinute"] !== undefined) {
|
|
179
|
+
const error = _number($o["startMinute"]);
|
|
180
|
+
if (error)
|
|
181
|
+
return error;
|
|
182
|
+
}
|
|
183
|
+
else
|
|
184
|
+
return {};
|
|
185
|
+
if ("stopYear" in $o && $o["stopYear"] !== undefined) {
|
|
186
|
+
const error = _number($o["stopYear"]);
|
|
187
|
+
if (error)
|
|
188
|
+
return error;
|
|
189
|
+
}
|
|
190
|
+
else
|
|
191
|
+
return {};
|
|
192
|
+
if ("stopMonth" in $o && $o["stopMonth"] !== undefined) {
|
|
193
|
+
const error = _number($o["stopMonth"]);
|
|
194
|
+
if (error)
|
|
195
|
+
return error;
|
|
196
|
+
}
|
|
197
|
+
else
|
|
198
|
+
return {};
|
|
199
|
+
if ("stopDay" in $o && $o["stopDay"] !== undefined) {
|
|
200
|
+
const error = _number($o["stopDay"]);
|
|
201
|
+
if (error)
|
|
202
|
+
return error;
|
|
203
|
+
}
|
|
204
|
+
else
|
|
205
|
+
return {};
|
|
206
|
+
if ("stopHour" in $o && $o["stopHour"] !== undefined) {
|
|
207
|
+
const error = _number($o["stopHour"]);
|
|
208
|
+
if (error)
|
|
209
|
+
return error;
|
|
210
|
+
}
|
|
211
|
+
else
|
|
212
|
+
return {};
|
|
213
|
+
if ("stopMinute" in $o && $o["stopMinute"] !== undefined) {
|
|
214
|
+
const error = _number($o["stopMinute"]);
|
|
215
|
+
if (error)
|
|
216
|
+
return error;
|
|
217
|
+
}
|
|
218
|
+
else
|
|
219
|
+
return {};
|
|
220
|
+
return null;
|
|
221
|
+
}
|
|
222
|
+
function optional__0($o) {
|
|
223
|
+
if ($o !== undefined) {
|
|
224
|
+
const error = _0($o);
|
|
225
|
+
if (error)
|
|
226
|
+
return error;
|
|
227
|
+
}
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
230
|
+
return optional__0($o);
|
|
231
|
+
};
|
|
232
|
+
const __assertType__optional_ScheduleEntryLockDailyRepeatingSchedule = $o => {
|
|
233
|
+
function su__4__5__6__7__8__9__10_eu($o) {
|
|
234
|
+
return ![0, 1, 2, 3, 4, 5, 6].includes($o) ? {} : null;
|
|
235
|
+
}
|
|
236
|
+
function sa_su__4__5__6__7__8__9__10_eu_ea_3($o) {
|
|
237
|
+
if (!Array.isArray($o))
|
|
238
|
+
return {};
|
|
239
|
+
for (let i = 0; i < $o.length; i++) {
|
|
240
|
+
const error = su__4__5__6__7__8__9__10_eu($o[i]);
|
|
241
|
+
if (error)
|
|
242
|
+
return error;
|
|
243
|
+
}
|
|
244
|
+
return null;
|
|
245
|
+
}
|
|
246
|
+
function _number($o) {
|
|
247
|
+
return typeof $o !== "number" ? {} : null;
|
|
248
|
+
}
|
|
249
|
+
function _0($o) {
|
|
250
|
+
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
251
|
+
return {};
|
|
252
|
+
if ("weekdays" in $o && $o["weekdays"] !== undefined) {
|
|
253
|
+
const error = sa_su__4__5__6__7__8__9__10_eu_ea_3($o["weekdays"]);
|
|
254
|
+
if (error)
|
|
255
|
+
return error;
|
|
256
|
+
}
|
|
257
|
+
else
|
|
258
|
+
return {};
|
|
259
|
+
if ("startHour" in $o && $o["startHour"] !== undefined) {
|
|
260
|
+
const error = _number($o["startHour"]);
|
|
261
|
+
if (error)
|
|
262
|
+
return error;
|
|
263
|
+
}
|
|
264
|
+
else
|
|
265
|
+
return {};
|
|
266
|
+
if ("startMinute" in $o && $o["startMinute"] !== undefined) {
|
|
267
|
+
const error = _number($o["startMinute"]);
|
|
268
|
+
if (error)
|
|
269
|
+
return error;
|
|
270
|
+
}
|
|
271
|
+
else
|
|
272
|
+
return {};
|
|
273
|
+
if ("durationHour" in $o && $o["durationHour"] !== undefined) {
|
|
274
|
+
const error = _number($o["durationHour"]);
|
|
275
|
+
if (error)
|
|
276
|
+
return error;
|
|
277
|
+
}
|
|
278
|
+
else
|
|
279
|
+
return {};
|
|
280
|
+
if ("durationMinute" in $o && $o["durationMinute"] !== undefined) {
|
|
281
|
+
const error = _number($o["durationMinute"]);
|
|
282
|
+
if (error)
|
|
283
|
+
return error;
|
|
284
|
+
}
|
|
285
|
+
else
|
|
286
|
+
return {};
|
|
287
|
+
return null;
|
|
288
|
+
}
|
|
289
|
+
function optional__0($o) {
|
|
290
|
+
if ($o !== undefined) {
|
|
291
|
+
const error = _0($o);
|
|
292
|
+
if (error)
|
|
293
|
+
return error;
|
|
294
|
+
}
|
|
295
|
+
return null;
|
|
296
|
+
}
|
|
297
|
+
return optional__0($o);
|
|
298
|
+
};
|
|
299
|
+
const __assertType__Timezone = $o => {
|
|
300
|
+
function _number($o) {
|
|
301
|
+
return typeof $o !== "number" ? {} : null;
|
|
302
|
+
}
|
|
303
|
+
function _0($o) {
|
|
304
|
+
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
305
|
+
return {};
|
|
306
|
+
if ("standardOffset" in $o && $o["standardOffset"] !== undefined) {
|
|
307
|
+
const error = _number($o["standardOffset"]);
|
|
308
|
+
if (error)
|
|
309
|
+
return error;
|
|
310
|
+
}
|
|
311
|
+
else
|
|
312
|
+
return {};
|
|
313
|
+
if ("dstOffset" in $o && $o["dstOffset"] !== undefined) {
|
|
314
|
+
const error = _number($o["dstOffset"]);
|
|
315
|
+
if (error)
|
|
316
|
+
return error;
|
|
317
|
+
}
|
|
318
|
+
else
|
|
319
|
+
return {};
|
|
320
|
+
return null;
|
|
321
|
+
}
|
|
322
|
+
return _0($o);
|
|
323
|
+
};
|
|
324
|
+
import { CommandClasses, MessagePriority, ZWaveError, ZWaveErrorCodes, encodeBitMask, getDSTInfo, isUnsupervisedOrSucceeded, parseBitMask, validatePayload, } from "@zwave-js/core";
|
|
325
|
+
import { Bytes, formatDate, formatTime, getEnumMemberName, pick, } from "@zwave-js/shared";
|
|
326
|
+
import { CCAPI } from "../lib/API.js";
|
|
327
|
+
import { CommandClass, } from "../lib/CommandClass.js";
|
|
328
|
+
import { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from "../lib/CommandClassDecorators.js";
|
|
329
|
+
import { V } from "../lib/Values.js";
|
|
330
|
+
import { ScheduleEntryLockCommand, ScheduleEntryLockScheduleKind, ScheduleEntryLockSetAction, ScheduleEntryLockWeekday, } from "../lib/_Types.js";
|
|
331
|
+
import { encodeTimezone, parseTimezone } from "../lib/serializers.js";
|
|
332
|
+
import { UserCodeCC } from "./UserCodeCC.js";
|
|
333
|
+
export const ScheduleEntryLockCCValues = Object.freeze({
|
|
334
|
+
...V.defineStaticCCValues(CommandClasses["Schedule Entry Lock"], {
|
|
335
|
+
...V.staticProperty("numWeekDaySlots", undefined, { internal: true }),
|
|
336
|
+
...V.staticProperty("numYearDaySlots", undefined, { internal: true }),
|
|
337
|
+
...V.staticProperty("numDailyRepeatingSlots", undefined, {
|
|
338
|
+
internal: true,
|
|
339
|
+
}),
|
|
340
|
+
}),
|
|
341
|
+
...V.defineDynamicCCValues(CommandClasses["Schedule Entry Lock"], {
|
|
342
|
+
...V.dynamicPropertyAndKeyWithName("userEnabled", "userEnabled", (userId) => userId, ({ property, propertyKey }) => property === "userEnabled" && typeof propertyKey === "number", undefined, { internal: true }),
|
|
343
|
+
...V.dynamicPropertyAndKeyWithName("scheduleKind", "scheduleKind", (userId) => userId, ({ property, propertyKey }) => property === "scheduleKind" && typeof propertyKey === "number", undefined, { internal: true }),
|
|
344
|
+
...V.dynamicPropertyAndKeyWithName("schedule", "schedule", (scheduleKind, userId, slotId) => toPropertyKey(scheduleKind, userId, slotId), ({ property, propertyKey }) => property === "schedule" && typeof propertyKey === "number", undefined, { internal: true }),
|
|
345
|
+
}),
|
|
346
|
+
});
|
|
347
|
+
function toPropertyKey(scheduleKind, userId, slotId) {
|
|
348
|
+
return (scheduleKind << 16) | (userId << 8) | slotId;
|
|
349
|
+
}
|
|
350
|
+
/** Caches information about a schedule */
|
|
351
|
+
function persistSchedule(ctx, scheduleKind, userId, slotId, schedule) {
|
|
352
|
+
const scheduleValue = ScheduleEntryLockCCValues.schedule(scheduleKind, userId, slotId);
|
|
353
|
+
if (schedule != undefined) {
|
|
354
|
+
this.setValue(ctx, scheduleValue, schedule);
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
this.removeValue(ctx, scheduleValue);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
/** Updates the schedule kind assumed to be active for user in the cache */
|
|
361
|
+
function setUserCodeScheduleKindCached(ctx, endpoint, userId, scheduleKind) {
|
|
362
|
+
ctx
|
|
363
|
+
.getValueDB(endpoint.nodeId)
|
|
364
|
+
.setValue(ScheduleEntryLockCCValues.scheduleKind(userId).endpoint(endpoint.index), scheduleKind);
|
|
365
|
+
}
|
|
366
|
+
/** Updates whether scheduling is active for one or all user(s) in the cache */
|
|
367
|
+
function setUserCodeScheduleEnabledCached(ctx, endpoint, userId, enabled) {
|
|
368
|
+
const setEnabled = (userId) => {
|
|
369
|
+
ctx
|
|
370
|
+
.getValueDB(endpoint.nodeId)
|
|
371
|
+
.setValue(ScheduleEntryLockCCValues.userEnabled(userId).endpoint(endpoint.index), enabled);
|
|
372
|
+
};
|
|
373
|
+
if (userId == undefined) {
|
|
374
|
+
// Enable/disable all users
|
|
375
|
+
const numUsers = UserCodeCC.getSupportedUsersCached(ctx, endpoint)
|
|
376
|
+
?? 0;
|
|
377
|
+
for (let userId = 1; userId <= numUsers; userId++) {
|
|
378
|
+
setEnabled(userId);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
else {
|
|
382
|
+
setEnabled(userId);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
let ScheduleEntryLockCCAPI = (() => {
|
|
386
|
+
let _classDecorators = [API(CommandClasses["Schedule Entry Lock"])];
|
|
387
|
+
let _classDescriptor;
|
|
388
|
+
let _classExtraInitializers = [];
|
|
389
|
+
let _classThis;
|
|
390
|
+
let _classSuper = CCAPI;
|
|
391
|
+
var ScheduleEntryLockCCAPI = class extends _classSuper {
|
|
392
|
+
static { _classThis = this; }
|
|
393
|
+
static {
|
|
394
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
395
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
396
|
+
ScheduleEntryLockCCAPI = _classThis = _classDescriptor.value;
|
|
397
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
398
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
399
|
+
}
|
|
400
|
+
supportsCommand(cmd) {
|
|
401
|
+
switch (cmd) {
|
|
402
|
+
case ScheduleEntryLockCommand.EnableSet:
|
|
403
|
+
case ScheduleEntryLockCommand.EnableAllSet:
|
|
404
|
+
case ScheduleEntryLockCommand.WeekDayScheduleSet:
|
|
405
|
+
case ScheduleEntryLockCommand.WeekDayScheduleGet:
|
|
406
|
+
case ScheduleEntryLockCommand.YearDayScheduleSet:
|
|
407
|
+
case ScheduleEntryLockCommand.YearDayScheduleGet:
|
|
408
|
+
case ScheduleEntryLockCommand.SupportedGet:
|
|
409
|
+
return true; // V1
|
|
410
|
+
case ScheduleEntryLockCommand.TimeOffsetSet:
|
|
411
|
+
case ScheduleEntryLockCommand.TimeOffsetGet:
|
|
412
|
+
return this.version >= 2;
|
|
413
|
+
case ScheduleEntryLockCommand.DailyRepeatingScheduleSet:
|
|
414
|
+
case ScheduleEntryLockCommand.DailyRepeatingScheduleGet:
|
|
415
|
+
return this.version >= 3;
|
|
416
|
+
}
|
|
417
|
+
return super.supportsCommand(cmd);
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Enables or disables schedules. If a user ID is given, that user's
|
|
421
|
+
* schedules will be enabled or disabled. If no user ID is given, all schedules
|
|
422
|
+
* will be affected.
|
|
423
|
+
*/
|
|
424
|
+
async setEnabled(enabled, userId) {
|
|
425
|
+
__assertType("enabled", "boolean", __assertType__boolean.bind(void 0, enabled));
|
|
426
|
+
__assertType("userId", "(optional) number", __assertType__optional_number.bind(void 0, userId));
|
|
427
|
+
let result;
|
|
428
|
+
if (userId != undefined) {
|
|
429
|
+
this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.EnableSet);
|
|
430
|
+
const cc = new ScheduleEntryLockCCEnableSet({
|
|
431
|
+
nodeId: this.endpoint.nodeId,
|
|
432
|
+
endpointIndex: this.endpoint.index,
|
|
433
|
+
userId,
|
|
434
|
+
enabled,
|
|
435
|
+
});
|
|
436
|
+
result = await this.host.sendCommand(cc, this.commandOptions);
|
|
437
|
+
}
|
|
438
|
+
else {
|
|
439
|
+
this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.EnableAllSet);
|
|
440
|
+
const cc = new ScheduleEntryLockCCEnableAllSet({
|
|
441
|
+
nodeId: this.endpoint.nodeId,
|
|
442
|
+
endpointIndex: this.endpoint.index,
|
|
443
|
+
enabled,
|
|
444
|
+
});
|
|
445
|
+
result = await this.host.sendCommand(cc, this.commandOptions);
|
|
446
|
+
}
|
|
447
|
+
if (this.isSinglecast() && isUnsupervisedOrSucceeded(result)) {
|
|
448
|
+
// Remember the new state in the cache
|
|
449
|
+
setUserCodeScheduleEnabledCached(this.host, this.endpoint, userId, enabled);
|
|
450
|
+
}
|
|
451
|
+
return result;
|
|
452
|
+
}
|
|
453
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
454
|
+
async getNumSlots() {
|
|
455
|
+
this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.SupportedGet);
|
|
456
|
+
const cc = new ScheduleEntryLockCCSupportedGet({
|
|
457
|
+
nodeId: this.endpoint.nodeId,
|
|
458
|
+
endpointIndex: this.endpoint.index,
|
|
459
|
+
});
|
|
460
|
+
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
461
|
+
if (result) {
|
|
462
|
+
return pick(result, [
|
|
463
|
+
"numWeekDaySlots",
|
|
464
|
+
"numYearDaySlots",
|
|
465
|
+
"numDailyRepeatingSlots",
|
|
466
|
+
]);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
async setWeekDaySchedule(slot, schedule) {
|
|
470
|
+
__assertType("slot", "ScheduleEntryLockSlotId", __assertType__ScheduleEntryLockSlotId.bind(void 0, slot));
|
|
471
|
+
__assertType("schedule", "(optional) ScheduleEntryLockWeekDaySchedule", __assertType__optional_ScheduleEntryLockWeekDaySchedule.bind(void 0, schedule));
|
|
472
|
+
this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.WeekDayScheduleSet);
|
|
473
|
+
if (this.isSinglecast()) {
|
|
474
|
+
const numSlots = ScheduleEntryLockCC.getNumWeekDaySlotsCached(this.host, this.endpoint);
|
|
475
|
+
if (slot.slotId < 1 || slot.slotId > numSlots) {
|
|
476
|
+
throw new ZWaveError(`The schedule slot # must be between 1 and the number of supported day-of-week slots ${numSlots}.`, ZWaveErrorCodes.Argument_Invalid);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
if (schedule) {
|
|
480
|
+
if (schedule.stopHour < schedule.startHour
|
|
481
|
+
|| schedule.stopHour === schedule.startHour
|
|
482
|
+
&& schedule.stopMinute <= schedule.startMinute) {
|
|
483
|
+
throw new ZWaveError(`The stop time must be after the start time.`, ZWaveErrorCodes.Argument_Invalid);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
const cc = new ScheduleEntryLockCCWeekDayScheduleSet({
|
|
487
|
+
nodeId: this.endpoint.nodeId,
|
|
488
|
+
endpointIndex: this.endpoint.index,
|
|
489
|
+
...slot,
|
|
490
|
+
...(schedule
|
|
491
|
+
? {
|
|
492
|
+
action: ScheduleEntryLockSetAction.Set,
|
|
493
|
+
...schedule,
|
|
494
|
+
}
|
|
495
|
+
: {
|
|
496
|
+
action: ScheduleEntryLockSetAction.Erase,
|
|
497
|
+
}),
|
|
498
|
+
});
|
|
499
|
+
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
500
|
+
if (this.isSinglecast() && isUnsupervisedOrSucceeded(result)) {
|
|
501
|
+
// Editing (but not erasing) a schedule will enable scheduling for that user
|
|
502
|
+
// and switch it to the current scheduling kind
|
|
503
|
+
if (!!schedule) {
|
|
504
|
+
setUserCodeScheduleEnabledCached(this.host, this.endpoint, slot.userId, true);
|
|
505
|
+
setUserCodeScheduleKindCached(this.host, this.endpoint, slot.userId, ScheduleEntryLockScheduleKind.WeekDay);
|
|
506
|
+
}
|
|
507
|
+
// And cache the schedule
|
|
508
|
+
persistSchedule.call(cc, this.host, ScheduleEntryLockScheduleKind.WeekDay, slot.userId, slot.slotId, schedule ?? false);
|
|
509
|
+
}
|
|
510
|
+
return result;
|
|
511
|
+
}
|
|
512
|
+
async getWeekDaySchedule(slot) {
|
|
513
|
+
__assertType("slot", "ScheduleEntryLockSlotId", __assertType__ScheduleEntryLockSlotId.bind(void 0, slot));
|
|
514
|
+
this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.WeekDayScheduleSet);
|
|
515
|
+
const cc = new ScheduleEntryLockCCWeekDayScheduleGet({
|
|
516
|
+
nodeId: this.endpoint.nodeId,
|
|
517
|
+
endpointIndex: this.endpoint.index,
|
|
518
|
+
...slot,
|
|
519
|
+
});
|
|
520
|
+
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
521
|
+
if (result?.weekday != undefined) {
|
|
522
|
+
return {
|
|
523
|
+
weekday: result.weekday,
|
|
524
|
+
startHour: result.startHour,
|
|
525
|
+
startMinute: result.startMinute,
|
|
526
|
+
stopHour: result.stopHour,
|
|
527
|
+
stopMinute: result.stopMinute,
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
async setYearDaySchedule(slot, schedule) {
|
|
532
|
+
__assertType("slot", "ScheduleEntryLockSlotId", __assertType__ScheduleEntryLockSlotId.bind(void 0, slot));
|
|
533
|
+
__assertType("schedule", "(optional) ScheduleEntryLockYearDaySchedule", __assertType__optional_ScheduleEntryLockYearDaySchedule.bind(void 0, schedule));
|
|
534
|
+
this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.YearDayScheduleSet);
|
|
535
|
+
if (this.isSinglecast()) {
|
|
536
|
+
const numSlots = ScheduleEntryLockCC.getNumYearDaySlotsCached(this.host, this.endpoint);
|
|
537
|
+
if (slot.slotId < 1 || slot.slotId > numSlots) {
|
|
538
|
+
throw new ZWaveError(`The schedule slot # must be between 1 and the number of supported day-of-year slots ${numSlots}.`, ZWaveErrorCodes.Argument_Invalid);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
if (schedule) {
|
|
542
|
+
const startDate = new Date(schedule.startYear, schedule.startMonth - 1, schedule.startDay, schedule.startHour, schedule.startMinute);
|
|
543
|
+
const stopDate = new Date(schedule.stopYear, schedule.stopMonth - 1, schedule.stopDay, schedule.stopHour, schedule.stopMinute);
|
|
544
|
+
if (stopDate <= startDate) {
|
|
545
|
+
throw new ZWaveError(`The stop date must be after the start date.`, ZWaveErrorCodes.Argument_Invalid);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
const cc = new ScheduleEntryLockCCYearDayScheduleSet({
|
|
549
|
+
nodeId: this.endpoint.nodeId,
|
|
550
|
+
endpointIndex: this.endpoint.index,
|
|
551
|
+
...slot,
|
|
552
|
+
...(schedule
|
|
553
|
+
? {
|
|
554
|
+
action: ScheduleEntryLockSetAction.Set,
|
|
555
|
+
...schedule,
|
|
556
|
+
}
|
|
557
|
+
: {
|
|
558
|
+
action: ScheduleEntryLockSetAction.Erase,
|
|
559
|
+
}),
|
|
560
|
+
});
|
|
561
|
+
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
562
|
+
if (this.isSinglecast() && isUnsupervisedOrSucceeded(result)) {
|
|
563
|
+
// Editing (but not erasing) a schedule will enable scheduling for that user
|
|
564
|
+
// and switch it to the current scheduling kind
|
|
565
|
+
if (!!schedule) {
|
|
566
|
+
setUserCodeScheduleEnabledCached(this.host, this.endpoint, slot.userId, true);
|
|
567
|
+
setUserCodeScheduleKindCached(this.host, this.endpoint, slot.userId, ScheduleEntryLockScheduleKind.YearDay);
|
|
568
|
+
}
|
|
569
|
+
// And cache the schedule
|
|
570
|
+
persistSchedule.call(cc, this.host, ScheduleEntryLockScheduleKind.YearDay, slot.userId, slot.slotId, schedule ?? false);
|
|
571
|
+
}
|
|
572
|
+
return result;
|
|
573
|
+
}
|
|
574
|
+
async getYearDaySchedule(slot) {
|
|
575
|
+
__assertType("slot", "ScheduleEntryLockSlotId", __assertType__ScheduleEntryLockSlotId.bind(void 0, slot));
|
|
576
|
+
this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.YearDayScheduleSet);
|
|
577
|
+
const cc = new ScheduleEntryLockCCYearDayScheduleGet({
|
|
578
|
+
nodeId: this.endpoint.nodeId,
|
|
579
|
+
endpointIndex: this.endpoint.index,
|
|
580
|
+
...slot,
|
|
581
|
+
});
|
|
582
|
+
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
583
|
+
if (result?.startYear != undefined) {
|
|
584
|
+
return {
|
|
585
|
+
startYear: result.startYear,
|
|
586
|
+
startMonth: result.startMonth,
|
|
587
|
+
startDay: result.startDay,
|
|
588
|
+
startHour: result.startHour,
|
|
589
|
+
startMinute: result.startMinute,
|
|
590
|
+
stopYear: result.stopYear,
|
|
591
|
+
stopMonth: result.stopMonth,
|
|
592
|
+
stopDay: result.stopDay,
|
|
593
|
+
stopHour: result.stopHour,
|
|
594
|
+
stopMinute: result.stopMinute,
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
async setDailyRepeatingSchedule(slot, schedule) {
|
|
599
|
+
__assertType("slot", "ScheduleEntryLockSlotId", __assertType__ScheduleEntryLockSlotId.bind(void 0, slot));
|
|
600
|
+
__assertType("schedule", "(optional) ScheduleEntryLockDailyRepeatingSchedule", __assertType__optional_ScheduleEntryLockDailyRepeatingSchedule.bind(void 0, schedule));
|
|
601
|
+
this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.DailyRepeatingScheduleSet);
|
|
602
|
+
if (this.isSinglecast()) {
|
|
603
|
+
const numSlots = ScheduleEntryLockCC
|
|
604
|
+
.getNumDailyRepeatingSlotsCached(this.host, this.endpoint);
|
|
605
|
+
if (slot.slotId < 1 || slot.slotId > numSlots) {
|
|
606
|
+
throw new ZWaveError(`The schedule slot # must be between 1 and the number of supported daily repeating slots ${numSlots}.`, ZWaveErrorCodes.Argument_Invalid);
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
const cc = new ScheduleEntryLockCCDailyRepeatingScheduleSet({
|
|
610
|
+
nodeId: this.endpoint.nodeId,
|
|
611
|
+
endpointIndex: this.endpoint.index,
|
|
612
|
+
...slot,
|
|
613
|
+
...(schedule
|
|
614
|
+
? {
|
|
615
|
+
action: ScheduleEntryLockSetAction.Set,
|
|
616
|
+
...schedule,
|
|
617
|
+
}
|
|
618
|
+
: {
|
|
619
|
+
action: ScheduleEntryLockSetAction.Erase,
|
|
620
|
+
}),
|
|
621
|
+
});
|
|
622
|
+
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
623
|
+
if (this.isSinglecast() && isUnsupervisedOrSucceeded(result)) {
|
|
624
|
+
// Editing (but not erasing) a schedule will enable scheduling for that user
|
|
625
|
+
// and switch it to the current scheduling kind
|
|
626
|
+
if (!!schedule) {
|
|
627
|
+
setUserCodeScheduleEnabledCached(this.host, this.endpoint, slot.userId, true);
|
|
628
|
+
setUserCodeScheduleKindCached(this.host, this.endpoint, slot.userId, ScheduleEntryLockScheduleKind.DailyRepeating);
|
|
629
|
+
}
|
|
630
|
+
// And cache the schedule
|
|
631
|
+
persistSchedule.call(cc, this.host, ScheduleEntryLockScheduleKind.DailyRepeating, slot.userId, slot.slotId, schedule ?? false);
|
|
632
|
+
}
|
|
633
|
+
return result;
|
|
634
|
+
}
|
|
635
|
+
async getDailyRepeatingSchedule(slot) {
|
|
636
|
+
__assertType("slot", "ScheduleEntryLockSlotId", __assertType__ScheduleEntryLockSlotId.bind(void 0, slot));
|
|
637
|
+
this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.DailyRepeatingScheduleSet);
|
|
638
|
+
const cc = new ScheduleEntryLockCCDailyRepeatingScheduleGet({
|
|
639
|
+
nodeId: this.endpoint.nodeId,
|
|
640
|
+
endpointIndex: this.endpoint.index,
|
|
641
|
+
...slot,
|
|
642
|
+
});
|
|
643
|
+
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
644
|
+
if (result?.weekdays != undefined) {
|
|
645
|
+
return {
|
|
646
|
+
weekdays: result.weekdays,
|
|
647
|
+
startHour: result.startHour,
|
|
648
|
+
startMinute: result.startMinute,
|
|
649
|
+
durationHour: result.durationHour,
|
|
650
|
+
durationMinute: result.durationMinute,
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
async getTimezone() {
|
|
655
|
+
this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.TimeOffsetGet);
|
|
656
|
+
const cc = new ScheduleEntryLockCCTimeOffsetGet({
|
|
657
|
+
nodeId: this.endpoint.nodeId,
|
|
658
|
+
endpointIndex: this.endpoint.index,
|
|
659
|
+
});
|
|
660
|
+
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
661
|
+
if (result) {
|
|
662
|
+
return pick(result, ["standardOffset", "dstOffset"]);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
async setTimezone(timezone) {
|
|
666
|
+
__assertType("timezone", "Timezone", __assertType__Timezone.bind(void 0, timezone));
|
|
667
|
+
this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.TimeOffsetSet);
|
|
668
|
+
const cc = new ScheduleEntryLockCCTimeOffsetSet({
|
|
669
|
+
nodeId: this.endpoint.nodeId,
|
|
670
|
+
endpointIndex: this.endpoint.index,
|
|
671
|
+
...timezone,
|
|
672
|
+
});
|
|
673
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
674
|
+
}
|
|
675
|
+
};
|
|
676
|
+
return ScheduleEntryLockCCAPI = _classThis;
|
|
677
|
+
})();
|
|
678
|
+
export { ScheduleEntryLockCCAPI };
|
|
679
|
+
let ScheduleEntryLockCC = (() => {
|
|
680
|
+
let _classDecorators = [commandClass(CommandClasses["Schedule Entry Lock"]), implementedVersion(3), ccValues(ScheduleEntryLockCCValues)];
|
|
681
|
+
let _classDescriptor;
|
|
682
|
+
let _classExtraInitializers = [];
|
|
683
|
+
let _classThis;
|
|
684
|
+
let _classSuper = CommandClass;
|
|
685
|
+
var ScheduleEntryLockCC = class extends _classSuper {
|
|
686
|
+
static { _classThis = this; }
|
|
687
|
+
static {
|
|
688
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
689
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
690
|
+
ScheduleEntryLockCC = _classThis = _classDescriptor.value;
|
|
691
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
692
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
693
|
+
}
|
|
694
|
+
async interview(ctx) {
|
|
695
|
+
const node = this.getNode(ctx);
|
|
696
|
+
const endpoint = this.getEndpoint(ctx);
|
|
697
|
+
const api = CCAPI.create(CommandClasses["Schedule Entry Lock"], ctx, endpoint).withOptions({
|
|
698
|
+
priority: MessagePriority.NodeQuery,
|
|
699
|
+
});
|
|
700
|
+
ctx.logNode(node.id, {
|
|
701
|
+
endpoint: this.endpointIndex,
|
|
702
|
+
message: `Interviewing ${this.ccName}...`,
|
|
703
|
+
direction: "none",
|
|
704
|
+
});
|
|
705
|
+
ctx.logNode(node.id, {
|
|
706
|
+
endpoint: this.endpointIndex,
|
|
707
|
+
message: "Querying supported number of schedule slots...",
|
|
708
|
+
direction: "outbound",
|
|
709
|
+
});
|
|
710
|
+
const slotsResp = await api.getNumSlots();
|
|
711
|
+
if (slotsResp) {
|
|
712
|
+
let logMessage = `received supported number of schedule slots:
|
|
713
|
+
day of week: ${slotsResp.numWeekDaySlots}
|
|
714
|
+
day of year: ${slotsResp.numYearDaySlots}`;
|
|
715
|
+
if (slotsResp.numDailyRepeatingSlots != undefined) {
|
|
716
|
+
logMessage += `
|
|
717
|
+
daily repeating: ${slotsResp.numDailyRepeatingSlots}`;
|
|
718
|
+
}
|
|
719
|
+
ctx.logNode(node.id, {
|
|
720
|
+
endpoint: this.endpointIndex,
|
|
721
|
+
message: logMessage,
|
|
722
|
+
direction: "inbound",
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
// If the timezone is not configured with the Time CC, do it here
|
|
726
|
+
if (api.supportsCommand(ScheduleEntryLockCommand.TimeOffsetSet)
|
|
727
|
+
&& (!endpoint.supportsCC(CommandClasses.Time)
|
|
728
|
+
|| endpoint.getCCVersion(CommandClasses.Time) < 2)) {
|
|
729
|
+
ctx.logNode(node.id, {
|
|
730
|
+
endpoint: this.endpointIndex,
|
|
731
|
+
message: "setting timezone information...",
|
|
732
|
+
direction: "outbound",
|
|
733
|
+
});
|
|
734
|
+
// Set the correct timezone on this node
|
|
735
|
+
const timezone = getDSTInfo();
|
|
736
|
+
await api.setTimezone(timezone);
|
|
737
|
+
}
|
|
738
|
+
// Remember that the interview is complete
|
|
739
|
+
this.setInterviewComplete(ctx, true);
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Returns the number of supported day-of-week slots.
|
|
743
|
+
* This only works AFTER the interview process
|
|
744
|
+
*/
|
|
745
|
+
static getNumWeekDaySlotsCached(ctx, endpoint) {
|
|
746
|
+
return ctx
|
|
747
|
+
.getValueDB(endpoint.nodeId)
|
|
748
|
+
.getValue(ScheduleEntryLockCCValues.numWeekDaySlots.endpoint(endpoint.index)) || 0;
|
|
749
|
+
}
|
|
750
|
+
/**
|
|
751
|
+
* Returns the number of supported day-of-year slots.
|
|
752
|
+
* This only works AFTER the interview process
|
|
753
|
+
*/
|
|
754
|
+
static getNumYearDaySlotsCached(ctx, endpoint) {
|
|
755
|
+
return ctx
|
|
756
|
+
.getValueDB(endpoint.nodeId)
|
|
757
|
+
.getValue(ScheduleEntryLockCCValues.numYearDaySlots.endpoint(endpoint.index)) || 0;
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* Returns the number of supported daily-repeating slots.
|
|
761
|
+
* This only works AFTER the interview process
|
|
762
|
+
*/
|
|
763
|
+
static getNumDailyRepeatingSlotsCached(ctx, endpoint) {
|
|
764
|
+
return ctx
|
|
765
|
+
.getValueDB(endpoint.nodeId)
|
|
766
|
+
.getValue(ScheduleEntryLockCCValues.numDailyRepeatingSlots.endpoint(endpoint.index)) || 0;
|
|
767
|
+
}
|
|
768
|
+
/**
|
|
769
|
+
* Returns whether scheduling for a given user ID (most likely) enabled. Since the Schedule Entry Lock CC
|
|
770
|
+
* provides no way to query the enabled state, Z-Wave JS tracks this in its own cache.
|
|
771
|
+
*
|
|
772
|
+
* This only works AFTER the interview process and is likely to be wrong if a device
|
|
773
|
+
* with existing schedules is queried. To be sure, disable scheduling for all users and enable
|
|
774
|
+
* only the desired ones.
|
|
775
|
+
*/
|
|
776
|
+
static getUserCodeScheduleEnabledCached(ctx, endpoint, userId) {
|
|
777
|
+
return !!ctx
|
|
778
|
+
.getValueDB(endpoint.nodeId)
|
|
779
|
+
.getValue(ScheduleEntryLockCCValues.userEnabled(userId).endpoint(endpoint.index));
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* Returns which scheduling kind is (most likely) enabled for a given user ID . Since the Schedule Entry Lock CC
|
|
783
|
+
* provides no way to query the current state, Z-Wave JS tracks this in its own cache.
|
|
784
|
+
*
|
|
785
|
+
* This only works AFTER the interview process and is likely to be wrong if a device
|
|
786
|
+
* with existing schedules is queried. To be sure, edit a schedule of the desired kind
|
|
787
|
+
* which will automatically switch the user to that scheduling kind.
|
|
788
|
+
*/
|
|
789
|
+
static getUserCodeScheduleKindCached(ctx, endpoint, userId) {
|
|
790
|
+
return ctx
|
|
791
|
+
.getValueDB(endpoint.nodeId)
|
|
792
|
+
.getValue(ScheduleEntryLockCCValues.scheduleKind(userId).endpoint(endpoint.index));
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* Returns the assumed state of a schedule. Since the Schedule Entry Lock CC
|
|
796
|
+
* provides no way to query the current state, Z-Wave JS tracks this in its own cache.
|
|
797
|
+
*
|
|
798
|
+
* A return value of `false` means the slot is empty, a return value of `undefined` means the information is not cached yet.
|
|
799
|
+
*
|
|
800
|
+
* This only works AFTER the interview process.
|
|
801
|
+
*/
|
|
802
|
+
static getScheduleCached(ctx, endpoint, scheduleKind, userId, slotId) {
|
|
803
|
+
return ctx
|
|
804
|
+
.getValueDB(endpoint.nodeId)
|
|
805
|
+
.getValue(ScheduleEntryLockCCValues.schedule(scheduleKind, userId, slotId).endpoint(endpoint.index));
|
|
806
|
+
}
|
|
807
|
+
};
|
|
808
|
+
return ScheduleEntryLockCC = _classThis;
|
|
809
|
+
})();
|
|
810
|
+
export { ScheduleEntryLockCC };
|
|
811
|
+
let ScheduleEntryLockCCEnableSet = (() => {
|
|
812
|
+
let _classDecorators = [CCCommand(ScheduleEntryLockCommand.EnableSet), useSupervision()];
|
|
813
|
+
let _classDescriptor;
|
|
814
|
+
let _classExtraInitializers = [];
|
|
815
|
+
let _classThis;
|
|
816
|
+
let _classSuper = ScheduleEntryLockCC;
|
|
817
|
+
var ScheduleEntryLockCCEnableSet = class extends _classSuper {
|
|
818
|
+
static { _classThis = this; }
|
|
819
|
+
static {
|
|
820
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
821
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
822
|
+
ScheduleEntryLockCCEnableSet = _classThis = _classDescriptor.value;
|
|
823
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
824
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
825
|
+
}
|
|
826
|
+
constructor(options) {
|
|
827
|
+
super(options);
|
|
828
|
+
this.userId = options.userId;
|
|
829
|
+
this.enabled = options.enabled;
|
|
830
|
+
}
|
|
831
|
+
static from(raw, ctx) {
|
|
832
|
+
validatePayload(raw.payload.length >= 2);
|
|
833
|
+
const userId = raw.payload[0];
|
|
834
|
+
const enabled = raw.payload[1] === 0x01;
|
|
835
|
+
return new this({
|
|
836
|
+
nodeId: ctx.sourceNodeId,
|
|
837
|
+
userId,
|
|
838
|
+
enabled,
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
userId;
|
|
842
|
+
enabled;
|
|
843
|
+
serialize(ctx) {
|
|
844
|
+
this.payload = Bytes.from([this.userId, this.enabled ? 0x01 : 0x00]);
|
|
845
|
+
return super.serialize(ctx);
|
|
846
|
+
}
|
|
847
|
+
toLogEntry(ctx) {
|
|
848
|
+
return {
|
|
849
|
+
...super.toLogEntry(ctx),
|
|
850
|
+
message: {
|
|
851
|
+
"user ID": this.userId,
|
|
852
|
+
action: this.enabled ? "enable" : "disable",
|
|
853
|
+
},
|
|
854
|
+
};
|
|
855
|
+
}
|
|
856
|
+
};
|
|
857
|
+
return ScheduleEntryLockCCEnableSet = _classThis;
|
|
858
|
+
})();
|
|
859
|
+
export { ScheduleEntryLockCCEnableSet };
|
|
860
|
+
let ScheduleEntryLockCCEnableAllSet = (() => {
|
|
861
|
+
let _classDecorators = [CCCommand(ScheduleEntryLockCommand.EnableAllSet), useSupervision()];
|
|
862
|
+
let _classDescriptor;
|
|
863
|
+
let _classExtraInitializers = [];
|
|
864
|
+
let _classThis;
|
|
865
|
+
let _classSuper = ScheduleEntryLockCC;
|
|
866
|
+
var ScheduleEntryLockCCEnableAllSet = class extends _classSuper {
|
|
867
|
+
static { _classThis = this; }
|
|
868
|
+
static {
|
|
869
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
870
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
871
|
+
ScheduleEntryLockCCEnableAllSet = _classThis = _classDescriptor.value;
|
|
872
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
873
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
874
|
+
}
|
|
875
|
+
constructor(options) {
|
|
876
|
+
super(options);
|
|
877
|
+
this.enabled = options.enabled;
|
|
878
|
+
}
|
|
879
|
+
static from(raw, ctx) {
|
|
880
|
+
validatePayload(raw.payload.length >= 1);
|
|
881
|
+
const enabled = raw.payload[0] === 0x01;
|
|
882
|
+
return new this({
|
|
883
|
+
nodeId: ctx.sourceNodeId,
|
|
884
|
+
enabled,
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
enabled;
|
|
888
|
+
serialize(ctx) {
|
|
889
|
+
this.payload = Bytes.from([this.enabled ? 0x01 : 0x00]);
|
|
890
|
+
return super.serialize(ctx);
|
|
891
|
+
}
|
|
892
|
+
toLogEntry(ctx) {
|
|
893
|
+
return {
|
|
894
|
+
...super.toLogEntry(ctx),
|
|
895
|
+
message: {
|
|
896
|
+
action: this.enabled ? "enable all" : "disable all",
|
|
897
|
+
},
|
|
898
|
+
};
|
|
899
|
+
}
|
|
900
|
+
};
|
|
901
|
+
return ScheduleEntryLockCCEnableAllSet = _classThis;
|
|
902
|
+
})();
|
|
903
|
+
export { ScheduleEntryLockCCEnableAllSet };
|
|
904
|
+
let ScheduleEntryLockCCSupportedReport = (() => {
|
|
905
|
+
let _classDecorators = [CCCommand(ScheduleEntryLockCommand.SupportedReport), ccValueProperty("numWeekDaySlots", ScheduleEntryLockCCValues.numWeekDaySlots), ccValueProperty("numYearDaySlots", ScheduleEntryLockCCValues.numYearDaySlots), ccValueProperty("numDailyRepeatingSlots", ScheduleEntryLockCCValues.numDailyRepeatingSlots)];
|
|
906
|
+
let _classDescriptor;
|
|
907
|
+
let _classExtraInitializers = [];
|
|
908
|
+
let _classThis;
|
|
909
|
+
let _classSuper = ScheduleEntryLockCC;
|
|
910
|
+
var ScheduleEntryLockCCSupportedReport = class extends _classSuper {
|
|
911
|
+
static { _classThis = this; }
|
|
912
|
+
static {
|
|
913
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
914
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
915
|
+
ScheduleEntryLockCCSupportedReport = _classThis = _classDescriptor.value;
|
|
916
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
917
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
918
|
+
}
|
|
919
|
+
constructor(options) {
|
|
920
|
+
super(options);
|
|
921
|
+
this.numWeekDaySlots = options.numWeekDaySlots;
|
|
922
|
+
this.numYearDaySlots = options.numYearDaySlots;
|
|
923
|
+
this.numDailyRepeatingSlots = options.numDailyRepeatingSlots;
|
|
924
|
+
}
|
|
925
|
+
static from(raw, ctx) {
|
|
926
|
+
validatePayload(raw.payload.length >= 2);
|
|
927
|
+
const numWeekDaySlots = raw.payload[0];
|
|
928
|
+
const numYearDaySlots = raw.payload[1];
|
|
929
|
+
let numDailyRepeatingSlots;
|
|
930
|
+
if (raw.payload.length >= 3) {
|
|
931
|
+
numDailyRepeatingSlots = raw.payload[2];
|
|
932
|
+
}
|
|
933
|
+
return new this({
|
|
934
|
+
nodeId: ctx.sourceNodeId,
|
|
935
|
+
numWeekDaySlots,
|
|
936
|
+
numYearDaySlots,
|
|
937
|
+
numDailyRepeatingSlots,
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
numWeekDaySlots;
|
|
941
|
+
numYearDaySlots;
|
|
942
|
+
numDailyRepeatingSlots;
|
|
943
|
+
serialize(ctx) {
|
|
944
|
+
this.payload = Bytes.from([
|
|
945
|
+
this.numWeekDaySlots,
|
|
946
|
+
this.numYearDaySlots,
|
|
947
|
+
this.numDailyRepeatingSlots ?? 0,
|
|
948
|
+
]);
|
|
949
|
+
return super.serialize(ctx);
|
|
950
|
+
}
|
|
951
|
+
toLogEntry(ctx) {
|
|
952
|
+
const message = {
|
|
953
|
+
"no. of weekday schedule slots": this.numWeekDaySlots,
|
|
954
|
+
"no. of day-of-year schedule slots": this.numYearDaySlots,
|
|
955
|
+
};
|
|
956
|
+
if (this.numDailyRepeatingSlots != undefined) {
|
|
957
|
+
message["no. of daily repeating schedule slots"] =
|
|
958
|
+
this.numDailyRepeatingSlots;
|
|
959
|
+
}
|
|
960
|
+
return {
|
|
961
|
+
...super.toLogEntry(ctx),
|
|
962
|
+
message,
|
|
963
|
+
};
|
|
964
|
+
}
|
|
965
|
+
};
|
|
966
|
+
return ScheduleEntryLockCCSupportedReport = _classThis;
|
|
967
|
+
})();
|
|
968
|
+
export { ScheduleEntryLockCCSupportedReport };
|
|
969
|
+
let ScheduleEntryLockCCSupportedGet = (() => {
|
|
970
|
+
let _classDecorators = [CCCommand(ScheduleEntryLockCommand.SupportedGet), expectedCCResponse(ScheduleEntryLockCCSupportedReport)];
|
|
971
|
+
let _classDescriptor;
|
|
972
|
+
let _classExtraInitializers = [];
|
|
973
|
+
let _classThis;
|
|
974
|
+
let _classSuper = ScheduleEntryLockCC;
|
|
975
|
+
var ScheduleEntryLockCCSupportedGet = class extends _classSuper {
|
|
976
|
+
static { _classThis = this; }
|
|
977
|
+
static {
|
|
978
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
979
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
980
|
+
ScheduleEntryLockCCSupportedGet = _classThis = _classDescriptor.value;
|
|
981
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
982
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
983
|
+
}
|
|
984
|
+
};
|
|
985
|
+
return ScheduleEntryLockCCSupportedGet = _classThis;
|
|
986
|
+
})();
|
|
987
|
+
export { ScheduleEntryLockCCSupportedGet };
|
|
988
|
+
let ScheduleEntryLockCCWeekDayScheduleSet = (() => {
|
|
989
|
+
let _classDecorators = [CCCommand(ScheduleEntryLockCommand.WeekDayScheduleSet), useSupervision()];
|
|
990
|
+
let _classDescriptor;
|
|
991
|
+
let _classExtraInitializers = [];
|
|
992
|
+
let _classThis;
|
|
993
|
+
let _classSuper = ScheduleEntryLockCC;
|
|
994
|
+
var ScheduleEntryLockCCWeekDayScheduleSet = class extends _classSuper {
|
|
995
|
+
static { _classThis = this; }
|
|
996
|
+
static {
|
|
997
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
998
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
999
|
+
ScheduleEntryLockCCWeekDayScheduleSet = _classThis = _classDescriptor.value;
|
|
1000
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1001
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1002
|
+
}
|
|
1003
|
+
constructor(options) {
|
|
1004
|
+
super(options);
|
|
1005
|
+
this.userId = options.userId;
|
|
1006
|
+
this.slotId = options.slotId;
|
|
1007
|
+
this.action = options.action;
|
|
1008
|
+
if (options.action === ScheduleEntryLockSetAction.Set) {
|
|
1009
|
+
this.weekday = options.weekday;
|
|
1010
|
+
this.startHour = options.startHour;
|
|
1011
|
+
this.startMinute = options.startMinute;
|
|
1012
|
+
this.stopHour = options.stopHour;
|
|
1013
|
+
this.stopMinute = options.stopMinute;
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
static from(raw, ctx) {
|
|
1017
|
+
validatePayload(raw.payload.length >= 3);
|
|
1018
|
+
const action = raw.payload[0];
|
|
1019
|
+
validatePayload(action === ScheduleEntryLockSetAction.Set
|
|
1020
|
+
|| action === ScheduleEntryLockSetAction.Erase);
|
|
1021
|
+
const userId = raw.payload[1];
|
|
1022
|
+
const slotId = raw.payload[2];
|
|
1023
|
+
if (action !== ScheduleEntryLockSetAction.Set) {
|
|
1024
|
+
return new this({
|
|
1025
|
+
nodeId: ctx.sourceNodeId,
|
|
1026
|
+
action,
|
|
1027
|
+
userId,
|
|
1028
|
+
slotId,
|
|
1029
|
+
});
|
|
1030
|
+
}
|
|
1031
|
+
validatePayload(raw.payload.length >= 8);
|
|
1032
|
+
const weekday = raw.payload[3];
|
|
1033
|
+
const startHour = raw.payload[4];
|
|
1034
|
+
const startMinute = raw.payload[5];
|
|
1035
|
+
const stopHour = raw.payload[6];
|
|
1036
|
+
const stopMinute = raw.payload[7];
|
|
1037
|
+
return new this({
|
|
1038
|
+
nodeId: ctx.sourceNodeId,
|
|
1039
|
+
action,
|
|
1040
|
+
userId,
|
|
1041
|
+
slotId,
|
|
1042
|
+
weekday,
|
|
1043
|
+
startHour,
|
|
1044
|
+
startMinute,
|
|
1045
|
+
stopHour,
|
|
1046
|
+
stopMinute,
|
|
1047
|
+
});
|
|
1048
|
+
}
|
|
1049
|
+
userId;
|
|
1050
|
+
slotId;
|
|
1051
|
+
action;
|
|
1052
|
+
weekday;
|
|
1053
|
+
startHour;
|
|
1054
|
+
startMinute;
|
|
1055
|
+
stopHour;
|
|
1056
|
+
stopMinute;
|
|
1057
|
+
serialize(ctx) {
|
|
1058
|
+
this.payload = Bytes.from([
|
|
1059
|
+
this.action,
|
|
1060
|
+
this.userId,
|
|
1061
|
+
this.slotId,
|
|
1062
|
+
// The report should have these fields set to 0xff
|
|
1063
|
+
// if the slot is erased. The specs don't mention anything
|
|
1064
|
+
// for the Set command, so we just assume the same is okay
|
|
1065
|
+
this.weekday ?? 0xff,
|
|
1066
|
+
this.startHour ?? 0xff,
|
|
1067
|
+
this.startMinute ?? 0xff,
|
|
1068
|
+
this.stopHour ?? 0xff,
|
|
1069
|
+
this.stopMinute ?? 0xff,
|
|
1070
|
+
]);
|
|
1071
|
+
return super.serialize(ctx);
|
|
1072
|
+
}
|
|
1073
|
+
toLogEntry(ctx) {
|
|
1074
|
+
let message;
|
|
1075
|
+
if (this.action === ScheduleEntryLockSetAction.Erase) {
|
|
1076
|
+
message = {
|
|
1077
|
+
"user ID": this.userId,
|
|
1078
|
+
"slot #": this.slotId,
|
|
1079
|
+
action: "erase",
|
|
1080
|
+
};
|
|
1081
|
+
}
|
|
1082
|
+
else {
|
|
1083
|
+
message = {
|
|
1084
|
+
"user ID": this.userId,
|
|
1085
|
+
"slot #": this.slotId,
|
|
1086
|
+
action: "set",
|
|
1087
|
+
weekday: getEnumMemberName(ScheduleEntryLockWeekday, this.weekday),
|
|
1088
|
+
"start time": formatTime(this.startHour ?? 0, this.startMinute ?? 0),
|
|
1089
|
+
"end time": formatTime(this.stopHour ?? 0, this.stopMinute ?? 0),
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
return {
|
|
1093
|
+
...super.toLogEntry(ctx),
|
|
1094
|
+
message,
|
|
1095
|
+
};
|
|
1096
|
+
}
|
|
1097
|
+
};
|
|
1098
|
+
return ScheduleEntryLockCCWeekDayScheduleSet = _classThis;
|
|
1099
|
+
})();
|
|
1100
|
+
export { ScheduleEntryLockCCWeekDayScheduleSet };
|
|
1101
|
+
let ScheduleEntryLockCCWeekDayScheduleReport = (() => {
|
|
1102
|
+
let _classDecorators = [CCCommand(ScheduleEntryLockCommand.WeekDayScheduleReport)];
|
|
1103
|
+
let _classDescriptor;
|
|
1104
|
+
let _classExtraInitializers = [];
|
|
1105
|
+
let _classThis;
|
|
1106
|
+
let _classSuper = ScheduleEntryLockCC;
|
|
1107
|
+
var ScheduleEntryLockCCWeekDayScheduleReport = class extends _classSuper {
|
|
1108
|
+
static { _classThis = this; }
|
|
1109
|
+
static {
|
|
1110
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1111
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1112
|
+
ScheduleEntryLockCCWeekDayScheduleReport = _classThis = _classDescriptor.value;
|
|
1113
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1114
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1115
|
+
}
|
|
1116
|
+
constructor(options) {
|
|
1117
|
+
super(options);
|
|
1118
|
+
this.userId = options.userId;
|
|
1119
|
+
this.slotId = options.slotId;
|
|
1120
|
+
this.weekday = options.weekday;
|
|
1121
|
+
this.startHour = options.startHour;
|
|
1122
|
+
this.startMinute = options.startMinute;
|
|
1123
|
+
this.stopHour = options.stopHour;
|
|
1124
|
+
this.stopMinute = options.stopMinute;
|
|
1125
|
+
}
|
|
1126
|
+
static from(raw, ctx) {
|
|
1127
|
+
validatePayload(raw.payload.length >= 2);
|
|
1128
|
+
const userId = raw.payload[0];
|
|
1129
|
+
const slotId = raw.payload[1];
|
|
1130
|
+
let ccOptions = {
|
|
1131
|
+
userId,
|
|
1132
|
+
slotId,
|
|
1133
|
+
};
|
|
1134
|
+
let weekday;
|
|
1135
|
+
let startHour;
|
|
1136
|
+
let startMinute;
|
|
1137
|
+
let stopHour;
|
|
1138
|
+
let stopMinute;
|
|
1139
|
+
if (raw.payload.length >= 7) {
|
|
1140
|
+
if (raw.payload[2] !== 0xff) {
|
|
1141
|
+
weekday = raw.payload[2];
|
|
1142
|
+
}
|
|
1143
|
+
if (raw.payload[3] !== 0xff) {
|
|
1144
|
+
startHour = raw.payload[3];
|
|
1145
|
+
}
|
|
1146
|
+
if (raw.payload[4] !== 0xff) {
|
|
1147
|
+
startMinute = raw.payload[4];
|
|
1148
|
+
}
|
|
1149
|
+
if (raw.payload[5] !== 0xff) {
|
|
1150
|
+
stopHour = raw.payload[5];
|
|
1151
|
+
}
|
|
1152
|
+
if (raw.payload[6] !== 0xff) {
|
|
1153
|
+
stopMinute = raw.payload[6];
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
if (weekday != undefined
|
|
1157
|
+
&& startHour != undefined
|
|
1158
|
+
&& startMinute != undefined
|
|
1159
|
+
&& stopHour != undefined
|
|
1160
|
+
&& stopMinute != undefined) {
|
|
1161
|
+
ccOptions = {
|
|
1162
|
+
...ccOptions,
|
|
1163
|
+
weekday,
|
|
1164
|
+
startHour,
|
|
1165
|
+
startMinute,
|
|
1166
|
+
stopHour,
|
|
1167
|
+
stopMinute,
|
|
1168
|
+
};
|
|
1169
|
+
}
|
|
1170
|
+
return new this({
|
|
1171
|
+
nodeId: ctx.sourceNodeId,
|
|
1172
|
+
...ccOptions,
|
|
1173
|
+
});
|
|
1174
|
+
}
|
|
1175
|
+
userId;
|
|
1176
|
+
slotId;
|
|
1177
|
+
weekday;
|
|
1178
|
+
startHour;
|
|
1179
|
+
startMinute;
|
|
1180
|
+
stopHour;
|
|
1181
|
+
stopMinute;
|
|
1182
|
+
persistValues(ctx) {
|
|
1183
|
+
if (!super.persistValues(ctx))
|
|
1184
|
+
return false;
|
|
1185
|
+
persistSchedule.call(this, ctx, ScheduleEntryLockScheduleKind.WeekDay, this.userId, this.slotId, this.weekday != undefined
|
|
1186
|
+
? {
|
|
1187
|
+
weekday: this.weekday,
|
|
1188
|
+
startHour: this.startHour,
|
|
1189
|
+
startMinute: this.startMinute,
|
|
1190
|
+
stopHour: this.stopHour,
|
|
1191
|
+
stopMinute: this.stopMinute,
|
|
1192
|
+
}
|
|
1193
|
+
: false);
|
|
1194
|
+
return true;
|
|
1195
|
+
}
|
|
1196
|
+
serialize(ctx) {
|
|
1197
|
+
this.payload = Bytes.from([
|
|
1198
|
+
this.userId,
|
|
1199
|
+
this.slotId,
|
|
1200
|
+
this.weekday ?? 0xff,
|
|
1201
|
+
this.startHour ?? 0xff,
|
|
1202
|
+
this.startMinute ?? 0xff,
|
|
1203
|
+
this.stopHour ?? 0xff,
|
|
1204
|
+
this.stopMinute ?? 0xff,
|
|
1205
|
+
]);
|
|
1206
|
+
return super.serialize(ctx);
|
|
1207
|
+
}
|
|
1208
|
+
toLogEntry(ctx) {
|
|
1209
|
+
let message;
|
|
1210
|
+
if (this.weekday == undefined) {
|
|
1211
|
+
message = {
|
|
1212
|
+
"user ID": this.userId,
|
|
1213
|
+
"slot #": this.slotId,
|
|
1214
|
+
schedule: "(empty)",
|
|
1215
|
+
};
|
|
1216
|
+
}
|
|
1217
|
+
else {
|
|
1218
|
+
message = {
|
|
1219
|
+
"user ID": this.userId,
|
|
1220
|
+
"slot #": this.slotId,
|
|
1221
|
+
weekday: getEnumMemberName(ScheduleEntryLockWeekday, this.weekday),
|
|
1222
|
+
"start time": formatTime(this.startHour ?? 0, this.startMinute ?? 0),
|
|
1223
|
+
"end time": formatTime(this.stopHour ?? 0, this.stopMinute ?? 0),
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1226
|
+
return {
|
|
1227
|
+
...super.toLogEntry(ctx),
|
|
1228
|
+
message,
|
|
1229
|
+
};
|
|
1230
|
+
}
|
|
1231
|
+
};
|
|
1232
|
+
return ScheduleEntryLockCCWeekDayScheduleReport = _classThis;
|
|
1233
|
+
})();
|
|
1234
|
+
export { ScheduleEntryLockCCWeekDayScheduleReport };
|
|
1235
|
+
let ScheduleEntryLockCCWeekDayScheduleGet = (() => {
|
|
1236
|
+
let _classDecorators = [CCCommand(ScheduleEntryLockCommand.WeekDayScheduleGet), expectedCCResponse(ScheduleEntryLockCCWeekDayScheduleReport)];
|
|
1237
|
+
let _classDescriptor;
|
|
1238
|
+
let _classExtraInitializers = [];
|
|
1239
|
+
let _classThis;
|
|
1240
|
+
let _classSuper = ScheduleEntryLockCC;
|
|
1241
|
+
var ScheduleEntryLockCCWeekDayScheduleGet = class extends _classSuper {
|
|
1242
|
+
static { _classThis = this; }
|
|
1243
|
+
static {
|
|
1244
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1245
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1246
|
+
ScheduleEntryLockCCWeekDayScheduleGet = _classThis = _classDescriptor.value;
|
|
1247
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1248
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1249
|
+
}
|
|
1250
|
+
constructor(options) {
|
|
1251
|
+
super(options);
|
|
1252
|
+
this.userId = options.userId;
|
|
1253
|
+
this.slotId = options.slotId;
|
|
1254
|
+
}
|
|
1255
|
+
static from(raw, ctx) {
|
|
1256
|
+
validatePayload(raw.payload.length >= 2);
|
|
1257
|
+
const userId = raw.payload[0];
|
|
1258
|
+
const slotId = raw.payload[1];
|
|
1259
|
+
return new this({
|
|
1260
|
+
nodeId: ctx.sourceNodeId,
|
|
1261
|
+
userId,
|
|
1262
|
+
slotId,
|
|
1263
|
+
});
|
|
1264
|
+
}
|
|
1265
|
+
userId;
|
|
1266
|
+
slotId;
|
|
1267
|
+
serialize(ctx) {
|
|
1268
|
+
this.payload = Bytes.from([this.userId, this.slotId]);
|
|
1269
|
+
return super.serialize(ctx);
|
|
1270
|
+
}
|
|
1271
|
+
toLogEntry(ctx) {
|
|
1272
|
+
return {
|
|
1273
|
+
...super.toLogEntry(ctx),
|
|
1274
|
+
message: {
|
|
1275
|
+
"user ID": this.userId,
|
|
1276
|
+
"slot #": this.slotId,
|
|
1277
|
+
},
|
|
1278
|
+
};
|
|
1279
|
+
}
|
|
1280
|
+
};
|
|
1281
|
+
return ScheduleEntryLockCCWeekDayScheduleGet = _classThis;
|
|
1282
|
+
})();
|
|
1283
|
+
export { ScheduleEntryLockCCWeekDayScheduleGet };
|
|
1284
|
+
let ScheduleEntryLockCCYearDayScheduleSet = (() => {
|
|
1285
|
+
let _classDecorators = [CCCommand(ScheduleEntryLockCommand.YearDayScheduleSet), useSupervision()];
|
|
1286
|
+
let _classDescriptor;
|
|
1287
|
+
let _classExtraInitializers = [];
|
|
1288
|
+
let _classThis;
|
|
1289
|
+
let _classSuper = ScheduleEntryLockCC;
|
|
1290
|
+
var ScheduleEntryLockCCYearDayScheduleSet = class extends _classSuper {
|
|
1291
|
+
static { _classThis = this; }
|
|
1292
|
+
static {
|
|
1293
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1294
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1295
|
+
ScheduleEntryLockCCYearDayScheduleSet = _classThis = _classDescriptor.value;
|
|
1296
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1297
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1298
|
+
}
|
|
1299
|
+
constructor(options) {
|
|
1300
|
+
super(options);
|
|
1301
|
+
this.userId = options.userId;
|
|
1302
|
+
this.slotId = options.slotId;
|
|
1303
|
+
this.action = options.action;
|
|
1304
|
+
if (options.action === ScheduleEntryLockSetAction.Set) {
|
|
1305
|
+
this.startYear = options.startYear;
|
|
1306
|
+
this.startMonth = options.startMonth;
|
|
1307
|
+
this.startDay = options.startDay;
|
|
1308
|
+
this.startHour = options.startHour;
|
|
1309
|
+
this.startMinute = options.startMinute;
|
|
1310
|
+
this.stopYear = options.stopYear;
|
|
1311
|
+
this.stopMonth = options.stopMonth;
|
|
1312
|
+
this.stopDay = options.stopDay;
|
|
1313
|
+
this.stopHour = options.stopHour;
|
|
1314
|
+
this.stopMinute = options.stopMinute;
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
static from(raw, ctx) {
|
|
1318
|
+
validatePayload(raw.payload.length >= 3);
|
|
1319
|
+
const action = raw.payload[0];
|
|
1320
|
+
validatePayload(action === ScheduleEntryLockSetAction.Set
|
|
1321
|
+
|| action === ScheduleEntryLockSetAction.Erase);
|
|
1322
|
+
const userId = raw.payload[1];
|
|
1323
|
+
const slotId = raw.payload[2];
|
|
1324
|
+
if (action !== ScheduleEntryLockSetAction.Set) {
|
|
1325
|
+
return new this({
|
|
1326
|
+
nodeId: ctx.sourceNodeId,
|
|
1327
|
+
action,
|
|
1328
|
+
userId,
|
|
1329
|
+
slotId,
|
|
1330
|
+
});
|
|
1331
|
+
}
|
|
1332
|
+
validatePayload(raw.payload.length >= 13);
|
|
1333
|
+
const startYear = raw.payload[3];
|
|
1334
|
+
const startMonth = raw.payload[4];
|
|
1335
|
+
const startDay = raw.payload[5];
|
|
1336
|
+
const startHour = raw.payload[6];
|
|
1337
|
+
const startMinute = raw.payload[7];
|
|
1338
|
+
const stopYear = raw.payload[8];
|
|
1339
|
+
const stopMonth = raw.payload[9];
|
|
1340
|
+
const stopDay = raw.payload[10];
|
|
1341
|
+
const stopHour = raw.payload[11];
|
|
1342
|
+
const stopMinute = raw.payload[12];
|
|
1343
|
+
return new this({
|
|
1344
|
+
nodeId: ctx.sourceNodeId,
|
|
1345
|
+
action,
|
|
1346
|
+
userId,
|
|
1347
|
+
slotId,
|
|
1348
|
+
startYear,
|
|
1349
|
+
startMonth,
|
|
1350
|
+
startDay,
|
|
1351
|
+
startHour,
|
|
1352
|
+
startMinute,
|
|
1353
|
+
stopYear,
|
|
1354
|
+
stopMonth,
|
|
1355
|
+
stopDay,
|
|
1356
|
+
stopHour,
|
|
1357
|
+
stopMinute,
|
|
1358
|
+
});
|
|
1359
|
+
}
|
|
1360
|
+
userId;
|
|
1361
|
+
slotId;
|
|
1362
|
+
action;
|
|
1363
|
+
startYear;
|
|
1364
|
+
startMonth;
|
|
1365
|
+
startDay;
|
|
1366
|
+
startHour;
|
|
1367
|
+
startMinute;
|
|
1368
|
+
stopYear;
|
|
1369
|
+
stopMonth;
|
|
1370
|
+
stopDay;
|
|
1371
|
+
stopHour;
|
|
1372
|
+
stopMinute;
|
|
1373
|
+
serialize(ctx) {
|
|
1374
|
+
this.payload = Bytes.from([
|
|
1375
|
+
this.action,
|
|
1376
|
+
this.userId,
|
|
1377
|
+
this.slotId,
|
|
1378
|
+
// The report should have these fields set to 0xff
|
|
1379
|
+
// if the slot is erased. The specs don't mention anything
|
|
1380
|
+
// for the Set command, so we just assume the same is okay
|
|
1381
|
+
this.startYear ?? 0xff,
|
|
1382
|
+
this.startMonth ?? 0xff,
|
|
1383
|
+
this.startDay ?? 0xff,
|
|
1384
|
+
this.startHour ?? 0xff,
|
|
1385
|
+
this.startMinute ?? 0xff,
|
|
1386
|
+
this.stopYear ?? 0xff,
|
|
1387
|
+
this.stopMonth ?? 0xff,
|
|
1388
|
+
this.stopDay ?? 0xff,
|
|
1389
|
+
this.stopHour ?? 0xff,
|
|
1390
|
+
this.stopMinute ?? 0xff,
|
|
1391
|
+
]);
|
|
1392
|
+
return super.serialize(ctx);
|
|
1393
|
+
}
|
|
1394
|
+
toLogEntry(ctx) {
|
|
1395
|
+
let message;
|
|
1396
|
+
if (this.action === ScheduleEntryLockSetAction.Erase) {
|
|
1397
|
+
message = {
|
|
1398
|
+
"user ID": this.userId,
|
|
1399
|
+
"slot #": this.slotId,
|
|
1400
|
+
action: "erase",
|
|
1401
|
+
};
|
|
1402
|
+
}
|
|
1403
|
+
else {
|
|
1404
|
+
message = {
|
|
1405
|
+
"user ID": this.userId,
|
|
1406
|
+
"slot #": this.slotId,
|
|
1407
|
+
action: "set",
|
|
1408
|
+
"start date": `${formatDate(this.startYear ?? 0, this.startMonth ?? 0, this.startDay ?? 0)} ${formatTime(this.startHour ?? 0, this.startMinute ?? 0)}`,
|
|
1409
|
+
"end date": `${formatDate(this.stopYear ?? 0, this.stopMonth ?? 0, this.stopDay ?? 0)} ${formatTime(this.stopHour ?? 0, this.stopMinute ?? 0)}`,
|
|
1410
|
+
};
|
|
1411
|
+
}
|
|
1412
|
+
return {
|
|
1413
|
+
...super.toLogEntry(ctx),
|
|
1414
|
+
message,
|
|
1415
|
+
};
|
|
1416
|
+
}
|
|
1417
|
+
};
|
|
1418
|
+
return ScheduleEntryLockCCYearDayScheduleSet = _classThis;
|
|
1419
|
+
})();
|
|
1420
|
+
export { ScheduleEntryLockCCYearDayScheduleSet };
|
|
1421
|
+
let ScheduleEntryLockCCYearDayScheduleReport = (() => {
|
|
1422
|
+
let _classDecorators = [CCCommand(ScheduleEntryLockCommand.YearDayScheduleReport)];
|
|
1423
|
+
let _classDescriptor;
|
|
1424
|
+
let _classExtraInitializers = [];
|
|
1425
|
+
let _classThis;
|
|
1426
|
+
let _classSuper = ScheduleEntryLockCC;
|
|
1427
|
+
var ScheduleEntryLockCCYearDayScheduleReport = class extends _classSuper {
|
|
1428
|
+
static { _classThis = this; }
|
|
1429
|
+
static {
|
|
1430
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1431
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1432
|
+
ScheduleEntryLockCCYearDayScheduleReport = _classThis = _classDescriptor.value;
|
|
1433
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1434
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1435
|
+
}
|
|
1436
|
+
constructor(options) {
|
|
1437
|
+
super(options);
|
|
1438
|
+
this.userId = options.userId;
|
|
1439
|
+
this.slotId = options.slotId;
|
|
1440
|
+
this.startYear = options.startYear;
|
|
1441
|
+
this.startMonth = options.startMonth;
|
|
1442
|
+
this.startDay = options.startDay;
|
|
1443
|
+
this.startHour = options.startHour;
|
|
1444
|
+
this.startMinute = options.startMinute;
|
|
1445
|
+
this.stopYear = options.stopYear;
|
|
1446
|
+
this.stopMonth = options.stopMonth;
|
|
1447
|
+
this.stopDay = options.stopDay;
|
|
1448
|
+
this.stopHour = options.stopHour;
|
|
1449
|
+
this.stopMinute = options.stopMinute;
|
|
1450
|
+
}
|
|
1451
|
+
static from(raw, ctx) {
|
|
1452
|
+
validatePayload(raw.payload.length >= 2);
|
|
1453
|
+
const userId = raw.payload[0];
|
|
1454
|
+
const slotId = raw.payload[1];
|
|
1455
|
+
let ccOptions = {
|
|
1456
|
+
userId,
|
|
1457
|
+
slotId,
|
|
1458
|
+
};
|
|
1459
|
+
let startYear;
|
|
1460
|
+
let startMonth;
|
|
1461
|
+
let startDay;
|
|
1462
|
+
let startHour;
|
|
1463
|
+
let startMinute;
|
|
1464
|
+
let stopYear;
|
|
1465
|
+
let stopMonth;
|
|
1466
|
+
let stopDay;
|
|
1467
|
+
let stopHour;
|
|
1468
|
+
let stopMinute;
|
|
1469
|
+
if (raw.payload.length >= 12) {
|
|
1470
|
+
if (raw.payload[2] !== 0xff) {
|
|
1471
|
+
startYear = raw.payload[2];
|
|
1472
|
+
}
|
|
1473
|
+
if (raw.payload[3] !== 0xff) {
|
|
1474
|
+
startMonth = raw.payload[3];
|
|
1475
|
+
}
|
|
1476
|
+
if (raw.payload[4] !== 0xff) {
|
|
1477
|
+
startDay = raw.payload[4];
|
|
1478
|
+
}
|
|
1479
|
+
if (raw.payload[5] !== 0xff) {
|
|
1480
|
+
startHour = raw.payload[5];
|
|
1481
|
+
}
|
|
1482
|
+
if (raw.payload[6] !== 0xff) {
|
|
1483
|
+
startMinute = raw.payload[6];
|
|
1484
|
+
}
|
|
1485
|
+
if (raw.payload[7] !== 0xff) {
|
|
1486
|
+
stopYear = raw.payload[7];
|
|
1487
|
+
}
|
|
1488
|
+
if (raw.payload[8] !== 0xff) {
|
|
1489
|
+
stopMonth = raw.payload[8];
|
|
1490
|
+
}
|
|
1491
|
+
if (raw.payload[9] !== 0xff) {
|
|
1492
|
+
stopDay = raw.payload[9];
|
|
1493
|
+
}
|
|
1494
|
+
if (raw.payload[10] !== 0xff) {
|
|
1495
|
+
stopHour = raw.payload[10];
|
|
1496
|
+
}
|
|
1497
|
+
if (raw.payload[11] !== 0xff) {
|
|
1498
|
+
stopMinute = raw.payload[11];
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
if (startYear != undefined
|
|
1502
|
+
&& startMonth != undefined
|
|
1503
|
+
&& startDay != undefined
|
|
1504
|
+
&& startHour != undefined
|
|
1505
|
+
&& startMinute != undefined
|
|
1506
|
+
&& stopYear != undefined
|
|
1507
|
+
&& stopMonth != undefined
|
|
1508
|
+
&& stopDay != undefined
|
|
1509
|
+
&& stopHour != undefined
|
|
1510
|
+
&& stopMinute != undefined) {
|
|
1511
|
+
ccOptions = {
|
|
1512
|
+
...ccOptions,
|
|
1513
|
+
startYear,
|
|
1514
|
+
startMonth,
|
|
1515
|
+
startDay,
|
|
1516
|
+
startHour,
|
|
1517
|
+
startMinute,
|
|
1518
|
+
stopYear,
|
|
1519
|
+
stopMonth,
|
|
1520
|
+
stopDay,
|
|
1521
|
+
stopHour,
|
|
1522
|
+
stopMinute,
|
|
1523
|
+
};
|
|
1524
|
+
}
|
|
1525
|
+
return new this({
|
|
1526
|
+
nodeId: ctx.sourceNodeId,
|
|
1527
|
+
...ccOptions,
|
|
1528
|
+
});
|
|
1529
|
+
}
|
|
1530
|
+
userId;
|
|
1531
|
+
slotId;
|
|
1532
|
+
startYear;
|
|
1533
|
+
startMonth;
|
|
1534
|
+
startDay;
|
|
1535
|
+
startHour;
|
|
1536
|
+
startMinute;
|
|
1537
|
+
stopYear;
|
|
1538
|
+
stopMonth;
|
|
1539
|
+
stopDay;
|
|
1540
|
+
stopHour;
|
|
1541
|
+
stopMinute;
|
|
1542
|
+
persistValues(ctx) {
|
|
1543
|
+
if (!super.persistValues(ctx))
|
|
1544
|
+
return false;
|
|
1545
|
+
persistSchedule.call(this, ctx, ScheduleEntryLockScheduleKind.YearDay, this.userId, this.slotId, this.startYear != undefined
|
|
1546
|
+
? {
|
|
1547
|
+
startYear: this.startYear,
|
|
1548
|
+
startMonth: this.startMonth,
|
|
1549
|
+
startDay: this.startDay,
|
|
1550
|
+
startHour: this.startHour,
|
|
1551
|
+
startMinute: this.startMinute,
|
|
1552
|
+
stopYear: this.stopYear,
|
|
1553
|
+
stopMonth: this.stopMonth,
|
|
1554
|
+
stopDay: this.stopDay,
|
|
1555
|
+
stopHour: this.stopHour,
|
|
1556
|
+
stopMinute: this.stopMinute,
|
|
1557
|
+
}
|
|
1558
|
+
: false);
|
|
1559
|
+
return true;
|
|
1560
|
+
}
|
|
1561
|
+
serialize(ctx) {
|
|
1562
|
+
this.payload = Bytes.from([
|
|
1563
|
+
this.userId,
|
|
1564
|
+
this.slotId,
|
|
1565
|
+
this.startYear ?? 0xff,
|
|
1566
|
+
this.startMonth ?? 0xff,
|
|
1567
|
+
this.startDay ?? 0xff,
|
|
1568
|
+
this.startHour ?? 0xff,
|
|
1569
|
+
this.startMinute ?? 0xff,
|
|
1570
|
+
this.stopYear ?? 0xff,
|
|
1571
|
+
this.stopMonth ?? 0xff,
|
|
1572
|
+
this.stopDay ?? 0xff,
|
|
1573
|
+
this.stopHour ?? 0xff,
|
|
1574
|
+
this.stopMinute ?? 0xff,
|
|
1575
|
+
]);
|
|
1576
|
+
return super.serialize(ctx);
|
|
1577
|
+
}
|
|
1578
|
+
toLogEntry(ctx) {
|
|
1579
|
+
let message;
|
|
1580
|
+
if (this.startYear !== undefined) {
|
|
1581
|
+
message = {
|
|
1582
|
+
"user ID": this.userId,
|
|
1583
|
+
"slot #": this.slotId,
|
|
1584
|
+
schedule: "(empty)",
|
|
1585
|
+
};
|
|
1586
|
+
}
|
|
1587
|
+
else {
|
|
1588
|
+
message = {
|
|
1589
|
+
"user ID": this.userId,
|
|
1590
|
+
"slot #": this.slotId,
|
|
1591
|
+
action: "set",
|
|
1592
|
+
"start date": `${formatDate(this.startYear ?? 0, this.startMonth ?? 0, this.startDay ?? 0)} ${formatTime(this.startHour ?? 0, this.startMinute ?? 0)}`,
|
|
1593
|
+
"end date": `${formatDate(this.stopYear ?? 0, this.stopMonth ?? 0, this.stopDay ?? 0)} ${formatTime(this.stopHour ?? 0, this.stopMinute ?? 0)}`,
|
|
1594
|
+
};
|
|
1595
|
+
}
|
|
1596
|
+
return {
|
|
1597
|
+
...super.toLogEntry(ctx),
|
|
1598
|
+
message,
|
|
1599
|
+
};
|
|
1600
|
+
}
|
|
1601
|
+
};
|
|
1602
|
+
return ScheduleEntryLockCCYearDayScheduleReport = _classThis;
|
|
1603
|
+
})();
|
|
1604
|
+
export { ScheduleEntryLockCCYearDayScheduleReport };
|
|
1605
|
+
let ScheduleEntryLockCCYearDayScheduleGet = (() => {
|
|
1606
|
+
let _classDecorators = [CCCommand(ScheduleEntryLockCommand.YearDayScheduleGet), expectedCCResponse(ScheduleEntryLockCCYearDayScheduleReport)];
|
|
1607
|
+
let _classDescriptor;
|
|
1608
|
+
let _classExtraInitializers = [];
|
|
1609
|
+
let _classThis;
|
|
1610
|
+
let _classSuper = ScheduleEntryLockCC;
|
|
1611
|
+
var ScheduleEntryLockCCYearDayScheduleGet = class extends _classSuper {
|
|
1612
|
+
static { _classThis = this; }
|
|
1613
|
+
static {
|
|
1614
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1615
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1616
|
+
ScheduleEntryLockCCYearDayScheduleGet = _classThis = _classDescriptor.value;
|
|
1617
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1618
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1619
|
+
}
|
|
1620
|
+
constructor(options) {
|
|
1621
|
+
super(options);
|
|
1622
|
+
this.userId = options.userId;
|
|
1623
|
+
this.slotId = options.slotId;
|
|
1624
|
+
}
|
|
1625
|
+
static from(raw, ctx) {
|
|
1626
|
+
validatePayload(raw.payload.length >= 2);
|
|
1627
|
+
const userId = raw.payload[0];
|
|
1628
|
+
const slotId = raw.payload[1];
|
|
1629
|
+
return new this({
|
|
1630
|
+
nodeId: ctx.sourceNodeId,
|
|
1631
|
+
userId,
|
|
1632
|
+
slotId,
|
|
1633
|
+
});
|
|
1634
|
+
}
|
|
1635
|
+
userId;
|
|
1636
|
+
slotId;
|
|
1637
|
+
serialize(ctx) {
|
|
1638
|
+
this.payload = Bytes.from([this.userId, this.slotId]);
|
|
1639
|
+
return super.serialize(ctx);
|
|
1640
|
+
}
|
|
1641
|
+
toLogEntry(ctx) {
|
|
1642
|
+
return {
|
|
1643
|
+
...super.toLogEntry(ctx),
|
|
1644
|
+
message: {
|
|
1645
|
+
"user ID": this.userId,
|
|
1646
|
+
"slot #": this.slotId,
|
|
1647
|
+
},
|
|
1648
|
+
};
|
|
1649
|
+
}
|
|
1650
|
+
};
|
|
1651
|
+
return ScheduleEntryLockCCYearDayScheduleGet = _classThis;
|
|
1652
|
+
})();
|
|
1653
|
+
export { ScheduleEntryLockCCYearDayScheduleGet };
|
|
1654
|
+
let ScheduleEntryLockCCTimeOffsetSet = (() => {
|
|
1655
|
+
let _classDecorators = [CCCommand(ScheduleEntryLockCommand.TimeOffsetSet), useSupervision()];
|
|
1656
|
+
let _classDescriptor;
|
|
1657
|
+
let _classExtraInitializers = [];
|
|
1658
|
+
let _classThis;
|
|
1659
|
+
let _classSuper = ScheduleEntryLockCC;
|
|
1660
|
+
var ScheduleEntryLockCCTimeOffsetSet = class extends _classSuper {
|
|
1661
|
+
static { _classThis = this; }
|
|
1662
|
+
static {
|
|
1663
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1664
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1665
|
+
ScheduleEntryLockCCTimeOffsetSet = _classThis = _classDescriptor.value;
|
|
1666
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1667
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1668
|
+
}
|
|
1669
|
+
constructor(options) {
|
|
1670
|
+
super(options);
|
|
1671
|
+
this.standardOffset = options.standardOffset;
|
|
1672
|
+
this.dstOffset = options.dstOffset;
|
|
1673
|
+
}
|
|
1674
|
+
static from(raw, ctx) {
|
|
1675
|
+
const { standardOffset, dstOffset } = parseTimezone(raw.payload);
|
|
1676
|
+
return new this({
|
|
1677
|
+
nodeId: ctx.sourceNodeId,
|
|
1678
|
+
standardOffset,
|
|
1679
|
+
dstOffset,
|
|
1680
|
+
});
|
|
1681
|
+
}
|
|
1682
|
+
standardOffset;
|
|
1683
|
+
dstOffset;
|
|
1684
|
+
serialize(ctx) {
|
|
1685
|
+
this.payload = encodeTimezone({
|
|
1686
|
+
standardOffset: this.standardOffset,
|
|
1687
|
+
dstOffset: this.dstOffset,
|
|
1688
|
+
});
|
|
1689
|
+
return super.serialize(ctx);
|
|
1690
|
+
}
|
|
1691
|
+
toLogEntry(ctx) {
|
|
1692
|
+
return {
|
|
1693
|
+
...super.toLogEntry(ctx),
|
|
1694
|
+
message: {
|
|
1695
|
+
"standard time offset": `${this.standardOffset} minutes`,
|
|
1696
|
+
"DST offset": `${this.dstOffset} minutes`,
|
|
1697
|
+
},
|
|
1698
|
+
};
|
|
1699
|
+
}
|
|
1700
|
+
};
|
|
1701
|
+
return ScheduleEntryLockCCTimeOffsetSet = _classThis;
|
|
1702
|
+
})();
|
|
1703
|
+
export { ScheduleEntryLockCCTimeOffsetSet };
|
|
1704
|
+
let ScheduleEntryLockCCTimeOffsetReport = (() => {
|
|
1705
|
+
let _classDecorators = [CCCommand(ScheduleEntryLockCommand.TimeOffsetReport)];
|
|
1706
|
+
let _classDescriptor;
|
|
1707
|
+
let _classExtraInitializers = [];
|
|
1708
|
+
let _classThis;
|
|
1709
|
+
let _classSuper = ScheduleEntryLockCC;
|
|
1710
|
+
var ScheduleEntryLockCCTimeOffsetReport = class extends _classSuper {
|
|
1711
|
+
static { _classThis = this; }
|
|
1712
|
+
static {
|
|
1713
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1714
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1715
|
+
ScheduleEntryLockCCTimeOffsetReport = _classThis = _classDescriptor.value;
|
|
1716
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1717
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1718
|
+
}
|
|
1719
|
+
constructor(options) {
|
|
1720
|
+
super(options);
|
|
1721
|
+
this.standardOffset = options.standardOffset;
|
|
1722
|
+
this.dstOffset = options.dstOffset;
|
|
1723
|
+
}
|
|
1724
|
+
static from(raw, ctx) {
|
|
1725
|
+
const { standardOffset, dstOffset } = parseTimezone(raw.payload);
|
|
1726
|
+
return new this({
|
|
1727
|
+
nodeId: ctx.sourceNodeId,
|
|
1728
|
+
standardOffset,
|
|
1729
|
+
dstOffset,
|
|
1730
|
+
});
|
|
1731
|
+
}
|
|
1732
|
+
standardOffset;
|
|
1733
|
+
dstOffset;
|
|
1734
|
+
serialize(ctx) {
|
|
1735
|
+
this.payload = encodeTimezone({
|
|
1736
|
+
standardOffset: this.standardOffset,
|
|
1737
|
+
dstOffset: this.dstOffset,
|
|
1738
|
+
});
|
|
1739
|
+
return super.serialize(ctx);
|
|
1740
|
+
}
|
|
1741
|
+
toLogEntry(ctx) {
|
|
1742
|
+
return {
|
|
1743
|
+
...super.toLogEntry(ctx),
|
|
1744
|
+
message: {
|
|
1745
|
+
"standard time offset": `${this.standardOffset} minutes`,
|
|
1746
|
+
"DST offset": `${this.dstOffset} minutes`,
|
|
1747
|
+
},
|
|
1748
|
+
};
|
|
1749
|
+
}
|
|
1750
|
+
};
|
|
1751
|
+
return ScheduleEntryLockCCTimeOffsetReport = _classThis;
|
|
1752
|
+
})();
|
|
1753
|
+
export { ScheduleEntryLockCCTimeOffsetReport };
|
|
1754
|
+
let ScheduleEntryLockCCTimeOffsetGet = (() => {
|
|
1755
|
+
let _classDecorators = [CCCommand(ScheduleEntryLockCommand.TimeOffsetGet), expectedCCResponse(ScheduleEntryLockCCTimeOffsetReport)];
|
|
1756
|
+
let _classDescriptor;
|
|
1757
|
+
let _classExtraInitializers = [];
|
|
1758
|
+
let _classThis;
|
|
1759
|
+
let _classSuper = ScheduleEntryLockCC;
|
|
1760
|
+
var ScheduleEntryLockCCTimeOffsetGet = class extends _classSuper {
|
|
1761
|
+
static { _classThis = this; }
|
|
1762
|
+
static {
|
|
1763
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1764
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1765
|
+
ScheduleEntryLockCCTimeOffsetGet = _classThis = _classDescriptor.value;
|
|
1766
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1767
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1768
|
+
}
|
|
1769
|
+
};
|
|
1770
|
+
return ScheduleEntryLockCCTimeOffsetGet = _classThis;
|
|
1771
|
+
})();
|
|
1772
|
+
export { ScheduleEntryLockCCTimeOffsetGet };
|
|
1773
|
+
let ScheduleEntryLockCCDailyRepeatingScheduleSet = (() => {
|
|
1774
|
+
let _classDecorators = [CCCommand(ScheduleEntryLockCommand.DailyRepeatingScheduleSet), useSupervision()];
|
|
1775
|
+
let _classDescriptor;
|
|
1776
|
+
let _classExtraInitializers = [];
|
|
1777
|
+
let _classThis;
|
|
1778
|
+
let _classSuper = ScheduleEntryLockCC;
|
|
1779
|
+
var ScheduleEntryLockCCDailyRepeatingScheduleSet = class extends _classSuper {
|
|
1780
|
+
static { _classThis = this; }
|
|
1781
|
+
static {
|
|
1782
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1783
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1784
|
+
ScheduleEntryLockCCDailyRepeatingScheduleSet = _classThis = _classDescriptor.value;
|
|
1785
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1786
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1787
|
+
}
|
|
1788
|
+
constructor(options) {
|
|
1789
|
+
super(options);
|
|
1790
|
+
this.userId = options.userId;
|
|
1791
|
+
this.slotId = options.slotId;
|
|
1792
|
+
this.action = options.action;
|
|
1793
|
+
if (options.action === ScheduleEntryLockSetAction.Set) {
|
|
1794
|
+
this.weekdays = options.weekdays;
|
|
1795
|
+
this.startHour = options.startHour;
|
|
1796
|
+
this.startMinute = options.startMinute;
|
|
1797
|
+
this.durationHour = options.durationHour;
|
|
1798
|
+
this.durationMinute = options.durationMinute;
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
static from(raw, ctx) {
|
|
1802
|
+
validatePayload(raw.payload.length >= 3);
|
|
1803
|
+
const action = raw.payload[0];
|
|
1804
|
+
validatePayload(action === ScheduleEntryLockSetAction.Set
|
|
1805
|
+
|| action === ScheduleEntryLockSetAction.Erase);
|
|
1806
|
+
const userId = raw.payload[1];
|
|
1807
|
+
const slotId = raw.payload[2];
|
|
1808
|
+
if (action !== ScheduleEntryLockSetAction.Set) {
|
|
1809
|
+
return new this({
|
|
1810
|
+
nodeId: ctx.sourceNodeId,
|
|
1811
|
+
action,
|
|
1812
|
+
userId,
|
|
1813
|
+
slotId,
|
|
1814
|
+
});
|
|
1815
|
+
}
|
|
1816
|
+
validatePayload(raw.payload.length >= 8);
|
|
1817
|
+
const weekdays = parseBitMask(raw.payload.subarray(3, 4), ScheduleEntryLockWeekday.Sunday);
|
|
1818
|
+
const startHour = raw.payload[4];
|
|
1819
|
+
const startMinute = raw.payload[5];
|
|
1820
|
+
const durationHour = raw.payload[6];
|
|
1821
|
+
const durationMinute = raw.payload[7];
|
|
1822
|
+
return new this({
|
|
1823
|
+
nodeId: ctx.sourceNodeId,
|
|
1824
|
+
action,
|
|
1825
|
+
userId,
|
|
1826
|
+
slotId,
|
|
1827
|
+
weekdays,
|
|
1828
|
+
startHour,
|
|
1829
|
+
startMinute,
|
|
1830
|
+
durationHour,
|
|
1831
|
+
durationMinute,
|
|
1832
|
+
});
|
|
1833
|
+
}
|
|
1834
|
+
userId;
|
|
1835
|
+
slotId;
|
|
1836
|
+
action;
|
|
1837
|
+
weekdays;
|
|
1838
|
+
startHour;
|
|
1839
|
+
startMinute;
|
|
1840
|
+
durationHour;
|
|
1841
|
+
durationMinute;
|
|
1842
|
+
serialize(ctx) {
|
|
1843
|
+
this.payload = Bytes.from([this.action, this.userId, this.slotId]);
|
|
1844
|
+
if (this.action === ScheduleEntryLockSetAction.Set) {
|
|
1845
|
+
this.payload = Bytes.concat([
|
|
1846
|
+
this.payload,
|
|
1847
|
+
encodeBitMask(this.weekdays, ScheduleEntryLockWeekday.Saturday, ScheduleEntryLockWeekday.Sunday),
|
|
1848
|
+
Bytes.from([
|
|
1849
|
+
this.startHour,
|
|
1850
|
+
this.startMinute,
|
|
1851
|
+
this.durationHour,
|
|
1852
|
+
this.durationMinute,
|
|
1853
|
+
]),
|
|
1854
|
+
]);
|
|
1855
|
+
}
|
|
1856
|
+
else {
|
|
1857
|
+
// Not sure if this is correct
|
|
1858
|
+
this.payload = Bytes.concat([this.payload, Bytes.alloc(5, 0xff)]);
|
|
1859
|
+
}
|
|
1860
|
+
return super.serialize(ctx);
|
|
1861
|
+
}
|
|
1862
|
+
toLogEntry(ctx) {
|
|
1863
|
+
let message;
|
|
1864
|
+
if (this.action === ScheduleEntryLockSetAction.Erase) {
|
|
1865
|
+
message = {
|
|
1866
|
+
"user ID": this.userId,
|
|
1867
|
+
"slot #": this.slotId,
|
|
1868
|
+
action: "erase",
|
|
1869
|
+
};
|
|
1870
|
+
}
|
|
1871
|
+
else {
|
|
1872
|
+
message = {
|
|
1873
|
+
"user ID": this.userId,
|
|
1874
|
+
"slot #": this.slotId,
|
|
1875
|
+
action: "set",
|
|
1876
|
+
weekdays: this.weekdays.map((w) => getEnumMemberName(ScheduleEntryLockWeekday, w)).join(", "),
|
|
1877
|
+
"start time": formatTime(this.startHour ?? 0, this.startMinute ?? 0),
|
|
1878
|
+
duration: formatTime(this.durationHour ?? 0, this.durationMinute ?? 0),
|
|
1879
|
+
};
|
|
1880
|
+
}
|
|
1881
|
+
return {
|
|
1882
|
+
...super.toLogEntry(ctx),
|
|
1883
|
+
message,
|
|
1884
|
+
};
|
|
1885
|
+
}
|
|
1886
|
+
};
|
|
1887
|
+
return ScheduleEntryLockCCDailyRepeatingScheduleSet = _classThis;
|
|
1888
|
+
})();
|
|
1889
|
+
export { ScheduleEntryLockCCDailyRepeatingScheduleSet };
|
|
1890
|
+
let ScheduleEntryLockCCDailyRepeatingScheduleReport = (() => {
|
|
1891
|
+
let _classDecorators = [CCCommand(ScheduleEntryLockCommand.DailyRepeatingScheduleReport)];
|
|
1892
|
+
let _classDescriptor;
|
|
1893
|
+
let _classExtraInitializers = [];
|
|
1894
|
+
let _classThis;
|
|
1895
|
+
let _classSuper = ScheduleEntryLockCC;
|
|
1896
|
+
var ScheduleEntryLockCCDailyRepeatingScheduleReport = class extends _classSuper {
|
|
1897
|
+
static { _classThis = this; }
|
|
1898
|
+
static {
|
|
1899
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1900
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1901
|
+
ScheduleEntryLockCCDailyRepeatingScheduleReport = _classThis = _classDescriptor.value;
|
|
1902
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1903
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1904
|
+
}
|
|
1905
|
+
constructor(options) {
|
|
1906
|
+
super(options);
|
|
1907
|
+
this.userId = options.userId;
|
|
1908
|
+
this.slotId = options.slotId;
|
|
1909
|
+
this.weekdays = options.weekdays;
|
|
1910
|
+
this.startHour = options.startHour;
|
|
1911
|
+
this.startMinute = options.startMinute;
|
|
1912
|
+
this.durationHour = options.durationHour;
|
|
1913
|
+
this.durationMinute = options.durationMinute;
|
|
1914
|
+
}
|
|
1915
|
+
static from(raw, ctx) {
|
|
1916
|
+
validatePayload(raw.payload.length >= 2);
|
|
1917
|
+
const userId = raw.payload[0];
|
|
1918
|
+
const slotId = raw.payload[1];
|
|
1919
|
+
if (raw.payload.length >= 7 && raw.payload[2] !== 0) {
|
|
1920
|
+
// Only parse the schedule if it is present and some weekday is selected
|
|
1921
|
+
const weekdays = parseBitMask(raw.payload.subarray(2, 3), ScheduleEntryLockWeekday.Sunday);
|
|
1922
|
+
const startHour = raw.payload[3];
|
|
1923
|
+
const startMinute = raw.payload[4];
|
|
1924
|
+
const durationHour = raw.payload[5];
|
|
1925
|
+
const durationMinute = raw.payload[6];
|
|
1926
|
+
return new this({
|
|
1927
|
+
nodeId: ctx.sourceNodeId,
|
|
1928
|
+
userId,
|
|
1929
|
+
slotId,
|
|
1930
|
+
weekdays,
|
|
1931
|
+
startHour,
|
|
1932
|
+
startMinute,
|
|
1933
|
+
durationHour,
|
|
1934
|
+
durationMinute,
|
|
1935
|
+
});
|
|
1936
|
+
}
|
|
1937
|
+
else {
|
|
1938
|
+
return new this({
|
|
1939
|
+
nodeId: ctx.sourceNodeId,
|
|
1940
|
+
userId,
|
|
1941
|
+
slotId,
|
|
1942
|
+
});
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
userId;
|
|
1946
|
+
slotId;
|
|
1947
|
+
weekdays;
|
|
1948
|
+
startHour;
|
|
1949
|
+
startMinute;
|
|
1950
|
+
durationHour;
|
|
1951
|
+
durationMinute;
|
|
1952
|
+
persistValues(ctx) {
|
|
1953
|
+
if (!super.persistValues(ctx))
|
|
1954
|
+
return false;
|
|
1955
|
+
persistSchedule.call(this, ctx, ScheduleEntryLockScheduleKind.DailyRepeating, this.userId, this.slotId, this.weekdays?.length
|
|
1956
|
+
? {
|
|
1957
|
+
weekdays: this.weekdays,
|
|
1958
|
+
startHour: this.startHour,
|
|
1959
|
+
startMinute: this.startMinute,
|
|
1960
|
+
durationHour: this.durationHour,
|
|
1961
|
+
durationMinute: this.durationMinute,
|
|
1962
|
+
}
|
|
1963
|
+
: false);
|
|
1964
|
+
return true;
|
|
1965
|
+
}
|
|
1966
|
+
serialize(ctx) {
|
|
1967
|
+
this.payload = Bytes.from([this.userId, this.slotId]);
|
|
1968
|
+
if (this.weekdays) {
|
|
1969
|
+
this.payload = Bytes.concat([
|
|
1970
|
+
this.payload,
|
|
1971
|
+
encodeBitMask(this.weekdays, ScheduleEntryLockWeekday.Saturday, ScheduleEntryLockWeekday.Sunday),
|
|
1972
|
+
Bytes.from([
|
|
1973
|
+
this.startHour,
|
|
1974
|
+
this.startMinute,
|
|
1975
|
+
this.durationHour,
|
|
1976
|
+
this.durationMinute,
|
|
1977
|
+
]),
|
|
1978
|
+
]);
|
|
1979
|
+
}
|
|
1980
|
+
else {
|
|
1981
|
+
// Not sure if this is correct, but at least we won't parse it incorrectly ourselves when setting everything to 0
|
|
1982
|
+
this.payload = Bytes.concat([this.payload, Bytes.alloc(5, 0)]);
|
|
1983
|
+
}
|
|
1984
|
+
return super.serialize(ctx);
|
|
1985
|
+
}
|
|
1986
|
+
toLogEntry(ctx) {
|
|
1987
|
+
let message;
|
|
1988
|
+
if (!this.weekdays) {
|
|
1989
|
+
message = {
|
|
1990
|
+
"user ID": this.userId,
|
|
1991
|
+
"slot #": this.slotId,
|
|
1992
|
+
schedule: "(empty)",
|
|
1993
|
+
};
|
|
1994
|
+
}
|
|
1995
|
+
else {
|
|
1996
|
+
message = {
|
|
1997
|
+
"user ID": this.userId,
|
|
1998
|
+
"slot #": this.slotId,
|
|
1999
|
+
action: "set",
|
|
2000
|
+
weekdays: this.weekdays
|
|
2001
|
+
.map((w) => getEnumMemberName(ScheduleEntryLockWeekday, w))
|
|
2002
|
+
.join(", "),
|
|
2003
|
+
"start time": formatTime(this.startHour ?? 0, this.startMinute ?? 0),
|
|
2004
|
+
duration: formatTime(this.durationHour ?? 0, this.durationMinute ?? 0),
|
|
2005
|
+
};
|
|
2006
|
+
}
|
|
2007
|
+
return {
|
|
2008
|
+
...super.toLogEntry(ctx),
|
|
2009
|
+
message,
|
|
2010
|
+
};
|
|
2011
|
+
}
|
|
2012
|
+
};
|
|
2013
|
+
return ScheduleEntryLockCCDailyRepeatingScheduleReport = _classThis;
|
|
2014
|
+
})();
|
|
2015
|
+
export { ScheduleEntryLockCCDailyRepeatingScheduleReport };
|
|
2016
|
+
let ScheduleEntryLockCCDailyRepeatingScheduleGet = (() => {
|
|
2017
|
+
let _classDecorators = [CCCommand(ScheduleEntryLockCommand.DailyRepeatingScheduleGet), expectedCCResponse(ScheduleEntryLockCCDailyRepeatingScheduleReport)];
|
|
2018
|
+
let _classDescriptor;
|
|
2019
|
+
let _classExtraInitializers = [];
|
|
2020
|
+
let _classThis;
|
|
2021
|
+
let _classSuper = ScheduleEntryLockCC;
|
|
2022
|
+
var ScheduleEntryLockCCDailyRepeatingScheduleGet = class extends _classSuper {
|
|
2023
|
+
static { _classThis = this; }
|
|
2024
|
+
static {
|
|
2025
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
2026
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
2027
|
+
ScheduleEntryLockCCDailyRepeatingScheduleGet = _classThis = _classDescriptor.value;
|
|
2028
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
2029
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
2030
|
+
}
|
|
2031
|
+
constructor(options) {
|
|
2032
|
+
super(options);
|
|
2033
|
+
this.userId = options.userId;
|
|
2034
|
+
this.slotId = options.slotId;
|
|
2035
|
+
}
|
|
2036
|
+
static from(raw, ctx) {
|
|
2037
|
+
validatePayload(raw.payload.length >= 2);
|
|
2038
|
+
const userId = raw.payload[0];
|
|
2039
|
+
const slotId = raw.payload[1];
|
|
2040
|
+
return new this({
|
|
2041
|
+
nodeId: ctx.sourceNodeId,
|
|
2042
|
+
userId,
|
|
2043
|
+
slotId,
|
|
2044
|
+
});
|
|
2045
|
+
}
|
|
2046
|
+
userId;
|
|
2047
|
+
slotId;
|
|
2048
|
+
serialize(ctx) {
|
|
2049
|
+
this.payload = Bytes.from([this.userId, this.slotId]);
|
|
2050
|
+
return super.serialize(ctx);
|
|
2051
|
+
}
|
|
2052
|
+
toLogEntry(ctx) {
|
|
2053
|
+
return {
|
|
2054
|
+
...super.toLogEntry(ctx),
|
|
2055
|
+
message: {
|
|
2056
|
+
"user ID": this.userId,
|
|
2057
|
+
"slot #": this.slotId,
|
|
2058
|
+
},
|
|
2059
|
+
};
|
|
2060
|
+
}
|
|
2061
|
+
};
|
|
2062
|
+
return ScheduleEntryLockCCDailyRepeatingScheduleGet = _classThis;
|
|
2063
|
+
})();
|
|
2064
|
+
export { ScheduleEntryLockCCDailyRepeatingScheduleGet };
|
|
2065
|
+
//# sourceMappingURL=ScheduleEntryLockCC.js.map
|