@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
|
@@ -50,13 +50,45 @@ var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
|
50
50
|
var import_Values = require("../lib/Values.js");
|
|
51
51
|
var import_Types = require("../lib/_Types.js");
|
|
52
52
|
var ccUtils = __toESM(require("../lib/utils.js"), 1);
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
54
|
+
function accept(f) {
|
|
55
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
56
|
+
return f;
|
|
57
|
+
}
|
|
58
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
59
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
60
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
61
|
+
var _, done = false;
|
|
62
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
63
|
+
var context = {};
|
|
64
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
65
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
66
|
+
context.addInitializer = function(f) {
|
|
67
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
68
|
+
extraInitializers.push(accept(f || null));
|
|
69
|
+
};
|
|
70
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
71
|
+
if (kind === "accessor") {
|
|
72
|
+
if (result === void 0) continue;
|
|
73
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
74
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
75
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
76
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
77
|
+
} else if (_ = accept(result)) {
|
|
78
|
+
if (kind === "field") initializers.unshift(_);
|
|
79
|
+
else descriptor[key] = _;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
83
|
+
done = true;
|
|
84
|
+
};
|
|
85
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
86
|
+
var useValue = arguments.length > 2;
|
|
87
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
88
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
89
|
+
}
|
|
90
|
+
return useValue ? value : void 0;
|
|
58
91
|
};
|
|
59
|
-
var EntryControlCCNotification_1, EntryControlCCKeySupportedReport_1, EntryControlCCEventSupportedReport_1, EntryControlCCConfigurationReport_1;
|
|
60
92
|
function __assertType(argName, typeName, boundHasError) {
|
|
61
93
|
const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
|
|
62
94
|
if (boundHasError()) {
|
|
@@ -97,485 +129,614 @@ const EntryControlCCValues = Object.freeze({
|
|
|
97
129
|
})
|
|
98
130
|
})
|
|
99
131
|
});
|
|
100
|
-
let EntryControlCCAPI =
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
return super.supportsCommand(cmd);
|
|
111
|
-
}
|
|
112
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
113
|
-
async getSupportedKeys() {
|
|
114
|
-
this.assertSupportsCommand(import_Types.EntryControlCommand, import_Types.EntryControlCommand.KeySupportedGet);
|
|
115
|
-
const cc = new EntryControlCCKeySupportedGet({
|
|
116
|
-
nodeId: this.endpoint.nodeId,
|
|
117
|
-
endpointIndex: this.endpoint.index
|
|
118
|
-
});
|
|
119
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
120
|
-
return response?.supportedKeys;
|
|
121
|
-
}
|
|
122
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
123
|
-
async getEventCapabilities() {
|
|
124
|
-
this.assertSupportsCommand(import_Types.EntryControlCommand, import_Types.EntryControlCommand.EventSupportedGet);
|
|
125
|
-
const cc = new EntryControlCCEventSupportedGet({
|
|
126
|
-
nodeId: this.endpoint.nodeId,
|
|
127
|
-
endpointIndex: this.endpoint.index
|
|
128
|
-
});
|
|
129
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
130
|
-
if (response) {
|
|
131
|
-
return (0, import_safe3.pick)(response, [
|
|
132
|
-
"supportedDataTypes",
|
|
133
|
-
"supportedEventTypes",
|
|
134
|
-
"minKeyCacheSize",
|
|
135
|
-
"maxKeyCacheSize",
|
|
136
|
-
"minKeyCacheTimeout",
|
|
137
|
-
"maxKeyCacheTimeout"
|
|
138
|
-
]);
|
|
132
|
+
let EntryControlCCAPI = (() => {
|
|
133
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Entry Control"])];
|
|
134
|
+
let _classDescriptor;
|
|
135
|
+
let _classExtraInitializers = [];
|
|
136
|
+
let _classThis;
|
|
137
|
+
let _classSuper = import_API.CCAPI;
|
|
138
|
+
var EntryControlCCAPI2 = class extends _classSuper {
|
|
139
|
+
static {
|
|
140
|
+
_classThis = this;
|
|
139
141
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
endpointIndex: this.endpoint.index
|
|
147
|
-
});
|
|
148
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
149
|
-
if (response) {
|
|
150
|
-
return (0, import_safe3.pick)(response, ["keyCacheSize", "keyCacheTimeout"]);
|
|
142
|
+
static {
|
|
143
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
144
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
145
|
+
EntryControlCCAPI2 = _classThis = _classDescriptor.value;
|
|
146
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
147
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
151
148
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
keyCacheSize,
|
|
161
|
-
keyCacheTimeout
|
|
162
|
-
});
|
|
163
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
164
|
-
}
|
|
165
|
-
get [import_API.SET_VALUE]() {
|
|
166
|
-
return async function({ property }, value) {
|
|
167
|
-
if (property !== "keyCacheSize" && property !== "keyCacheTimeout") {
|
|
168
|
-
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
149
|
+
supportsCommand(cmd) {
|
|
150
|
+
switch (cmd) {
|
|
151
|
+
case import_Types.EntryControlCommand.KeySupportedGet:
|
|
152
|
+
case import_Types.EntryControlCommand.EventSupportedGet:
|
|
153
|
+
case import_Types.EntryControlCommand.ConfigurationGet:
|
|
154
|
+
return this.isSinglecast();
|
|
155
|
+
case import_Types.EntryControlCommand.ConfigurationSet:
|
|
156
|
+
return true;
|
|
169
157
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
158
|
+
return super.supportsCommand(cmd);
|
|
159
|
+
}
|
|
160
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
161
|
+
async getSupportedKeys() {
|
|
162
|
+
this.assertSupportsCommand(import_Types.EntryControlCommand, import_Types.EntryControlCommand.KeySupportedGet);
|
|
163
|
+
const cc = new EntryControlCCKeySupportedGet({
|
|
164
|
+
nodeId: this.endpoint.nodeId,
|
|
165
|
+
endpointIndex: this.endpoint.index
|
|
166
|
+
});
|
|
167
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
168
|
+
return response?.supportedKeys;
|
|
169
|
+
}
|
|
170
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
171
|
+
async getEventCapabilities() {
|
|
172
|
+
this.assertSupportsCommand(import_Types.EntryControlCommand, import_Types.EntryControlCommand.EventSupportedGet);
|
|
173
|
+
const cc = new EntryControlCCEventSupportedGet({
|
|
174
|
+
nodeId: this.endpoint.nodeId,
|
|
175
|
+
endpointIndex: this.endpoint.index
|
|
176
|
+
});
|
|
177
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
178
|
+
if (response) {
|
|
179
|
+
return (0, import_safe3.pick)(response, [
|
|
180
|
+
"supportedDataTypes",
|
|
181
|
+
"supportedEventTypes",
|
|
182
|
+
"minKeyCacheSize",
|
|
183
|
+
"maxKeyCacheSize",
|
|
184
|
+
"minKeyCacheTimeout",
|
|
185
|
+
"maxKeyCacheTimeout"
|
|
186
|
+
]);
|
|
186
187
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
188
|
+
}
|
|
189
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
190
|
+
async getConfiguration() {
|
|
191
|
+
this.assertSupportsCommand(import_Types.EntryControlCommand, import_Types.EntryControlCommand.ConfigurationGet);
|
|
192
|
+
const cc = new EntryControlCCConfigurationGet({
|
|
193
|
+
nodeId: this.endpoint.nodeId,
|
|
194
|
+
endpointIndex: this.endpoint.index
|
|
195
|
+
});
|
|
196
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
197
|
+
if (response) {
|
|
198
|
+
return (0, import_safe3.pick)(response, ["keyCacheSize", "keyCacheTimeout"]);
|
|
196
199
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
...super.determineRequiredCCInterviews(),
|
|
208
|
-
import_safe.CommandClasses.Association,
|
|
209
|
-
import_safe.CommandClasses["Multi Channel Association"],
|
|
210
|
-
import_safe.CommandClasses["Association Group Information"]
|
|
211
|
-
];
|
|
212
|
-
}
|
|
213
|
-
async interview(ctx) {
|
|
214
|
-
const node = this.getNode(ctx);
|
|
215
|
-
const endpoint = this.getEndpoint(ctx);
|
|
216
|
-
const api = import_API.CCAPI.create(import_safe.CommandClasses["Entry Control"], ctx, endpoint).withOptions({
|
|
217
|
-
priority: import_safe.MessagePriority.NodeQuery
|
|
218
|
-
});
|
|
219
|
-
ctx.logNode(node.id, {
|
|
220
|
-
endpoint: this.endpointIndex,
|
|
221
|
-
message: `Interviewing ${this.ccName}...`,
|
|
222
|
-
direction: "none"
|
|
223
|
-
});
|
|
224
|
-
try {
|
|
225
|
-
await ccUtils.assignLifelineIssueingCommand(ctx, endpoint, this.ccId, import_Types.EntryControlCommand.Notification);
|
|
226
|
-
} catch {
|
|
227
|
-
ctx.logNode(node.id, {
|
|
228
|
-
endpoint: endpoint.index,
|
|
229
|
-
message: `Configuring associations to receive ${(0, import_safe.getCCName)(this.ccId)} commands failed!`,
|
|
230
|
-
level: "warn"
|
|
200
|
+
}
|
|
201
|
+
async setConfiguration(keyCacheSize, keyCacheTimeout) {
|
|
202
|
+
__assertType("keyCacheSize", "number", __assertType__number.bind(void 0, keyCacheSize));
|
|
203
|
+
__assertType("keyCacheTimeout", "number", __assertType__number.bind(void 0, keyCacheTimeout));
|
|
204
|
+
this.assertSupportsCommand(import_Types.EntryControlCommand, import_Types.EntryControlCommand.ConfigurationGet);
|
|
205
|
+
const cc = new EntryControlCCConfigurationSet({
|
|
206
|
+
nodeId: this.endpoint.nodeId,
|
|
207
|
+
endpointIndex: this.endpoint.index,
|
|
208
|
+
keyCacheSize,
|
|
209
|
+
keyCacheTimeout
|
|
231
210
|
});
|
|
211
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
212
|
+
}
|
|
213
|
+
get [import_API.SET_VALUE]() {
|
|
214
|
+
return async function({ property }, value) {
|
|
215
|
+
if (property !== "keyCacheSize" && property !== "keyCacheTimeout") {
|
|
216
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
217
|
+
}
|
|
218
|
+
if (typeof value !== "number") {
|
|
219
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
220
|
+
}
|
|
221
|
+
let keyCacheSize = value;
|
|
222
|
+
let keyCacheTimeout = 2;
|
|
223
|
+
if (property === "keyCacheTimeout") {
|
|
224
|
+
keyCacheTimeout = value;
|
|
225
|
+
const oldKeyCacheSize = this.tryGetValueDB()?.getValue(EntryControlCCValues.keyCacheSize.endpoint(this.endpoint.index));
|
|
226
|
+
if (oldKeyCacheSize == void 0) {
|
|
227
|
+
throw new import_safe.ZWaveError(`The "keyCacheTimeout" property cannot be changed before the key cache size is known!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
228
|
+
}
|
|
229
|
+
keyCacheSize = oldKeyCacheSize;
|
|
230
|
+
}
|
|
231
|
+
const result = await this.setConfiguration(keyCacheSize, keyCacheTimeout);
|
|
232
|
+
if (this.isSinglecast() && !(0, import_safe.supervisedCommandSucceeded)(result)) {
|
|
233
|
+
this.schedulePoll({ property }, value, { transition: "fast" });
|
|
234
|
+
}
|
|
235
|
+
return result;
|
|
236
|
+
};
|
|
232
237
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
get [import_API.POLL_VALUE]() {
|
|
239
|
+
return async function({ property }) {
|
|
240
|
+
switch (property) {
|
|
241
|
+
case "keyCacheSize":
|
|
242
|
+
case "keyCacheTimeout":
|
|
243
|
+
return (await this.getConfiguration())?.[property];
|
|
244
|
+
}
|
|
245
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
return EntryControlCCAPI2 = _classThis;
|
|
250
|
+
})();
|
|
251
|
+
let EntryControlCC = (() => {
|
|
252
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Entry Control"]), (0, import_CommandClassDecorators.implementedVersion)(1), (0, import_CommandClassDecorators.ccValues)(EntryControlCCValues)];
|
|
253
|
+
let _classDescriptor;
|
|
254
|
+
let _classExtraInitializers = [];
|
|
255
|
+
let _classThis;
|
|
256
|
+
let _classSuper = import_CommandClass.CommandClass;
|
|
257
|
+
var EntryControlCC2 = class extends _classSuper {
|
|
258
|
+
static {
|
|
259
|
+
_classThis = this;
|
|
260
|
+
}
|
|
261
|
+
static {
|
|
262
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
263
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
264
|
+
EntryControlCC2 = _classThis = _classDescriptor.value;
|
|
265
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
266
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
267
|
+
}
|
|
268
|
+
determineRequiredCCInterviews() {
|
|
269
|
+
return [
|
|
270
|
+
...super.determineRequiredCCInterviews(),
|
|
271
|
+
import_safe.CommandClasses.Association,
|
|
272
|
+
import_safe.CommandClasses["Multi Channel Association"],
|
|
273
|
+
import_safe.CommandClasses["Association Group Information"]
|
|
274
|
+
];
|
|
275
|
+
}
|
|
276
|
+
async interview(ctx) {
|
|
277
|
+
const node = this.getNode(ctx);
|
|
278
|
+
const endpoint = this.getEndpoint(ctx);
|
|
279
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Entry Control"], ctx, endpoint).withOptions({
|
|
280
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
281
|
+
});
|
|
240
282
|
ctx.logNode(node.id, {
|
|
241
283
|
endpoint: this.endpointIndex,
|
|
242
|
-
message: `
|
|
243
|
-
direction: "
|
|
284
|
+
message: `Interviewing ${this.ccName}...`,
|
|
285
|
+
direction: "none"
|
|
244
286
|
});
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
287
|
+
try {
|
|
288
|
+
await ccUtils.assignLifelineIssueingCommand(ctx, endpoint, this.ccId, import_Types.EntryControlCommand.Notification);
|
|
289
|
+
} catch {
|
|
290
|
+
ctx.logNode(node.id, {
|
|
291
|
+
endpoint: endpoint.index,
|
|
292
|
+
message: `Configuring associations to receive ${(0, import_safe.getCCName)(this.ccId)} commands failed!`,
|
|
293
|
+
level: "warn"
|
|
294
|
+
});
|
|
295
|
+
}
|
|
253
296
|
ctx.logNode(node.id, {
|
|
254
297
|
endpoint: this.endpointIndex,
|
|
255
|
-
message:
|
|
298
|
+
message: "requesting entry control supported keys...",
|
|
299
|
+
direction: "outbound"
|
|
300
|
+
});
|
|
301
|
+
const supportedKeys = await api.getSupportedKeys();
|
|
302
|
+
if (supportedKeys) {
|
|
303
|
+
ctx.logNode(node.id, {
|
|
304
|
+
endpoint: this.endpointIndex,
|
|
305
|
+
message: `received entry control supported keys: ${supportedKeys.toString()}`,
|
|
306
|
+
direction: "inbound"
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
ctx.logNode(node.id, {
|
|
310
|
+
endpoint: this.endpointIndex,
|
|
311
|
+
message: "requesting entry control supported events...",
|
|
312
|
+
direction: "outbound"
|
|
313
|
+
});
|
|
314
|
+
const eventCapabilities = await api.getEventCapabilities();
|
|
315
|
+
if (eventCapabilities) {
|
|
316
|
+
ctx.logNode(node.id, {
|
|
317
|
+
endpoint: this.endpointIndex,
|
|
318
|
+
message: `received entry control supported keys:
|
|
256
319
|
data types: ${eventCapabilities.supportedDataTypes.map((e) => import_Types.EntryControlDataTypes[e]).toString()}
|
|
257
320
|
event types: ${eventCapabilities.supportedEventTypes.map((e) => import_Types.EntryControlEventTypes[e]).toString()}
|
|
258
321
|
min key cache size: ${eventCapabilities.minKeyCacheSize}
|
|
259
322
|
max key cache size: ${eventCapabilities.maxKeyCacheSize}
|
|
260
323
|
min key cache timeout: ${eventCapabilities.minKeyCacheTimeout} seconds
|
|
261
324
|
max key cache timeout: ${eventCapabilities.maxKeyCacheTimeout} seconds`,
|
|
262
|
-
|
|
263
|
-
|
|
325
|
+
direction: "inbound"
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
await this.refreshValues(ctx);
|
|
329
|
+
this.setInterviewComplete(ctx, true);
|
|
264
330
|
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
const api = import_API.CCAPI.create(import_safe.CommandClasses["Entry Control"], ctx, endpoint).withOptions({
|
|
272
|
-
priority: import_safe.MessagePriority.NodeQuery
|
|
273
|
-
});
|
|
274
|
-
ctx.logNode(node.id, {
|
|
275
|
-
endpoint: this.endpointIndex,
|
|
276
|
-
message: "requesting entry control configuration...",
|
|
277
|
-
direction: "outbound"
|
|
278
|
-
});
|
|
279
|
-
const conf = await api.getConfiguration();
|
|
280
|
-
if (conf) {
|
|
331
|
+
async refreshValues(ctx) {
|
|
332
|
+
const node = this.getNode(ctx);
|
|
333
|
+
const endpoint = this.getEndpoint(ctx);
|
|
334
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Entry Control"], ctx, endpoint).withOptions({
|
|
335
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
336
|
+
});
|
|
281
337
|
ctx.logNode(node.id, {
|
|
282
338
|
endpoint: this.endpointIndex,
|
|
283
|
-
message:
|
|
339
|
+
message: "requesting entry control configuration...",
|
|
340
|
+
direction: "outbound"
|
|
341
|
+
});
|
|
342
|
+
const conf = await api.getConfiguration();
|
|
343
|
+
if (conf) {
|
|
344
|
+
ctx.logNode(node.id, {
|
|
345
|
+
endpoint: this.endpointIndex,
|
|
346
|
+
message: `received entry control configuration:
|
|
284
347
|
key cache size: ${conf.keyCacheSize}
|
|
285
348
|
key cache timeout: ${conf.keyCacheTimeout} seconds`,
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
};
|
|
291
|
-
EntryControlCC = __decorate([
|
|
292
|
-
(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Entry Control"]),
|
|
293
|
-
(0, import_CommandClassDecorators.implementedVersion)(1),
|
|
294
|
-
(0, import_CommandClassDecorators.ccValues)(EntryControlCCValues)
|
|
295
|
-
], EntryControlCC);
|
|
296
|
-
let EntryControlCCNotification = EntryControlCCNotification_1 = class EntryControlCCNotification2 extends EntryControlCC {
|
|
297
|
-
constructor(options) {
|
|
298
|
-
super(options);
|
|
299
|
-
this.sequenceNumber = options.sequenceNumber;
|
|
300
|
-
this.dataType = options.dataType;
|
|
301
|
-
this.eventType = options.eventType;
|
|
302
|
-
this.eventData = options.eventData;
|
|
303
|
-
}
|
|
304
|
-
static from(raw, ctx) {
|
|
305
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 4);
|
|
306
|
-
const sequenceNumber = raw.payload[0];
|
|
307
|
-
let dataType = raw.payload[1] & 3;
|
|
308
|
-
const eventType = raw.payload[2];
|
|
309
|
-
const eventDataLength = raw.payload[3];
|
|
310
|
-
(0, import_safe.validatePayload)(eventDataLength >= 0 && eventDataLength <= 32);
|
|
311
|
-
const offset = 4;
|
|
312
|
-
(0, import_safe.validatePayload)(raw.payload.length >= offset + eventDataLength);
|
|
313
|
-
let eventData;
|
|
314
|
-
if (eventDataLength > 0) {
|
|
315
|
-
const noStrictValidation = !!ctx.getDeviceConfig?.(ctx.sourceNodeId)?.compat?.disableStrictEntryControlDataValidation;
|
|
316
|
-
eventData = import_safe2.Bytes.from(raw.payload.subarray(offset, offset + eventDataLength));
|
|
317
|
-
switch (dataType) {
|
|
318
|
-
case import_Types.EntryControlDataTypes.Raw:
|
|
319
|
-
if (!noStrictValidation) {
|
|
320
|
-
(0, import_safe.validatePayload)(eventDataLength >= 1 && eventDataLength <= 32);
|
|
321
|
-
}
|
|
322
|
-
break;
|
|
323
|
-
case import_Types.EntryControlDataTypes.ASCII:
|
|
324
|
-
if (!noStrictValidation) {
|
|
325
|
-
(0, import_safe.validatePayload)(eventDataLength === 16 || eventDataLength === 32);
|
|
326
|
-
}
|
|
327
|
-
eventData = eventData.toString("ascii");
|
|
328
|
-
if (!noStrictValidation) {
|
|
329
|
-
(0, import_safe.validatePayload)(/^[\u0000-\u007f]+[\u00ff]*$/.test(eventData));
|
|
330
|
-
}
|
|
331
|
-
eventData = eventData.replace(/[\u00ff]*$/, "");
|
|
332
|
-
break;
|
|
333
|
-
case import_Types.EntryControlDataTypes.MD5:
|
|
334
|
-
if (!noStrictValidation) {
|
|
335
|
-
(0, import_safe.validatePayload)(eventDataLength === 16);
|
|
336
|
-
}
|
|
337
|
-
break;
|
|
338
|
-
}
|
|
339
|
-
} else {
|
|
340
|
-
dataType = import_Types.EntryControlDataTypes.None;
|
|
341
|
-
}
|
|
342
|
-
return new EntryControlCCNotification_1({
|
|
343
|
-
nodeId: ctx.sourceNodeId,
|
|
344
|
-
sequenceNumber,
|
|
345
|
-
dataType,
|
|
346
|
-
eventType,
|
|
347
|
-
eventData
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
sequenceNumber;
|
|
351
|
-
dataType;
|
|
352
|
-
eventType;
|
|
353
|
-
eventData;
|
|
354
|
-
toLogEntry(ctx) {
|
|
355
|
-
const message = {
|
|
356
|
-
"sequence number": this.sequenceNumber,
|
|
357
|
-
"data type": this.dataType,
|
|
358
|
-
"event type": this.eventType
|
|
359
|
-
};
|
|
360
|
-
if (this.eventData) {
|
|
361
|
-
switch (this.eventType) {
|
|
362
|
-
case import_Types.EntryControlEventTypes.CachedKeys:
|
|
363
|
-
case import_Types.EntryControlEventTypes.Enter:
|
|
364
|
-
message["event data"] = "*".repeat(this.eventData.length);
|
|
365
|
-
break;
|
|
366
|
-
default:
|
|
367
|
-
message["event data"] = typeof this.eventData === "string" ? this.eventData : (0, import_safe3.buffer2hex)(this.eventData);
|
|
349
|
+
direction: "inbound"
|
|
350
|
+
});
|
|
368
351
|
}
|
|
369
352
|
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
(0, import_safe.validatePayload)(raw.payload.length >= offset + eventTypeLength);
|
|
435
|
-
const supportedEventTypes = (0, import_safe.parseBitMask)(raw.payload.subarray(offset, offset + eventTypeLength), import_Types.EntryControlEventTypes.Caching);
|
|
436
|
-
offset += eventTypeLength;
|
|
437
|
-
(0, import_safe.validatePayload)(raw.payload.length >= offset + 4);
|
|
438
|
-
const minKeyCacheSize = raw.payload[offset];
|
|
439
|
-
(0, import_safe.validatePayload)(minKeyCacheSize >= 1 && minKeyCacheSize <= 32);
|
|
440
|
-
const maxKeyCacheSize = raw.payload[offset + 1];
|
|
441
|
-
(0, import_safe.validatePayload)(maxKeyCacheSize >= minKeyCacheSize && maxKeyCacheSize <= 32);
|
|
442
|
-
const minKeyCacheTimeout = raw.payload[offset + 2];
|
|
443
|
-
const maxKeyCacheTimeout = raw.payload[offset + 3];
|
|
444
|
-
return new EntryControlCCEventSupportedReport_1({
|
|
445
|
-
nodeId: ctx.sourceNodeId,
|
|
446
|
-
supportedDataTypes,
|
|
447
|
-
supportedEventTypes,
|
|
448
|
-
minKeyCacheSize,
|
|
449
|
-
maxKeyCacheSize,
|
|
450
|
-
minKeyCacheTimeout,
|
|
451
|
-
maxKeyCacheTimeout
|
|
452
|
-
});
|
|
453
|
-
}
|
|
454
|
-
persistValues(ctx) {
|
|
455
|
-
if (!super.persistValues(ctx))
|
|
456
|
-
return false;
|
|
457
|
-
const keyCacheSizeValue = EntryControlCCValues.keyCacheSize;
|
|
458
|
-
this.setMetadata(ctx, keyCacheSizeValue, {
|
|
459
|
-
...keyCacheSizeValue.meta,
|
|
460
|
-
min: this.minKeyCacheSize,
|
|
461
|
-
max: this.maxKeyCacheSize
|
|
462
|
-
});
|
|
463
|
-
const keyCacheTimeoutValue = EntryControlCCValues.keyCacheTimeout;
|
|
464
|
-
this.setMetadata(ctx, keyCacheTimeoutValue, {
|
|
465
|
-
...keyCacheTimeoutValue.meta,
|
|
466
|
-
min: this.minKeyCacheTimeout,
|
|
467
|
-
max: this.maxKeyCacheTimeout
|
|
468
|
-
});
|
|
469
|
-
return true;
|
|
470
|
-
}
|
|
471
|
-
supportedDataTypes;
|
|
472
|
-
supportedEventTypes;
|
|
473
|
-
minKeyCacheSize;
|
|
474
|
-
maxKeyCacheSize;
|
|
475
|
-
minKeyCacheTimeout;
|
|
476
|
-
maxKeyCacheTimeout;
|
|
477
|
-
toLogEntry(ctx) {
|
|
478
|
-
return {
|
|
479
|
-
...super.toLogEntry(ctx),
|
|
480
|
-
message: {
|
|
481
|
-
"supported data types": this.supportedDataTypes.map((dt) => import_Types.EntryControlDataTypes[dt]).toString(),
|
|
482
|
-
"supported event types": this.supportedEventTypes.map((et) => import_Types.EntryControlEventTypes[et]).toString(),
|
|
483
|
-
"min key cache size": this.minKeyCacheSize,
|
|
484
|
-
"max key cache size": this.maxKeyCacheSize,
|
|
485
|
-
"min key cache timeout": this.minKeyCacheTimeout,
|
|
486
|
-
"max key cache timeout": this.maxKeyCacheTimeout
|
|
487
|
-
}
|
|
488
|
-
};
|
|
489
|
-
}
|
|
490
|
-
};
|
|
491
|
-
__decorate([
|
|
492
|
-
(0, import_CommandClassDecorators.ccValue)(EntryControlCCValues.supportedDataTypes)
|
|
493
|
-
], EntryControlCCEventSupportedReport.prototype, "supportedDataTypes", void 0);
|
|
494
|
-
__decorate([
|
|
495
|
-
(0, import_CommandClassDecorators.ccValue)(EntryControlCCValues.supportedEventTypes)
|
|
496
|
-
], EntryControlCCEventSupportedReport.prototype, "supportedEventTypes", void 0);
|
|
497
|
-
EntryControlCCEventSupportedReport = EntryControlCCEventSupportedReport_1 = __decorate([
|
|
498
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.EventSupportedReport)
|
|
499
|
-
], EntryControlCCEventSupportedReport);
|
|
500
|
-
let EntryControlCCEventSupportedGet = class EntryControlCCEventSupportedGet2 extends EntryControlCC {
|
|
501
|
-
};
|
|
502
|
-
EntryControlCCEventSupportedGet = __decorate([
|
|
503
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.EventSupportedGet),
|
|
504
|
-
(0, import_CommandClassDecorators.expectedCCResponse)(EntryControlCCEventSupportedReport)
|
|
505
|
-
], EntryControlCCEventSupportedGet);
|
|
506
|
-
let EntryControlCCConfigurationReport = EntryControlCCConfigurationReport_1 = class EntryControlCCConfigurationReport2 extends EntryControlCC {
|
|
507
|
-
constructor(options) {
|
|
508
|
-
super(options);
|
|
509
|
-
this.keyCacheSize = options.keyCacheSize;
|
|
510
|
-
this.keyCacheTimeout = options.keyCacheTimeout;
|
|
511
|
-
}
|
|
512
|
-
static from(raw, ctx) {
|
|
513
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
514
|
-
const keyCacheSize = raw.payload[0];
|
|
515
|
-
(0, import_safe.validatePayload)(keyCacheSize >= 1 && keyCacheSize <= 32);
|
|
516
|
-
const keyCacheTimeout = raw.payload[1];
|
|
517
|
-
return new EntryControlCCConfigurationReport_1({
|
|
518
|
-
nodeId: ctx.sourceNodeId,
|
|
519
|
-
keyCacheSize,
|
|
520
|
-
keyCacheTimeout
|
|
521
|
-
});
|
|
522
|
-
}
|
|
523
|
-
keyCacheSize;
|
|
524
|
-
keyCacheTimeout;
|
|
525
|
-
toLogEntry(ctx) {
|
|
526
|
-
return {
|
|
527
|
-
...super.toLogEntry(ctx),
|
|
528
|
-
message: {
|
|
529
|
-
"key cache size": this.keyCacheSize,
|
|
530
|
-
"key cache timeout": this.keyCacheTimeout
|
|
353
|
+
};
|
|
354
|
+
return EntryControlCC2 = _classThis;
|
|
355
|
+
})();
|
|
356
|
+
let EntryControlCCNotification = (() => {
|
|
357
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.Notification)];
|
|
358
|
+
let _classDescriptor;
|
|
359
|
+
let _classExtraInitializers = [];
|
|
360
|
+
let _classThis;
|
|
361
|
+
let _classSuper = EntryControlCC;
|
|
362
|
+
var EntryControlCCNotification2 = class extends _classSuper {
|
|
363
|
+
static {
|
|
364
|
+
_classThis = this;
|
|
365
|
+
}
|
|
366
|
+
static {
|
|
367
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
368
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
369
|
+
EntryControlCCNotification2 = _classThis = _classDescriptor.value;
|
|
370
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
371
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
372
|
+
}
|
|
373
|
+
constructor(options) {
|
|
374
|
+
super(options);
|
|
375
|
+
this.sequenceNumber = options.sequenceNumber;
|
|
376
|
+
this.dataType = options.dataType;
|
|
377
|
+
this.eventType = options.eventType;
|
|
378
|
+
this.eventData = options.eventData;
|
|
379
|
+
}
|
|
380
|
+
static from(raw, ctx) {
|
|
381
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 4);
|
|
382
|
+
const sequenceNumber = raw.payload[0];
|
|
383
|
+
let dataType = raw.payload[1] & 3;
|
|
384
|
+
const eventType = raw.payload[2];
|
|
385
|
+
const eventDataLength = raw.payload[3];
|
|
386
|
+
(0, import_safe.validatePayload)(eventDataLength >= 0 && eventDataLength <= 32);
|
|
387
|
+
const offset = 4;
|
|
388
|
+
(0, import_safe.validatePayload)(raw.payload.length >= offset + eventDataLength);
|
|
389
|
+
let eventData;
|
|
390
|
+
if (eventDataLength > 0) {
|
|
391
|
+
const noStrictValidation = !!ctx.getDeviceConfig?.(ctx.sourceNodeId)?.compat?.disableStrictEntryControlDataValidation;
|
|
392
|
+
eventData = import_safe2.Bytes.from(raw.payload.subarray(offset, offset + eventDataLength));
|
|
393
|
+
switch (dataType) {
|
|
394
|
+
case import_Types.EntryControlDataTypes.Raw:
|
|
395
|
+
if (!noStrictValidation) {
|
|
396
|
+
(0, import_safe.validatePayload)(eventDataLength >= 1 && eventDataLength <= 32);
|
|
397
|
+
}
|
|
398
|
+
break;
|
|
399
|
+
case import_Types.EntryControlDataTypes.ASCII:
|
|
400
|
+
if (!noStrictValidation) {
|
|
401
|
+
(0, import_safe.validatePayload)(eventDataLength === 16 || eventDataLength === 32);
|
|
402
|
+
}
|
|
403
|
+
eventData = eventData.toString("ascii");
|
|
404
|
+
if (!noStrictValidation) {
|
|
405
|
+
(0, import_safe.validatePayload)(/^[\u0000-\u007f]+[\u00ff]*$/.test(eventData));
|
|
406
|
+
}
|
|
407
|
+
eventData = eventData.replace(/[\u00ff]*$/, "");
|
|
408
|
+
break;
|
|
409
|
+
case import_Types.EntryControlDataTypes.MD5:
|
|
410
|
+
if (!noStrictValidation) {
|
|
411
|
+
(0, import_safe.validatePayload)(eventDataLength === 16);
|
|
412
|
+
}
|
|
413
|
+
break;
|
|
414
|
+
}
|
|
415
|
+
} else {
|
|
416
|
+
dataType = import_Types.EntryControlDataTypes.None;
|
|
531
417
|
}
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
keyCacheSize;
|
|
560
|
-
keyCacheTimeout;
|
|
561
|
-
serialize(ctx) {
|
|
562
|
-
this.payload = import_safe2.Bytes.from([this.keyCacheSize, this.keyCacheTimeout]);
|
|
563
|
-
return super.serialize(ctx);
|
|
564
|
-
}
|
|
565
|
-
toLogEntry(ctx) {
|
|
566
|
-
return {
|
|
567
|
-
...super.toLogEntry(ctx),
|
|
568
|
-
message: {
|
|
569
|
-
"key cache size": this.keyCacheSize,
|
|
570
|
-
"key cache timeout": this.keyCacheTimeout
|
|
418
|
+
return new this({
|
|
419
|
+
nodeId: ctx.sourceNodeId,
|
|
420
|
+
sequenceNumber,
|
|
421
|
+
dataType,
|
|
422
|
+
eventType,
|
|
423
|
+
eventData
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
sequenceNumber;
|
|
427
|
+
dataType;
|
|
428
|
+
eventType;
|
|
429
|
+
eventData;
|
|
430
|
+
toLogEntry(ctx) {
|
|
431
|
+
const message = {
|
|
432
|
+
"sequence number": this.sequenceNumber,
|
|
433
|
+
"data type": this.dataType,
|
|
434
|
+
"event type": this.eventType
|
|
435
|
+
};
|
|
436
|
+
if (this.eventData) {
|
|
437
|
+
switch (this.eventType) {
|
|
438
|
+
case import_Types.EntryControlEventTypes.CachedKeys:
|
|
439
|
+
case import_Types.EntryControlEventTypes.Enter:
|
|
440
|
+
message["event data"] = "*".repeat(this.eventData.length);
|
|
441
|
+
break;
|
|
442
|
+
default:
|
|
443
|
+
message["event data"] = typeof this.eventData === "string" ? this.eventData : (0, import_safe3.buffer2hex)(this.eventData);
|
|
444
|
+
}
|
|
571
445
|
}
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
446
|
+
return {
|
|
447
|
+
...super.toLogEntry(ctx),
|
|
448
|
+
message
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
};
|
|
452
|
+
return EntryControlCCNotification2 = _classThis;
|
|
453
|
+
})();
|
|
454
|
+
let EntryControlCCKeySupportedReport = (() => {
|
|
455
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.KeySupportedReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedKeys", EntryControlCCValues.supportedKeys)];
|
|
456
|
+
let _classDescriptor;
|
|
457
|
+
let _classExtraInitializers = [];
|
|
458
|
+
let _classThis;
|
|
459
|
+
let _classSuper = EntryControlCC;
|
|
460
|
+
var EntryControlCCKeySupportedReport2 = class extends _classSuper {
|
|
461
|
+
static {
|
|
462
|
+
_classThis = this;
|
|
463
|
+
}
|
|
464
|
+
static {
|
|
465
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
466
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
467
|
+
EntryControlCCKeySupportedReport2 = _classThis = _classDescriptor.value;
|
|
468
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
469
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
470
|
+
}
|
|
471
|
+
constructor(options) {
|
|
472
|
+
super(options);
|
|
473
|
+
this.supportedKeys = options.supportedKeys;
|
|
474
|
+
}
|
|
475
|
+
static from(raw, ctx) {
|
|
476
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
477
|
+
const length = raw.payload[0];
|
|
478
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1 + length);
|
|
479
|
+
const supportedKeys = (0, import_safe.parseBitMask)(raw.payload.subarray(1, 1 + length), 0);
|
|
480
|
+
return new this({
|
|
481
|
+
nodeId: ctx.sourceNodeId,
|
|
482
|
+
supportedKeys
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
supportedKeys;
|
|
486
|
+
toLogEntry(ctx) {
|
|
487
|
+
return {
|
|
488
|
+
...super.toLogEntry(ctx),
|
|
489
|
+
message: { "supported keys": this.supportedKeys.toString() }
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
return EntryControlCCKeySupportedReport2 = _classThis;
|
|
494
|
+
})();
|
|
495
|
+
let EntryControlCCKeySupportedGet = (() => {
|
|
496
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.KeySupportedGet), (0, import_CommandClassDecorators.expectedCCResponse)(EntryControlCCKeySupportedReport)];
|
|
497
|
+
let _classDescriptor;
|
|
498
|
+
let _classExtraInitializers = [];
|
|
499
|
+
let _classThis;
|
|
500
|
+
let _classSuper = EntryControlCC;
|
|
501
|
+
var EntryControlCCKeySupportedGet2 = class extends _classSuper {
|
|
502
|
+
static {
|
|
503
|
+
_classThis = this;
|
|
504
|
+
}
|
|
505
|
+
static {
|
|
506
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
507
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
508
|
+
EntryControlCCKeySupportedGet2 = _classThis = _classDescriptor.value;
|
|
509
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
510
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
511
|
+
}
|
|
512
|
+
};
|
|
513
|
+
return EntryControlCCKeySupportedGet2 = _classThis;
|
|
514
|
+
})();
|
|
515
|
+
let EntryControlCCEventSupportedReport = (() => {
|
|
516
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.EventSupportedReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedDataTypes", EntryControlCCValues.supportedDataTypes), (0, import_CommandClassDecorators.ccValueProperty)("supportedEventTypes", EntryControlCCValues.supportedEventTypes)];
|
|
517
|
+
let _classDescriptor;
|
|
518
|
+
let _classExtraInitializers = [];
|
|
519
|
+
let _classThis;
|
|
520
|
+
let _classSuper = EntryControlCC;
|
|
521
|
+
var EntryControlCCEventSupportedReport2 = class extends _classSuper {
|
|
522
|
+
static {
|
|
523
|
+
_classThis = this;
|
|
524
|
+
}
|
|
525
|
+
static {
|
|
526
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
527
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
528
|
+
EntryControlCCEventSupportedReport2 = _classThis = _classDescriptor.value;
|
|
529
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
530
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
531
|
+
}
|
|
532
|
+
constructor(options) {
|
|
533
|
+
super(options);
|
|
534
|
+
this.supportedDataTypes = options.supportedDataTypes;
|
|
535
|
+
this.supportedEventTypes = options.supportedEventTypes;
|
|
536
|
+
this.minKeyCacheSize = options.minKeyCacheSize;
|
|
537
|
+
this.maxKeyCacheSize = options.maxKeyCacheSize;
|
|
538
|
+
this.minKeyCacheTimeout = options.minKeyCacheTimeout;
|
|
539
|
+
this.maxKeyCacheTimeout = options.maxKeyCacheTimeout;
|
|
540
|
+
}
|
|
541
|
+
static from(raw, ctx) {
|
|
542
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
543
|
+
const dataTypeLength = raw.payload[0] & 3;
|
|
544
|
+
let offset = 1;
|
|
545
|
+
(0, import_safe.validatePayload)(raw.payload.length >= offset + dataTypeLength);
|
|
546
|
+
const supportedDataTypes = (0, import_safe.parseBitMask)(raw.payload.subarray(offset, offset + dataTypeLength), import_Types.EntryControlDataTypes.None);
|
|
547
|
+
offset += dataTypeLength;
|
|
548
|
+
(0, import_safe.validatePayload)(raw.payload.length >= offset + 1);
|
|
549
|
+
const eventTypeLength = raw.payload[offset] & 31;
|
|
550
|
+
offset += 1;
|
|
551
|
+
(0, import_safe.validatePayload)(raw.payload.length >= offset + eventTypeLength);
|
|
552
|
+
const supportedEventTypes = (0, import_safe.parseBitMask)(raw.payload.subarray(offset, offset + eventTypeLength), import_Types.EntryControlEventTypes.Caching);
|
|
553
|
+
offset += eventTypeLength;
|
|
554
|
+
(0, import_safe.validatePayload)(raw.payload.length >= offset + 4);
|
|
555
|
+
const minKeyCacheSize = raw.payload[offset];
|
|
556
|
+
(0, import_safe.validatePayload)(minKeyCacheSize >= 1 && minKeyCacheSize <= 32);
|
|
557
|
+
const maxKeyCacheSize = raw.payload[offset + 1];
|
|
558
|
+
(0, import_safe.validatePayload)(maxKeyCacheSize >= minKeyCacheSize && maxKeyCacheSize <= 32);
|
|
559
|
+
const minKeyCacheTimeout = raw.payload[offset + 2];
|
|
560
|
+
const maxKeyCacheTimeout = raw.payload[offset + 3];
|
|
561
|
+
return new this({
|
|
562
|
+
nodeId: ctx.sourceNodeId,
|
|
563
|
+
supportedDataTypes,
|
|
564
|
+
supportedEventTypes,
|
|
565
|
+
minKeyCacheSize,
|
|
566
|
+
maxKeyCacheSize,
|
|
567
|
+
minKeyCacheTimeout,
|
|
568
|
+
maxKeyCacheTimeout
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
persistValues(ctx) {
|
|
572
|
+
if (!super.persistValues(ctx))
|
|
573
|
+
return false;
|
|
574
|
+
const keyCacheSizeValue = EntryControlCCValues.keyCacheSize;
|
|
575
|
+
this.setMetadata(ctx, keyCacheSizeValue, {
|
|
576
|
+
...keyCacheSizeValue.meta,
|
|
577
|
+
min: this.minKeyCacheSize,
|
|
578
|
+
max: this.maxKeyCacheSize
|
|
579
|
+
});
|
|
580
|
+
const keyCacheTimeoutValue = EntryControlCCValues.keyCacheTimeout;
|
|
581
|
+
this.setMetadata(ctx, keyCacheTimeoutValue, {
|
|
582
|
+
...keyCacheTimeoutValue.meta,
|
|
583
|
+
min: this.minKeyCacheTimeout,
|
|
584
|
+
max: this.maxKeyCacheTimeout
|
|
585
|
+
});
|
|
586
|
+
return true;
|
|
587
|
+
}
|
|
588
|
+
supportedDataTypes;
|
|
589
|
+
supportedEventTypes;
|
|
590
|
+
minKeyCacheSize;
|
|
591
|
+
maxKeyCacheSize;
|
|
592
|
+
minKeyCacheTimeout;
|
|
593
|
+
maxKeyCacheTimeout;
|
|
594
|
+
toLogEntry(ctx) {
|
|
595
|
+
return {
|
|
596
|
+
...super.toLogEntry(ctx),
|
|
597
|
+
message: {
|
|
598
|
+
"supported data types": this.supportedDataTypes.map((dt) => import_Types.EntryControlDataTypes[dt]).toString(),
|
|
599
|
+
"supported event types": this.supportedEventTypes.map((et) => import_Types.EntryControlEventTypes[et]).toString(),
|
|
600
|
+
"min key cache size": this.minKeyCacheSize,
|
|
601
|
+
"max key cache size": this.maxKeyCacheSize,
|
|
602
|
+
"min key cache timeout": this.minKeyCacheTimeout,
|
|
603
|
+
"max key cache timeout": this.maxKeyCacheTimeout
|
|
604
|
+
}
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
};
|
|
608
|
+
return EntryControlCCEventSupportedReport2 = _classThis;
|
|
609
|
+
})();
|
|
610
|
+
let EntryControlCCEventSupportedGet = (() => {
|
|
611
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.EventSupportedGet), (0, import_CommandClassDecorators.expectedCCResponse)(EntryControlCCEventSupportedReport)];
|
|
612
|
+
let _classDescriptor;
|
|
613
|
+
let _classExtraInitializers = [];
|
|
614
|
+
let _classThis;
|
|
615
|
+
let _classSuper = EntryControlCC;
|
|
616
|
+
var EntryControlCCEventSupportedGet2 = class extends _classSuper {
|
|
617
|
+
static {
|
|
618
|
+
_classThis = this;
|
|
619
|
+
}
|
|
620
|
+
static {
|
|
621
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
622
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
623
|
+
EntryControlCCEventSupportedGet2 = _classThis = _classDescriptor.value;
|
|
624
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
625
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
626
|
+
}
|
|
627
|
+
};
|
|
628
|
+
return EntryControlCCEventSupportedGet2 = _classThis;
|
|
629
|
+
})();
|
|
630
|
+
let EntryControlCCConfigurationReport = (() => {
|
|
631
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.ConfigurationReport), (0, import_CommandClassDecorators.ccValueProperty)("keyCacheSize", EntryControlCCValues.keyCacheSize), (0, import_CommandClassDecorators.ccValueProperty)("keyCacheTimeout", EntryControlCCValues.keyCacheTimeout)];
|
|
632
|
+
let _classDescriptor;
|
|
633
|
+
let _classExtraInitializers = [];
|
|
634
|
+
let _classThis;
|
|
635
|
+
let _classSuper = EntryControlCC;
|
|
636
|
+
var EntryControlCCConfigurationReport2 = class extends _classSuper {
|
|
637
|
+
static {
|
|
638
|
+
_classThis = this;
|
|
639
|
+
}
|
|
640
|
+
static {
|
|
641
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
642
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
643
|
+
EntryControlCCConfigurationReport2 = _classThis = _classDescriptor.value;
|
|
644
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
645
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
646
|
+
}
|
|
647
|
+
constructor(options) {
|
|
648
|
+
super(options);
|
|
649
|
+
this.keyCacheSize = options.keyCacheSize;
|
|
650
|
+
this.keyCacheTimeout = options.keyCacheTimeout;
|
|
651
|
+
}
|
|
652
|
+
static from(raw, ctx) {
|
|
653
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
654
|
+
const keyCacheSize = raw.payload[0];
|
|
655
|
+
(0, import_safe.validatePayload)(keyCacheSize >= 1 && keyCacheSize <= 32);
|
|
656
|
+
const keyCacheTimeout = raw.payload[1];
|
|
657
|
+
return new this({
|
|
658
|
+
nodeId: ctx.sourceNodeId,
|
|
659
|
+
keyCacheSize,
|
|
660
|
+
keyCacheTimeout
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
keyCacheSize;
|
|
664
|
+
keyCacheTimeout;
|
|
665
|
+
toLogEntry(ctx) {
|
|
666
|
+
return {
|
|
667
|
+
...super.toLogEntry(ctx),
|
|
668
|
+
message: {
|
|
669
|
+
"key cache size": this.keyCacheSize,
|
|
670
|
+
"key cache timeout": this.keyCacheTimeout
|
|
671
|
+
}
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
};
|
|
675
|
+
return EntryControlCCConfigurationReport2 = _classThis;
|
|
676
|
+
})();
|
|
677
|
+
let EntryControlCCConfigurationGet = (() => {
|
|
678
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.ConfigurationGet), (0, import_CommandClassDecorators.expectedCCResponse)(EntryControlCCConfigurationReport)];
|
|
679
|
+
let _classDescriptor;
|
|
680
|
+
let _classExtraInitializers = [];
|
|
681
|
+
let _classThis;
|
|
682
|
+
let _classSuper = EntryControlCC;
|
|
683
|
+
var EntryControlCCConfigurationGet2 = class extends _classSuper {
|
|
684
|
+
static {
|
|
685
|
+
_classThis = this;
|
|
686
|
+
}
|
|
687
|
+
static {
|
|
688
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
689
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
690
|
+
EntryControlCCConfigurationGet2 = _classThis = _classDescriptor.value;
|
|
691
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
692
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
693
|
+
}
|
|
694
|
+
};
|
|
695
|
+
return EntryControlCCConfigurationGet2 = _classThis;
|
|
696
|
+
})();
|
|
697
|
+
let EntryControlCCConfigurationSet = (() => {
|
|
698
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.EntryControlCommand.ConfigurationSet), (0, import_CommandClassDecorators.useSupervision)()];
|
|
699
|
+
let _classDescriptor;
|
|
700
|
+
let _classExtraInitializers = [];
|
|
701
|
+
let _classThis;
|
|
702
|
+
let _classSuper = EntryControlCC;
|
|
703
|
+
var EntryControlCCConfigurationSet2 = class extends _classSuper {
|
|
704
|
+
static {
|
|
705
|
+
_classThis = this;
|
|
706
|
+
}
|
|
707
|
+
static {
|
|
708
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
709
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
710
|
+
EntryControlCCConfigurationSet2 = _classThis = _classDescriptor.value;
|
|
711
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
712
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
713
|
+
}
|
|
714
|
+
constructor(options) {
|
|
715
|
+
super(options);
|
|
716
|
+
this.keyCacheSize = options.keyCacheSize;
|
|
717
|
+
this.keyCacheTimeout = options.keyCacheTimeout;
|
|
718
|
+
}
|
|
719
|
+
static from(_raw, _ctx) {
|
|
720
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
721
|
+
}
|
|
722
|
+
keyCacheSize;
|
|
723
|
+
keyCacheTimeout;
|
|
724
|
+
serialize(ctx) {
|
|
725
|
+
this.payload = import_safe2.Bytes.from([this.keyCacheSize, this.keyCacheTimeout]);
|
|
726
|
+
return super.serialize(ctx);
|
|
727
|
+
}
|
|
728
|
+
toLogEntry(ctx) {
|
|
729
|
+
return {
|
|
730
|
+
...super.toLogEntry(ctx),
|
|
731
|
+
message: {
|
|
732
|
+
"key cache size": this.keyCacheSize,
|
|
733
|
+
"key cache timeout": this.keyCacheTimeout
|
|
734
|
+
}
|
|
735
|
+
};
|
|
736
|
+
}
|
|
737
|
+
};
|
|
738
|
+
return EntryControlCCConfigurationSet2 = _classThis;
|
|
739
|
+
})();
|
|
579
740
|
// Annotate the CommonJS export names for ESM import in node:
|
|
580
741
|
0 && (module.exports = {
|
|
581
742
|
EntryControlCC,
|