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