@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
|
@@ -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 AssociationCC_1, AssociationCCSet_1, AssociationCCRemove_1, AssociationCCReport_1, AssociationCCGet_1, AssociationCCSupportedGroupingsReport_1, AssociationCCSpecificGroupReport_1;
|
|
60
92
|
function __assertType(argName, typeName, boundHasError) {
|
|
61
93
|
const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
|
|
62
94
|
if (boundHasError()) {
|
|
@@ -175,525 +207,659 @@ const AssociationCCValues = Object.freeze({
|
|
|
175
207
|
...import_Values.V.dynamicPropertyAndKeyWithName("nodeIds", "nodeIds", (groupId) => groupId, ({ property, propertyKey }) => property === "nodeIds" && typeof propertyKey === "number", void 0, { internal: true })
|
|
176
208
|
})
|
|
177
209
|
});
|
|
178
|
-
let AssociationCCAPI =
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
return true;
|
|
188
|
-
case import_Types.AssociationCommand.SpecificGroupGet:
|
|
189
|
-
case import_Types.AssociationCommand.SpecificGroupReport:
|
|
190
|
-
return this.version >= 2;
|
|
191
|
-
}
|
|
192
|
-
return super.supportsCommand(cmd);
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Returns the number of association groups a node supports.
|
|
196
|
-
* Association groups are consecutive, starting at 1.
|
|
197
|
-
*/
|
|
198
|
-
async getGroupCount() {
|
|
199
|
-
this.assertSupportsCommand(import_Types.AssociationCommand, import_Types.AssociationCommand.SupportedGroupingsGet);
|
|
200
|
-
const cc = new AssociationCCSupportedGroupingsGet({
|
|
201
|
-
nodeId: this.endpoint.nodeId,
|
|
202
|
-
endpointIndex: this.endpoint.index
|
|
203
|
-
});
|
|
204
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
205
|
-
if (response)
|
|
206
|
-
return response.groupCount;
|
|
207
|
-
}
|
|
208
|
-
async reportGroupCount(groupCount) {
|
|
209
|
-
__assertType("groupCount", "number", __assertType__number.bind(void 0, groupCount));
|
|
210
|
-
this.assertSupportsCommand(import_Types.AssociationCommand, import_Types.AssociationCommand.SupportedGroupingsReport);
|
|
211
|
-
const cc = new AssociationCCSupportedGroupingsReport({
|
|
212
|
-
nodeId: this.endpoint.nodeId,
|
|
213
|
-
endpointIndex: this.endpoint.index,
|
|
214
|
-
groupCount
|
|
215
|
-
});
|
|
216
|
-
await this.host.sendCommand(cc, this.commandOptions);
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Returns information about an association group.
|
|
220
|
-
*/
|
|
221
|
-
async getGroup(groupId) {
|
|
222
|
-
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
223
|
-
this.assertSupportsCommand(import_Types.AssociationCommand, import_Types.AssociationCommand.Get);
|
|
224
|
-
const cc = new AssociationCCGet({
|
|
225
|
-
nodeId: this.endpoint.nodeId,
|
|
226
|
-
endpointIndex: this.endpoint.index,
|
|
227
|
-
groupId
|
|
228
|
-
});
|
|
229
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
230
|
-
if (response) {
|
|
231
|
-
return {
|
|
232
|
-
maxNodes: response.maxNodes,
|
|
233
|
-
nodeIds: response.nodeIds
|
|
234
|
-
};
|
|
210
|
+
let AssociationCCAPI = (() => {
|
|
211
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses.Association)];
|
|
212
|
+
let _classDescriptor;
|
|
213
|
+
let _classExtraInitializers = [];
|
|
214
|
+
let _classThis;
|
|
215
|
+
let _classSuper = import_API.PhysicalCCAPI;
|
|
216
|
+
var AssociationCCAPI2 = class extends _classSuper {
|
|
217
|
+
static {
|
|
218
|
+
_classThis = this;
|
|
235
219
|
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
nodeId: this.endpoint.nodeId,
|
|
256
|
-
endpointIndex: this.endpoint.index,
|
|
257
|
-
groupId,
|
|
258
|
-
nodeIds
|
|
259
|
-
});
|
|
260
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* Removes nodes from an association group
|
|
264
|
-
*/
|
|
265
|
-
async removeNodeIds(options) {
|
|
266
|
-
__assertType("options", "AssociationCCRemoveOptions", __assertType__AssociationCCRemoveOptions.bind(void 0, options));
|
|
267
|
-
this.assertSupportsCommand(import_Types.AssociationCommand, import_Types.AssociationCommand.Remove);
|
|
268
|
-
if (!options.groupId) {
|
|
269
|
-
if (this.version === 1) {
|
|
270
|
-
throw new import_safe.ZWaveError(`Node ${this.endpoint.nodeId} only supports AssociationCC V1 which requires the group Id to be set`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
220
|
+
static {
|
|
221
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
222
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
223
|
+
AssociationCCAPI2 = _classThis = _classDescriptor.value;
|
|
224
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
225
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
226
|
+
}
|
|
227
|
+
supportsCommand(cmd) {
|
|
228
|
+
switch (cmd) {
|
|
229
|
+
case import_Types.AssociationCommand.Get:
|
|
230
|
+
case import_Types.AssociationCommand.Set:
|
|
231
|
+
case import_Types.AssociationCommand.Report:
|
|
232
|
+
case import_Types.AssociationCommand.Remove:
|
|
233
|
+
case import_Types.AssociationCommand.SupportedGroupingsGet:
|
|
234
|
+
case import_Types.AssociationCommand.SupportedGroupingsReport:
|
|
235
|
+
return true;
|
|
236
|
+
case import_Types.AssociationCommand.SpecificGroupGet:
|
|
237
|
+
case import_Types.AssociationCommand.SpecificGroupReport:
|
|
238
|
+
return this.version >= 2;
|
|
271
239
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
|
|
240
|
+
return super.supportsCommand(cmd);
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Returns the number of association groups a node supports.
|
|
244
|
+
* Association groups are consecutive, starting at 1.
|
|
245
|
+
*/
|
|
246
|
+
async getGroupCount() {
|
|
247
|
+
this.assertSupportsCommand(import_Types.AssociationCommand, import_Types.AssociationCommand.SupportedGroupingsGet);
|
|
248
|
+
const cc = new AssociationCCSupportedGroupingsGet({
|
|
249
|
+
nodeId: this.endpoint.nodeId,
|
|
250
|
+
endpointIndex: this.endpoint.index
|
|
251
|
+
});
|
|
252
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
253
|
+
if (response)
|
|
254
|
+
return response.groupCount;
|
|
255
|
+
}
|
|
256
|
+
async reportGroupCount(groupCount) {
|
|
257
|
+
__assertType("groupCount", "number", __assertType__number.bind(void 0, groupCount));
|
|
258
|
+
this.assertSupportsCommand(import_Types.AssociationCommand, import_Types.AssociationCommand.SupportedGroupingsReport);
|
|
259
|
+
const cc = new AssociationCCSupportedGroupingsReport({
|
|
260
|
+
nodeId: this.endpoint.nodeId,
|
|
261
|
+
endpointIndex: this.endpoint.index,
|
|
262
|
+
groupCount
|
|
263
|
+
});
|
|
264
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Returns information about an association group.
|
|
268
|
+
*/
|
|
269
|
+
async getGroup(groupId) {
|
|
270
|
+
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
271
|
+
this.assertSupportsCommand(import_Types.AssociationCommand, import_Types.AssociationCommand.Get);
|
|
272
|
+
const cc = new AssociationCCGet({
|
|
273
|
+
nodeId: this.endpoint.nodeId,
|
|
274
|
+
endpointIndex: this.endpoint.index,
|
|
275
|
+
groupId
|
|
276
|
+
});
|
|
277
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
278
|
+
if (response) {
|
|
279
|
+
return {
|
|
280
|
+
maxNodes: response.maxNodes,
|
|
281
|
+
nodeIds: response.nodeIds
|
|
282
|
+
};
|
|
294
283
|
}
|
|
295
284
|
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
nodeId: this.endpoint.nodeId,
|
|
304
|
-
endpointIndex: this.endpoint.index
|
|
305
|
-
});
|
|
306
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
307
|
-
return response?.group;
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* Report the association group that represents the most recently detected button press
|
|
311
|
-
*/
|
|
312
|
-
async reportSpecificGroup(group) {
|
|
313
|
-
__assertType("group", "number", __assertType__number.bind(void 0, group));
|
|
314
|
-
this.assertSupportsCommand(import_Types.AssociationCommand, import_Types.AssociationCommand.SpecificGroupReport);
|
|
315
|
-
const cc = new AssociationCCSpecificGroupReport({
|
|
316
|
-
nodeId: this.endpoint.nodeId,
|
|
317
|
-
endpointIndex: this.endpoint.index,
|
|
318
|
-
group
|
|
319
|
-
});
|
|
320
|
-
await this.host.sendCommand(cc, this.commandOptions);
|
|
321
|
-
}
|
|
322
|
-
};
|
|
323
|
-
AssociationCCAPI = __decorate([
|
|
324
|
-
(0, import_CommandClassDecorators.API)(import_safe.CommandClasses.Association)
|
|
325
|
-
], AssociationCCAPI);
|
|
326
|
-
let AssociationCC = AssociationCC_1 = class AssociationCC2 extends import_CommandClass.CommandClass {
|
|
327
|
-
determineRequiredCCInterviews() {
|
|
328
|
-
return [
|
|
329
|
-
...super.determineRequiredCCInterviews(),
|
|
330
|
-
import_safe.CommandClasses["Z-Wave Plus Info"],
|
|
331
|
-
// We need information about endpoints to correctly configure the lifeline associations
|
|
332
|
-
import_safe.CommandClasses["Multi Channel"]
|
|
333
|
-
];
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* Returns the number of association groups reported by the node/endpoint.
|
|
337
|
-
* This only works AFTER the interview process
|
|
338
|
-
*/
|
|
339
|
-
static getGroupCountCached(ctx, endpoint) {
|
|
340
|
-
return ctx.getValueDB(endpoint.nodeId).getValue(AssociationCCValues.groupCount.endpoint(endpoint.index)) || 0;
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Returns the number of nodes an association group supports.
|
|
344
|
-
* This only works AFTER the interview process
|
|
345
|
-
*/
|
|
346
|
-
static getMaxNodesCached(ctx, endpoint, groupId) {
|
|
347
|
-
return ctx.getValueDB(endpoint.nodeId).getValue(AssociationCCValues.maxNodes(groupId).endpoint(endpoint.index)) ?? ctx.getDeviceConfig?.(endpoint.nodeId)?.getAssociationConfigForEndpoint(endpoint.index, groupId)?.maxNodes ?? 0;
|
|
348
|
-
}
|
|
349
|
-
/**
|
|
350
|
-
* Returns all the destinations of all association groups reported by the node/endpoint.
|
|
351
|
-
* This only works AFTER the interview process
|
|
352
|
-
*/
|
|
353
|
-
static getAllDestinationsCached(ctx, endpoint) {
|
|
354
|
-
const ret = /* @__PURE__ */ new Map();
|
|
355
|
-
const groupCount = this.getGroupCountCached(ctx, endpoint);
|
|
356
|
-
const valueDB = ctx.getValueDB(endpoint.nodeId);
|
|
357
|
-
for (let i = 1; i <= groupCount; i++) {
|
|
358
|
-
const nodes = valueDB.getValue(AssociationCCValues.nodeIds(i).endpoint(endpoint.index)) ?? [];
|
|
359
|
-
ret.set(
|
|
360
|
-
i,
|
|
361
|
-
// Filter out duplicates
|
|
362
|
-
(0, import_arrays.distinct)(nodes).map((nodeId) => ({ nodeId }))
|
|
363
|
-
);
|
|
364
|
-
}
|
|
365
|
-
return ret;
|
|
366
|
-
}
|
|
367
|
-
async interview(ctx) {
|
|
368
|
-
const node = this.getNode(ctx);
|
|
369
|
-
const endpoint = this.getEndpoint(ctx);
|
|
370
|
-
const api = import_API.CCAPI.create(import_safe.CommandClasses.Association, ctx, endpoint).withOptions({
|
|
371
|
-
priority: import_safe.MessagePriority.NodeQuery
|
|
372
|
-
});
|
|
373
|
-
ctx.logNode(node.id, {
|
|
374
|
-
endpoint: this.endpointIndex,
|
|
375
|
-
message: `Interviewing ${this.ccName}...`,
|
|
376
|
-
direction: "none"
|
|
377
|
-
});
|
|
378
|
-
ctx.logNode(node.id, {
|
|
379
|
-
endpoint: this.endpointIndex,
|
|
380
|
-
message: "querying number of association groups...",
|
|
381
|
-
direction: "outbound"
|
|
382
|
-
});
|
|
383
|
-
const groupCount = await api.getGroupCount();
|
|
384
|
-
if (groupCount != void 0) {
|
|
385
|
-
ctx.logNode(node.id, {
|
|
386
|
-
endpoint: this.endpointIndex,
|
|
387
|
-
message: `supports ${groupCount} association groups`,
|
|
388
|
-
direction: "inbound"
|
|
285
|
+
async sendReport(options) {
|
|
286
|
+
__assertType("options", "AssociationCCReportOptions", __assertType__AssociationCCReportOptions.bind(void 0, options));
|
|
287
|
+
this.assertSupportsCommand(import_Types.AssociationCommand, import_Types.AssociationCommand.Report);
|
|
288
|
+
const cc = new AssociationCCReport({
|
|
289
|
+
nodeId: this.endpoint.nodeId,
|
|
290
|
+
endpointIndex: this.endpoint.index,
|
|
291
|
+
...options
|
|
389
292
|
});
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
293
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Adds new nodes to an association group
|
|
297
|
+
*/
|
|
298
|
+
async addNodeIds(groupId, ...nodeIds) {
|
|
299
|
+
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
300
|
+
__assertType("nodeIds", void 0, __assertType__sa__number_ea_2.bind(void 0, nodeIds));
|
|
301
|
+
this.assertSupportsCommand(import_Types.AssociationCommand, import_Types.AssociationCommand.Set);
|
|
302
|
+
const cc = new AssociationCCSet({
|
|
303
|
+
nodeId: this.endpoint.nodeId,
|
|
304
|
+
endpointIndex: this.endpoint.index,
|
|
305
|
+
groupId,
|
|
306
|
+
nodeIds
|
|
395
307
|
});
|
|
396
|
-
return;
|
|
308
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Removes nodes from an association group
|
|
312
|
+
*/
|
|
313
|
+
async removeNodeIds(options) {
|
|
314
|
+
__assertType("options", "AssociationCCRemoveOptions", __assertType__AssociationCCRemoveOptions.bind(void 0, options));
|
|
315
|
+
this.assertSupportsCommand(import_Types.AssociationCommand, import_Types.AssociationCommand.Remove);
|
|
316
|
+
if (!options.groupId) {
|
|
317
|
+
if (this.version === 1) {
|
|
318
|
+
throw new import_safe.ZWaveError(`Node ${this.endpoint.nodeId} only supports AssociationCC V1 which requires the group Id to be set`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
319
|
+
}
|
|
320
|
+
} else if (options.groupId < 0) {
|
|
321
|
+
throw new import_safe.ZWaveError("The group id must be positive!", import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
322
|
+
}
|
|
323
|
+
const cc = new AssociationCCRemove({
|
|
324
|
+
nodeId: this.endpoint.nodeId,
|
|
325
|
+
endpointIndex: this.endpoint.index,
|
|
326
|
+
...options
|
|
327
|
+
});
|
|
328
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Removes nodes from all association groups
|
|
332
|
+
*/
|
|
333
|
+
async removeNodeIdsFromAllGroups(nodeIds) {
|
|
334
|
+
__assertType("nodeIds", void 0, __assertType__sa__number_ea_2.bind(void 0, nodeIds));
|
|
335
|
+
this.assertSupportsCommand(import_Types.AssociationCommand, import_Types.AssociationCommand.Remove);
|
|
336
|
+
if (this.version >= 2) {
|
|
337
|
+
return this.removeNodeIds({ nodeIds, groupId: 0 });
|
|
338
|
+
} else {
|
|
339
|
+
const groupCount = this.tryGetValueDB()?.getValue(AssociationCCValues.groupCount.endpoint(this.endpoint.index)) ?? 0;
|
|
340
|
+
for (let groupId = 1; groupId <= groupCount; groupId++) {
|
|
341
|
+
await this.removeNodeIds({ nodeIds, groupId });
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Request the association group that represents the most recently detected button press
|
|
347
|
+
*/
|
|
348
|
+
async getSpecificGroup() {
|
|
349
|
+
this.assertSupportsCommand(import_Types.AssociationCommand, import_Types.AssociationCommand.SpecificGroupGet);
|
|
350
|
+
const cc = new AssociationCCSpecificGroupGet({
|
|
351
|
+
nodeId: this.endpoint.nodeId,
|
|
352
|
+
endpointIndex: this.endpoint.index
|
|
353
|
+
});
|
|
354
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
355
|
+
return response?.group;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Report the association group that represents the most recently detected button press
|
|
359
|
+
*/
|
|
360
|
+
async reportSpecificGroup(group) {
|
|
361
|
+
__assertType("group", "number", __assertType__number.bind(void 0, group));
|
|
362
|
+
this.assertSupportsCommand(import_Types.AssociationCommand, import_Types.AssociationCommand.SpecificGroupReport);
|
|
363
|
+
const cc = new AssociationCCSpecificGroupReport({
|
|
364
|
+
nodeId: this.endpoint.nodeId,
|
|
365
|
+
endpointIndex: this.endpoint.index,
|
|
366
|
+
group
|
|
367
|
+
});
|
|
368
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
return AssociationCCAPI2 = _classThis;
|
|
372
|
+
})();
|
|
373
|
+
let AssociationCC = (() => {
|
|
374
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses.Association), (0, import_CommandClassDecorators.implementedVersion)(4), (0, import_CommandClassDecorators.ccValues)(AssociationCCValues)];
|
|
375
|
+
let _classDescriptor;
|
|
376
|
+
let _classExtraInitializers = [];
|
|
377
|
+
let _classThis;
|
|
378
|
+
let _classSuper = import_CommandClass.CommandClass;
|
|
379
|
+
var AssociationCC2 = class extends _classSuper {
|
|
380
|
+
static {
|
|
381
|
+
_classThis = this;
|
|
382
|
+
}
|
|
383
|
+
static {
|
|
384
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
385
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
386
|
+
AssociationCC2 = _classThis = _classDescriptor.value;
|
|
387
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
388
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
389
|
+
}
|
|
390
|
+
determineRequiredCCInterviews() {
|
|
391
|
+
return [
|
|
392
|
+
...super.determineRequiredCCInterviews(),
|
|
393
|
+
import_safe.CommandClasses["Z-Wave Plus Info"],
|
|
394
|
+
// We need information about endpoints to correctly configure the lifeline associations
|
|
395
|
+
import_safe.CommandClasses["Multi Channel"]
|
|
396
|
+
];
|
|
397
397
|
}
|
|
398
|
-
|
|
399
|
-
|
|
398
|
+
/**
|
|
399
|
+
* Returns the number of association groups reported by the node/endpoint.
|
|
400
|
+
* This only works AFTER the interview process
|
|
401
|
+
*/
|
|
402
|
+
static getGroupCountCached(ctx, endpoint) {
|
|
403
|
+
return ctx.getValueDB(endpoint.nodeId).getValue(AssociationCCValues.groupCount.endpoint(endpoint.index)) || 0;
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Returns the number of nodes an association group supports.
|
|
407
|
+
* This only works AFTER the interview process
|
|
408
|
+
*/
|
|
409
|
+
static getMaxNodesCached(ctx, endpoint, groupId) {
|
|
410
|
+
return ctx.getValueDB(endpoint.nodeId).getValue(AssociationCCValues.maxNodes(groupId).endpoint(endpoint.index)) ?? ctx.getDeviceConfig?.(endpoint.nodeId)?.getAssociationConfigForEndpoint(endpoint.index, groupId)?.maxNodes ?? 0;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Returns all the destinations of all association groups reported by the node/endpoint.
|
|
414
|
+
* This only works AFTER the interview process
|
|
415
|
+
*/
|
|
416
|
+
static getAllDestinationsCached(ctx, endpoint) {
|
|
417
|
+
const ret = /* @__PURE__ */ new Map();
|
|
418
|
+
const groupCount = this.getGroupCountCached(ctx, endpoint);
|
|
419
|
+
const valueDB = ctx.getValueDB(endpoint.nodeId);
|
|
420
|
+
for (let i = 1; i <= groupCount; i++) {
|
|
421
|
+
const nodes = valueDB.getValue(AssociationCCValues.nodeIds(i).endpoint(endpoint.index)) ?? [];
|
|
422
|
+
ret.set(
|
|
423
|
+
i,
|
|
424
|
+
// Filter out duplicates
|
|
425
|
+
(0, import_arrays.distinct)(nodes).map((nodeId) => ({ nodeId }))
|
|
426
|
+
);
|
|
427
|
+
}
|
|
428
|
+
return ret;
|
|
429
|
+
}
|
|
430
|
+
async interview(ctx) {
|
|
431
|
+
const node = this.getNode(ctx);
|
|
432
|
+
const endpoint = this.getEndpoint(ctx);
|
|
433
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses.Association, ctx, endpoint).withOptions({
|
|
434
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
435
|
+
});
|
|
400
436
|
ctx.logNode(node.id, {
|
|
401
437
|
endpoint: this.endpointIndex,
|
|
402
|
-
message:
|
|
438
|
+
message: `Interviewing ${this.ccName}...`,
|
|
403
439
|
direction: "none"
|
|
404
440
|
});
|
|
405
|
-
this.setInterviewComplete(ctx, true);
|
|
406
|
-
return;
|
|
407
|
-
}
|
|
408
|
-
await ccUtils.configureLifelineAssociations(ctx, endpoint);
|
|
409
|
-
this.setInterviewComplete(ctx, true);
|
|
410
|
-
}
|
|
411
|
-
async refreshValues(ctx) {
|
|
412
|
-
const node = this.getNode(ctx);
|
|
413
|
-
const endpoint = this.getEndpoint(ctx);
|
|
414
|
-
const api = import_API.CCAPI.create(import_safe.CommandClasses.Association, ctx, endpoint).withOptions({
|
|
415
|
-
priority: import_safe.MessagePriority.NodeQuery
|
|
416
|
-
});
|
|
417
|
-
const groupCount = AssociationCC_1.getGroupCountCached(ctx, endpoint);
|
|
418
|
-
for (let groupId = 1; groupId <= groupCount; groupId++) {
|
|
419
441
|
ctx.logNode(node.id, {
|
|
420
442
|
endpoint: this.endpointIndex,
|
|
421
|
-
message:
|
|
443
|
+
message: "querying number of association groups...",
|
|
422
444
|
direction: "outbound"
|
|
423
445
|
});
|
|
424
|
-
const
|
|
425
|
-
if (
|
|
426
|
-
const logMessage = `received information for association group #${groupId}:
|
|
427
|
-
maximum # of nodes: ${group.maxNodes}
|
|
428
|
-
currently assigned nodes: ${group.nodeIds.map(String).join(", ")}`;
|
|
446
|
+
const groupCount = await api.getGroupCount();
|
|
447
|
+
if (groupCount != void 0) {
|
|
429
448
|
ctx.logNode(node.id, {
|
|
430
449
|
endpoint: this.endpointIndex,
|
|
431
|
-
message:
|
|
450
|
+
message: `supports ${groupCount} association groups`,
|
|
432
451
|
direction: "inbound"
|
|
433
452
|
});
|
|
453
|
+
} else {
|
|
454
|
+
ctx.logNode(node.id, {
|
|
455
|
+
endpoint: this.endpointIndex,
|
|
456
|
+
message: "Querying association groups timed out, skipping interview...",
|
|
457
|
+
level: "warn"
|
|
458
|
+
});
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
await this.refreshValues(ctx);
|
|
462
|
+
if (endpoint.supportsCC(import_safe.CommandClasses["Multi Channel Association"])) {
|
|
463
|
+
ctx.logNode(node.id, {
|
|
464
|
+
endpoint: this.endpointIndex,
|
|
465
|
+
message: `${this.constructor.name}: delaying configuration of lifeline associations until after Multi Channel Association interview...`,
|
|
466
|
+
direction: "none"
|
|
467
|
+
});
|
|
468
|
+
this.setInterviewComplete(ctx, true);
|
|
469
|
+
return;
|
|
434
470
|
}
|
|
471
|
+
await ccUtils.configureLifelineAssociations(ctx, endpoint);
|
|
472
|
+
this.setInterviewComplete(ctx, true);
|
|
435
473
|
}
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
let
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
nodeId: ctx.sourceNodeId,
|
|
461
|
-
groupId,
|
|
462
|
-
nodeIds
|
|
463
|
-
});
|
|
464
|
-
}
|
|
465
|
-
groupId;
|
|
466
|
-
nodeIds;
|
|
467
|
-
serialize(ctx) {
|
|
468
|
-
this.payload = import_safe2.Bytes.from([this.groupId, ...this.nodeIds]);
|
|
469
|
-
return super.serialize(ctx);
|
|
470
|
-
}
|
|
471
|
-
toLogEntry(ctx) {
|
|
472
|
-
const message = {
|
|
473
|
-
"group id": this.groupId || "all groups",
|
|
474
|
-
"node ids": this.nodeIds.length ? this.nodeIds.join(", ") : "all nodes"
|
|
475
|
-
};
|
|
476
|
-
return {
|
|
477
|
-
...super.toLogEntry(ctx),
|
|
478
|
-
message
|
|
479
|
-
};
|
|
480
|
-
}
|
|
481
|
-
};
|
|
482
|
-
AssociationCCSet = AssociationCCSet_1 = __decorate([
|
|
483
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.AssociationCommand.Set),
|
|
484
|
-
(0, import_CommandClassDecorators.useSupervision)()
|
|
485
|
-
], AssociationCCSet);
|
|
486
|
-
let AssociationCCRemove = AssociationCCRemove_1 = class AssociationCCRemove2 extends AssociationCC {
|
|
487
|
-
constructor(options) {
|
|
488
|
-
super(options);
|
|
489
|
-
this.groupId = options.groupId;
|
|
490
|
-
this.nodeIds = options.nodeIds;
|
|
491
|
-
}
|
|
492
|
-
static from(raw, ctx) {
|
|
493
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
494
|
-
let groupId;
|
|
495
|
-
if (raw.payload[0] !== 0) {
|
|
496
|
-
groupId = raw.payload[0];
|
|
497
|
-
}
|
|
498
|
-
const nodeIds = [...raw.payload.subarray(1)];
|
|
499
|
-
return new AssociationCCRemove_1({
|
|
500
|
-
nodeId: ctx.sourceNodeId,
|
|
501
|
-
groupId,
|
|
502
|
-
nodeIds
|
|
503
|
-
});
|
|
504
|
-
}
|
|
505
|
-
groupId;
|
|
506
|
-
nodeIds;
|
|
507
|
-
serialize(ctx) {
|
|
508
|
-
this.payload = import_safe2.Bytes.from([
|
|
509
|
-
this.groupId || 0,
|
|
510
|
-
...this.nodeIds || []
|
|
511
|
-
]);
|
|
512
|
-
return super.serialize(ctx);
|
|
513
|
-
}
|
|
514
|
-
toLogEntry(ctx) {
|
|
515
|
-
const message = {
|
|
516
|
-
"group id": this.groupId || "all groups",
|
|
517
|
-
"node ids": this.nodeIds && this.nodeIds.length ? this.nodeIds.join(", ") : "all nodes"
|
|
518
|
-
};
|
|
519
|
-
return {
|
|
520
|
-
...super.toLogEntry(ctx),
|
|
521
|
-
message
|
|
522
|
-
};
|
|
523
|
-
}
|
|
524
|
-
};
|
|
525
|
-
AssociationCCRemove = AssociationCCRemove_1 = __decorate([
|
|
526
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.AssociationCommand.Remove),
|
|
527
|
-
(0, import_CommandClassDecorators.useSupervision)()
|
|
528
|
-
], AssociationCCRemove);
|
|
529
|
-
let AssociationCCReport = AssociationCCReport_1 = class AssociationCCReport2 extends AssociationCC {
|
|
530
|
-
constructor(options) {
|
|
531
|
-
super(options);
|
|
532
|
-
this.groupId = options.groupId;
|
|
533
|
-
this.maxNodes = options.maxNodes;
|
|
534
|
-
this.nodeIds = options.nodeIds;
|
|
535
|
-
this.reportsToFollow = options.reportsToFollow;
|
|
536
|
-
}
|
|
537
|
-
static from(raw, ctx) {
|
|
538
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 3);
|
|
539
|
-
const groupId = raw.payload[0];
|
|
540
|
-
const maxNodes = raw.payload[1];
|
|
541
|
-
const reportsToFollow = raw.payload[2];
|
|
542
|
-
const nodeIds = [...raw.payload.subarray(3)];
|
|
543
|
-
return new AssociationCCReport_1({
|
|
544
|
-
nodeId: ctx.sourceNodeId,
|
|
545
|
-
groupId,
|
|
546
|
-
maxNodes,
|
|
547
|
-
reportsToFollow,
|
|
548
|
-
nodeIds
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
groupId;
|
|
552
|
-
maxNodes;
|
|
553
|
-
nodeIds;
|
|
554
|
-
reportsToFollow;
|
|
555
|
-
getPartialCCSessionId() {
|
|
556
|
-
return { groupId: this.groupId };
|
|
557
|
-
}
|
|
558
|
-
expectMoreMessages() {
|
|
559
|
-
return this.reportsToFollow > 0;
|
|
560
|
-
}
|
|
561
|
-
mergePartialCCs(partials, _ctx) {
|
|
562
|
-
this.nodeIds = [...partials, this].map((report) => report.nodeIds).reduce((prev, cur) => prev.concat(...cur), []);
|
|
563
|
-
}
|
|
564
|
-
serialize(ctx) {
|
|
565
|
-
this.payload = import_safe2.Bytes.from([
|
|
566
|
-
this.groupId,
|
|
567
|
-
this.maxNodes,
|
|
568
|
-
this.reportsToFollow,
|
|
569
|
-
...this.nodeIds
|
|
570
|
-
]);
|
|
571
|
-
return super.serialize(ctx);
|
|
572
|
-
}
|
|
573
|
-
toLogEntry(ctx) {
|
|
574
|
-
return {
|
|
575
|
-
...super.toLogEntry(ctx),
|
|
576
|
-
message: {
|
|
577
|
-
"group id": this.groupId,
|
|
578
|
-
"max # of nodes": this.maxNodes,
|
|
579
|
-
"node IDs": this.nodeIds.join(", "),
|
|
580
|
-
"reports to follow": this.reportsToFollow
|
|
474
|
+
async refreshValues(ctx) {
|
|
475
|
+
const node = this.getNode(ctx);
|
|
476
|
+
const endpoint = this.getEndpoint(ctx);
|
|
477
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses.Association, ctx, endpoint).withOptions({
|
|
478
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
479
|
+
});
|
|
480
|
+
const groupCount = AssociationCC2.getGroupCountCached(ctx, endpoint);
|
|
481
|
+
for (let groupId = 1; groupId <= groupCount; groupId++) {
|
|
482
|
+
ctx.logNode(node.id, {
|
|
483
|
+
endpoint: this.endpointIndex,
|
|
484
|
+
message: `querying association group #${groupId}...`,
|
|
485
|
+
direction: "outbound"
|
|
486
|
+
});
|
|
487
|
+
const group = await api.getGroup(groupId);
|
|
488
|
+
if (group != void 0) {
|
|
489
|
+
const logMessage = `received information for association group #${groupId}:
|
|
490
|
+
maximum # of nodes: ${group.maxNodes}
|
|
491
|
+
currently assigned nodes: ${group.nodeIds.map(String).join(", ")}`;
|
|
492
|
+
ctx.logNode(node.id, {
|
|
493
|
+
endpoint: this.endpointIndex,
|
|
494
|
+
message: logMessage,
|
|
495
|
+
direction: "inbound"
|
|
496
|
+
});
|
|
497
|
+
}
|
|
581
498
|
}
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
(
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
...
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
499
|
+
}
|
|
500
|
+
};
|
|
501
|
+
return AssociationCC2 = _classThis;
|
|
502
|
+
})();
|
|
503
|
+
let AssociationCCSet = (() => {
|
|
504
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.AssociationCommand.Set), (0, import_CommandClassDecorators.useSupervision)()];
|
|
505
|
+
let _classDescriptor;
|
|
506
|
+
let _classExtraInitializers = [];
|
|
507
|
+
let _classThis;
|
|
508
|
+
let _classSuper = AssociationCC;
|
|
509
|
+
var AssociationCCSet2 = class extends _classSuper {
|
|
510
|
+
static {
|
|
511
|
+
_classThis = this;
|
|
512
|
+
}
|
|
513
|
+
static {
|
|
514
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
515
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
516
|
+
AssociationCCSet2 = _classThis = _classDescriptor.value;
|
|
517
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
518
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
519
|
+
}
|
|
520
|
+
constructor(options) {
|
|
521
|
+
super(options);
|
|
522
|
+
if (options.groupId < 1) {
|
|
523
|
+
throw new import_safe.ZWaveError("The group id must be positive!", import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
524
|
+
}
|
|
525
|
+
if (options.nodeIds.some((n) => n < 1 || n > import_safe.MAX_NODES)) {
|
|
526
|
+
throw new import_safe.ZWaveError(`All node IDs must be between 1 and ${import_safe.MAX_NODES}!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
527
|
+
}
|
|
528
|
+
this.groupId = options.groupId;
|
|
529
|
+
this.nodeIds = options.nodeIds;
|
|
530
|
+
}
|
|
531
|
+
static from(raw, ctx) {
|
|
532
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
533
|
+
const groupId = raw.payload[0];
|
|
534
|
+
const nodeIds = [...raw.payload.subarray(1)];
|
|
535
|
+
return new this({
|
|
536
|
+
nodeId: ctx.sourceNodeId,
|
|
537
|
+
groupId,
|
|
538
|
+
nodeIds
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
groupId;
|
|
542
|
+
nodeIds;
|
|
543
|
+
serialize(ctx) {
|
|
544
|
+
this.payload = import_safe2.Bytes.from([this.groupId, ...this.nodeIds]);
|
|
545
|
+
return super.serialize(ctx);
|
|
546
|
+
}
|
|
547
|
+
toLogEntry(ctx) {
|
|
548
|
+
const message = {
|
|
549
|
+
"group id": this.groupId || "all groups",
|
|
550
|
+
"node ids": this.nodeIds.length ? this.nodeIds.join(", ") : "all nodes"
|
|
551
|
+
};
|
|
552
|
+
return {
|
|
553
|
+
...super.toLogEntry(ctx),
|
|
554
|
+
message
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
};
|
|
558
|
+
return AssociationCCSet2 = _classThis;
|
|
559
|
+
})();
|
|
560
|
+
let AssociationCCRemove = (() => {
|
|
561
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.AssociationCommand.Remove), (0, import_CommandClassDecorators.useSupervision)()];
|
|
562
|
+
let _classDescriptor;
|
|
563
|
+
let _classExtraInitializers = [];
|
|
564
|
+
let _classThis;
|
|
565
|
+
let _classSuper = AssociationCC;
|
|
566
|
+
var AssociationCCRemove2 = class extends _classSuper {
|
|
567
|
+
static {
|
|
568
|
+
_classThis = this;
|
|
569
|
+
}
|
|
570
|
+
static {
|
|
571
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
572
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
573
|
+
AssociationCCRemove2 = _classThis = _classDescriptor.value;
|
|
574
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
575
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
576
|
+
}
|
|
577
|
+
constructor(options) {
|
|
578
|
+
super(options);
|
|
579
|
+
this.groupId = options.groupId;
|
|
580
|
+
this.nodeIds = options.nodeIds;
|
|
581
|
+
}
|
|
582
|
+
static from(raw, ctx) {
|
|
583
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
584
|
+
let groupId;
|
|
585
|
+
if (raw.payload[0] !== 0) {
|
|
586
|
+
groupId = raw.payload[0];
|
|
587
|
+
}
|
|
588
|
+
const nodeIds = [...raw.payload.subarray(1)];
|
|
589
|
+
return new this({
|
|
590
|
+
nodeId: ctx.sourceNodeId,
|
|
591
|
+
groupId,
|
|
592
|
+
nodeIds
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
groupId;
|
|
596
|
+
nodeIds;
|
|
597
|
+
serialize(ctx) {
|
|
598
|
+
this.payload = import_safe2.Bytes.from([
|
|
599
|
+
this.groupId || 0,
|
|
600
|
+
...this.nodeIds || []
|
|
601
|
+
]);
|
|
602
|
+
return super.serialize(ctx);
|
|
603
|
+
}
|
|
604
|
+
toLogEntry(ctx) {
|
|
605
|
+
const message = {
|
|
606
|
+
"group id": this.groupId || "all groups",
|
|
607
|
+
"node ids": this.nodeIds && this.nodeIds.length ? this.nodeIds.join(", ") : "all nodes"
|
|
608
|
+
};
|
|
609
|
+
return {
|
|
610
|
+
...super.toLogEntry(ctx),
|
|
611
|
+
message
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
};
|
|
615
|
+
return AssociationCCRemove2 = _classThis;
|
|
616
|
+
})();
|
|
617
|
+
let AssociationCCReport = (() => {
|
|
618
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.AssociationCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("maxNodes", AssociationCCValues.maxNodes, (self) => [self.groupId]), (0, import_CommandClassDecorators.ccValueProperty)("nodeIds", AssociationCCValues.nodeIds, (self) => [self.groupId])];
|
|
619
|
+
let _classDescriptor;
|
|
620
|
+
let _classExtraInitializers = [];
|
|
621
|
+
let _classThis;
|
|
622
|
+
let _classSuper = AssociationCC;
|
|
623
|
+
var AssociationCCReport2 = class extends _classSuper {
|
|
624
|
+
static {
|
|
625
|
+
_classThis = this;
|
|
626
|
+
}
|
|
627
|
+
static {
|
|
628
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
629
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
630
|
+
AssociationCCReport2 = _classThis = _classDescriptor.value;
|
|
631
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
632
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
633
|
+
}
|
|
634
|
+
constructor(options) {
|
|
635
|
+
super(options);
|
|
636
|
+
this.groupId = options.groupId;
|
|
637
|
+
this.maxNodes = options.maxNodes;
|
|
638
|
+
this.nodeIds = options.nodeIds;
|
|
639
|
+
this.reportsToFollow = options.reportsToFollow;
|
|
640
|
+
}
|
|
641
|
+
static from(raw, ctx) {
|
|
642
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 3);
|
|
643
|
+
const groupId = raw.payload[0];
|
|
644
|
+
const maxNodes = raw.payload[1];
|
|
645
|
+
const reportsToFollow = raw.payload[2];
|
|
646
|
+
const nodeIds = [...raw.payload.subarray(3)];
|
|
647
|
+
return new this({
|
|
648
|
+
nodeId: ctx.sourceNodeId,
|
|
649
|
+
groupId,
|
|
650
|
+
maxNodes,
|
|
651
|
+
reportsToFollow,
|
|
652
|
+
nodeIds
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
groupId;
|
|
656
|
+
maxNodes;
|
|
657
|
+
nodeIds;
|
|
658
|
+
reportsToFollow;
|
|
659
|
+
getPartialCCSessionId() {
|
|
660
|
+
return { groupId: this.groupId };
|
|
661
|
+
}
|
|
662
|
+
expectMoreMessages() {
|
|
663
|
+
return this.reportsToFollow > 0;
|
|
664
|
+
}
|
|
665
|
+
mergePartialCCs(partials, _ctx) {
|
|
666
|
+
this.nodeIds = [...partials, this].map((report) => report.nodeIds).reduce((prev, cur) => prev.concat(...cur), []);
|
|
667
|
+
}
|
|
668
|
+
serialize(ctx) {
|
|
669
|
+
this.payload = import_safe2.Bytes.from([
|
|
670
|
+
this.groupId,
|
|
671
|
+
this.maxNodes,
|
|
672
|
+
this.reportsToFollow,
|
|
673
|
+
...this.nodeIds
|
|
674
|
+
]);
|
|
675
|
+
return super.serialize(ctx);
|
|
676
|
+
}
|
|
677
|
+
toLogEntry(ctx) {
|
|
678
|
+
return {
|
|
679
|
+
...super.toLogEntry(ctx),
|
|
680
|
+
message: {
|
|
681
|
+
"group id": this.groupId,
|
|
682
|
+
"max # of nodes": this.maxNodes,
|
|
683
|
+
"node IDs": this.nodeIds.join(", "),
|
|
684
|
+
"reports to follow": this.reportsToFollow
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
}
|
|
688
|
+
};
|
|
689
|
+
return AssociationCCReport2 = _classThis;
|
|
690
|
+
})();
|
|
691
|
+
let AssociationCCGet = (() => {
|
|
692
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.AssociationCommand.Get), (0, import_CommandClassDecorators.expectedCCResponse)(AssociationCCReport)];
|
|
693
|
+
let _classDescriptor;
|
|
694
|
+
let _classExtraInitializers = [];
|
|
695
|
+
let _classThis;
|
|
696
|
+
let _classSuper = AssociationCC;
|
|
697
|
+
var AssociationCCGet2 = class extends _classSuper {
|
|
698
|
+
static {
|
|
699
|
+
_classThis = this;
|
|
700
|
+
}
|
|
701
|
+
static {
|
|
702
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
703
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
704
|
+
AssociationCCGet2 = _classThis = _classDescriptor.value;
|
|
705
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
706
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
707
|
+
}
|
|
708
|
+
constructor(options) {
|
|
709
|
+
super(options);
|
|
710
|
+
if (options.groupId < 1) {
|
|
711
|
+
throw new import_safe.ZWaveError("The group id must be positive!", import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
712
|
+
}
|
|
713
|
+
this.groupId = options.groupId;
|
|
714
|
+
}
|
|
715
|
+
static from(raw, ctx) {
|
|
716
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
717
|
+
const groupId = raw.payload[0];
|
|
718
|
+
return new this({
|
|
719
|
+
nodeId: ctx.sourceNodeId,
|
|
720
|
+
groupId
|
|
721
|
+
});
|
|
722
|
+
}
|
|
723
|
+
groupId;
|
|
724
|
+
serialize(ctx) {
|
|
725
|
+
this.payload = import_safe2.Bytes.from([this.groupId]);
|
|
726
|
+
return super.serialize(ctx);
|
|
727
|
+
}
|
|
728
|
+
toLogEntry(ctx) {
|
|
729
|
+
return {
|
|
730
|
+
...super.toLogEntry(ctx),
|
|
731
|
+
message: { "group id": this.groupId }
|
|
732
|
+
};
|
|
733
|
+
}
|
|
734
|
+
};
|
|
735
|
+
return AssociationCCGet2 = _classThis;
|
|
736
|
+
})();
|
|
737
|
+
let AssociationCCSupportedGroupingsReport = (() => {
|
|
738
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.AssociationCommand.SupportedGroupingsReport), (0, import_CommandClassDecorators.ccValueProperty)("groupCount", AssociationCCValues.groupCount)];
|
|
739
|
+
let _classDescriptor;
|
|
740
|
+
let _classExtraInitializers = [];
|
|
741
|
+
let _classThis;
|
|
742
|
+
let _classSuper = AssociationCC;
|
|
743
|
+
var AssociationCCSupportedGroupingsReport2 = class extends _classSuper {
|
|
744
|
+
static {
|
|
745
|
+
_classThis = this;
|
|
746
|
+
}
|
|
747
|
+
static {
|
|
748
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
749
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
750
|
+
AssociationCCSupportedGroupingsReport2 = _classThis = _classDescriptor.value;
|
|
751
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
752
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
753
|
+
}
|
|
754
|
+
constructor(options) {
|
|
755
|
+
super(options);
|
|
756
|
+
this.groupCount = options.groupCount;
|
|
757
|
+
}
|
|
758
|
+
static from(raw, ctx) {
|
|
759
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
760
|
+
const groupCount = raw.payload[0];
|
|
761
|
+
return new this({
|
|
762
|
+
nodeId: ctx.sourceNodeId,
|
|
763
|
+
groupCount
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
groupCount;
|
|
767
|
+
serialize(ctx) {
|
|
768
|
+
this.payload = import_safe2.Bytes.from([this.groupCount]);
|
|
769
|
+
return super.serialize(ctx);
|
|
770
|
+
}
|
|
771
|
+
toLogEntry(ctx) {
|
|
772
|
+
return {
|
|
773
|
+
...super.toLogEntry(ctx),
|
|
774
|
+
message: { "group count": this.groupCount }
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
};
|
|
778
|
+
return AssociationCCSupportedGroupingsReport2 = _classThis;
|
|
779
|
+
})();
|
|
780
|
+
let AssociationCCSupportedGroupingsGet = (() => {
|
|
781
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.AssociationCommand.SupportedGroupingsGet), (0, import_CommandClassDecorators.expectedCCResponse)(AssociationCCSupportedGroupingsReport)];
|
|
782
|
+
let _classDescriptor;
|
|
783
|
+
let _classExtraInitializers = [];
|
|
784
|
+
let _classThis;
|
|
785
|
+
let _classSuper = AssociationCC;
|
|
786
|
+
var AssociationCCSupportedGroupingsGet2 = class extends _classSuper {
|
|
787
|
+
static {
|
|
788
|
+
_classThis = this;
|
|
789
|
+
}
|
|
790
|
+
static {
|
|
791
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
792
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
793
|
+
AssociationCCSupportedGroupingsGet2 = _classThis = _classDescriptor.value;
|
|
794
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
795
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
796
|
+
}
|
|
797
|
+
};
|
|
798
|
+
return AssociationCCSupportedGroupingsGet2 = _classThis;
|
|
799
|
+
})();
|
|
800
|
+
let AssociationCCSpecificGroupReport = (() => {
|
|
801
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.AssociationCommand.SpecificGroupReport)];
|
|
802
|
+
let _classDescriptor;
|
|
803
|
+
let _classExtraInitializers = [];
|
|
804
|
+
let _classThis;
|
|
805
|
+
let _classSuper = AssociationCC;
|
|
806
|
+
var AssociationCCSpecificGroupReport2 = class extends _classSuper {
|
|
807
|
+
static {
|
|
808
|
+
_classThis = this;
|
|
809
|
+
}
|
|
810
|
+
static {
|
|
811
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
812
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
813
|
+
AssociationCCSpecificGroupReport2 = _classThis = _classDescriptor.value;
|
|
814
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
815
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
816
|
+
}
|
|
817
|
+
constructor(options) {
|
|
818
|
+
super(options);
|
|
819
|
+
this.group = options.group;
|
|
820
|
+
}
|
|
821
|
+
static from(raw, ctx) {
|
|
822
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
823
|
+
const group = raw.payload[0];
|
|
824
|
+
return new this({
|
|
825
|
+
nodeId: ctx.sourceNodeId,
|
|
826
|
+
group
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
group;
|
|
830
|
+
serialize(ctx) {
|
|
831
|
+
this.payload = import_safe2.Bytes.from([this.group]);
|
|
832
|
+
return super.serialize(ctx);
|
|
833
|
+
}
|
|
834
|
+
toLogEntry(ctx) {
|
|
835
|
+
return {
|
|
836
|
+
...super.toLogEntry(ctx),
|
|
837
|
+
message: { group: this.group }
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
};
|
|
841
|
+
return AssociationCCSpecificGroupReport2 = _classThis;
|
|
842
|
+
})();
|
|
843
|
+
let AssociationCCSpecificGroupGet = (() => {
|
|
844
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.AssociationCommand.SpecificGroupGet), (0, import_CommandClassDecorators.expectedCCResponse)(AssociationCCSpecificGroupReport)];
|
|
845
|
+
let _classDescriptor;
|
|
846
|
+
let _classExtraInitializers = [];
|
|
847
|
+
let _classThis;
|
|
848
|
+
let _classSuper = AssociationCC;
|
|
849
|
+
var AssociationCCSpecificGroupGet2 = class extends _classSuper {
|
|
850
|
+
static {
|
|
851
|
+
_classThis = this;
|
|
852
|
+
}
|
|
853
|
+
static {
|
|
854
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
855
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
856
|
+
AssociationCCSpecificGroupGet2 = _classThis = _classDescriptor.value;
|
|
857
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
858
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
859
|
+
}
|
|
860
|
+
};
|
|
861
|
+
return AssociationCCSpecificGroupGet2 = _classThis;
|
|
862
|
+
})();
|
|
697
863
|
// Annotate the CommonJS export names for ESM import in node:
|
|
698
864
|
0 && (module.exports = {
|
|
699
865
|
AssociationCC,
|