@zwave-js/cc 14.0.0-beta.4 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.js +381 -266
- package/build/cjs/cc/AlarmSensorCC.js.map +3 -3
- package/build/cjs/cc/AssociationCC.js +669 -503
- package/build/cjs/cc/AssociationCC.js.map +3 -3
- package/build/cjs/cc/AssociationGroupInfoCC.js +633 -492
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +3 -3
- package/build/cjs/cc/BarrierOperatorCC.js +595 -429
- package/build/cjs/cc/BarrierOperatorCC.js.map +3 -3
- package/build/cjs/cc/BasicCC.js +354 -260
- package/build/cjs/cc/BasicCC.js.map +3 -3
- package/build/cjs/cc/BatteryCC.js +427 -345
- package/build/cjs/cc/BatteryCC.js.map +3 -3
- package/build/cjs/cc/BinarySensorCC.js +391 -276
- package/build/cjs/cc/BinarySensorCC.js.map +3 -3
- package/build/cjs/cc/BinarySwitchCC.js +347 -253
- package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
- package/build/cjs/cc/CRC16CC.js +160 -85
- package/build/cjs/cc/CRC16CC.js.map +3 -3
- package/build/cjs/cc/CentralSceneCC.js +459 -324
- package/build/cjs/cc/CentralSceneCC.js.map +3 -3
- package/build/cjs/cc/ClimateControlScheduleCC.js +459 -293
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +3 -3
- package/build/cjs/cc/ClockCC.js +254 -150
- package/build/cjs/cc/ClockCC.js.map +3 -3
- package/build/cjs/cc/ColorSwitchCC.js +758 -610
- package/build/cjs/cc/ColorSwitchCC.js.map +3 -3
- package/build/cjs/cc/ConfigurationCC.js +1700 -1453
- package/build/cjs/cc/ConfigurationCC.js.map +3 -3
- package/build/cjs/cc/DeviceResetLocallyCC.js +125 -49
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +3 -3
- package/build/cjs/cc/DoorLockCC.js +904 -777
- package/build/cjs/cc/DoorLockCC.js.map +3 -3
- package/build/cjs/cc/DoorLockLoggingCC.js +321 -206
- package/build/cjs/cc/DoorLockLoggingCC.js.map +3 -3
- package/build/cjs/cc/EnergyProductionCC.js +249 -160
- package/build/cjs/cc/EnergyProductionCC.js.map +3 -3
- package/build/cjs/cc/EntryControlCC.js +619 -458
- package/build/cjs/cc/EntryControlCC.js.map +3 -3
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +898 -698
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +3 -3
- package/build/cjs/cc/HailCC.js +57 -11
- package/build/cjs/cc/HailCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlModeCC.js +359 -233
- package/build/cjs/cc/HumidityControlModeCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +189 -103
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlSetpointCC.js +682 -495
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +3 -3
- package/build/cjs/cc/InclusionControllerCC.js +205 -114
- package/build/cjs/cc/InclusionControllerCC.js.map +3 -3
- package/build/cjs/cc/IndicatorCC.js +897 -736
- package/build/cjs/cc/IndicatorCC.js.map +3 -3
- package/build/cjs/cc/IrrigationCC.js +1651 -1405
- package/build/cjs/cc/IrrigationCC.js.map +3 -3
- package/build/cjs/cc/LanguageCC.js +268 -171
- package/build/cjs/cc/LanguageCC.js.map +3 -3
- package/build/cjs/cc/LockCC.js +254 -154
- package/build/cjs/cc/LockCC.js.map +3 -3
- package/build/cjs/cc/ManufacturerProprietaryCC.js +189 -129
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.js +319 -213
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +3 -3
- package/build/cjs/cc/MeterCC.js +827 -707
- package/build/cjs/cc/MeterCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelAssociationCC.js +612 -478
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelCC.js +1037 -819
- package/build/cjs/cc/MultiChannelCC.js.map +3 -3
- package/build/cjs/cc/MultiCommandCC.js +172 -97
- package/build/cjs/cc/MultiCommandCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSensorCC.js +589 -449
- package/build/cjs/cc/MultilevelSensorCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSwitchCC.js +587 -439
- package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
- package/build/cjs/cc/NoOperationCC.js +89 -27
- package/build/cjs/cc/NoOperationCC.js.map +2 -2
- package/build/cjs/cc/NodeNamingCC.js +417 -277
- package/build/cjs/cc/NodeNamingCC.js.map +3 -3
- package/build/cjs/cc/NotificationCC.js +972 -818
- package/build/cjs/cc/NotificationCC.js.map +3 -3
- package/build/cjs/cc/PowerlevelCC.js +450 -303
- package/build/cjs/cc/PowerlevelCC.js.map +3 -3
- package/build/cjs/cc/ProtectionCC.js +686 -494
- package/build/cjs/cc/ProtectionCC.js.map +3 -3
- package/build/cjs/cc/SceneActivationCC.js +165 -97
- package/build/cjs/cc/SceneActivationCC.js.map +3 -3
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +346 -243
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +3 -3
- package/build/cjs/cc/SceneControllerConfigurationCC.js +401 -298
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +3 -3
- package/build/cjs/cc/ScheduleEntryLockCC.js +1552 -1272
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +3 -3
- package/build/cjs/cc/Security2CC.js +1483 -1219
- package/build/cjs/cc/Security2CC.js.map +3 -3
- package/build/cjs/cc/SecurityCC.js +839 -619
- package/build/cjs/cc/SecurityCC.js.map +3 -3
- package/build/cjs/cc/SoundSwitchCC.js +707 -515
- package/build/cjs/cc/SoundSwitchCC.js.map +3 -3
- package/build/cjs/cc/SupervisionCC.js +327 -237
- package/build/cjs/cc/SupervisionCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanModeCC.js +386 -263
- package/build/cjs/cc/ThermostatFanModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanStateCC.js +192 -106
- package/build/cjs/cc/ThermostatFanStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatModeCC.js +425 -302
- package/build/cjs/cc/ThermostatModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatOperatingStateCC.js +188 -102
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetbackCC.js +277 -173
- package/build/cjs/cc/ThermostatSetbackCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetpointCC.js +645 -491
- package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
- package/build/cjs/cc/TimeCC.js +515 -353
- package/build/cjs/cc/TimeCC.js.map +3 -3
- package/build/cjs/cc/TimeParametersCC.js +302 -202
- package/build/cjs/cc/TimeParametersCC.js.map +3 -3
- package/build/cjs/cc/TransportServiceCC.js +433 -315
- package/build/cjs/cc/TransportServiceCC.js.map +3 -3
- package/build/cjs/cc/UserCodeCC.js +1385 -1102
- package/build/cjs/cc/UserCodeCC.js.map +3 -3
- package/build/cjs/cc/VersionCC.js +696 -562
- package/build/cjs/cc/VersionCC.js.map +3 -3
- package/build/cjs/cc/WakeUpCC.js +499 -346
- package/build/cjs/cc/WakeUpCC.js.map +3 -3
- package/build/cjs/cc/WindowCoveringCC.js +626 -478
- package/build/cjs/cc/WindowCoveringCC.js.map +3 -3
- package/build/cjs/cc/ZWaveLongRangeCC.js +57 -10
- package/build/cjs/cc/ZWaveLongRangeCC.js.map +2 -2
- package/build/cjs/cc/ZWavePlusCC.js +233 -159
- package/build/cjs/cc/ZWavePlusCC.js.map +3 -3
- package/build/cjs/cc/ZWaveProtocolCC.js +1515 -948
- package/build/cjs/cc/ZWaveProtocolCC.js.map +3 -3
- package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +4 -4
- package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +1 -1
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +395 -274
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +3 -3
- package/build/cjs/lib/CommandClassDecorators.d.ts +11 -15
- package/build/cjs/lib/CommandClassDecorators.js +19 -20
- package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
- package/build/cjs/lib/Security2/Extension.d.ts +1 -1
- package/build/cjs/lib/Security2/Extension.js +217 -126
- package/build/cjs/lib/Security2/Extension.js.map +3 -3
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +389 -291
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +678 -537
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +659 -539
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +634 -493
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +380 -302
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +449 -384
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +395 -297
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +353 -274
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.js +162 -98
- package/build/esm/cc/CRC16CC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +465 -351
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +454 -313
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.js +248 -159
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +802 -677
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +1899 -1687
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js +124 -59
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +951 -849
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +316 -218
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +240 -164
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +629 -493
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +938 -769
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HailCC.js +51 -12
- package/build/esm/cc/HailCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +357 -250
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +182 -109
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +706 -546
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/InclusionControllerCC.js +197 -119
- package/build/esm/cc/InclusionControllerCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.js +973 -835
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +1697 -1496
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +266 -184
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +247 -162
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +192 -141
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +312 -223
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +896 -795
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +631 -518
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +1106 -921
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultiCommandCC.js +166 -102
- package/build/esm/cc/MultiCommandCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +616 -497
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +621 -496
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NoOperationCC.js +82 -29
- package/build/esm/cc/NoOperationCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +413 -294
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +1097 -966
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/PowerlevelCC.js +437 -311
- package/build/esm/cc/PowerlevelCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +704 -543
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +157 -100
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +357 -269
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +434 -346
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +1596 -1357
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.js +1633 -1406
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.js +876 -687
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +689 -526
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.js +349 -272
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +388 -284
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +184 -111
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +435 -331
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +180 -107
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.js +274 -185
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +674 -543
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.js +499 -360
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +296 -211
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +464 -363
- package/build/esm/cc/TransportServiceCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +1443 -1205
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +744 -635
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +494 -364
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +655 -530
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWaveLongRangeCC.js +51 -11
- package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +223 -162
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +1443 -953
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +4 -4
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +390 -286
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/esm/lib/CommandClassDecorators.d.ts +11 -15
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
- package/build/esm/lib/CommandClassDecorators.js +24 -24
- package/build/esm/lib/CommandClassDecorators.js.map +1 -1
- package/build/esm/lib/Security2/Extension.d.ts +1 -1
- package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
- package/build/esm/lib/Security2/Extension.js +207 -123
- package/build/esm/lib/Security2/Extension.js.map +1 -1
- package/package.json +6 -6
|
@@ -40,13 +40,45 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
40
40
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
41
41
|
var import_Values = require("../lib/Values.js");
|
|
42
42
|
var import_Types = require("../lib/_Types.js");
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
44
|
+
function accept(f) {
|
|
45
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
46
|
+
return f;
|
|
47
|
+
}
|
|
48
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
49
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
50
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
51
|
+
var _, done = false;
|
|
52
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
53
|
+
var context = {};
|
|
54
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
55
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
56
|
+
context.addInitializer = function(f) {
|
|
57
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
58
|
+
extraInitializers.push(accept(f || null));
|
|
59
|
+
};
|
|
60
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
61
|
+
if (kind === "accessor") {
|
|
62
|
+
if (result === void 0) continue;
|
|
63
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
64
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
65
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
66
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
67
|
+
} else if (_ = accept(result)) {
|
|
68
|
+
if (kind === "field") initializers.unshift(_);
|
|
69
|
+
else descriptor[key] = _;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
73
|
+
done = true;
|
|
74
|
+
};
|
|
75
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
76
|
+
var useValue = arguments.length > 2;
|
|
77
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
78
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
79
|
+
}
|
|
80
|
+
return useValue ? value : void 0;
|
|
48
81
|
};
|
|
49
|
-
var DoorLockCCOperationReport_1, DoorLockCCConfigurationReport_1, DoorLockCCCapabilitiesReport_1;
|
|
50
82
|
function __assertType(argName, typeName, boundHasError) {
|
|
51
83
|
const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
|
|
52
84
|
if (boundHasError()) {
|
|
@@ -371,206 +403,237 @@ const configurationSetParameters = [
|
|
|
371
403
|
"twistAssist",
|
|
372
404
|
"blockToBlock"
|
|
373
405
|
];
|
|
374
|
-
let DoorLockCCAPI =
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
case import_Types.DoorLockCommand.CapabilitiesGet:
|
|
384
|
-
return this.version >= 4;
|
|
406
|
+
let DoorLockCCAPI = (() => {
|
|
407
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Door Lock"])];
|
|
408
|
+
let _classDescriptor;
|
|
409
|
+
let _classExtraInitializers = [];
|
|
410
|
+
let _classThis;
|
|
411
|
+
let _classSuper = import_API.PhysicalCCAPI;
|
|
412
|
+
var DoorLockCCAPI2 = class extends _classSuper {
|
|
413
|
+
static {
|
|
414
|
+
_classThis = this;
|
|
385
415
|
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
if (
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
});
|
|
416
|
+
static {
|
|
417
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
418
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
419
|
+
DoorLockCCAPI2 = _classThis = _classDescriptor.value;
|
|
420
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
421
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
422
|
+
}
|
|
423
|
+
supportsCommand(cmd) {
|
|
424
|
+
switch (cmd) {
|
|
425
|
+
case import_Types.DoorLockCommand.OperationSet:
|
|
426
|
+
case import_Types.DoorLockCommand.OperationGet:
|
|
427
|
+
case import_Types.DoorLockCommand.ConfigurationSet:
|
|
428
|
+
case import_Types.DoorLockCommand.ConfigurationGet:
|
|
429
|
+
return true;
|
|
430
|
+
// This is mandatory
|
|
431
|
+
case import_Types.DoorLockCommand.CapabilitiesGet:
|
|
432
|
+
return this.version >= 4;
|
|
433
|
+
}
|
|
434
|
+
return super.supportsCommand(cmd);
|
|
435
|
+
}
|
|
436
|
+
get [import_API.SET_VALUE]() {
|
|
437
|
+
return async function({ property }, value) {
|
|
438
|
+
if (property === "targetMode") {
|
|
439
|
+
if (typeof value !== "number") {
|
|
440
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
412
441
|
}
|
|
442
|
+
const result = await this.set(value);
|
|
443
|
+
if ((0, import_safe.supervisedCommandSucceeded)(result)) {
|
|
444
|
+
this.getValueDB().setValue(DoorLockCCValues.currentMode.endpoint(this.endpoint.index), value);
|
|
445
|
+
} else {
|
|
446
|
+
this.schedulePoll({ property }, value);
|
|
447
|
+
}
|
|
448
|
+
return result;
|
|
449
|
+
} else if (typeof property === "string" && configurationSetParameters.includes(property)) {
|
|
450
|
+
const config = {
|
|
451
|
+
[property]: value
|
|
452
|
+
};
|
|
453
|
+
for (const param of configurationSetParameters) {
|
|
454
|
+
if (param !== property) {
|
|
455
|
+
config[param] = this.tryGetValueDB()?.getValue({
|
|
456
|
+
commandClass: this.ccId,
|
|
457
|
+
endpoint: this.endpoint.index,
|
|
458
|
+
property: param
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
const allTrue = [true, true, true, true];
|
|
463
|
+
if (!config.insideHandlesCanOpenDoorConfiguration) {
|
|
464
|
+
config.insideHandlesCanOpenDoorConfiguration = allTrue;
|
|
465
|
+
}
|
|
466
|
+
if (!config.outsideHandlesCanOpenDoorConfiguration) {
|
|
467
|
+
config.outsideHandlesCanOpenDoorConfiguration = allTrue;
|
|
468
|
+
}
|
|
469
|
+
const result = await this.setConfiguration(config);
|
|
470
|
+
if (!(0, import_safe.supervisedCommandSucceeded)(result)) {
|
|
471
|
+
this.schedulePoll({ property }, value);
|
|
472
|
+
}
|
|
473
|
+
return result;
|
|
474
|
+
} else {
|
|
475
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
413
476
|
}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
get [import_API.POLL_VALUE]() {
|
|
480
|
+
return async function({ property }) {
|
|
481
|
+
switch (property) {
|
|
482
|
+
case "currentMode":
|
|
483
|
+
case "targetMode":
|
|
484
|
+
case "duration":
|
|
485
|
+
case "outsideHandlesCanOpenDoor":
|
|
486
|
+
case "insideHandlesCanOpenDoor":
|
|
487
|
+
case "latchStatus":
|
|
488
|
+
case "boltStatus":
|
|
489
|
+
case "doorStatus":
|
|
490
|
+
case "lockTimeout":
|
|
491
|
+
return (await this.get())?.[property];
|
|
492
|
+
case "operationType":
|
|
493
|
+
case "outsideHandlesCanOpenDoorConfiguration":
|
|
494
|
+
case "insideHandlesCanOpenDoorConfiguration":
|
|
495
|
+
case "lockTimeoutConfiguration":
|
|
496
|
+
case "autoRelockTime":
|
|
497
|
+
case "holdAndReleaseTime":
|
|
498
|
+
case "twistAssist":
|
|
499
|
+
case "blockToBlock":
|
|
500
|
+
return (await this.getConfiguration())?.[property];
|
|
501
|
+
default:
|
|
502
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
424
503
|
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
507
|
+
async getCapabilities() {
|
|
508
|
+
this.assertSupportsCommand(import_Types.DoorLockCommand, import_Types.DoorLockCommand.CapabilitiesGet);
|
|
509
|
+
const cc = new DoorLockCCCapabilitiesGet({
|
|
510
|
+
nodeId: this.endpoint.nodeId,
|
|
511
|
+
endpointIndex: this.endpoint.index
|
|
512
|
+
});
|
|
513
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
514
|
+
if (response) {
|
|
515
|
+
return (0, import_safe3.pick)(response, [
|
|
516
|
+
"autoRelockSupported",
|
|
517
|
+
"blockToBlockSupported",
|
|
518
|
+
"boltSupported",
|
|
519
|
+
"doorSupported",
|
|
520
|
+
"holdAndReleaseSupported",
|
|
521
|
+
"latchSupported",
|
|
522
|
+
"twistAssistSupported",
|
|
523
|
+
"supportedDoorLockModes",
|
|
524
|
+
"supportedInsideHandles",
|
|
525
|
+
"supportedOperationTypes",
|
|
526
|
+
"supportedOutsideHandles"
|
|
527
|
+
]);
|
|
428
528
|
}
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
case "twistAssist":
|
|
451
|
-
case "blockToBlock":
|
|
452
|
-
return (await this.getConfiguration())?.[property];
|
|
453
|
-
default:
|
|
454
|
-
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
529
|
+
}
|
|
530
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
531
|
+
async get() {
|
|
532
|
+
this.assertSupportsCommand(import_Types.DoorLockCommand, import_Types.DoorLockCommand.OperationGet);
|
|
533
|
+
const cc = new DoorLockCCOperationGet({
|
|
534
|
+
nodeId: this.endpoint.nodeId,
|
|
535
|
+
endpointIndex: this.endpoint.index
|
|
536
|
+
});
|
|
537
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
538
|
+
if (response) {
|
|
539
|
+
return (0, import_safe3.pick)(response, [
|
|
540
|
+
"currentMode",
|
|
541
|
+
"targetMode",
|
|
542
|
+
"duration",
|
|
543
|
+
"outsideHandlesCanOpenDoor",
|
|
544
|
+
"insideHandlesCanOpenDoor",
|
|
545
|
+
"latchStatus",
|
|
546
|
+
"boltStatus",
|
|
547
|
+
"doorStatus",
|
|
548
|
+
"lockTimeout"
|
|
549
|
+
]);
|
|
455
550
|
}
|
|
456
|
-
};
|
|
457
|
-
}
|
|
458
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
459
|
-
async getCapabilities() {
|
|
460
|
-
this.assertSupportsCommand(import_Types.DoorLockCommand, import_Types.DoorLockCommand.CapabilitiesGet);
|
|
461
|
-
const cc = new DoorLockCCCapabilitiesGet({
|
|
462
|
-
nodeId: this.endpoint.nodeId,
|
|
463
|
-
endpointIndex: this.endpoint.index
|
|
464
|
-
});
|
|
465
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
466
|
-
if (response) {
|
|
467
|
-
return (0, import_safe3.pick)(response, [
|
|
468
|
-
"autoRelockSupported",
|
|
469
|
-
"blockToBlockSupported",
|
|
470
|
-
"boltSupported",
|
|
471
|
-
"doorSupported",
|
|
472
|
-
"holdAndReleaseSupported",
|
|
473
|
-
"latchSupported",
|
|
474
|
-
"twistAssistSupported",
|
|
475
|
-
"supportedDoorLockModes",
|
|
476
|
-
"supportedInsideHandles",
|
|
477
|
-
"supportedOperationTypes",
|
|
478
|
-
"supportedOutsideHandles"
|
|
479
|
-
]);
|
|
480
551
|
}
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
if (response) {
|
|
491
|
-
return (0, import_safe3.pick)(response, [
|
|
492
|
-
"currentMode",
|
|
493
|
-
"targetMode",
|
|
494
|
-
"duration",
|
|
495
|
-
"outsideHandlesCanOpenDoor",
|
|
496
|
-
"insideHandlesCanOpenDoor",
|
|
497
|
-
"latchStatus",
|
|
498
|
-
"boltStatus",
|
|
499
|
-
"doorStatus",
|
|
500
|
-
"lockTimeout"
|
|
501
|
-
]);
|
|
552
|
+
async set(mode) {
|
|
553
|
+
__assertType("mode", "DoorLockMode", __assertType__DoorLockMode.bind(void 0, mode));
|
|
554
|
+
this.assertSupportsCommand(import_Types.DoorLockCommand, import_Types.DoorLockCommand.OperationSet);
|
|
555
|
+
const cc = new DoorLockCCOperationSet({
|
|
556
|
+
nodeId: this.endpoint.nodeId,
|
|
557
|
+
endpointIndex: this.endpoint.index,
|
|
558
|
+
mode
|
|
559
|
+
});
|
|
560
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
502
561
|
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
513
|
-
}
|
|
514
|
-
async setConfiguration(configuration) {
|
|
515
|
-
__assertType("configuration", "DoorLockCCConfigurationSetOptions", __assertType__DoorLockCCConfigurationSetOptions.bind(void 0, configuration));
|
|
516
|
-
this.assertSupportsCommand(import_Types.DoorLockCommand, import_Types.DoorLockCommand.ConfigurationSet);
|
|
517
|
-
const cc = new DoorLockCCConfigurationSet({
|
|
518
|
-
nodeId: this.endpoint.nodeId,
|
|
519
|
-
endpointIndex: this.endpoint.index,
|
|
520
|
-
...configuration
|
|
521
|
-
});
|
|
522
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
523
|
-
}
|
|
524
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
525
|
-
async getConfiguration() {
|
|
526
|
-
this.assertSupportsCommand(import_Types.DoorLockCommand, import_Types.DoorLockCommand.ConfigurationGet);
|
|
527
|
-
const cc = new DoorLockCCConfigurationGet({
|
|
528
|
-
nodeId: this.endpoint.nodeId,
|
|
529
|
-
endpointIndex: this.endpoint.index
|
|
530
|
-
});
|
|
531
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
532
|
-
if (response) {
|
|
533
|
-
return (0, import_safe3.pick)(response, [
|
|
534
|
-
"operationType",
|
|
535
|
-
"outsideHandlesCanOpenDoorConfiguration",
|
|
536
|
-
"insideHandlesCanOpenDoorConfiguration",
|
|
537
|
-
"lockTimeoutConfiguration",
|
|
538
|
-
"autoRelockTime",
|
|
539
|
-
"holdAndReleaseTime",
|
|
540
|
-
"twistAssist",
|
|
541
|
-
"blockToBlock"
|
|
542
|
-
]);
|
|
562
|
+
async setConfiguration(configuration) {
|
|
563
|
+
__assertType("configuration", "DoorLockCCConfigurationSetOptions", __assertType__DoorLockCCConfigurationSetOptions.bind(void 0, configuration));
|
|
564
|
+
this.assertSupportsCommand(import_Types.DoorLockCommand, import_Types.DoorLockCommand.ConfigurationSet);
|
|
565
|
+
const cc = new DoorLockCCConfigurationSet({
|
|
566
|
+
nodeId: this.endpoint.nodeId,
|
|
567
|
+
endpointIndex: this.endpoint.index,
|
|
568
|
+
...configuration
|
|
569
|
+
});
|
|
570
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
543
571
|
}
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
572
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
573
|
+
async getConfiguration() {
|
|
574
|
+
this.assertSupportsCommand(import_Types.DoorLockCommand, import_Types.DoorLockCommand.ConfigurationGet);
|
|
575
|
+
const cc = new DoorLockCCConfigurationGet({
|
|
576
|
+
nodeId: this.endpoint.nodeId,
|
|
577
|
+
endpointIndex: this.endpoint.index
|
|
578
|
+
});
|
|
579
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
580
|
+
if (response) {
|
|
581
|
+
return (0, import_safe3.pick)(response, [
|
|
582
|
+
"operationType",
|
|
583
|
+
"outsideHandlesCanOpenDoorConfiguration",
|
|
584
|
+
"insideHandlesCanOpenDoorConfiguration",
|
|
585
|
+
"lockTimeoutConfiguration",
|
|
586
|
+
"autoRelockTime",
|
|
587
|
+
"holdAndReleaseTime",
|
|
588
|
+
"twistAssist",
|
|
589
|
+
"blockToBlock"
|
|
590
|
+
]);
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
};
|
|
594
|
+
return DoorLockCCAPI2 = _classThis;
|
|
595
|
+
})();
|
|
596
|
+
let DoorLockCC = (() => {
|
|
597
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Door Lock"]), (0, import_CommandClassDecorators.implementedVersion)(4), (0, import_CommandClassDecorators.ccValues)(DoorLockCCValues)];
|
|
598
|
+
let _classDescriptor;
|
|
599
|
+
let _classExtraInitializers = [];
|
|
600
|
+
let _classThis;
|
|
601
|
+
let _classSuper = import_CommandClass.CommandClass;
|
|
602
|
+
var DoorLockCC2 = class extends _classSuper {
|
|
603
|
+
static {
|
|
604
|
+
_classThis = this;
|
|
605
|
+
}
|
|
606
|
+
static {
|
|
607
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
608
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
609
|
+
DoorLockCC2 = _classThis = _classDescriptor.value;
|
|
610
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
611
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
612
|
+
}
|
|
613
|
+
async interview(ctx) {
|
|
614
|
+
const node = this.getNode(ctx);
|
|
615
|
+
const endpoint = this.getEndpoint(ctx);
|
|
616
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Door Lock"], ctx, endpoint).withOptions({
|
|
617
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
618
|
+
});
|
|
566
619
|
ctx.logNode(node.id, {
|
|
567
620
|
endpoint: this.endpointIndex,
|
|
568
|
-
message:
|
|
569
|
-
direction: "
|
|
621
|
+
message: `Interviewing ${this.ccName}...`,
|
|
622
|
+
direction: "none"
|
|
570
623
|
});
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
624
|
+
let hadCriticalTimeout = false;
|
|
625
|
+
let doorSupported = true;
|
|
626
|
+
let boltSupported = true;
|
|
627
|
+
let latchSupported = true;
|
|
628
|
+
if (api.version >= 4) {
|
|
629
|
+
ctx.logNode(node.id, {
|
|
630
|
+
endpoint: this.endpointIndex,
|
|
631
|
+
message: "requesting lock capabilities...",
|
|
632
|
+
direction: "outbound"
|
|
633
|
+
});
|
|
634
|
+
const resp = await api.getCapabilities();
|
|
635
|
+
if (resp) {
|
|
636
|
+
const logMessage = `received lock capabilities:
|
|
574
637
|
supported operation types: ${resp.supportedOperationTypes.map((t) => (0, import_safe3.getEnumMemberName)(import_Types.DoorLockOperationType, t)).join(", ")}
|
|
575
638
|
supported door lock modes: ${resp.supportedDoorLockModes.map((t) => (0, import_safe3.getEnumMemberName)(import_Types.DoorLockMode, t)).map((str) => `
|
|
576
639
|
\xB7 ${str}`).join("")}
|
|
@@ -583,645 +646,709 @@ supports auto-relock: ${resp.autoRelockSupported}
|
|
|
583
646
|
supports hold-and-release: ${resp.holdAndReleaseSupported}
|
|
584
647
|
supports twist assist: ${resp.twistAssistSupported}
|
|
585
648
|
supports block to block: ${resp.blockToBlockSupported}`;
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
649
|
+
ctx.logNode(node.id, {
|
|
650
|
+
endpoint: this.endpointIndex,
|
|
651
|
+
message: logMessage,
|
|
652
|
+
direction: "inbound"
|
|
653
|
+
});
|
|
654
|
+
doorSupported = resp.doorSupported;
|
|
655
|
+
boltSupported = resp.boltSupported;
|
|
656
|
+
latchSupported = resp.latchSupported;
|
|
657
|
+
const targetModeValue = DoorLockCCValues.targetMode;
|
|
658
|
+
this.setMetadata(ctx, targetModeValue, {
|
|
659
|
+
...targetModeValue.meta,
|
|
660
|
+
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.DoorLockMode, resp.supportedDoorLockModes)
|
|
661
|
+
});
|
|
662
|
+
const operationTypeValue = DoorLockCCValues.operationType;
|
|
663
|
+
this.setMetadata(ctx, operationTypeValue, {
|
|
664
|
+
...operationTypeValue.meta,
|
|
665
|
+
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.DoorLockOperationType, resp.supportedOperationTypes)
|
|
666
|
+
});
|
|
667
|
+
} else {
|
|
668
|
+
hadCriticalTimeout = true;
|
|
669
|
+
}
|
|
606
670
|
}
|
|
671
|
+
if (!hadCriticalTimeout) {
|
|
672
|
+
const doorStatusValue = DoorLockCCValues.doorStatus;
|
|
673
|
+
if (doorSupported)
|
|
674
|
+
this.setMetadata(ctx, doorStatusValue);
|
|
675
|
+
this.setValue(ctx, DoorLockCCValues.doorSupported, doorSupported);
|
|
676
|
+
const latchStatusValue = DoorLockCCValues.latchStatus;
|
|
677
|
+
if (latchSupported)
|
|
678
|
+
this.setMetadata(ctx, latchStatusValue);
|
|
679
|
+
this.setValue(ctx, DoorLockCCValues.latchSupported, latchSupported);
|
|
680
|
+
const boltStatusValue = DoorLockCCValues.boltStatus;
|
|
681
|
+
if (boltSupported)
|
|
682
|
+
this.setMetadata(ctx, boltStatusValue);
|
|
683
|
+
this.setValue(ctx, DoorLockCCValues.boltSupported, boltSupported);
|
|
684
|
+
}
|
|
685
|
+
await this.refreshValues(ctx);
|
|
686
|
+
if (!hadCriticalTimeout)
|
|
687
|
+
this.setInterviewComplete(ctx, true);
|
|
607
688
|
}
|
|
608
|
-
|
|
609
|
-
const
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
this.
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
await this.refreshValues(ctx);
|
|
623
|
-
if (!hadCriticalTimeout)
|
|
624
|
-
this.setInterviewComplete(ctx, true);
|
|
625
|
-
}
|
|
626
|
-
async refreshValues(ctx) {
|
|
627
|
-
const node = this.getNode(ctx);
|
|
628
|
-
const endpoint = this.getEndpoint(ctx);
|
|
629
|
-
const api = import_API.CCAPI.create(import_safe.CommandClasses["Door Lock"], ctx, endpoint).withOptions({
|
|
630
|
-
priority: import_safe.MessagePriority.NodeQuery
|
|
631
|
-
});
|
|
632
|
-
ctx.logNode(node.id, {
|
|
633
|
-
endpoint: this.endpointIndex,
|
|
634
|
-
message: "requesting lock configuration...",
|
|
635
|
-
direction: "outbound"
|
|
636
|
-
});
|
|
637
|
-
const config = await api.getConfiguration();
|
|
638
|
-
if (config) {
|
|
639
|
-
let logMessage = `received lock configuration:
|
|
689
|
+
async refreshValues(ctx) {
|
|
690
|
+
const node = this.getNode(ctx);
|
|
691
|
+
const endpoint = this.getEndpoint(ctx);
|
|
692
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Door Lock"], ctx, endpoint).withOptions({
|
|
693
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
694
|
+
});
|
|
695
|
+
ctx.logNode(node.id, {
|
|
696
|
+
endpoint: this.endpointIndex,
|
|
697
|
+
message: "requesting lock configuration...",
|
|
698
|
+
direction: "outbound"
|
|
699
|
+
});
|
|
700
|
+
const config = await api.getConfiguration();
|
|
701
|
+
if (config) {
|
|
702
|
+
let logMessage = `received lock configuration:
|
|
640
703
|
operation type: ${(0, import_safe3.getEnumMemberName)(import_Types.DoorLockOperationType, config.operationType)}`;
|
|
641
|
-
|
|
642
|
-
|
|
704
|
+
if (config.operationType === import_Types.DoorLockOperationType.Timed) {
|
|
705
|
+
logMessage += `
|
|
643
706
|
lock timeout: ${config.lockTimeoutConfiguration} seconds
|
|
644
707
|
`;
|
|
645
|
-
|
|
646
|
-
|
|
708
|
+
}
|
|
709
|
+
logMessage += `
|
|
647
710
|
outside handles can open door: ${config.outsideHandlesCanOpenDoorConfiguration.map(String).join(", ")}
|
|
648
711
|
inside handles can open door: ${config.insideHandlesCanOpenDoorConfiguration.map(String).join(", ")}`;
|
|
649
|
-
|
|
650
|
-
|
|
712
|
+
if (api.version >= 4) {
|
|
713
|
+
logMessage += `
|
|
651
714
|
auto-relock time ${config.autoRelockTime ?? "-"} seconds
|
|
652
715
|
hold-and-release time ${config.holdAndReleaseTime ?? "-"} seconds
|
|
653
716
|
twist assist ${!!config.twistAssist}
|
|
654
717
|
block to block ${!!config.blockToBlock}`;
|
|
718
|
+
}
|
|
719
|
+
ctx.logNode(node.id, {
|
|
720
|
+
endpoint: this.endpointIndex,
|
|
721
|
+
message: logMessage,
|
|
722
|
+
direction: "inbound"
|
|
723
|
+
});
|
|
655
724
|
}
|
|
656
725
|
ctx.logNode(node.id, {
|
|
657
726
|
endpoint: this.endpointIndex,
|
|
658
|
-
message:
|
|
659
|
-
direction: "
|
|
727
|
+
message: "requesting current lock status...",
|
|
728
|
+
direction: "outbound"
|
|
660
729
|
});
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
message: "requesting current lock status...",
|
|
665
|
-
direction: "outbound"
|
|
666
|
-
});
|
|
667
|
-
const status = await api.get();
|
|
668
|
-
if (status) {
|
|
669
|
-
let logMessage = `received lock status:
|
|
730
|
+
const status = await api.get();
|
|
731
|
+
if (status) {
|
|
732
|
+
let logMessage = `received lock status:
|
|
670
733
|
current mode: ${(0, import_safe3.getEnumMemberName)(import_Types.DoorLockMode, status.currentMode)}`;
|
|
671
|
-
|
|
672
|
-
|
|
734
|
+
if (status.targetMode != void 0) {
|
|
735
|
+
logMessage += `
|
|
673
736
|
target mode: ${(0, import_safe3.getEnumMemberName)(import_Types.DoorLockMode, status.targetMode)}
|
|
674
737
|
remaining duration: ${status.duration?.toString() ?? "undefined"}`;
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
738
|
+
}
|
|
739
|
+
if (status.lockTimeout != void 0) {
|
|
740
|
+
logMessage += `
|
|
678
741
|
lock timeout: ${status.lockTimeout} seconds`;
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
742
|
+
}
|
|
743
|
+
if (status.doorStatus != void 0) {
|
|
744
|
+
logMessage += `
|
|
682
745
|
door status: ${status.doorStatus}`;
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
746
|
+
}
|
|
747
|
+
if (status.boltStatus != void 0) {
|
|
748
|
+
logMessage += `
|
|
686
749
|
bolt status: ${status.boltStatus}`;
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
750
|
+
}
|
|
751
|
+
if (status.latchStatus != void 0) {
|
|
752
|
+
logMessage += `
|
|
690
753
|
latch status: ${status.latchStatus}`;
|
|
754
|
+
}
|
|
755
|
+
ctx.logNode(node.id, {
|
|
756
|
+
endpoint: this.endpointIndex,
|
|
757
|
+
message: logMessage,
|
|
758
|
+
direction: "inbound"
|
|
759
|
+
});
|
|
691
760
|
}
|
|
692
|
-
ctx.logNode(node.id, {
|
|
693
|
-
endpoint: this.endpointIndex,
|
|
694
|
-
message: logMessage,
|
|
695
|
-
direction: "inbound"
|
|
696
|
-
});
|
|
697
761
|
}
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
(0, import_CommandClassDecorators.
|
|
703
|
-
|
|
704
|
-
]
|
|
705
|
-
let
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
762
|
+
};
|
|
763
|
+
return DoorLockCC2 = _classThis;
|
|
764
|
+
})();
|
|
765
|
+
let DoorLockCCOperationSet = (() => {
|
|
766
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.DoorLockCommand.OperationSet), (0, import_CommandClassDecorators.useSupervision)()];
|
|
767
|
+
let _classDescriptor;
|
|
768
|
+
let _classExtraInitializers = [];
|
|
769
|
+
let _classThis;
|
|
770
|
+
let _classSuper = DoorLockCC;
|
|
771
|
+
var DoorLockCCOperationSet2 = class extends _classSuper {
|
|
772
|
+
static {
|
|
773
|
+
_classThis = this;
|
|
710
774
|
}
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
return {
|
|
723
|
-
...super.toLogEntry(ctx),
|
|
724
|
-
message: {
|
|
725
|
-
"target mode": (0, import_safe3.getEnumMemberName)(import_Types.DoorLockMode, this.mode)
|
|
775
|
+
static {
|
|
776
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
777
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
778
|
+
DoorLockCCOperationSet2 = _classThis = _classDescriptor.value;
|
|
779
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
780
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
781
|
+
}
|
|
782
|
+
constructor(options) {
|
|
783
|
+
super(options);
|
|
784
|
+
if (options.mode === import_Types.DoorLockMode.Unknown) {
|
|
785
|
+
throw new import_safe.ZWaveError(`Unknown is not a valid door lock target state!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
726
786
|
}
|
|
727
|
-
|
|
728
|
-
}
|
|
729
|
-
};
|
|
730
|
-
DoorLockCCOperationSet = __decorate([
|
|
731
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.DoorLockCommand.OperationSet),
|
|
732
|
-
(0, import_CommandClassDecorators.useSupervision)()
|
|
733
|
-
], DoorLockCCOperationSet);
|
|
734
|
-
let DoorLockCCOperationReport = DoorLockCCOperationReport_1 = class DoorLockCCOperationReport2 extends DoorLockCC {
|
|
735
|
-
constructor(options) {
|
|
736
|
-
super(options);
|
|
737
|
-
this.currentMode = options.currentMode;
|
|
738
|
-
this.outsideHandlesCanOpenDoor = options.outsideHandlesCanOpenDoor;
|
|
739
|
-
this.insideHandlesCanOpenDoor = options.insideHandlesCanOpenDoor;
|
|
740
|
-
this.doorStatus = options.doorStatus;
|
|
741
|
-
this.boltStatus = options.boltStatus;
|
|
742
|
-
this.latchStatus = options.latchStatus;
|
|
743
|
-
this.lockTimeout = options.lockTimeout;
|
|
744
|
-
this.targetMode = options.targetMode;
|
|
745
|
-
this.duration = options.duration;
|
|
746
|
-
}
|
|
747
|
-
static from(raw, ctx) {
|
|
748
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 5);
|
|
749
|
-
const currentMode = raw.payload[0];
|
|
750
|
-
const outsideHandlesCanOpenDoor = [
|
|
751
|
-
!!(raw.payload[1] & 16),
|
|
752
|
-
!!(raw.payload[1] & 32),
|
|
753
|
-
!!(raw.payload[1] & 64),
|
|
754
|
-
!!(raw.payload[1] & 128)
|
|
755
|
-
];
|
|
756
|
-
const insideHandlesCanOpenDoor = [
|
|
757
|
-
!!(raw.payload[1] & 1),
|
|
758
|
-
!!(raw.payload[1] & 2),
|
|
759
|
-
!!(raw.payload[1] & 4),
|
|
760
|
-
!!(raw.payload[1] & 8)
|
|
761
|
-
];
|
|
762
|
-
const doorStatus = !!(raw.payload[2] & 1) ? "closed" : "open";
|
|
763
|
-
const boltStatus = !!(raw.payload[2] & 2) ? "unlocked" : "locked";
|
|
764
|
-
const latchStatus = !!(raw.payload[2] & 4) ? "closed" : "open";
|
|
765
|
-
const lockTimeoutMinutes = raw.payload[3];
|
|
766
|
-
const lockTimeoutSeconds = raw.payload[4];
|
|
767
|
-
let lockTimeout;
|
|
768
|
-
if (lockTimeoutMinutes <= 253 && lockTimeoutSeconds <= 59) {
|
|
769
|
-
lockTimeout = lockTimeoutSeconds + lockTimeoutMinutes * 60;
|
|
787
|
+
this.mode = options.mode;
|
|
770
788
|
}
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
if (raw.payload.length >= 7) {
|
|
774
|
-
targetMode = raw.payload[5];
|
|
775
|
-
duration = import_safe.Duration.parseReport(raw.payload[6]);
|
|
789
|
+
static from(_raw, _ctx) {
|
|
790
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
776
791
|
}
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
insideHandlesCanOpenDoor,
|
|
782
|
-
doorStatus,
|
|
783
|
-
boltStatus,
|
|
784
|
-
latchStatus,
|
|
785
|
-
lockTimeout,
|
|
786
|
-
targetMode,
|
|
787
|
-
duration
|
|
788
|
-
});
|
|
789
|
-
}
|
|
790
|
-
persistValues(ctx) {
|
|
791
|
-
if (!super.persistValues(ctx))
|
|
792
|
-
return false;
|
|
793
|
-
const supportsDoorStatus = !!this.getValue(ctx, DoorLockCCValues.doorSupported);
|
|
794
|
-
if (supportsDoorStatus) {
|
|
795
|
-
this.setValue(ctx, DoorLockCCValues.doorStatus, this.doorStatus);
|
|
792
|
+
mode;
|
|
793
|
+
serialize(ctx) {
|
|
794
|
+
this.payload = import_safe2.Bytes.from([this.mode]);
|
|
795
|
+
return super.serialize(ctx);
|
|
796
796
|
}
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
797
|
+
toLogEntry(ctx) {
|
|
798
|
+
return {
|
|
799
|
+
...super.toLogEntry(ctx),
|
|
800
|
+
message: {
|
|
801
|
+
"target mode": (0, import_safe3.getEnumMemberName)(import_Types.DoorLockMode, this.mode)
|
|
802
|
+
}
|
|
803
|
+
};
|
|
800
804
|
}
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
805
|
+
};
|
|
806
|
+
return DoorLockCCOperationSet2 = _classThis;
|
|
807
|
+
})();
|
|
808
|
+
let DoorLockCCOperationReport = (() => {
|
|
809
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.DoorLockCommand.OperationReport), (0, import_CommandClassDecorators.ccValueProperty)("currentMode", DoorLockCCValues.currentMode), (0, import_CommandClassDecorators.ccValueProperty)("targetMode", DoorLockCCValues.targetMode), (0, import_CommandClassDecorators.ccValueProperty)("duration", DoorLockCCValues.duration), (0, import_CommandClassDecorators.ccValueProperty)("outsideHandlesCanOpenDoor", DoorLockCCValues.outsideHandlesCanOpenDoor), (0, import_CommandClassDecorators.ccValueProperty)("insideHandlesCanOpenDoor", DoorLockCCValues.insideHandlesCanOpenDoor), (0, import_CommandClassDecorators.ccValueProperty)("lockTimeout", DoorLockCCValues.lockTimeout)];
|
|
810
|
+
let _classDescriptor;
|
|
811
|
+
let _classExtraInitializers = [];
|
|
812
|
+
let _classThis;
|
|
813
|
+
let _classSuper = DoorLockCC;
|
|
814
|
+
var DoorLockCCOperationReport2 = class extends _classSuper {
|
|
815
|
+
static {
|
|
816
|
+
_classThis = this;
|
|
804
817
|
}
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
insideHandlesCanOpenDoor;
|
|
812
|
-
latchStatus;
|
|
813
|
-
boltStatus;
|
|
814
|
-
doorStatus;
|
|
815
|
-
lockTimeout;
|
|
816
|
-
// in seconds
|
|
817
|
-
toLogEntry(ctx) {
|
|
818
|
-
const message = {
|
|
819
|
-
"current mode": (0, import_safe3.getEnumMemberName)(import_Types.DoorLockMode, this.currentMode),
|
|
820
|
-
"active outside handles": this.outsideHandlesCanOpenDoor.join(", "),
|
|
821
|
-
"active inside handles": this.insideHandlesCanOpenDoor.join(", ")
|
|
822
|
-
};
|
|
823
|
-
if (this.latchStatus != void 0) {
|
|
824
|
-
message["latch status"] = this.latchStatus;
|
|
818
|
+
static {
|
|
819
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
820
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
821
|
+
DoorLockCCOperationReport2 = _classThis = _classDescriptor.value;
|
|
822
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
823
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
825
824
|
}
|
|
826
|
-
|
|
827
|
-
|
|
825
|
+
constructor(options) {
|
|
826
|
+
super(options);
|
|
827
|
+
this.currentMode = options.currentMode;
|
|
828
|
+
this.outsideHandlesCanOpenDoor = options.outsideHandlesCanOpenDoor;
|
|
829
|
+
this.insideHandlesCanOpenDoor = options.insideHandlesCanOpenDoor;
|
|
830
|
+
this.doorStatus = options.doorStatus;
|
|
831
|
+
this.boltStatus = options.boltStatus;
|
|
832
|
+
this.latchStatus = options.latchStatus;
|
|
833
|
+
this.lockTimeout = options.lockTimeout;
|
|
834
|
+
this.targetMode = options.targetMode;
|
|
835
|
+
this.duration = options.duration;
|
|
828
836
|
}
|
|
829
|
-
|
|
830
|
-
|
|
837
|
+
static from(raw, ctx) {
|
|
838
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 5);
|
|
839
|
+
const currentMode = raw.payload[0];
|
|
840
|
+
const outsideHandlesCanOpenDoor = [
|
|
841
|
+
!!(raw.payload[1] & 16),
|
|
842
|
+
!!(raw.payload[1] & 32),
|
|
843
|
+
!!(raw.payload[1] & 64),
|
|
844
|
+
!!(raw.payload[1] & 128)
|
|
845
|
+
];
|
|
846
|
+
const insideHandlesCanOpenDoor = [
|
|
847
|
+
!!(raw.payload[1] & 1),
|
|
848
|
+
!!(raw.payload[1] & 2),
|
|
849
|
+
!!(raw.payload[1] & 4),
|
|
850
|
+
!!(raw.payload[1] & 8)
|
|
851
|
+
];
|
|
852
|
+
const doorStatus = !!(raw.payload[2] & 1) ? "closed" : "open";
|
|
853
|
+
const boltStatus = !!(raw.payload[2] & 2) ? "unlocked" : "locked";
|
|
854
|
+
const latchStatus = !!(raw.payload[2] & 4) ? "closed" : "open";
|
|
855
|
+
const lockTimeoutMinutes = raw.payload[3];
|
|
856
|
+
const lockTimeoutSeconds = raw.payload[4];
|
|
857
|
+
let lockTimeout;
|
|
858
|
+
if (lockTimeoutMinutes <= 253 && lockTimeoutSeconds <= 59) {
|
|
859
|
+
lockTimeout = lockTimeoutSeconds + lockTimeoutMinutes * 60;
|
|
860
|
+
}
|
|
861
|
+
let targetMode;
|
|
862
|
+
let duration;
|
|
863
|
+
if (raw.payload.length >= 7) {
|
|
864
|
+
targetMode = raw.payload[5];
|
|
865
|
+
duration = import_safe.Duration.parseReport(raw.payload[6]);
|
|
866
|
+
}
|
|
867
|
+
return new this({
|
|
868
|
+
nodeId: ctx.sourceNodeId,
|
|
869
|
+
currentMode,
|
|
870
|
+
outsideHandlesCanOpenDoor,
|
|
871
|
+
insideHandlesCanOpenDoor,
|
|
872
|
+
doorStatus,
|
|
873
|
+
boltStatus,
|
|
874
|
+
latchStatus,
|
|
875
|
+
lockTimeout,
|
|
876
|
+
targetMode,
|
|
877
|
+
duration
|
|
878
|
+
});
|
|
831
879
|
}
|
|
832
|
-
|
|
833
|
-
|
|
880
|
+
persistValues(ctx) {
|
|
881
|
+
if (!super.persistValues(ctx))
|
|
882
|
+
return false;
|
|
883
|
+
const supportsDoorStatus = !!this.getValue(ctx, DoorLockCCValues.doorSupported);
|
|
884
|
+
if (supportsDoorStatus) {
|
|
885
|
+
this.setValue(ctx, DoorLockCCValues.doorStatus, this.doorStatus);
|
|
886
|
+
}
|
|
887
|
+
const supportsBoltStatus = !!this.getValue(ctx, DoorLockCCValues.boltSupported);
|
|
888
|
+
if (supportsBoltStatus) {
|
|
889
|
+
this.setValue(ctx, DoorLockCCValues.boltStatus, this.boltStatus);
|
|
890
|
+
}
|
|
891
|
+
const supportsLatchStatus = !!this.getValue(ctx, DoorLockCCValues.latchSupported);
|
|
892
|
+
if (supportsLatchStatus) {
|
|
893
|
+
this.setValue(ctx, DoorLockCCValues.latchStatus, this.latchStatus);
|
|
894
|
+
}
|
|
895
|
+
return true;
|
|
834
896
|
}
|
|
835
|
-
|
|
836
|
-
|
|
897
|
+
currentMode;
|
|
898
|
+
targetMode;
|
|
899
|
+
duration;
|
|
900
|
+
outsideHandlesCanOpenDoor;
|
|
901
|
+
insideHandlesCanOpenDoor;
|
|
902
|
+
latchStatus;
|
|
903
|
+
boltStatus;
|
|
904
|
+
doorStatus;
|
|
905
|
+
lockTimeout;
|
|
906
|
+
// in seconds
|
|
907
|
+
toLogEntry(ctx) {
|
|
908
|
+
const message = {
|
|
909
|
+
"current mode": (0, import_safe3.getEnumMemberName)(import_Types.DoorLockMode, this.currentMode),
|
|
910
|
+
"active outside handles": this.outsideHandlesCanOpenDoor.join(", "),
|
|
911
|
+
"active inside handles": this.insideHandlesCanOpenDoor.join(", ")
|
|
912
|
+
};
|
|
913
|
+
if (this.latchStatus != void 0) {
|
|
914
|
+
message["latch status"] = this.latchStatus;
|
|
915
|
+
}
|
|
916
|
+
if (this.boltStatus != void 0) {
|
|
917
|
+
message["bolt status"] = this.boltStatus;
|
|
918
|
+
}
|
|
919
|
+
if (this.doorStatus != void 0) {
|
|
920
|
+
message["door status"] = this.doorStatus;
|
|
921
|
+
}
|
|
922
|
+
if (this.targetMode != void 0) {
|
|
923
|
+
message["target mode"] = (0, import_safe3.getEnumMemberName)(import_Types.DoorLockMode, this.targetMode);
|
|
924
|
+
}
|
|
925
|
+
if (this.duration != void 0) {
|
|
926
|
+
message["remaining duration"] = this.duration.toString();
|
|
927
|
+
}
|
|
928
|
+
if (this.lockTimeout != void 0) {
|
|
929
|
+
message["lock timeout"] = `${this.lockTimeout} seconds`;
|
|
930
|
+
}
|
|
931
|
+
return {
|
|
932
|
+
...super.toLogEntry(ctx),
|
|
933
|
+
message
|
|
934
|
+
};
|
|
837
935
|
}
|
|
838
|
-
|
|
839
|
-
|
|
936
|
+
};
|
|
937
|
+
return DoorLockCCOperationReport2 = _classThis;
|
|
938
|
+
})();
|
|
939
|
+
let DoorLockCCOperationGet = (() => {
|
|
940
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.DoorLockCommand.OperationGet), (0, import_CommandClassDecorators.expectedCCResponse)(DoorLockCCOperationReport)];
|
|
941
|
+
let _classDescriptor;
|
|
942
|
+
let _classExtraInitializers = [];
|
|
943
|
+
let _classThis;
|
|
944
|
+
let _classSuper = DoorLockCC;
|
|
945
|
+
var DoorLockCCOperationGet2 = class extends _classSuper {
|
|
946
|
+
static {
|
|
947
|
+
_classThis = this;
|
|
840
948
|
}
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
__decorate([
|
|
848
|
-
(0, import_CommandClassDecorators.ccValue)(DoorLockCCValues.currentMode)
|
|
849
|
-
], DoorLockCCOperationReport.prototype, "currentMode", void 0);
|
|
850
|
-
__decorate([
|
|
851
|
-
(0, import_CommandClassDecorators.ccValue)(DoorLockCCValues.targetMode)
|
|
852
|
-
], DoorLockCCOperationReport.prototype, "targetMode", void 0);
|
|
853
|
-
__decorate([
|
|
854
|
-
(0, import_CommandClassDecorators.ccValue)(DoorLockCCValues.duration)
|
|
855
|
-
], DoorLockCCOperationReport.prototype, "duration", void 0);
|
|
856
|
-
__decorate([
|
|
857
|
-
(0, import_CommandClassDecorators.ccValue)(DoorLockCCValues.outsideHandlesCanOpenDoor)
|
|
858
|
-
], DoorLockCCOperationReport.prototype, "outsideHandlesCanOpenDoor", void 0);
|
|
859
|
-
__decorate([
|
|
860
|
-
(0, import_CommandClassDecorators.ccValue)(DoorLockCCValues.insideHandlesCanOpenDoor)
|
|
861
|
-
], DoorLockCCOperationReport.prototype, "insideHandlesCanOpenDoor", void 0);
|
|
862
|
-
__decorate([
|
|
863
|
-
(0, import_CommandClassDecorators.ccValue)(DoorLockCCValues.lockTimeout)
|
|
864
|
-
], DoorLockCCOperationReport.prototype, "lockTimeout", void 0);
|
|
865
|
-
DoorLockCCOperationReport = DoorLockCCOperationReport_1 = __decorate([
|
|
866
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.DoorLockCommand.OperationReport)
|
|
867
|
-
], DoorLockCCOperationReport);
|
|
868
|
-
let DoorLockCCOperationGet = class DoorLockCCOperationGet2 extends DoorLockCC {
|
|
869
|
-
};
|
|
870
|
-
DoorLockCCOperationGet = __decorate([
|
|
871
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.DoorLockCommand.OperationGet),
|
|
872
|
-
(0, import_CommandClassDecorators.expectedCCResponse)(DoorLockCCOperationReport)
|
|
873
|
-
], DoorLockCCOperationGet);
|
|
874
|
-
let DoorLockCCConfigurationReport = DoorLockCCConfigurationReport_1 = class DoorLockCCConfigurationReport2 extends DoorLockCC {
|
|
875
|
-
constructor(options) {
|
|
876
|
-
super(options);
|
|
877
|
-
this.operationType = options.operationType;
|
|
878
|
-
this.outsideHandlesCanOpenDoorConfiguration = options.outsideHandlesCanOpenDoorConfiguration;
|
|
879
|
-
this.insideHandlesCanOpenDoorConfiguration = options.insideHandlesCanOpenDoorConfiguration;
|
|
880
|
-
this.lockTimeoutConfiguration = options.lockTimeoutConfiguration;
|
|
881
|
-
this.autoRelockTime = options.autoRelockTime;
|
|
882
|
-
this.holdAndReleaseTime = options.holdAndReleaseTime;
|
|
883
|
-
this.twistAssist = options.twistAssist;
|
|
884
|
-
this.blockToBlock = options.blockToBlock;
|
|
885
|
-
}
|
|
886
|
-
static from(raw, ctx) {
|
|
887
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 4);
|
|
888
|
-
const operationType = raw.payload[0];
|
|
889
|
-
const outsideHandlesCanOpenDoorConfiguration = [
|
|
890
|
-
!!(raw.payload[1] & 16),
|
|
891
|
-
!!(raw.payload[1] & 32),
|
|
892
|
-
!!(raw.payload[1] & 64),
|
|
893
|
-
!!(raw.payload[1] & 128)
|
|
894
|
-
];
|
|
895
|
-
const insideHandlesCanOpenDoorConfiguration = [
|
|
896
|
-
!!(raw.payload[1] & 1),
|
|
897
|
-
!!(raw.payload[1] & 2),
|
|
898
|
-
!!(raw.payload[1] & 4),
|
|
899
|
-
!!(raw.payload[1] & 8)
|
|
900
|
-
];
|
|
901
|
-
let lockTimeoutConfiguration;
|
|
902
|
-
if (operationType === import_Types.DoorLockOperationType.Timed) {
|
|
903
|
-
const lockTimeoutMinutes = raw.payload[2];
|
|
904
|
-
const lockTimeoutSeconds = raw.payload[3];
|
|
905
|
-
if (lockTimeoutMinutes <= 253 && lockTimeoutSeconds <= 59) {
|
|
906
|
-
lockTimeoutConfiguration = lockTimeoutSeconds + lockTimeoutMinutes * 60;
|
|
907
|
-
}
|
|
949
|
+
static {
|
|
950
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
951
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
952
|
+
DoorLockCCOperationGet2 = _classThis = _classDescriptor.value;
|
|
953
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
954
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
908
955
|
}
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
956
|
+
};
|
|
957
|
+
return DoorLockCCOperationGet2 = _classThis;
|
|
958
|
+
})();
|
|
959
|
+
let DoorLockCCConfigurationReport = (() => {
|
|
960
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.DoorLockCommand.ConfigurationReport), (0, import_CommandClassDecorators.ccValueProperty)("operationType", DoorLockCCValues.operationType), (0, import_CommandClassDecorators.ccValueProperty)("outsideHandlesCanOpenDoorConfiguration", DoorLockCCValues.outsideHandlesCanOpenDoorConfiguration), (0, import_CommandClassDecorators.ccValueProperty)("insideHandlesCanOpenDoorConfiguration", DoorLockCCValues.insideHandlesCanOpenDoorConfiguration), (0, import_CommandClassDecorators.ccValueProperty)("lockTimeoutConfiguration", DoorLockCCValues.lockTimeoutConfiguration)];
|
|
961
|
+
let _classDescriptor;
|
|
962
|
+
let _classExtraInitializers = [];
|
|
963
|
+
let _classThis;
|
|
964
|
+
let _classSuper = DoorLockCC;
|
|
965
|
+
var DoorLockCCConfigurationReport2 = class extends _classSuper {
|
|
966
|
+
static {
|
|
967
|
+
_classThis = this;
|
|
919
968
|
}
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
autoRelockTime,
|
|
927
|
-
holdAndReleaseTime,
|
|
928
|
-
twistAssist,
|
|
929
|
-
blockToBlock
|
|
930
|
-
});
|
|
931
|
-
}
|
|
932
|
-
operationType;
|
|
933
|
-
outsideHandlesCanOpenDoorConfiguration;
|
|
934
|
-
insideHandlesCanOpenDoorConfiguration;
|
|
935
|
-
lockTimeoutConfiguration;
|
|
936
|
-
// These are not always supported and have to be persisted manually
|
|
937
|
-
// to avoid unsupported values being exposed to the user
|
|
938
|
-
autoRelockTime;
|
|
939
|
-
holdAndReleaseTime;
|
|
940
|
-
twistAssist;
|
|
941
|
-
blockToBlock;
|
|
942
|
-
persistValues(ctx) {
|
|
943
|
-
if (!super.persistValues(ctx))
|
|
944
|
-
return false;
|
|
945
|
-
const supportsAutoRelock = !!this.getValue(ctx, DoorLockCCValues.autoRelockSupported);
|
|
946
|
-
if (supportsAutoRelock) {
|
|
947
|
-
this.setValue(ctx, DoorLockCCValues.autoRelockTime, this.autoRelockTime);
|
|
969
|
+
static {
|
|
970
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
971
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
972
|
+
DoorLockCCConfigurationReport2 = _classThis = _classDescriptor.value;
|
|
973
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
974
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
948
975
|
}
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
this.
|
|
976
|
+
constructor(options) {
|
|
977
|
+
super(options);
|
|
978
|
+
this.operationType = options.operationType;
|
|
979
|
+
this.outsideHandlesCanOpenDoorConfiguration = options.outsideHandlesCanOpenDoorConfiguration;
|
|
980
|
+
this.insideHandlesCanOpenDoorConfiguration = options.insideHandlesCanOpenDoorConfiguration;
|
|
981
|
+
this.lockTimeoutConfiguration = options.lockTimeoutConfiguration;
|
|
982
|
+
this.autoRelockTime = options.autoRelockTime;
|
|
983
|
+
this.holdAndReleaseTime = options.holdAndReleaseTime;
|
|
984
|
+
this.twistAssist = options.twistAssist;
|
|
985
|
+
this.blockToBlock = options.blockToBlock;
|
|
952
986
|
}
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
987
|
+
static from(raw, ctx) {
|
|
988
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 4);
|
|
989
|
+
const operationType = raw.payload[0];
|
|
990
|
+
const outsideHandlesCanOpenDoorConfiguration = [
|
|
991
|
+
!!(raw.payload[1] & 16),
|
|
992
|
+
!!(raw.payload[1] & 32),
|
|
993
|
+
!!(raw.payload[1] & 64),
|
|
994
|
+
!!(raw.payload[1] & 128)
|
|
995
|
+
];
|
|
996
|
+
const insideHandlesCanOpenDoorConfiguration = [
|
|
997
|
+
!!(raw.payload[1] & 1),
|
|
998
|
+
!!(raw.payload[1] & 2),
|
|
999
|
+
!!(raw.payload[1] & 4),
|
|
1000
|
+
!!(raw.payload[1] & 8)
|
|
1001
|
+
];
|
|
1002
|
+
let lockTimeoutConfiguration;
|
|
1003
|
+
if (operationType === import_Types.DoorLockOperationType.Timed) {
|
|
1004
|
+
const lockTimeoutMinutes = raw.payload[2];
|
|
1005
|
+
const lockTimeoutSeconds = raw.payload[3];
|
|
1006
|
+
if (lockTimeoutMinutes <= 253 && lockTimeoutSeconds <= 59) {
|
|
1007
|
+
lockTimeoutConfiguration = lockTimeoutSeconds + lockTimeoutMinutes * 60;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
let autoRelockTime;
|
|
1011
|
+
let holdAndReleaseTime;
|
|
1012
|
+
let twistAssist;
|
|
1013
|
+
let blockToBlock;
|
|
1014
|
+
if (raw.payload.length >= 5) {
|
|
1015
|
+
autoRelockTime = raw.payload.readUInt16BE(4);
|
|
1016
|
+
holdAndReleaseTime = raw.payload.readUInt16BE(6);
|
|
1017
|
+
const flags = raw.payload[8];
|
|
1018
|
+
twistAssist = !!(flags & 1);
|
|
1019
|
+
blockToBlock = !!(flags & 2);
|
|
1020
|
+
}
|
|
1021
|
+
return new this({
|
|
1022
|
+
nodeId: ctx.sourceNodeId,
|
|
1023
|
+
operationType,
|
|
1024
|
+
outsideHandlesCanOpenDoorConfiguration,
|
|
1025
|
+
insideHandlesCanOpenDoorConfiguration,
|
|
1026
|
+
lockTimeoutConfiguration,
|
|
1027
|
+
autoRelockTime,
|
|
1028
|
+
holdAndReleaseTime,
|
|
1029
|
+
twistAssist,
|
|
1030
|
+
blockToBlock
|
|
1031
|
+
});
|
|
956
1032
|
}
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
1033
|
+
operationType;
|
|
1034
|
+
outsideHandlesCanOpenDoorConfiguration;
|
|
1035
|
+
insideHandlesCanOpenDoorConfiguration;
|
|
1036
|
+
lockTimeoutConfiguration;
|
|
1037
|
+
// These are not always supported and have to be persisted manually
|
|
1038
|
+
// to avoid unsupported values being exposed to the user
|
|
1039
|
+
autoRelockTime;
|
|
1040
|
+
holdAndReleaseTime;
|
|
1041
|
+
twistAssist;
|
|
1042
|
+
blockToBlock;
|
|
1043
|
+
persistValues(ctx) {
|
|
1044
|
+
if (!super.persistValues(ctx))
|
|
1045
|
+
return false;
|
|
1046
|
+
const supportsAutoRelock = !!this.getValue(ctx, DoorLockCCValues.autoRelockSupported);
|
|
1047
|
+
if (supportsAutoRelock) {
|
|
1048
|
+
this.setValue(ctx, DoorLockCCValues.autoRelockTime, this.autoRelockTime);
|
|
1049
|
+
}
|
|
1050
|
+
const supportsHoldAndRelease = !!this.getValue(ctx, DoorLockCCValues.holdAndReleaseSupported);
|
|
1051
|
+
if (supportsHoldAndRelease) {
|
|
1052
|
+
this.setValue(ctx, DoorLockCCValues.holdAndReleaseTime, this.holdAndReleaseTime);
|
|
1053
|
+
}
|
|
1054
|
+
const supportsTwistAssist = !!this.getValue(ctx, DoorLockCCValues.twistAssistSupported);
|
|
1055
|
+
if (supportsTwistAssist) {
|
|
1056
|
+
this.setValue(ctx, DoorLockCCValues.twistAssist, this.twistAssist);
|
|
1057
|
+
}
|
|
1058
|
+
const supportsBlockToBlock = !!this.getValue(ctx, DoorLockCCValues.blockToBlockSupported);
|
|
1059
|
+
if (supportsBlockToBlock) {
|
|
1060
|
+
this.setValue(ctx, DoorLockCCValues.blockToBlock, this.blockToBlock);
|
|
1061
|
+
}
|
|
1062
|
+
return true;
|
|
960
1063
|
}
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
1064
|
+
toLogEntry(ctx) {
|
|
1065
|
+
const message = {
|
|
1066
|
+
"operation type": (0, import_safe3.getEnumMemberName)(import_Types.DoorLockOperationType, this.operationType),
|
|
1067
|
+
"outside handle configuration": this.outsideHandlesCanOpenDoorConfiguration.join(", "),
|
|
1068
|
+
"inside handle configuration": this.insideHandlesCanOpenDoorConfiguration.join(", ")
|
|
1069
|
+
};
|
|
1070
|
+
if (this.lockTimeoutConfiguration != void 0) {
|
|
1071
|
+
message["timed mode duration"] = `${this.lockTimeoutConfiguration} seconds`;
|
|
1072
|
+
}
|
|
1073
|
+
if (this.autoRelockTime != void 0) {
|
|
1074
|
+
message["auto-relock time"] = `${this.autoRelockTime} seconds`;
|
|
1075
|
+
}
|
|
1076
|
+
if (this.holdAndReleaseTime != void 0) {
|
|
1077
|
+
message["hold-and-release time"] = `${this.holdAndReleaseTime} seconds`;
|
|
1078
|
+
}
|
|
1079
|
+
if (this.twistAssist != void 0) {
|
|
1080
|
+
message["twist assist enabled"] = this.twistAssist;
|
|
1081
|
+
}
|
|
1082
|
+
if (this.blockToBlock != void 0) {
|
|
1083
|
+
message["block-to-block enabled"] = this.blockToBlock;
|
|
1084
|
+
}
|
|
1085
|
+
return {
|
|
1086
|
+
...super.toLogEntry(ctx),
|
|
1087
|
+
message
|
|
1088
|
+
};
|
|
971
1089
|
}
|
|
972
|
-
|
|
973
|
-
|
|
1090
|
+
};
|
|
1091
|
+
return DoorLockCCConfigurationReport2 = _classThis;
|
|
1092
|
+
})();
|
|
1093
|
+
let DoorLockCCConfigurationGet = (() => {
|
|
1094
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.DoorLockCommand.ConfigurationGet), (0, import_CommandClassDecorators.expectedCCResponse)(DoorLockCCConfigurationReport)];
|
|
1095
|
+
let _classDescriptor;
|
|
1096
|
+
let _classExtraInitializers = [];
|
|
1097
|
+
let _classThis;
|
|
1098
|
+
let _classSuper = DoorLockCC;
|
|
1099
|
+
var DoorLockCCConfigurationGet2 = class extends _classSuper {
|
|
1100
|
+
static {
|
|
1101
|
+
_classThis = this;
|
|
974
1102
|
}
|
|
975
|
-
|
|
976
|
-
|
|
1103
|
+
static {
|
|
1104
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1105
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1106
|
+
DoorLockCCConfigurationGet2 = _classThis = _classDescriptor.value;
|
|
1107
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1108
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
977
1109
|
}
|
|
978
|
-
|
|
979
|
-
|
|
1110
|
+
};
|
|
1111
|
+
return DoorLockCCConfigurationGet2 = _classThis;
|
|
1112
|
+
})();
|
|
1113
|
+
let DoorLockCCConfigurationSet = (() => {
|
|
1114
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.DoorLockCommand.ConfigurationSet), (0, import_CommandClassDecorators.useSupervision)()];
|
|
1115
|
+
let _classDescriptor;
|
|
1116
|
+
let _classExtraInitializers = [];
|
|
1117
|
+
let _classThis;
|
|
1118
|
+
let _classSuper = DoorLockCC;
|
|
1119
|
+
var DoorLockCCConfigurationSet2 = class extends _classSuper {
|
|
1120
|
+
static {
|
|
1121
|
+
_classThis = this;
|
|
980
1122
|
}
|
|
981
|
-
|
|
982
|
-
|
|
1123
|
+
static {
|
|
1124
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1125
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1126
|
+
DoorLockCCConfigurationSet2 = _classThis = _classDescriptor.value;
|
|
1127
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1128
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
983
1129
|
}
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
(0, import_CommandClassDecorators.ccValue)(DoorLockCCValues.outsideHandlesCanOpenDoorConfiguration)
|
|
995
|
-
], DoorLockCCConfigurationReport.prototype, "outsideHandlesCanOpenDoorConfiguration", void 0);
|
|
996
|
-
__decorate([
|
|
997
|
-
(0, import_CommandClassDecorators.ccValue)(DoorLockCCValues.insideHandlesCanOpenDoorConfiguration)
|
|
998
|
-
], DoorLockCCConfigurationReport.prototype, "insideHandlesCanOpenDoorConfiguration", void 0);
|
|
999
|
-
__decorate([
|
|
1000
|
-
(0, import_CommandClassDecorators.ccValue)(DoorLockCCValues.lockTimeoutConfiguration)
|
|
1001
|
-
], DoorLockCCConfigurationReport.prototype, "lockTimeoutConfiguration", void 0);
|
|
1002
|
-
DoorLockCCConfigurationReport = DoorLockCCConfigurationReport_1 = __decorate([
|
|
1003
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.DoorLockCommand.ConfigurationReport)
|
|
1004
|
-
], DoorLockCCConfigurationReport);
|
|
1005
|
-
let DoorLockCCConfigurationGet = class DoorLockCCConfigurationGet2 extends DoorLockCC {
|
|
1006
|
-
};
|
|
1007
|
-
DoorLockCCConfigurationGet = __decorate([
|
|
1008
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.DoorLockCommand.ConfigurationGet),
|
|
1009
|
-
(0, import_CommandClassDecorators.expectedCCResponse)(DoorLockCCConfigurationReport)
|
|
1010
|
-
], DoorLockCCConfigurationGet);
|
|
1011
|
-
let DoorLockCCConfigurationSet = class DoorLockCCConfigurationSet2 extends DoorLockCC {
|
|
1012
|
-
constructor(options) {
|
|
1013
|
-
super(options);
|
|
1014
|
-
this.operationType = options.operationType;
|
|
1015
|
-
this.outsideHandlesCanOpenDoorConfiguration = options.outsideHandlesCanOpenDoorConfiguration;
|
|
1016
|
-
this.insideHandlesCanOpenDoorConfiguration = options.insideHandlesCanOpenDoorConfiguration;
|
|
1017
|
-
this.lockTimeoutConfiguration = options.lockTimeoutConfiguration;
|
|
1018
|
-
this.autoRelockTime = options.autoRelockTime;
|
|
1019
|
-
this.holdAndReleaseTime = options.holdAndReleaseTime;
|
|
1020
|
-
this.twistAssist = options.twistAssist;
|
|
1021
|
-
this.blockToBlock = options.blockToBlock;
|
|
1022
|
-
}
|
|
1023
|
-
static from(_raw, _ctx) {
|
|
1024
|
-
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
1025
|
-
}
|
|
1026
|
-
operationType;
|
|
1027
|
-
outsideHandlesCanOpenDoorConfiguration;
|
|
1028
|
-
insideHandlesCanOpenDoorConfiguration;
|
|
1029
|
-
lockTimeoutConfiguration;
|
|
1030
|
-
autoRelockTime;
|
|
1031
|
-
holdAndReleaseTime;
|
|
1032
|
-
twistAssist;
|
|
1033
|
-
blockToBlock;
|
|
1034
|
-
serialize(ctx) {
|
|
1035
|
-
const insideHandles = (0, import_typeguards.isArray)(this.insideHandlesCanOpenDoorConfiguration) ? this.insideHandlesCanOpenDoorConfiguration : [];
|
|
1036
|
-
const outsideHandles = (0, import_typeguards.isArray)(this.outsideHandlesCanOpenDoorConfiguration) ? this.outsideHandlesCanOpenDoorConfiguration : [];
|
|
1037
|
-
const handles = [...insideHandles, ...outsideHandles].map((val, i) => val ? 1 << i : 0).reduce((acc, cur) => acc | cur, 0);
|
|
1038
|
-
let lockTimeoutMinutes;
|
|
1039
|
-
let lockTimeoutSeconds;
|
|
1040
|
-
if (this.operationType === import_Types.DoorLockOperationType.Constant) {
|
|
1041
|
-
lockTimeoutMinutes = lockTimeoutSeconds = 254;
|
|
1042
|
-
} else {
|
|
1043
|
-
lockTimeoutMinutes = Math.floor(this.lockTimeoutConfiguration / 60);
|
|
1044
|
-
lockTimeoutSeconds = this.lockTimeoutConfiguration % 60;
|
|
1130
|
+
constructor(options) {
|
|
1131
|
+
super(options);
|
|
1132
|
+
this.operationType = options.operationType;
|
|
1133
|
+
this.outsideHandlesCanOpenDoorConfiguration = options.outsideHandlesCanOpenDoorConfiguration;
|
|
1134
|
+
this.insideHandlesCanOpenDoorConfiguration = options.insideHandlesCanOpenDoorConfiguration;
|
|
1135
|
+
this.lockTimeoutConfiguration = options.lockTimeoutConfiguration;
|
|
1136
|
+
this.autoRelockTime = options.autoRelockTime;
|
|
1137
|
+
this.holdAndReleaseTime = options.holdAndReleaseTime;
|
|
1138
|
+
this.twistAssist = options.twistAssist;
|
|
1139
|
+
this.blockToBlock = options.blockToBlock;
|
|
1045
1140
|
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1141
|
+
static from(_raw, _ctx) {
|
|
1142
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
1143
|
+
}
|
|
1144
|
+
operationType;
|
|
1145
|
+
outsideHandlesCanOpenDoorConfiguration;
|
|
1146
|
+
insideHandlesCanOpenDoorConfiguration;
|
|
1147
|
+
lockTimeoutConfiguration;
|
|
1148
|
+
autoRelockTime;
|
|
1149
|
+
holdAndReleaseTime;
|
|
1150
|
+
twistAssist;
|
|
1151
|
+
blockToBlock;
|
|
1152
|
+
serialize(ctx) {
|
|
1153
|
+
const insideHandles = (0, import_typeguards.isArray)(this.insideHandlesCanOpenDoorConfiguration) ? this.insideHandlesCanOpenDoorConfiguration : [];
|
|
1154
|
+
const outsideHandles = (0, import_typeguards.isArray)(this.outsideHandlesCanOpenDoorConfiguration) ? this.outsideHandlesCanOpenDoorConfiguration : [];
|
|
1155
|
+
const handles = [...insideHandles, ...outsideHandles].map((val, i) => val ? 1 << i : 0).reduce((acc, cur) => acc | cur, 0);
|
|
1156
|
+
let lockTimeoutMinutes;
|
|
1157
|
+
let lockTimeoutSeconds;
|
|
1158
|
+
if (this.operationType === import_Types.DoorLockOperationType.Constant) {
|
|
1159
|
+
lockTimeoutMinutes = lockTimeoutSeconds = 254;
|
|
1160
|
+
} else {
|
|
1161
|
+
lockTimeoutMinutes = Math.floor(this.lockTimeoutConfiguration / 60);
|
|
1162
|
+
lockTimeoutSeconds = this.lockTimeoutConfiguration % 60;
|
|
1163
|
+
}
|
|
1164
|
+
const flags = (this.twistAssist ? 1 : 0) | (this.blockToBlock ? 2 : 0);
|
|
1165
|
+
this.payload = import_safe2.Bytes.from([
|
|
1166
|
+
this.operationType,
|
|
1167
|
+
handles,
|
|
1168
|
+
lockTimeoutMinutes,
|
|
1169
|
+
lockTimeoutSeconds,
|
|
1170
|
+
// placeholder for auto relock time
|
|
1171
|
+
0,
|
|
1172
|
+
0,
|
|
1173
|
+
// placeholder for hold and release time
|
|
1174
|
+
0,
|
|
1175
|
+
0,
|
|
1176
|
+
flags
|
|
1177
|
+
]);
|
|
1178
|
+
this.payload.writeUInt16BE((this.autoRelockTime ?? 0) & 65535, 4);
|
|
1179
|
+
this.payload.writeUInt16BE((this.holdAndReleaseTime ?? 0) & 65535, 6);
|
|
1180
|
+
return super.serialize(ctx);
|
|
1074
1181
|
}
|
|
1075
|
-
|
|
1076
|
-
|
|
1182
|
+
toLogEntry(ctx) {
|
|
1183
|
+
const insideHandles = (0, import_typeguards.isArray)(this.insideHandlesCanOpenDoorConfiguration) ? this.insideHandlesCanOpenDoorConfiguration : [];
|
|
1184
|
+
const outsideHandles = (0, import_typeguards.isArray)(this.outsideHandlesCanOpenDoorConfiguration) ? this.outsideHandlesCanOpenDoorConfiguration : [];
|
|
1185
|
+
const message = {
|
|
1186
|
+
"operation type": (0, import_safe3.getEnumMemberName)(import_Types.DoorLockOperationType, this.operationType),
|
|
1187
|
+
"outside handle configuration": outsideHandles.join(", "),
|
|
1188
|
+
"inside handle configuration": insideHandles.join(", ")
|
|
1189
|
+
};
|
|
1190
|
+
if (this.lockTimeoutConfiguration != void 0) {
|
|
1191
|
+
message["timed mode duration"] = `${this.lockTimeoutConfiguration} seconds`;
|
|
1192
|
+
}
|
|
1193
|
+
if (this.autoRelockTime != void 0) {
|
|
1194
|
+
message["auto-relock time"] = `${this.autoRelockTime} seconds`;
|
|
1195
|
+
}
|
|
1196
|
+
if (this.holdAndReleaseTime != void 0) {
|
|
1197
|
+
message["hold-and-release time"] = `${this.holdAndReleaseTime} seconds`;
|
|
1198
|
+
}
|
|
1199
|
+
if (this.twistAssist != void 0) {
|
|
1200
|
+
message["enable twist assist"] = this.twistAssist;
|
|
1201
|
+
}
|
|
1202
|
+
if (this.blockToBlock != void 0) {
|
|
1203
|
+
message["enable block-to-block"] = this.blockToBlock;
|
|
1204
|
+
}
|
|
1205
|
+
return {
|
|
1206
|
+
...super.toLogEntry(ctx),
|
|
1207
|
+
message
|
|
1208
|
+
};
|
|
1077
1209
|
}
|
|
1078
|
-
|
|
1079
|
-
|
|
1210
|
+
};
|
|
1211
|
+
return DoorLockCCConfigurationSet2 = _classThis;
|
|
1212
|
+
})();
|
|
1213
|
+
let DoorLockCCCapabilitiesReport = (() => {
|
|
1214
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.DoorLockCommand.CapabilitiesReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedOutsideHandles", DoorLockCCValues.supportedOutsideHandles), (0, import_CommandClassDecorators.ccValueProperty)("supportedInsideHandles", DoorLockCCValues.supportedInsideHandles), (0, import_CommandClassDecorators.ccValueProperty)("autoRelockSupported", DoorLockCCValues.autoRelockSupported), (0, import_CommandClassDecorators.ccValueProperty)("holdAndReleaseSupported", DoorLockCCValues.holdAndReleaseSupported), (0, import_CommandClassDecorators.ccValueProperty)("twistAssistSupported", DoorLockCCValues.twistAssistSupported), (0, import_CommandClassDecorators.ccValueProperty)("blockToBlockSupported", DoorLockCCValues.blockToBlockSupported)];
|
|
1215
|
+
let _classDescriptor;
|
|
1216
|
+
let _classExtraInitializers = [];
|
|
1217
|
+
let _classThis;
|
|
1218
|
+
let _classSuper = DoorLockCC;
|
|
1219
|
+
var DoorLockCCCapabilitiesReport2 = class extends _classSuper {
|
|
1220
|
+
static {
|
|
1221
|
+
_classThis = this;
|
|
1080
1222
|
}
|
|
1081
|
-
|
|
1082
|
-
|
|
1223
|
+
static {
|
|
1224
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1225
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1226
|
+
DoorLockCCCapabilitiesReport2 = _classThis = _classDescriptor.value;
|
|
1227
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1228
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1083
1229
|
}
|
|
1084
|
-
|
|
1085
|
-
|
|
1230
|
+
constructor(options) {
|
|
1231
|
+
super(options);
|
|
1232
|
+
this.supportedOperationTypes = options.supportedOperationTypes;
|
|
1233
|
+
this.supportedDoorLockModes = options.supportedDoorLockModes;
|
|
1234
|
+
this.supportedOutsideHandles = options.supportedOutsideHandles;
|
|
1235
|
+
this.supportedInsideHandles = options.supportedInsideHandles;
|
|
1236
|
+
this.doorSupported = options.doorSupported;
|
|
1237
|
+
this.boltSupported = options.boltSupported;
|
|
1238
|
+
this.latchSupported = options.latchSupported;
|
|
1239
|
+
this.blockToBlockSupported = options.blockToBlockSupported;
|
|
1240
|
+
this.twistAssistSupported = options.twistAssistSupported;
|
|
1241
|
+
this.holdAndReleaseSupported = options.holdAndReleaseSupported;
|
|
1242
|
+
this.autoRelockSupported = options.autoRelockSupported;
|
|
1086
1243
|
}
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
raw.payload
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
supportedOperationTypes;
|
|
1165
|
-
supportedDoorLockModes;
|
|
1166
|
-
supportedOutsideHandles;
|
|
1167
|
-
supportedInsideHandles;
|
|
1168
|
-
// These 3 are not automatically persisted because in CC version 3
|
|
1169
|
-
// we have to assume them to be supported. In v4 we can query this.
|
|
1170
|
-
latchSupported;
|
|
1171
|
-
boltSupported;
|
|
1172
|
-
doorSupported;
|
|
1173
|
-
autoRelockSupported;
|
|
1174
|
-
holdAndReleaseSupported;
|
|
1175
|
-
twistAssistSupported;
|
|
1176
|
-
blockToBlockSupported;
|
|
1177
|
-
toLogEntry(ctx) {
|
|
1178
|
-
return {
|
|
1179
|
-
...super.toLogEntry(ctx),
|
|
1180
|
-
message: {
|
|
1181
|
-
door: this.doorSupported,
|
|
1182
|
-
bolt: this.boltSupported,
|
|
1183
|
-
latch: this.latchSupported,
|
|
1184
|
-
"block-to-block feature": this.blockToBlockSupported,
|
|
1185
|
-
"twist assist feature": this.twistAssistSupported,
|
|
1186
|
-
"hold-and-release feature": this.holdAndReleaseSupported,
|
|
1187
|
-
"auto-relock feature": this.autoRelockSupported,
|
|
1188
|
-
"operation types": this.supportedOperationTypes.map((t) => `
|
|
1244
|
+
static from(raw, ctx) {
|
|
1245
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
1246
|
+
const bitMaskLength = raw.payload[0] & 31;
|
|
1247
|
+
let offset = 1;
|
|
1248
|
+
(0, import_safe.validatePayload)(raw.payload.length >= offset + bitMaskLength + 1);
|
|
1249
|
+
const supportedOperationTypes = (0, import_safe.parseBitMask)(
|
|
1250
|
+
raw.payload.subarray(offset, offset + bitMaskLength),
|
|
1251
|
+
// bit 0 is reserved, bitmask starts at 1
|
|
1252
|
+
0
|
|
1253
|
+
);
|
|
1254
|
+
offset += bitMaskLength;
|
|
1255
|
+
const listLength = raw.payload[offset];
|
|
1256
|
+
offset += 1;
|
|
1257
|
+
(0, import_safe.validatePayload)(raw.payload.length >= offset + listLength + 3);
|
|
1258
|
+
const supportedDoorLockModes = [
|
|
1259
|
+
...raw.payload.subarray(offset, offset + listLength)
|
|
1260
|
+
];
|
|
1261
|
+
offset += listLength;
|
|
1262
|
+
const supportedOutsideHandles = [
|
|
1263
|
+
!!(raw.payload[offset] & 16),
|
|
1264
|
+
!!(raw.payload[offset] & 32),
|
|
1265
|
+
!!(raw.payload[offset] & 64),
|
|
1266
|
+
!!(raw.payload[offset] & 128)
|
|
1267
|
+
];
|
|
1268
|
+
const supportedInsideHandles = [
|
|
1269
|
+
!!(raw.payload[offset] & 1),
|
|
1270
|
+
!!(raw.payload[offset] & 2),
|
|
1271
|
+
!!(raw.payload[offset] & 4),
|
|
1272
|
+
!!(raw.payload[offset] & 8)
|
|
1273
|
+
];
|
|
1274
|
+
const doorSupported = !!(raw.payload[offset + 1] & 1);
|
|
1275
|
+
const boltSupported = !!(raw.payload[offset + 1] & 2);
|
|
1276
|
+
const latchSupported = !!(raw.payload[offset + 1] & 4);
|
|
1277
|
+
const blockToBlockSupported = !!(raw.payload[offset + 2] & 1);
|
|
1278
|
+
const twistAssistSupported = !!(raw.payload[offset + 2] & 2);
|
|
1279
|
+
const holdAndReleaseSupported = !!(raw.payload[offset + 2] & 4);
|
|
1280
|
+
const autoRelockSupported = !!(raw.payload[offset + 2] & 8);
|
|
1281
|
+
return new this({
|
|
1282
|
+
nodeId: ctx.sourceNodeId,
|
|
1283
|
+
supportedOperationTypes,
|
|
1284
|
+
supportedDoorLockModes,
|
|
1285
|
+
supportedOutsideHandles,
|
|
1286
|
+
supportedInsideHandles,
|
|
1287
|
+
doorSupported,
|
|
1288
|
+
boltSupported,
|
|
1289
|
+
latchSupported,
|
|
1290
|
+
blockToBlockSupported,
|
|
1291
|
+
twistAssistSupported,
|
|
1292
|
+
holdAndReleaseSupported,
|
|
1293
|
+
autoRelockSupported
|
|
1294
|
+
});
|
|
1295
|
+
}
|
|
1296
|
+
supportedOperationTypes;
|
|
1297
|
+
supportedDoorLockModes;
|
|
1298
|
+
supportedOutsideHandles;
|
|
1299
|
+
supportedInsideHandles;
|
|
1300
|
+
// These 3 are not automatically persisted because in CC version 3
|
|
1301
|
+
// we have to assume them to be supported. In v4 we can query this.
|
|
1302
|
+
latchSupported;
|
|
1303
|
+
boltSupported;
|
|
1304
|
+
doorSupported;
|
|
1305
|
+
autoRelockSupported;
|
|
1306
|
+
holdAndReleaseSupported;
|
|
1307
|
+
twistAssistSupported;
|
|
1308
|
+
blockToBlockSupported;
|
|
1309
|
+
toLogEntry(ctx) {
|
|
1310
|
+
return {
|
|
1311
|
+
...super.toLogEntry(ctx),
|
|
1312
|
+
message: {
|
|
1313
|
+
door: this.doorSupported,
|
|
1314
|
+
bolt: this.boltSupported,
|
|
1315
|
+
latch: this.latchSupported,
|
|
1316
|
+
"block-to-block feature": this.blockToBlockSupported,
|
|
1317
|
+
"twist assist feature": this.twistAssistSupported,
|
|
1318
|
+
"hold-and-release feature": this.holdAndReleaseSupported,
|
|
1319
|
+
"auto-relock feature": this.autoRelockSupported,
|
|
1320
|
+
"operation types": this.supportedOperationTypes.map((t) => `
|
|
1189
1321
|
\xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.DoorLockOperationType, t)}`).join(""),
|
|
1190
|
-
|
|
1322
|
+
"door lock modes": this.supportedDoorLockModes.map((t) => `
|
|
1191
1323
|
\xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.DoorLockMode, t)}`).join(""),
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
};
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
};
|
|
1221
|
-
DoorLockCCCapabilitiesGet = __decorate([
|
|
1222
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.DoorLockCommand.CapabilitiesGet),
|
|
1223
|
-
(0, import_CommandClassDecorators.expectedCCResponse)(DoorLockCCCapabilitiesReport)
|
|
1224
|
-
], DoorLockCCCapabilitiesGet);
|
|
1324
|
+
"outside handles": this.supportedOutsideHandles.join(", "),
|
|
1325
|
+
"inside handles": this.supportedInsideHandles.join(", ")
|
|
1326
|
+
}
|
|
1327
|
+
};
|
|
1328
|
+
}
|
|
1329
|
+
};
|
|
1330
|
+
return DoorLockCCCapabilitiesReport2 = _classThis;
|
|
1331
|
+
})();
|
|
1332
|
+
let DoorLockCCCapabilitiesGet = (() => {
|
|
1333
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.DoorLockCommand.CapabilitiesGet), (0, import_CommandClassDecorators.expectedCCResponse)(DoorLockCCCapabilitiesReport)];
|
|
1334
|
+
let _classDescriptor;
|
|
1335
|
+
let _classExtraInitializers = [];
|
|
1336
|
+
let _classThis;
|
|
1337
|
+
let _classSuper = DoorLockCC;
|
|
1338
|
+
var DoorLockCCCapabilitiesGet2 = class extends _classSuper {
|
|
1339
|
+
static {
|
|
1340
|
+
_classThis = this;
|
|
1341
|
+
}
|
|
1342
|
+
static {
|
|
1343
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1344
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1345
|
+
DoorLockCCCapabilitiesGet2 = _classThis = _classDescriptor.value;
|
|
1346
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1347
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1348
|
+
}
|
|
1349
|
+
};
|
|
1350
|
+
return DoorLockCCCapabilitiesGet2 = _classThis;
|
|
1351
|
+
})();
|
|
1225
1352
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1226
1353
|
0 && (module.exports = {
|
|
1227
1354
|
DoorLockCC,
|