@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 MultiChannelAssociationCCSet_1, MultiChannelAssociationCCRemove_1, MultiChannelAssociationCCReport_1, MultiChannelAssociationCCGet_1, MultiChannelAssociationCCSupportedGroupingsReport_1;
|
|
8
35
|
function __assertType(argName, typeName, boundHasError) {
|
|
9
36
|
const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
|
|
10
37
|
if (boundHasError()) {
|
|
@@ -335,7 +362,7 @@ import { Bytes } from "@zwave-js/shared/safe";
|
|
|
335
362
|
import { pick } from "@zwave-js/shared/safe";
|
|
336
363
|
import { CCAPI, PhysicalCCAPI } from "../lib/API.js";
|
|
337
364
|
import { CommandClass, } from "../lib/CommandClass.js";
|
|
338
|
-
import { API, CCCommand,
|
|
365
|
+
import { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from "../lib/CommandClassDecorators.js";
|
|
339
366
|
import { V } from "../lib/Values.js";
|
|
340
367
|
import { MultiChannelAssociationCommand, } from "../lib/_Types.js";
|
|
341
368
|
import * as ccUtils from "../lib/utils.js";
|
|
@@ -423,559 +450,645 @@ function deserializeMultiChannelAssociationDestination(data) {
|
|
|
423
450
|
return { nodeIds, endpoints };
|
|
424
451
|
}
|
|
425
452
|
// @noSetValueAPI
|
|
426
|
-
let MultiChannelAssociationCCAPI =
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
return response?.groupCount;
|
|
451
|
-
}
|
|
452
|
-
async reportGroupCount(groupCount) {
|
|
453
|
-
__assertType("groupCount", "number", __assertType__number.bind(void 0, groupCount));
|
|
454
|
-
this.assertSupportsCommand(MultiChannelAssociationCommand, MultiChannelAssociationCommand.SupportedGroupingsReport);
|
|
455
|
-
const cc = new MultiChannelAssociationCCSupportedGroupingsReport({
|
|
456
|
-
nodeId: this.endpoint.nodeId,
|
|
457
|
-
endpointIndex: this.endpoint.index,
|
|
458
|
-
groupCount,
|
|
459
|
-
});
|
|
460
|
-
await this.host.sendCommand(cc, this.commandOptions);
|
|
461
|
-
}
|
|
462
|
-
/**
|
|
463
|
-
* Returns information about an association group.
|
|
464
|
-
*/
|
|
465
|
-
async getGroup(groupId) {
|
|
466
|
-
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
467
|
-
this.assertSupportsCommand(MultiChannelAssociationCommand, MultiChannelAssociationCommand.Get);
|
|
468
|
-
const cc = new MultiChannelAssociationCCGet({
|
|
469
|
-
nodeId: this.endpoint.nodeId,
|
|
470
|
-
endpointIndex: this.endpoint.index,
|
|
471
|
-
groupId,
|
|
472
|
-
});
|
|
473
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
474
|
-
if (response) {
|
|
475
|
-
return pick(response, ["maxNodes", "nodeIds", "endpoints"]);
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
async sendReport(options) {
|
|
479
|
-
__assertType("options", "MultiChannelAssociationCCReportOptions", __assertType__MultiChannelAssociationCCReportOptions.bind(void 0, options));
|
|
480
|
-
this.assertSupportsCommand(MultiChannelAssociationCommand, MultiChannelAssociationCommand.Report);
|
|
481
|
-
const cc = new MultiChannelAssociationCCReport({
|
|
482
|
-
nodeId: this.endpoint.nodeId,
|
|
483
|
-
endpointIndex: this.endpoint.index,
|
|
484
|
-
...options,
|
|
485
|
-
});
|
|
486
|
-
await this.host.sendCommand(cc, this.commandOptions);
|
|
487
|
-
}
|
|
488
|
-
/**
|
|
489
|
-
* Adds new nodes or endpoints to an association group
|
|
490
|
-
*/
|
|
491
|
-
async addDestinations(options) {
|
|
492
|
-
__assertType("options", "MultiChannelAssociationCCSetOptions", __assertType__MultiChannelAssociationCCSetOptions.bind(void 0, options));
|
|
493
|
-
this.assertSupportsCommand(MultiChannelAssociationCommand, MultiChannelAssociationCommand.Set);
|
|
494
|
-
const cc = new MultiChannelAssociationCCSet({
|
|
495
|
-
nodeId: this.endpoint.nodeId,
|
|
496
|
-
endpointIndex: this.endpoint.index,
|
|
497
|
-
...options,
|
|
498
|
-
});
|
|
499
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
500
|
-
}
|
|
501
|
-
/**
|
|
502
|
-
* Removes nodes or endpoints from an association group
|
|
503
|
-
*/
|
|
504
|
-
async removeDestinations(options) {
|
|
505
|
-
__assertType("options", "MultiChannelAssociationCCRemoveOptions", __assertType__MultiChannelAssociationCCRemoveOptions.bind(void 0, options));
|
|
506
|
-
this.assertSupportsCommand(MultiChannelAssociationCommand, MultiChannelAssociationCommand.Remove);
|
|
507
|
-
if (!options.groupId && this.version === 1) {
|
|
508
|
-
// V1 does not support omitting the group, manually remove the destination from all groups
|
|
509
|
-
// We don't want to do too much work, so find out which groups the destination is in
|
|
510
|
-
const currentDestinations = MultiChannelAssociationCC
|
|
511
|
-
.getAllDestinationsCached(this.host, this.endpoint);
|
|
512
|
-
for (const [group, destinations] of currentDestinations) {
|
|
513
|
-
const cc = new MultiChannelAssociationCCRemove({
|
|
514
|
-
nodeId: this.endpoint.nodeId,
|
|
515
|
-
endpointIndex: this.endpoint.index,
|
|
516
|
-
groupId: group,
|
|
517
|
-
nodeIds: destinations
|
|
518
|
-
.filter((d) => d.endpoint != undefined)
|
|
519
|
-
.map((d) => d.nodeId),
|
|
520
|
-
endpoints: destinations.filter((d) => d.endpoint != undefined),
|
|
521
|
-
});
|
|
522
|
-
// TODO: evaluate intermediate supervision results
|
|
523
|
-
await this.host.sendCommand(cc, this.commandOptions);
|
|
453
|
+
let MultiChannelAssociationCCAPI = (() => {
|
|
454
|
+
let _classDecorators = [API(CommandClasses["Multi Channel Association"])];
|
|
455
|
+
let _classDescriptor;
|
|
456
|
+
let _classExtraInitializers = [];
|
|
457
|
+
let _classThis;
|
|
458
|
+
let _classSuper = PhysicalCCAPI;
|
|
459
|
+
var MultiChannelAssociationCCAPI = class extends _classSuper {
|
|
460
|
+
static { _classThis = this; }
|
|
461
|
+
static {
|
|
462
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
463
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
464
|
+
MultiChannelAssociationCCAPI = _classThis = _classDescriptor.value;
|
|
465
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
466
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
467
|
+
}
|
|
468
|
+
supportsCommand(cmd) {
|
|
469
|
+
switch (cmd) {
|
|
470
|
+
case MultiChannelAssociationCommand.Get:
|
|
471
|
+
case MultiChannelAssociationCommand.Set:
|
|
472
|
+
case MultiChannelAssociationCommand.Report:
|
|
473
|
+
case MultiChannelAssociationCommand.Remove:
|
|
474
|
+
case MultiChannelAssociationCommand.SupportedGroupingsGet:
|
|
475
|
+
case MultiChannelAssociationCommand.SupportedGroupingsReport:
|
|
476
|
+
return true; // This is mandatory
|
|
524
477
|
}
|
|
478
|
+
return super.supportsCommand(cmd);
|
|
525
479
|
}
|
|
526
|
-
|
|
527
|
-
|
|
480
|
+
/**
|
|
481
|
+
* Returns the number of association groups a node supports.
|
|
482
|
+
* Association groups are consecutive, starting at 1.
|
|
483
|
+
*/
|
|
484
|
+
async getGroupCount() {
|
|
485
|
+
this.assertSupportsCommand(MultiChannelAssociationCommand, MultiChannelAssociationCommand.SupportedGroupingsGet);
|
|
486
|
+
const cc = new MultiChannelAssociationCCSupportedGroupingsGet({
|
|
487
|
+
nodeId: this.endpoint.nodeId,
|
|
488
|
+
endpointIndex: this.endpoint.index,
|
|
489
|
+
});
|
|
490
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
491
|
+
return response?.groupCount;
|
|
528
492
|
}
|
|
529
|
-
|
|
530
|
-
|
|
493
|
+
async reportGroupCount(groupCount) {
|
|
494
|
+
__assertType("groupCount", "number", __assertType__number.bind(void 0, groupCount));
|
|
495
|
+
this.assertSupportsCommand(MultiChannelAssociationCommand, MultiChannelAssociationCommand.SupportedGroupingsReport);
|
|
496
|
+
const cc = new MultiChannelAssociationCCSupportedGroupingsReport({
|
|
497
|
+
nodeId: this.endpoint.nodeId,
|
|
498
|
+
endpointIndex: this.endpoint.index,
|
|
499
|
+
groupCount,
|
|
500
|
+
});
|
|
501
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Returns information about an association group.
|
|
505
|
+
*/
|
|
506
|
+
async getGroup(groupId) {
|
|
507
|
+
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
508
|
+
this.assertSupportsCommand(MultiChannelAssociationCommand, MultiChannelAssociationCommand.Get);
|
|
509
|
+
const cc = new MultiChannelAssociationCCGet({
|
|
510
|
+
nodeId: this.endpoint.nodeId,
|
|
511
|
+
endpointIndex: this.endpoint.index,
|
|
512
|
+
groupId,
|
|
513
|
+
});
|
|
514
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
515
|
+
if (response) {
|
|
516
|
+
return pick(response, ["maxNodes", "nodeIds", "endpoints"]);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
async sendReport(options) {
|
|
520
|
+
__assertType("options", "MultiChannelAssociationCCReportOptions", __assertType__MultiChannelAssociationCCReportOptions.bind(void 0, options));
|
|
521
|
+
this.assertSupportsCommand(MultiChannelAssociationCommand, MultiChannelAssociationCommand.Report);
|
|
522
|
+
const cc = new MultiChannelAssociationCCReport({
|
|
523
|
+
nodeId: this.endpoint.nodeId,
|
|
524
|
+
endpointIndex: this.endpoint.index,
|
|
525
|
+
...options,
|
|
526
|
+
});
|
|
527
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Adds new nodes or endpoints to an association group
|
|
531
|
+
*/
|
|
532
|
+
async addDestinations(options) {
|
|
533
|
+
__assertType("options", "MultiChannelAssociationCCSetOptions", __assertType__MultiChannelAssociationCCSetOptions.bind(void 0, options));
|
|
534
|
+
this.assertSupportsCommand(MultiChannelAssociationCommand, MultiChannelAssociationCommand.Set);
|
|
535
|
+
const cc = new MultiChannelAssociationCCSet({
|
|
531
536
|
nodeId: this.endpoint.nodeId,
|
|
532
537
|
endpointIndex: this.endpoint.index,
|
|
533
538
|
...options,
|
|
534
539
|
});
|
|
535
540
|
return this.host.sendCommand(cc, this.commandOptions);
|
|
536
541
|
}
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
* This only works AFTER the interview process
|
|
558
|
-
*/
|
|
559
|
-
static getGroupCountCached(ctx, endpoint) {
|
|
560
|
-
return ctx
|
|
561
|
-
.getValueDB(endpoint.nodeId)
|
|
562
|
-
.getValue(MultiChannelAssociationCCValues.groupCount.endpoint(endpoint.index)) || 0;
|
|
563
|
-
}
|
|
564
|
-
/**
|
|
565
|
-
* Returns the number of nodes an association group supports.
|
|
566
|
-
* This only works AFTER the interview process
|
|
567
|
-
*/
|
|
568
|
-
static getMaxNodesCached(ctx, endpoint, groupId) {
|
|
569
|
-
return ctx
|
|
570
|
-
.getValueDB(endpoint.nodeId)
|
|
571
|
-
.getValue(MultiChannelAssociationCCValues.maxNodes(groupId).endpoint(endpoint.index)) ?? 0;
|
|
572
|
-
}
|
|
573
|
-
/**
|
|
574
|
-
* Returns all the destinations of all association groups reported by the node/endpoint.
|
|
575
|
-
* This only works AFTER the interview process
|
|
576
|
-
*/
|
|
577
|
-
static getAllDestinationsCached(ctx, endpoint) {
|
|
578
|
-
const ret = new Map();
|
|
579
|
-
const groupCount = this.getGroupCountCached(ctx, endpoint);
|
|
580
|
-
const valueDB = ctx.getValueDB(endpoint.nodeId);
|
|
581
|
-
for (let i = 1; i <= groupCount; i++) {
|
|
582
|
-
const groupDestinations = [];
|
|
583
|
-
// Add all node destinations
|
|
584
|
-
const nodes = valueDB.getValue(MultiChannelAssociationCCValues.nodeIds(i).endpoint(endpoint.index)) ?? [];
|
|
585
|
-
groupDestinations.push(...nodes.map((nodeId) => ({ nodeId })));
|
|
586
|
-
// And all endpoint destinations
|
|
587
|
-
const endpoints = valueDB.getValue(MultiChannelAssociationCCValues.endpoints(i).endpoint(endpoint.index)) ?? [];
|
|
588
|
-
for (const ep of endpoints) {
|
|
589
|
-
if (typeof ep.endpoint === "number") {
|
|
590
|
-
groupDestinations.push({
|
|
591
|
-
nodeId: ep.nodeId,
|
|
592
|
-
endpoint: ep.endpoint,
|
|
542
|
+
/**
|
|
543
|
+
* Removes nodes or endpoints from an association group
|
|
544
|
+
*/
|
|
545
|
+
async removeDestinations(options) {
|
|
546
|
+
__assertType("options", "MultiChannelAssociationCCRemoveOptions", __assertType__MultiChannelAssociationCCRemoveOptions.bind(void 0, options));
|
|
547
|
+
this.assertSupportsCommand(MultiChannelAssociationCommand, MultiChannelAssociationCommand.Remove);
|
|
548
|
+
if (!options.groupId && this.version === 1) {
|
|
549
|
+
// V1 does not support omitting the group, manually remove the destination from all groups
|
|
550
|
+
// We don't want to do too much work, so find out which groups the destination is in
|
|
551
|
+
const currentDestinations = MultiChannelAssociationCC
|
|
552
|
+
.getAllDestinationsCached(this.host, this.endpoint);
|
|
553
|
+
for (const [group, destinations] of currentDestinations) {
|
|
554
|
+
const cc = new MultiChannelAssociationCCRemove({
|
|
555
|
+
nodeId: this.endpoint.nodeId,
|
|
556
|
+
endpointIndex: this.endpoint.index,
|
|
557
|
+
groupId: group,
|
|
558
|
+
nodeIds: destinations
|
|
559
|
+
.filter((d) => d.endpoint != undefined)
|
|
560
|
+
.map((d) => d.nodeId),
|
|
561
|
+
endpoints: destinations.filter((d) => d.endpoint != undefined),
|
|
593
562
|
});
|
|
563
|
+
// TODO: evaluate intermediate supervision results
|
|
564
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
594
565
|
}
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
566
|
+
}
|
|
567
|
+
else if (options.groupId && options.groupId < 0) {
|
|
568
|
+
throw new ZWaveError("The group id must not be negative!", ZWaveErrorCodes.Argument_Invalid);
|
|
569
|
+
}
|
|
570
|
+
else {
|
|
571
|
+
const cc = new MultiChannelAssociationCCRemove({
|
|
572
|
+
nodeId: this.endpoint.nodeId,
|
|
573
|
+
endpointIndex: this.endpoint.index,
|
|
574
|
+
...options,
|
|
575
|
+
});
|
|
576
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
};
|
|
580
|
+
return MultiChannelAssociationCCAPI = _classThis;
|
|
581
|
+
})();
|
|
582
|
+
export { MultiChannelAssociationCCAPI };
|
|
583
|
+
let MultiChannelAssociationCC = (() => {
|
|
584
|
+
let _classDecorators = [commandClass(CommandClasses["Multi Channel Association"]), implementedVersion(5), ccValues(MultiChannelAssociationCCValues)];
|
|
585
|
+
let _classDescriptor;
|
|
586
|
+
let _classExtraInitializers = [];
|
|
587
|
+
let _classThis;
|
|
588
|
+
let _classSuper = CommandClass;
|
|
589
|
+
var MultiChannelAssociationCC = class extends _classSuper {
|
|
590
|
+
static { _classThis = this; }
|
|
591
|
+
static {
|
|
592
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
593
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
594
|
+
MultiChannelAssociationCC = _classThis = _classDescriptor.value;
|
|
595
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
596
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
597
|
+
}
|
|
598
|
+
determineRequiredCCInterviews() {
|
|
599
|
+
// MultiChannelAssociationCC must be interviewed after Z-Wave+ if that is supported
|
|
600
|
+
return [
|
|
601
|
+
...super.determineRequiredCCInterviews(),
|
|
602
|
+
CommandClasses["Z-Wave Plus Info"],
|
|
603
|
+
// We need information about endpoints to correctly configure the lifeline associations
|
|
604
|
+
CommandClasses["Multi Channel"],
|
|
605
|
+
// AssociationCC will short-circuit if this CC is supported
|
|
606
|
+
CommandClasses.Association,
|
|
607
|
+
];
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Returns the number of association groups reported by the node/endpoint.
|
|
611
|
+
* This only works AFTER the interview process
|
|
612
|
+
*/
|
|
613
|
+
static getGroupCountCached(ctx, endpoint) {
|
|
614
|
+
return ctx
|
|
615
|
+
.getValueDB(endpoint.nodeId)
|
|
616
|
+
.getValue(MultiChannelAssociationCCValues.groupCount.endpoint(endpoint.index)) || 0;
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Returns the number of nodes an association group supports.
|
|
620
|
+
* This only works AFTER the interview process
|
|
621
|
+
*/
|
|
622
|
+
static getMaxNodesCached(ctx, endpoint, groupId) {
|
|
623
|
+
return ctx
|
|
624
|
+
.getValueDB(endpoint.nodeId)
|
|
625
|
+
.getValue(MultiChannelAssociationCCValues.maxNodes(groupId).endpoint(endpoint.index)) ?? 0;
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Returns all the destinations of all association groups reported by the node/endpoint.
|
|
629
|
+
* This only works AFTER the interview process
|
|
630
|
+
*/
|
|
631
|
+
static getAllDestinationsCached(ctx, endpoint) {
|
|
632
|
+
const ret = new Map();
|
|
633
|
+
const groupCount = this.getGroupCountCached(ctx, endpoint);
|
|
634
|
+
const valueDB = ctx.getValueDB(endpoint.nodeId);
|
|
635
|
+
for (let i = 1; i <= groupCount; i++) {
|
|
636
|
+
const groupDestinations = [];
|
|
637
|
+
// Add all node destinations
|
|
638
|
+
const nodes = valueDB.getValue(MultiChannelAssociationCCValues.nodeIds(i).endpoint(endpoint.index)) ?? [];
|
|
639
|
+
groupDestinations.push(...nodes.map((nodeId) => ({ nodeId })));
|
|
640
|
+
// And all endpoint destinations
|
|
641
|
+
const endpoints = valueDB.getValue(MultiChannelAssociationCCValues.endpoints(i).endpoint(endpoint.index)) ?? [];
|
|
642
|
+
for (const ep of endpoints) {
|
|
643
|
+
if (typeof ep.endpoint === "number") {
|
|
644
|
+
groupDestinations.push({
|
|
645
|
+
nodeId: ep.nodeId,
|
|
646
|
+
endpoint: ep.endpoint,
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
else {
|
|
650
|
+
groupDestinations.push(...ep.endpoint.map((e) => ({
|
|
651
|
+
nodeId: ep.nodeId,
|
|
652
|
+
endpoint: e,
|
|
653
|
+
})));
|
|
654
|
+
}
|
|
600
655
|
}
|
|
656
|
+
ret.set(i,
|
|
657
|
+
// Filter out duplicates
|
|
658
|
+
groupDestinations.filter((addr, index) => index
|
|
659
|
+
=== groupDestinations.findIndex(({ nodeId, endpoint }) => nodeId === addr.nodeId
|
|
660
|
+
&& endpoint === addr.endpoint)));
|
|
601
661
|
}
|
|
602
|
-
ret
|
|
603
|
-
// Filter out duplicates
|
|
604
|
-
groupDestinations.filter((addr, index) => index
|
|
605
|
-
=== groupDestinations.findIndex(({ nodeId, endpoint }) => nodeId === addr.nodeId
|
|
606
|
-
&& endpoint === addr.endpoint)));
|
|
607
|
-
}
|
|
608
|
-
return ret;
|
|
609
|
-
}
|
|
610
|
-
async interview(ctx) {
|
|
611
|
-
const node = this.getNode(ctx);
|
|
612
|
-
const endpoint = this.getEndpoint(ctx);
|
|
613
|
-
const mcAPI = CCAPI.create(CommandClasses["Multi Channel Association"], ctx, endpoint);
|
|
614
|
-
ctx.logNode(node.id, {
|
|
615
|
-
endpoint: this.endpointIndex,
|
|
616
|
-
message: `Interviewing ${this.ccName}...`,
|
|
617
|
-
direction: "none",
|
|
618
|
-
});
|
|
619
|
-
// First find out how many groups are supported as multi channel
|
|
620
|
-
ctx.logNode(node.id, {
|
|
621
|
-
endpoint: this.endpointIndex,
|
|
622
|
-
message: "querying number of multi channel association groups...",
|
|
623
|
-
direction: "outbound",
|
|
624
|
-
});
|
|
625
|
-
const mcGroupCount = await mcAPI.getGroupCount();
|
|
626
|
-
if (mcGroupCount != undefined) {
|
|
627
|
-
ctx.logNode(node.id, {
|
|
628
|
-
endpoint: this.endpointIndex,
|
|
629
|
-
message: `supports ${mcGroupCount} multi channel association groups`,
|
|
630
|
-
direction: "inbound",
|
|
631
|
-
});
|
|
662
|
+
return ret;
|
|
632
663
|
}
|
|
633
|
-
|
|
664
|
+
async interview(ctx) {
|
|
665
|
+
const node = this.getNode(ctx);
|
|
666
|
+
const endpoint = this.getEndpoint(ctx);
|
|
667
|
+
const mcAPI = CCAPI.create(CommandClasses["Multi Channel Association"], ctx, endpoint);
|
|
634
668
|
ctx.logNode(node.id, {
|
|
635
669
|
endpoint: this.endpointIndex,
|
|
636
|
-
message:
|
|
637
|
-
|
|
670
|
+
message: `Interviewing ${this.ccName}...`,
|
|
671
|
+
direction: "none",
|
|
638
672
|
});
|
|
639
|
-
|
|
640
|
-
}
|
|
641
|
-
// Query each association group for its members
|
|
642
|
-
await this.refreshValues(ctx);
|
|
643
|
-
// And set up lifeline associations
|
|
644
|
-
await ccUtils.configureLifelineAssociations(ctx, endpoint);
|
|
645
|
-
// Remember that the interview is complete
|
|
646
|
-
this.setInterviewComplete(ctx, true);
|
|
647
|
-
}
|
|
648
|
-
async refreshValues(ctx) {
|
|
649
|
-
const node = this.getNode(ctx);
|
|
650
|
-
const endpoint = this.getEndpoint(ctx);
|
|
651
|
-
const mcAPI = CCAPI.create(CommandClasses["Multi Channel Association"], ctx, endpoint).withOptions({
|
|
652
|
-
priority: MessagePriority.NodeQuery,
|
|
653
|
-
});
|
|
654
|
-
const assocAPI = CCAPI.create(CommandClasses.Association, ctx, endpoint).withOptions({
|
|
655
|
-
priority: MessagePriority.NodeQuery,
|
|
656
|
-
});
|
|
657
|
-
const mcGroupCount = this.getValue(ctx, MultiChannelAssociationCCValues.groupCount) ?? 0;
|
|
658
|
-
// Some devices report more association groups than multi channel association groups, so we need this info here
|
|
659
|
-
const assocGroupCount = this.getValue(ctx, AssociationCCValues.groupCount)
|
|
660
|
-
|| mcGroupCount;
|
|
661
|
-
// Then query each multi channel association group
|
|
662
|
-
for (let groupId = 1; groupId <= mcGroupCount; groupId++) {
|
|
673
|
+
// First find out how many groups are supported as multi channel
|
|
663
674
|
ctx.logNode(node.id, {
|
|
664
675
|
endpoint: this.endpointIndex,
|
|
665
|
-
message:
|
|
676
|
+
message: "querying number of multi channel association groups...",
|
|
666
677
|
direction: "outbound",
|
|
667
678
|
});
|
|
668
|
-
const
|
|
669
|
-
if (
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
679
|
+
const mcGroupCount = await mcAPI.getGroupCount();
|
|
680
|
+
if (mcGroupCount != undefined) {
|
|
681
|
+
ctx.logNode(node.id, {
|
|
682
|
+
endpoint: this.endpointIndex,
|
|
683
|
+
message: `supports ${mcGroupCount} multi channel association groups`,
|
|
684
|
+
direction: "inbound",
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
else {
|
|
688
|
+
ctx.logNode(node.id, {
|
|
689
|
+
endpoint: this.endpointIndex,
|
|
690
|
+
message: "Querying multi channel association groups timed out, skipping interview...",
|
|
691
|
+
level: "warn",
|
|
692
|
+
});
|
|
693
|
+
return;
|
|
694
|
+
}
|
|
695
|
+
// Query each association group for its members
|
|
696
|
+
await this.refreshValues(ctx);
|
|
697
|
+
// And set up lifeline associations
|
|
698
|
+
await ccUtils.configureLifelineAssociations(ctx, endpoint);
|
|
699
|
+
// Remember that the interview is complete
|
|
700
|
+
this.setInterviewComplete(ctx, true);
|
|
689
701
|
}
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
702
|
+
async refreshValues(ctx) {
|
|
703
|
+
const node = this.getNode(ctx);
|
|
704
|
+
const endpoint = this.getEndpoint(ctx);
|
|
705
|
+
const mcAPI = CCAPI.create(CommandClasses["Multi Channel Association"], ctx, endpoint).withOptions({
|
|
706
|
+
priority: MessagePriority.NodeQuery,
|
|
707
|
+
});
|
|
708
|
+
const assocAPI = CCAPI.create(CommandClasses.Association, ctx, endpoint).withOptions({
|
|
709
|
+
priority: MessagePriority.NodeQuery,
|
|
696
710
|
});
|
|
697
|
-
|
|
711
|
+
const mcGroupCount = this.getValue(ctx, MultiChannelAssociationCCValues.groupCount) ?? 0;
|
|
712
|
+
// Some devices report more association groups than multi channel association groups, so we need this info here
|
|
713
|
+
const assocGroupCount = this.getValue(ctx, AssociationCCValues.groupCount)
|
|
714
|
+
|| mcGroupCount;
|
|
715
|
+
// Then query each multi channel association group
|
|
716
|
+
for (let groupId = 1; groupId <= mcGroupCount; groupId++) {
|
|
698
717
|
ctx.logNode(node.id, {
|
|
699
718
|
endpoint: this.endpointIndex,
|
|
700
|
-
message: `querying association group #${groupId}...`,
|
|
719
|
+
message: `querying multi channel association group #${groupId}...`,
|
|
701
720
|
direction: "outbound",
|
|
702
721
|
});
|
|
703
|
-
const group = await
|
|
722
|
+
const group = await mcAPI.getGroup(groupId);
|
|
704
723
|
if (!group)
|
|
705
724
|
continue;
|
|
706
|
-
const logMessage = `received information for association group #${groupId}:
|
|
725
|
+
const logMessage = `received information for multi channel association group #${groupId}:
|
|
707
726
|
maximum # of nodes: ${group.maxNodes}
|
|
708
|
-
currently assigned nodes: ${group.nodeIds.map(String).join(", ")}
|
|
727
|
+
currently assigned nodes: ${group.nodeIds.map(String).join(", ")}
|
|
728
|
+
currently assigned endpoints: ${group.endpoints
|
|
729
|
+
.map(({ nodeId, endpoint }) => {
|
|
730
|
+
if (typeof endpoint === "number") {
|
|
731
|
+
return `${nodeId}:${endpoint}`;
|
|
732
|
+
}
|
|
733
|
+
else {
|
|
734
|
+
return `${nodeId}:[${endpoint.map(String).join(", ")}]`;
|
|
735
|
+
}
|
|
736
|
+
})
|
|
737
|
+
.join("")}`;
|
|
709
738
|
ctx.logNode(node.id, {
|
|
710
739
|
endpoint: this.endpointIndex,
|
|
711
740
|
message: logMessage,
|
|
712
741
|
direction: "inbound",
|
|
713
742
|
});
|
|
714
743
|
}
|
|
744
|
+
// Check if there are more non-multi-channel association groups we haven't queried yet
|
|
745
|
+
if (assocAPI.isSupported() && assocGroupCount > mcGroupCount) {
|
|
746
|
+
ctx.logNode(node.id, {
|
|
747
|
+
endpoint: this.endpointIndex,
|
|
748
|
+
message: `querying additional non-multi-channel association groups...`,
|
|
749
|
+
direction: "outbound",
|
|
750
|
+
});
|
|
751
|
+
for (let groupId = mcGroupCount + 1; groupId <= assocGroupCount; groupId++) {
|
|
752
|
+
ctx.logNode(node.id, {
|
|
753
|
+
endpoint: this.endpointIndex,
|
|
754
|
+
message: `querying association group #${groupId}...`,
|
|
755
|
+
direction: "outbound",
|
|
756
|
+
});
|
|
757
|
+
const group = await assocAPI.getGroup(groupId);
|
|
758
|
+
if (!group)
|
|
759
|
+
continue;
|
|
760
|
+
const logMessage = `received information for association group #${groupId}:
|
|
761
|
+
maximum # of nodes: ${group.maxNodes}
|
|
762
|
+
currently assigned nodes: ${group.nodeIds.map(String).join(", ")}`;
|
|
763
|
+
ctx.logNode(node.id, {
|
|
764
|
+
endpoint: this.endpointIndex,
|
|
765
|
+
message: logMessage,
|
|
766
|
+
direction: "inbound",
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
}
|
|
715
770
|
}
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
commandClass(CommandClasses["Multi Channel Association"]),
|
|
720
|
-
implementedVersion(5),
|
|
721
|
-
ccValues(MultiChannelAssociationCCValues)
|
|
722
|
-
], MultiChannelAssociationCC);
|
|
771
|
+
};
|
|
772
|
+
return MultiChannelAssociationCC = _classThis;
|
|
773
|
+
})();
|
|
723
774
|
export { MultiChannelAssociationCC };
|
|
724
|
-
let MultiChannelAssociationCCSet =
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
groupId
|
|
745
|
-
nodeIds
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
775
|
+
let MultiChannelAssociationCCSet = (() => {
|
|
776
|
+
let _classDecorators = [CCCommand(MultiChannelAssociationCommand.Set), useSupervision()];
|
|
777
|
+
let _classDescriptor;
|
|
778
|
+
let _classExtraInitializers = [];
|
|
779
|
+
let _classThis;
|
|
780
|
+
let _classSuper = MultiChannelAssociationCC;
|
|
781
|
+
var MultiChannelAssociationCCSet = class extends _classSuper {
|
|
782
|
+
static { _classThis = this; }
|
|
783
|
+
static {
|
|
784
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
785
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
786
|
+
MultiChannelAssociationCCSet = _classThis = _classDescriptor.value;
|
|
787
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
788
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
789
|
+
}
|
|
790
|
+
constructor(options) {
|
|
791
|
+
super(options);
|
|
792
|
+
if (options.groupId < 1) {
|
|
793
|
+
throw new ZWaveError("The group id must be positive!", ZWaveErrorCodes.Argument_Invalid);
|
|
794
|
+
}
|
|
795
|
+
this.groupId = options.groupId;
|
|
796
|
+
this.nodeIds = ("nodeIds" in options && options.nodeIds) || [];
|
|
797
|
+
if (this.nodeIds.some((n) => n < 1 || n > MAX_NODES)) {
|
|
798
|
+
throw new ZWaveError(`All node IDs must be between 1 and ${MAX_NODES}!`, ZWaveErrorCodes.Argument_Invalid);
|
|
799
|
+
}
|
|
800
|
+
this.endpoints = ("endpoints" in options && options.endpoints)
|
|
801
|
+
|| [];
|
|
802
|
+
}
|
|
803
|
+
static from(raw, ctx) {
|
|
804
|
+
validatePayload(raw.payload.length >= 1);
|
|
805
|
+
const groupId = raw.payload[0];
|
|
806
|
+
const { nodeIds, endpoints } = deserializeMultiChannelAssociationDestination(raw.payload.subarray(1));
|
|
807
|
+
return new this({
|
|
808
|
+
nodeId: ctx.sourceNodeId,
|
|
809
|
+
groupId,
|
|
810
|
+
nodeIds,
|
|
811
|
+
endpoints,
|
|
812
|
+
});
|
|
813
|
+
}
|
|
814
|
+
groupId;
|
|
815
|
+
nodeIds;
|
|
816
|
+
endpoints;
|
|
817
|
+
serialize(ctx) {
|
|
818
|
+
this.payload = Bytes.concat([
|
|
819
|
+
Bytes.from([this.groupId]),
|
|
820
|
+
serializeMultiChannelAssociationDestination(this.nodeIds, this.endpoints),
|
|
821
|
+
]);
|
|
822
|
+
return super.serialize(ctx);
|
|
823
|
+
}
|
|
824
|
+
toLogEntry(ctx) {
|
|
825
|
+
return {
|
|
826
|
+
...super.toLogEntry(ctx),
|
|
827
|
+
message: {
|
|
828
|
+
"group id": this.groupId,
|
|
829
|
+
"node ids": this.nodeIds.join(", "),
|
|
830
|
+
endpoints: endpointAddressesToString(this.endpoints),
|
|
831
|
+
},
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
};
|
|
835
|
+
return MultiChannelAssociationCCSet = _classThis;
|
|
836
|
+
})();
|
|
774
837
|
export { MultiChannelAssociationCCSet };
|
|
775
|
-
let MultiChannelAssociationCCRemove =
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
],
|
|
838
|
+
let MultiChannelAssociationCCRemove = (() => {
|
|
839
|
+
let _classDecorators = [CCCommand(MultiChannelAssociationCommand.Remove), useSupervision()];
|
|
840
|
+
let _classDescriptor;
|
|
841
|
+
let _classExtraInitializers = [];
|
|
842
|
+
let _classThis;
|
|
843
|
+
let _classSuper = MultiChannelAssociationCC;
|
|
844
|
+
var MultiChannelAssociationCCRemove = class extends _classSuper {
|
|
845
|
+
static { _classThis = this; }
|
|
846
|
+
static {
|
|
847
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
848
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
849
|
+
MultiChannelAssociationCCRemove = _classThis = _classDescriptor.value;
|
|
850
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
851
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
852
|
+
}
|
|
853
|
+
constructor(options) {
|
|
854
|
+
super(options);
|
|
855
|
+
// When removing associations, we allow invalid node IDs.
|
|
856
|
+
// See GH#3606 - it is possible that those exist.
|
|
857
|
+
this.groupId = options.groupId;
|
|
858
|
+
this.nodeIds = options.nodeIds;
|
|
859
|
+
this.endpoints = options.endpoints;
|
|
860
|
+
}
|
|
861
|
+
static from(raw, ctx) {
|
|
862
|
+
validatePayload(raw.payload.length >= 1);
|
|
863
|
+
const groupId = raw.payload[0];
|
|
864
|
+
const { nodeIds, endpoints } = deserializeMultiChannelAssociationDestination(raw.payload.subarray(1));
|
|
865
|
+
return new this({
|
|
866
|
+
nodeId: ctx.sourceNodeId,
|
|
867
|
+
groupId,
|
|
868
|
+
nodeIds,
|
|
869
|
+
endpoints,
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
groupId;
|
|
873
|
+
nodeIds;
|
|
874
|
+
endpoints;
|
|
875
|
+
serialize(ctx) {
|
|
876
|
+
this.payload = Bytes.concat([
|
|
877
|
+
Bytes.from([this.groupId || 0]),
|
|
878
|
+
serializeMultiChannelAssociationDestination(this.nodeIds || [], this.endpoints || []),
|
|
879
|
+
]);
|
|
880
|
+
return super.serialize(ctx);
|
|
881
|
+
}
|
|
882
|
+
toLogEntry(ctx) {
|
|
883
|
+
const message = {
|
|
884
|
+
"group id": this.groupId || "(all groups)",
|
|
885
|
+
};
|
|
886
|
+
if (this.nodeIds) {
|
|
887
|
+
message["node ids"] = this.nodeIds.join(", ");
|
|
888
|
+
}
|
|
889
|
+
if (this.endpoints) {
|
|
890
|
+
message.endpoints = endpointAddressesToString(this.endpoints);
|
|
891
|
+
}
|
|
892
|
+
return {
|
|
893
|
+
...super.toLogEntry(ctx),
|
|
894
|
+
message,
|
|
895
|
+
};
|
|
896
|
+
}
|
|
897
|
+
};
|
|
898
|
+
return MultiChannelAssociationCCRemove = _classThis;
|
|
899
|
+
})();
|
|
825
900
|
export { MultiChannelAssociationCCRemove };
|
|
826
|
-
let MultiChannelAssociationCCReport =
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
groupId
|
|
844
|
-
maxNodes
|
|
845
|
-
nodeIds
|
|
846
|
-
endpoints
|
|
847
|
-
reportsToFollow
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
901
|
+
let MultiChannelAssociationCCReport = (() => {
|
|
902
|
+
let _classDecorators = [CCCommand(MultiChannelAssociationCommand.Report), ccValueProperty("maxNodes", MultiChannelAssociationCCValues.maxNodes, (self) => [self.groupId]), ccValueProperty("nodeIds", MultiChannelAssociationCCValues.nodeIds, (self) => [self.groupId]), ccValueProperty("endpoints", MultiChannelAssociationCCValues.endpoints, (self) => [self.groupId])];
|
|
903
|
+
let _classDescriptor;
|
|
904
|
+
let _classExtraInitializers = [];
|
|
905
|
+
let _classThis;
|
|
906
|
+
let _classSuper = MultiChannelAssociationCC;
|
|
907
|
+
var MultiChannelAssociationCCReport = class extends _classSuper {
|
|
908
|
+
static { _classThis = this; }
|
|
909
|
+
static {
|
|
910
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
911
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
912
|
+
MultiChannelAssociationCCReport = _classThis = _classDescriptor.value;
|
|
913
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
914
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
915
|
+
}
|
|
916
|
+
constructor(options) {
|
|
917
|
+
super(options);
|
|
918
|
+
this.groupId = options.groupId;
|
|
919
|
+
this.maxNodes = options.maxNodes;
|
|
920
|
+
this.nodeIds = options.nodeIds;
|
|
921
|
+
this.endpoints = options.endpoints;
|
|
922
|
+
this.reportsToFollow = options.reportsToFollow;
|
|
923
|
+
}
|
|
924
|
+
static from(raw, ctx) {
|
|
925
|
+
validatePayload(raw.payload.length >= 3);
|
|
926
|
+
const groupId = raw.payload[0];
|
|
927
|
+
const maxNodes = raw.payload[1];
|
|
928
|
+
const reportsToFollow = raw.payload[2];
|
|
929
|
+
const { nodeIds, endpoints } = deserializeMultiChannelAssociationDestination(raw.payload.subarray(3));
|
|
930
|
+
return new this({
|
|
931
|
+
nodeId: ctx.sourceNodeId,
|
|
932
|
+
groupId,
|
|
933
|
+
maxNodes,
|
|
934
|
+
nodeIds,
|
|
935
|
+
endpoints,
|
|
936
|
+
reportsToFollow,
|
|
937
|
+
});
|
|
938
|
+
}
|
|
939
|
+
groupId;
|
|
940
|
+
maxNodes;
|
|
941
|
+
nodeIds;
|
|
942
|
+
endpoints;
|
|
943
|
+
reportsToFollow;
|
|
944
|
+
getPartialCCSessionId() {
|
|
945
|
+
// Distinguish sessions by the association group ID
|
|
946
|
+
return { groupId: this.groupId };
|
|
947
|
+
}
|
|
948
|
+
expectMoreMessages() {
|
|
949
|
+
return this.reportsToFollow > 0;
|
|
950
|
+
}
|
|
951
|
+
mergePartialCCs(partials, _ctx) {
|
|
952
|
+
// Concat the list of nodes
|
|
953
|
+
this.nodeIds = [...partials, this]
|
|
954
|
+
.map((report) => [...report.nodeIds])
|
|
955
|
+
.reduce((prev, cur) => prev.concat(...cur), []);
|
|
956
|
+
// Concat the list of endpoints
|
|
957
|
+
this.endpoints = [...partials, this]
|
|
958
|
+
.map((report) => [...report.endpoints])
|
|
959
|
+
.reduce((prev, cur) => prev.concat(...cur), []);
|
|
960
|
+
}
|
|
961
|
+
serialize(ctx) {
|
|
962
|
+
const destinations = serializeMultiChannelAssociationDestination(this.nodeIds, this.endpoints);
|
|
963
|
+
this.payload = Bytes.concat([
|
|
964
|
+
Bytes.from([
|
|
965
|
+
this.groupId,
|
|
966
|
+
this.maxNodes,
|
|
967
|
+
this.reportsToFollow,
|
|
968
|
+
]),
|
|
969
|
+
destinations,
|
|
970
|
+
]);
|
|
971
|
+
return super.serialize(ctx);
|
|
972
|
+
}
|
|
973
|
+
toLogEntry(ctx) {
|
|
974
|
+
return {
|
|
975
|
+
...super.toLogEntry(ctx),
|
|
976
|
+
message: {
|
|
977
|
+
"group id": this.groupId,
|
|
978
|
+
"maximum # of nodes": this.maxNodes,
|
|
979
|
+
"node ids": this.nodeIds.join(", "),
|
|
980
|
+
endpoints: endpointAddressesToString(this.endpoints),
|
|
981
|
+
},
|
|
982
|
+
};
|
|
983
|
+
}
|
|
984
|
+
};
|
|
985
|
+
return MultiChannelAssociationCCReport = _classThis;
|
|
986
|
+
})();
|
|
908
987
|
export { MultiChannelAssociationCCReport };
|
|
909
|
-
let MultiChannelAssociationCCGet =
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
988
|
+
let MultiChannelAssociationCCGet = (() => {
|
|
989
|
+
let _classDecorators = [CCCommand(MultiChannelAssociationCommand.Get), expectedCCResponse(MultiChannelAssociationCCReport)];
|
|
990
|
+
let _classDescriptor;
|
|
991
|
+
let _classExtraInitializers = [];
|
|
992
|
+
let _classThis;
|
|
993
|
+
let _classSuper = MultiChannelAssociationCC;
|
|
994
|
+
var MultiChannelAssociationCCGet = class extends _classSuper {
|
|
995
|
+
static { _classThis = this; }
|
|
996
|
+
static {
|
|
997
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
998
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
999
|
+
MultiChannelAssociationCCGet = _classThis = _classDescriptor.value;
|
|
1000
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1001
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1002
|
+
}
|
|
1003
|
+
constructor(options) {
|
|
1004
|
+
super(options);
|
|
1005
|
+
if (options.groupId < 1) {
|
|
1006
|
+
throw new ZWaveError("The group id must be positive!", ZWaveErrorCodes.Argument_Invalid);
|
|
1007
|
+
}
|
|
1008
|
+
this.groupId = options.groupId;
|
|
1009
|
+
}
|
|
1010
|
+
static from(raw, ctx) {
|
|
1011
|
+
validatePayload(raw.payload.length >= 1);
|
|
1012
|
+
const groupId = raw.payload[0];
|
|
1013
|
+
return new this({
|
|
1014
|
+
nodeId: ctx.sourceNodeId,
|
|
1015
|
+
groupId,
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
groupId;
|
|
1019
|
+
serialize(ctx) {
|
|
1020
|
+
this.payload = Bytes.from([this.groupId]);
|
|
1021
|
+
return super.serialize(ctx);
|
|
1022
|
+
}
|
|
1023
|
+
toLogEntry(ctx) {
|
|
1024
|
+
return {
|
|
1025
|
+
...super.toLogEntry(ctx),
|
|
1026
|
+
message: { "group id": this.groupId },
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
1029
|
+
};
|
|
1030
|
+
return MultiChannelAssociationCCGet = _classThis;
|
|
1031
|
+
})();
|
|
941
1032
|
export { MultiChannelAssociationCCGet };
|
|
942
|
-
let MultiChannelAssociationCCSupportedGroupingsReport =
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1033
|
+
let MultiChannelAssociationCCSupportedGroupingsReport = (() => {
|
|
1034
|
+
let _classDecorators = [CCCommand(MultiChannelAssociationCommand.SupportedGroupingsReport), ccValueProperty("groupCount", MultiChannelAssociationCCValues.groupCount)];
|
|
1035
|
+
let _classDescriptor;
|
|
1036
|
+
let _classExtraInitializers = [];
|
|
1037
|
+
let _classThis;
|
|
1038
|
+
let _classSuper = MultiChannelAssociationCC;
|
|
1039
|
+
var MultiChannelAssociationCCSupportedGroupingsReport = class extends _classSuper {
|
|
1040
|
+
static { _classThis = this; }
|
|
1041
|
+
static {
|
|
1042
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1043
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1044
|
+
MultiChannelAssociationCCSupportedGroupingsReport = _classThis = _classDescriptor.value;
|
|
1045
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1046
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1047
|
+
}
|
|
1048
|
+
constructor(options) {
|
|
1049
|
+
super(options);
|
|
1050
|
+
this.groupCount = options.groupCount;
|
|
1051
|
+
}
|
|
1052
|
+
static from(raw, ctx) {
|
|
1053
|
+
validatePayload(raw.payload.length >= 1);
|
|
1054
|
+
const groupCount = raw.payload[0];
|
|
1055
|
+
return new this({
|
|
1056
|
+
nodeId: ctx.sourceNodeId,
|
|
1057
|
+
groupCount,
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
groupCount;
|
|
1061
|
+
serialize(ctx) {
|
|
1062
|
+
this.payload = Bytes.from([this.groupCount]);
|
|
1063
|
+
return super.serialize(ctx);
|
|
1064
|
+
}
|
|
1065
|
+
toLogEntry(ctx) {
|
|
1066
|
+
return {
|
|
1067
|
+
...super.toLogEntry(ctx),
|
|
1068
|
+
message: { "group count": this.groupCount },
|
|
1069
|
+
};
|
|
1070
|
+
}
|
|
1071
|
+
};
|
|
1072
|
+
return MultiChannelAssociationCCSupportedGroupingsReport = _classThis;
|
|
1073
|
+
})();
|
|
973
1074
|
export { MultiChannelAssociationCCSupportedGroupingsReport };
|
|
974
|
-
let MultiChannelAssociationCCSupportedGroupingsGet =
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
1075
|
+
let MultiChannelAssociationCCSupportedGroupingsGet = (() => {
|
|
1076
|
+
let _classDecorators = [CCCommand(MultiChannelAssociationCommand.SupportedGroupingsGet), expectedCCResponse(MultiChannelAssociationCCSupportedGroupingsReport)];
|
|
1077
|
+
let _classDescriptor;
|
|
1078
|
+
let _classExtraInitializers = [];
|
|
1079
|
+
let _classThis;
|
|
1080
|
+
let _classSuper = MultiChannelAssociationCC;
|
|
1081
|
+
var MultiChannelAssociationCCSupportedGroupingsGet = class extends _classSuper {
|
|
1082
|
+
static { _classThis = this; }
|
|
1083
|
+
static {
|
|
1084
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1085
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1086
|
+
MultiChannelAssociationCCSupportedGroupingsGet = _classThis = _classDescriptor.value;
|
|
1087
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1088
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1089
|
+
}
|
|
1090
|
+
};
|
|
1091
|
+
return MultiChannelAssociationCCSupportedGroupingsGet = _classThis;
|
|
1092
|
+
})();
|
|
980
1093
|
export { MultiChannelAssociationCCSupportedGroupingsGet };
|
|
981
1094
|
//# sourceMappingURL=MultiChannelAssociationCC.js.map
|