@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
|
@@ -44,13 +44,45 @@ var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
|
44
44
|
var import_EncapsulatingCommandClass = require("../lib/EncapsulatingCommandClass.js");
|
|
45
45
|
var import_Values = require("../lib/Values.js");
|
|
46
46
|
var import_Types = require("../lib/_Types.js");
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
48
|
+
function accept(f) {
|
|
49
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
50
|
+
return f;
|
|
51
|
+
}
|
|
52
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
53
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
54
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
55
|
+
var _, done = false;
|
|
56
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
57
|
+
var context = {};
|
|
58
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
59
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
60
|
+
context.addInitializer = function(f) {
|
|
61
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
62
|
+
extraInitializers.push(accept(f || null));
|
|
63
|
+
};
|
|
64
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
65
|
+
if (kind === "accessor") {
|
|
66
|
+
if (result === void 0) continue;
|
|
67
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
68
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
69
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
70
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
71
|
+
} else if (_ = accept(result)) {
|
|
72
|
+
if (kind === "field") initializers.unshift(_);
|
|
73
|
+
else descriptor[key] = _;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
77
|
+
done = true;
|
|
78
|
+
};
|
|
79
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
80
|
+
var useValue = arguments.length > 2;
|
|
81
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
82
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
83
|
+
}
|
|
84
|
+
return useValue ? value : void 0;
|
|
52
85
|
};
|
|
53
|
-
var MultiChannelCCEndPointReport_1, MultiChannelCCCapabilityReport_1, MultiChannelCCCapabilityGet_1, MultiChannelCCEndPointFindReport_1, MultiChannelCCEndPointFind_1, MultiChannelCCAggregatedMembersReport_1, MultiChannelCCCommandEncapsulation_1, MultiChannelCCV1Report_1, MultiChannelCCV1CommandEncapsulation_1;
|
|
54
86
|
function __assertType(argName, typeName, boundHasError) {
|
|
55
87
|
const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
|
|
56
88
|
if (boundHasError()) {
|
|
@@ -123,713 +155,842 @@ function areEndpointsUnnecessary(ctx, nodeId, endpointIndizes) {
|
|
|
123
155
|
return false;
|
|
124
156
|
return true;
|
|
125
157
|
}
|
|
126
|
-
let MultiChannelCCAPI =
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
// these do seem to be supported in version 2
|
|
136
|
-
case import_Types.MultiChannelCommand.EndPointGet:
|
|
137
|
-
case import_Types.MultiChannelCommand.CapabilityGet:
|
|
138
|
-
return this.version >= 2 && this.isSinglecast();
|
|
139
|
-
case import_Types.MultiChannelCommand.CommandEncapsulation:
|
|
140
|
-
return this.version >= 2;
|
|
141
|
-
case import_Types.MultiChannelCommand.EndPointFind:
|
|
142
|
-
return this.version >= 3 && this.isSinglecast();
|
|
143
|
-
case import_Types.MultiChannelCommand.AggregatedMembersGet:
|
|
144
|
-
return this.version >= 4 && this.isSinglecast();
|
|
145
|
-
}
|
|
146
|
-
return super.supportsCommand(cmd);
|
|
147
|
-
}
|
|
148
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
149
|
-
async getEndpoints() {
|
|
150
|
-
this.assertSupportsCommand(import_Types.MultiChannelCommand, import_Types.MultiChannelCommand.EndPointGet);
|
|
151
|
-
const cc = new MultiChannelCCEndPointGet({
|
|
152
|
-
nodeId: this.endpoint.nodeId,
|
|
153
|
-
endpointIndex: this.endpoint.index
|
|
154
|
-
});
|
|
155
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
156
|
-
if (response) {
|
|
157
|
-
return {
|
|
158
|
-
isDynamicEndpointCount: response.countIsDynamic,
|
|
159
|
-
identicalCapabilities: response.identicalCapabilities,
|
|
160
|
-
individualEndpointCount: response.individualCount,
|
|
161
|
-
aggregatedEndpointCount: response.aggregatedCount
|
|
162
|
-
};
|
|
158
|
+
let MultiChannelCCAPI = (() => {
|
|
159
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Multi Channel"])];
|
|
160
|
+
let _classDescriptor;
|
|
161
|
+
let _classExtraInitializers = [];
|
|
162
|
+
let _classThis;
|
|
163
|
+
let _classSuper = import_API.CCAPI;
|
|
164
|
+
var MultiChannelCCAPI2 = class extends _classSuper {
|
|
165
|
+
static {
|
|
166
|
+
_classThis = this;
|
|
163
167
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
endpointIndex: this.endpoint.index,
|
|
171
|
-
requestedEndpoint: endpoint
|
|
172
|
-
});
|
|
173
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
174
|
-
if (response) {
|
|
175
|
-
const generic = (0, import_safe.getGenericDeviceClass)(response.genericDeviceClass);
|
|
176
|
-
const specific = (0, import_safe.getSpecificDeviceClass)(response.genericDeviceClass, response.specificDeviceClass);
|
|
177
|
-
return {
|
|
178
|
-
isDynamic: response.isDynamic,
|
|
179
|
-
wasRemoved: response.wasRemoved,
|
|
180
|
-
supportedCCs: response.supportedCCs,
|
|
181
|
-
generic,
|
|
182
|
-
specific
|
|
183
|
-
};
|
|
168
|
+
static {
|
|
169
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
170
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
171
|
+
MultiChannelCCAPI2 = _classThis = _classDescriptor.value;
|
|
172
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
173
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
184
174
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
175
|
+
supportsCommand(cmd) {
|
|
176
|
+
switch (cmd) {
|
|
177
|
+
// Legacy commands:
|
|
178
|
+
case import_Types.MultiChannelCommand.GetV1:
|
|
179
|
+
return this.isSinglecast() && this.version === 1;
|
|
180
|
+
case import_Types.MultiChannelCommand.CommandEncapsulationV1:
|
|
181
|
+
return this.version === 1;
|
|
182
|
+
// The specs start at version 3 but according to OZW,
|
|
183
|
+
// these do seem to be supported in version 2
|
|
184
|
+
case import_Types.MultiChannelCommand.EndPointGet:
|
|
185
|
+
case import_Types.MultiChannelCommand.CapabilityGet:
|
|
186
|
+
return this.version >= 2 && this.isSinglecast();
|
|
187
|
+
case import_Types.MultiChannelCommand.CommandEncapsulation:
|
|
188
|
+
return this.version >= 2;
|
|
189
|
+
case import_Types.MultiChannelCommand.EndPointFind:
|
|
190
|
+
return this.version >= 3 && this.isSinglecast();
|
|
191
|
+
case import_Types.MultiChannelCommand.AggregatedMembersGet:
|
|
192
|
+
return this.version >= 4 && this.isSinglecast();
|
|
193
|
+
}
|
|
194
|
+
return super.supportsCommand(cmd);
|
|
195
|
+
}
|
|
196
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
197
|
+
async getEndpoints() {
|
|
198
|
+
this.assertSupportsCommand(import_Types.MultiChannelCommand, import_Types.MultiChannelCommand.EndPointGet);
|
|
199
|
+
const cc = new MultiChannelCCEndPointGet({
|
|
200
|
+
nodeId: this.endpoint.nodeId,
|
|
201
|
+
endpointIndex: this.endpoint.index
|
|
202
|
+
});
|
|
203
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
204
|
+
if (response) {
|
|
205
|
+
return {
|
|
206
|
+
isDynamicEndpointCount: response.countIsDynamic,
|
|
207
|
+
identicalCapabilities: response.identicalCapabilities,
|
|
208
|
+
individualEndpointCount: response.individualCount,
|
|
209
|
+
aggregatedEndpointCount: response.aggregatedCount
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
async getEndpointCapabilities(endpoint) {
|
|
214
|
+
__assertType("endpoint", "number", __assertType__number.bind(void 0, endpoint));
|
|
215
|
+
this.assertSupportsCommand(import_Types.MultiChannelCommand, import_Types.MultiChannelCommand.CapabilityGet);
|
|
216
|
+
const cc = new MultiChannelCCCapabilityGet({
|
|
217
|
+
nodeId: this.endpoint.nodeId,
|
|
218
|
+
endpointIndex: this.endpoint.index,
|
|
219
|
+
requestedEndpoint: endpoint
|
|
220
|
+
});
|
|
221
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
222
|
+
if (response) {
|
|
223
|
+
const generic = (0, import_safe.getGenericDeviceClass)(response.genericDeviceClass);
|
|
224
|
+
const specific = (0, import_safe.getSpecificDeviceClass)(response.genericDeviceClass, response.specificDeviceClass);
|
|
225
|
+
return {
|
|
226
|
+
isDynamic: response.isDynamic,
|
|
227
|
+
wasRemoved: response.wasRemoved,
|
|
228
|
+
supportedCCs: response.supportedCCs,
|
|
229
|
+
generic,
|
|
230
|
+
specific
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
async findEndpoints(genericClass, specificClass) {
|
|
235
|
+
__assertType("genericClass", "number", __assertType__number.bind(void 0, genericClass));
|
|
236
|
+
__assertType("specificClass", "number", __assertType__number.bind(void 0, specificClass));
|
|
237
|
+
this.assertSupportsCommand(import_Types.MultiChannelCommand, import_Types.MultiChannelCommand.EndPointFind);
|
|
238
|
+
const cc = new MultiChannelCCEndPointFind({
|
|
239
|
+
nodeId: this.endpoint.nodeId,
|
|
240
|
+
endpointIndex: this.endpoint.index,
|
|
241
|
+
genericClass,
|
|
242
|
+
specificClass
|
|
243
|
+
});
|
|
244
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
245
|
+
return response?.foundEndpoints;
|
|
246
|
+
}
|
|
247
|
+
async getAggregatedMembers(endpoint) {
|
|
248
|
+
__assertType("endpoint", "number", __assertType__number.bind(void 0, endpoint));
|
|
249
|
+
this.assertSupportsCommand(import_Types.MultiChannelCommand, import_Types.MultiChannelCommand.AggregatedMembersGet);
|
|
250
|
+
const cc = new MultiChannelCCAggregatedMembersGet({
|
|
251
|
+
nodeId: this.endpoint.nodeId,
|
|
252
|
+
endpointIndex: this.endpoint.index,
|
|
253
|
+
requestedEndpoint: endpoint
|
|
254
|
+
});
|
|
255
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
256
|
+
return response?.members;
|
|
257
|
+
}
|
|
258
|
+
// Encapsulation is used internally and too frequently that we
|
|
259
|
+
// want to pay the cost of validating each call
|
|
260
|
+
// eslint-disable-next-line @zwave-js/ccapi-validate-args
|
|
261
|
+
async sendEncapsulated(options) {
|
|
262
|
+
this.assertSupportsCommand(import_Types.MultiChannelCommand, import_Types.MultiChannelCommand.CommandEncapsulation);
|
|
263
|
+
const cc = new MultiChannelCCCommandEncapsulation({
|
|
264
|
+
nodeId: this.endpoint.nodeId,
|
|
265
|
+
...options
|
|
266
|
+
});
|
|
267
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
268
|
+
}
|
|
269
|
+
async getEndpointCountV1(ccId) {
|
|
270
|
+
__assertType("ccId", "CommandClasses", __assertType__number.bind(void 0, ccId));
|
|
271
|
+
this.assertSupportsCommand(import_Types.MultiChannelCommand, import_Types.MultiChannelCommand.GetV1);
|
|
272
|
+
const cc = new MultiChannelCCV1Get({
|
|
273
|
+
nodeId: this.endpoint.nodeId,
|
|
274
|
+
requestedCC: ccId
|
|
275
|
+
});
|
|
276
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
277
|
+
return response?.endpointCount;
|
|
278
|
+
}
|
|
279
|
+
// Encapsulation is used internally and too frequently that we
|
|
280
|
+
// want to pay the cost of validating each call
|
|
281
|
+
// eslint-disable-next-line @zwave-js/ccapi-validate-args
|
|
282
|
+
async sendEncapsulatedV1(encapsulated) {
|
|
283
|
+
this.assertSupportsCommand(import_Types.MultiChannelCommand, import_Types.MultiChannelCommand.CommandEncapsulationV1);
|
|
284
|
+
const cc = new MultiChannelCCV1CommandEncapsulation({
|
|
285
|
+
nodeId: this.endpoint.nodeId,
|
|
286
|
+
encapsulated
|
|
287
|
+
});
|
|
288
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
return MultiChannelCCAPI2 = _classThis;
|
|
292
|
+
})();
|
|
293
|
+
let MultiChannelCC = (() => {
|
|
294
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Multi Channel"]), (0, import_CommandClassDecorators.implementedVersion)(4), (0, import_CommandClassDecorators.ccValues)(MultiChannelCCValues)];
|
|
295
|
+
let _classDescriptor;
|
|
296
|
+
let _classExtraInitializers = [];
|
|
297
|
+
let _classThis;
|
|
298
|
+
let _classSuper = import_CommandClass.CommandClass;
|
|
299
|
+
var MultiChannelCC2 = class extends _classSuper {
|
|
300
|
+
static {
|
|
301
|
+
_classThis = this;
|
|
302
|
+
}
|
|
303
|
+
static {
|
|
304
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
305
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
306
|
+
MultiChannelCC2 = _classThis = _classDescriptor.value;
|
|
307
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
308
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
309
|
+
}
|
|
310
|
+
/** Tests if a command targets a specific endpoint and thus requires encapsulation */
|
|
311
|
+
static requiresEncapsulation(cc) {
|
|
312
|
+
return cc.endpointIndex !== 0 && !(cc instanceof MultiChannelCCCommandEncapsulation) && !(cc instanceof MultiChannelCCV1CommandEncapsulation);
|
|
313
|
+
}
|
|
314
|
+
/** Encapsulates a command that targets a specific endpoint, with version 2+ of the Multi Channel CC */
|
|
315
|
+
static encapsulate(cc) {
|
|
316
|
+
const ret = new MultiChannelCCCommandEncapsulation({
|
|
317
|
+
nodeId: cc.nodeId,
|
|
318
|
+
encapsulated: cc,
|
|
319
|
+
destination: cc.endpointIndex
|
|
320
|
+
});
|
|
321
|
+
ret.encapsulationFlags = cc.encapsulationFlags;
|
|
322
|
+
return ret;
|
|
323
|
+
}
|
|
324
|
+
/** Encapsulates a command that targets a specific endpoint, with version 1 of the Multi Channel CC */
|
|
325
|
+
static encapsulateV1(cc) {
|
|
326
|
+
const ret = new MultiChannelCCV1CommandEncapsulation({
|
|
327
|
+
nodeId: cc.nodeId,
|
|
328
|
+
encapsulated: cc
|
|
329
|
+
});
|
|
330
|
+
ret.encapsulationFlags = cc.encapsulationFlags;
|
|
331
|
+
return ret;
|
|
332
|
+
}
|
|
333
|
+
skipEndpointInterview() {
|
|
334
|
+
return true;
|
|
335
|
+
}
|
|
336
|
+
async interview(ctx) {
|
|
337
|
+
const node = this.getNode(ctx);
|
|
338
|
+
const removeEndpoints = ctx.getDeviceConfig?.(node.id)?.compat?.removeEndpoints;
|
|
339
|
+
if (removeEndpoints === "*") {
|
|
340
|
+
ctx.logNode(node.id, {
|
|
341
|
+
endpoint: this.endpointIndex,
|
|
342
|
+
message: `Skipping ${this.ccName} interview b/c all endpoints are ignored by the device config file...`,
|
|
343
|
+
direction: "none"
|
|
344
|
+
});
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
277
347
|
ctx.logNode(node.id, {
|
|
278
348
|
endpoint: this.endpointIndex,
|
|
279
|
-
message: `
|
|
349
|
+
message: `Interviewing ${this.ccName}...`,
|
|
280
350
|
direction: "none"
|
|
281
351
|
});
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
endpoint
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
if (ccVersion === 1)
|
|
291
|
-
return this.interviewV1(ctx);
|
|
292
|
-
const endpoint = node.getEndpoint(this.endpointIndex);
|
|
293
|
-
const api = import_API.CCAPI.create(import_safe.CommandClasses["Multi Channel"], ctx, endpoint).withOptions({
|
|
294
|
-
priority: import_safe.MessagePriority.NodeQuery
|
|
295
|
-
});
|
|
296
|
-
const valueDB = this.getValueDB(ctx);
|
|
297
|
-
ctx.logNode(node.id, {
|
|
298
|
-
endpoint: this.endpointIndex,
|
|
299
|
-
message: "querying device endpoint information...",
|
|
300
|
-
direction: "outbound"
|
|
301
|
-
});
|
|
302
|
-
const multiResponse = await api.getEndpoints();
|
|
303
|
-
if (!multiResponse) {
|
|
352
|
+
const ccVersion = (0, import_CommandClass.getEffectiveCCVersion)(ctx, this);
|
|
353
|
+
if (ccVersion === 1)
|
|
354
|
+
return this.interviewV1(ctx);
|
|
355
|
+
const endpoint = node.getEndpoint(this.endpointIndex);
|
|
356
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Multi Channel"], ctx, endpoint).withOptions({
|
|
357
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
358
|
+
});
|
|
359
|
+
const valueDB = this.getValueDB(ctx);
|
|
304
360
|
ctx.logNode(node.id, {
|
|
305
361
|
endpoint: this.endpointIndex,
|
|
306
|
-
message: "
|
|
307
|
-
|
|
362
|
+
message: "querying device endpoint information...",
|
|
363
|
+
direction: "outbound"
|
|
308
364
|
});
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
365
|
+
const multiResponse = await api.getEndpoints();
|
|
366
|
+
if (!multiResponse) {
|
|
367
|
+
ctx.logNode(node.id, {
|
|
368
|
+
endpoint: this.endpointIndex,
|
|
369
|
+
message: "Querying device endpoint information timed out, aborting interview...",
|
|
370
|
+
level: "warn"
|
|
371
|
+
});
|
|
372
|
+
return this.throwMissingCriticalInterviewResponse();
|
|
373
|
+
}
|
|
374
|
+
let logMessage = `received response for device endpoints:
|
|
312
375
|
endpoint count (individual): ${multiResponse.individualEndpointCount}
|
|
313
376
|
count is dynamic: ${multiResponse.isDynamicEndpointCount}
|
|
314
377
|
identical capabilities: ${multiResponse.identicalCapabilities}`;
|
|
315
|
-
|
|
316
|
-
|
|
378
|
+
if (multiResponse.aggregatedEndpointCount != void 0) {
|
|
379
|
+
logMessage += `
|
|
317
380
|
endpoint count (aggregated): ${multiResponse.aggregatedEndpointCount}`;
|
|
318
|
-
}
|
|
319
|
-
ctx.logNode(node.id, {
|
|
320
|
-
endpoint: this.endpointIndex,
|
|
321
|
-
message: logMessage,
|
|
322
|
-
direction: "inbound"
|
|
323
|
-
});
|
|
324
|
-
let allEndpoints = [];
|
|
325
|
-
const addSequentialEndpoints = () => {
|
|
326
|
-
for (let i = 1; i <= multiResponse.individualEndpointCount + (multiResponse.aggregatedEndpointCount ?? 0); i++) {
|
|
327
|
-
allEndpoints.push(i);
|
|
328
381
|
}
|
|
329
|
-
};
|
|
330
|
-
if (api.supportsCommand(import_Types.MultiChannelCommand.EndPointFind)) {
|
|
331
382
|
ctx.logNode(node.id, {
|
|
332
383
|
endpoint: this.endpointIndex,
|
|
333
|
-
message:
|
|
334
|
-
direction: "
|
|
384
|
+
message: logMessage,
|
|
385
|
+
direction: "inbound"
|
|
335
386
|
});
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
387
|
+
let allEndpoints = [];
|
|
388
|
+
const addSequentialEndpoints = () => {
|
|
389
|
+
for (let i = 1; i <= multiResponse.individualEndpointCount + (multiResponse.aggregatedEndpointCount ?? 0); i++) {
|
|
390
|
+
allEndpoints.push(i);
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
if (api.supportsCommand(import_Types.MultiChannelCommand.EndPointFind)) {
|
|
340
394
|
ctx.logNode(node.id, {
|
|
341
395
|
endpoint: this.endpointIndex,
|
|
342
|
-
message:
|
|
343
|
-
direction: "
|
|
396
|
+
message: "querying all endpoints...",
|
|
397
|
+
direction: "outbound"
|
|
344
398
|
});
|
|
345
|
-
|
|
399
|
+
const foundEndpoints = await api.findEndpoints(255, 255);
|
|
400
|
+
if (foundEndpoints)
|
|
401
|
+
allEndpoints.push(...foundEndpoints);
|
|
402
|
+
if (!allEndpoints.length) {
|
|
403
|
+
ctx.logNode(node.id, {
|
|
404
|
+
endpoint: this.endpointIndex,
|
|
405
|
+
message: `Endpoint query returned no results, assuming that endpoints are sequential`,
|
|
406
|
+
direction: "inbound"
|
|
407
|
+
});
|
|
408
|
+
addSequentialEndpoints();
|
|
409
|
+
} else {
|
|
410
|
+
ctx.logNode(node.id, {
|
|
411
|
+
endpoint: this.endpointIndex,
|
|
412
|
+
message: `received endpoints: ${allEndpoints.map(String).join(", ")}`,
|
|
413
|
+
direction: "inbound"
|
|
414
|
+
});
|
|
415
|
+
}
|
|
346
416
|
} else {
|
|
347
417
|
ctx.logNode(node.id, {
|
|
348
418
|
endpoint: this.endpointIndex,
|
|
349
|
-
message: `
|
|
350
|
-
direction: "
|
|
419
|
+
message: `does not support EndPointFind, assuming that endpoints are sequential`,
|
|
420
|
+
direction: "none"
|
|
351
421
|
});
|
|
422
|
+
addSequentialEndpoints();
|
|
352
423
|
}
|
|
353
|
-
|
|
354
|
-
ctx.logNode(node.id, {
|
|
355
|
-
endpoint: this.endpointIndex,
|
|
356
|
-
message: `does not support EndPointFind, assuming that endpoints are sequential`,
|
|
357
|
-
direction: "none"
|
|
358
|
-
});
|
|
359
|
-
addSequentialEndpoints();
|
|
360
|
-
}
|
|
361
|
-
if (removeEndpoints?.length) {
|
|
362
|
-
ctx.logNode(node.id, {
|
|
363
|
-
endpoint: this.endpointIndex,
|
|
364
|
-
message: `The following endpoints are ignored through the config file: ${removeEndpoints.join(", ")}`,
|
|
365
|
-
direction: "none"
|
|
366
|
-
});
|
|
367
|
-
allEndpoints = allEndpoints.filter((e) => !removeEndpoints.includes(e));
|
|
368
|
-
}
|
|
369
|
-
let hasQueriedCapabilities = false;
|
|
370
|
-
for (const endpoint2 of allEndpoints) {
|
|
371
|
-
if (endpoint2 > multiResponse.individualEndpointCount && ccVersion >= 4) {
|
|
424
|
+
if (removeEndpoints?.length) {
|
|
372
425
|
ctx.logNode(node.id, {
|
|
373
426
|
endpoint: this.endpointIndex,
|
|
374
|
-
message: `
|
|
375
|
-
direction: "
|
|
427
|
+
message: `The following endpoints are ignored through the config file: ${removeEndpoints.join(", ")}`,
|
|
428
|
+
direction: "none"
|
|
376
429
|
});
|
|
377
|
-
|
|
378
|
-
|
|
430
|
+
allEndpoints = allEndpoints.filter((e) => !removeEndpoints.includes(e));
|
|
431
|
+
}
|
|
432
|
+
let hasQueriedCapabilities = false;
|
|
433
|
+
for (const endpoint2 of allEndpoints) {
|
|
434
|
+
if (endpoint2 > multiResponse.individualEndpointCount && ccVersion >= 4) {
|
|
379
435
|
ctx.logNode(node.id, {
|
|
380
436
|
endpoint: this.endpointIndex,
|
|
381
|
-
message: `aggregated endpoint #${endpoint2}
|
|
382
|
-
direction: "
|
|
437
|
+
message: `querying members of aggregated endpoint #${endpoint2}...`,
|
|
438
|
+
direction: "outbound"
|
|
383
439
|
});
|
|
440
|
+
const members = await api.getAggregatedMembers(endpoint2);
|
|
441
|
+
if (members) {
|
|
442
|
+
ctx.logNode(node.id, {
|
|
443
|
+
endpoint: this.endpointIndex,
|
|
444
|
+
message: `aggregated endpoint #${endpoint2} has members ${members.map(String).join(", ")}`,
|
|
445
|
+
direction: "inbound"
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
if (multiResponse.identicalCapabilities && hasQueriedCapabilities) {
|
|
450
|
+
ctx.logNode(node.id, {
|
|
451
|
+
endpoint: this.endpointIndex,
|
|
452
|
+
message: `all endpoints identical, skipping capability query for endpoint #${endpoint2}...`,
|
|
453
|
+
direction: "none"
|
|
454
|
+
});
|
|
455
|
+
const devClass = valueDB.getValue(MultiChannelCCValues.endpointDeviceClass.endpoint(allEndpoints[0]));
|
|
456
|
+
valueDB.setValue(MultiChannelCCValues.endpointDeviceClass.endpoint(endpoint2), devClass);
|
|
457
|
+
const ep1Caps = valueDB.getValue(MultiChannelCCValues.endpointCCs.endpoint(allEndpoints[0]));
|
|
458
|
+
valueDB.setValue(MultiChannelCCValues.endpointCCs.endpoint(endpoint2), [...ep1Caps]);
|
|
459
|
+
continue;
|
|
384
460
|
}
|
|
385
|
-
}
|
|
386
|
-
if (multiResponse.identicalCapabilities && hasQueriedCapabilities) {
|
|
387
461
|
ctx.logNode(node.id, {
|
|
388
462
|
endpoint: this.endpointIndex,
|
|
389
|
-
message: `
|
|
390
|
-
direction: "
|
|
463
|
+
message: `querying capabilities for endpoint #${endpoint2}...`,
|
|
464
|
+
direction: "outbound"
|
|
391
465
|
});
|
|
392
|
-
const
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
continue;
|
|
397
|
-
}
|
|
398
|
-
ctx.logNode(node.id, {
|
|
399
|
-
endpoint: this.endpointIndex,
|
|
400
|
-
message: `querying capabilities for endpoint #${endpoint2}...`,
|
|
401
|
-
direction: "outbound"
|
|
402
|
-
});
|
|
403
|
-
const caps = await api.getEndpointCapabilities(endpoint2);
|
|
404
|
-
if (caps) {
|
|
405
|
-
hasQueriedCapabilities = true;
|
|
406
|
-
logMessage = `received response for endpoint capabilities (#${endpoint2}):
|
|
466
|
+
const caps = await api.getEndpointCapabilities(endpoint2);
|
|
467
|
+
if (caps) {
|
|
468
|
+
hasQueriedCapabilities = true;
|
|
469
|
+
logMessage = `received response for endpoint capabilities (#${endpoint2}):
|
|
407
470
|
generic device class: ${caps.generic.label}
|
|
408
471
|
specific device class: ${caps.specific.label}
|
|
409
472
|
is dynamic end point: ${caps.isDynamic}
|
|
410
473
|
supported CCs:`;
|
|
411
|
-
|
|
412
|
-
|
|
474
|
+
for (const cc of caps.supportedCCs) {
|
|
475
|
+
logMessage += `
|
|
413
476
|
\xB7 ${(0, import_safe.getCCName)(cc)}`;
|
|
477
|
+
}
|
|
478
|
+
ctx.logNode(node.id, {
|
|
479
|
+
endpoint: this.endpointIndex,
|
|
480
|
+
message: logMessage,
|
|
481
|
+
direction: "inbound"
|
|
482
|
+
});
|
|
483
|
+
} else {
|
|
484
|
+
ctx.logNode(node.id, {
|
|
485
|
+
endpoint: this.endpointIndex,
|
|
486
|
+
message: `Querying endpoint #${endpoint2} capabilities timed out, aborting interview...`,
|
|
487
|
+
level: "warn"
|
|
488
|
+
});
|
|
489
|
+
return this.throwMissingCriticalInterviewResponse();
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
if (!multiResponse.identicalCapabilities && areEndpointsUnnecessary(ctx, node.id, allEndpoints)) {
|
|
493
|
+
const preserve = ctx.getDeviceConfig?.(node.id)?.compat?.preserveEndpoints;
|
|
494
|
+
if (!preserve) {
|
|
495
|
+
allEndpoints = [];
|
|
496
|
+
ctx.logNode(node.id, {
|
|
497
|
+
message: `Endpoints seem unnecessary b/c they have different device classes, ignoring all...`
|
|
498
|
+
});
|
|
499
|
+
} else if (preserve === "*") {
|
|
500
|
+
ctx.logNode(node.id, {
|
|
501
|
+
message: `Endpoints seem unnecessary, but are configured to be preserved.`
|
|
502
|
+
});
|
|
503
|
+
} else {
|
|
504
|
+
allEndpoints = allEndpoints.filter((ep) => preserve.includes(ep));
|
|
505
|
+
ctx.logNode(node.id, {
|
|
506
|
+
message: `Endpoints seem unnecessary, but endpoints ${allEndpoints.join(", ")} are configured to be preserved.`
|
|
507
|
+
});
|
|
414
508
|
}
|
|
415
|
-
ctx.logNode(node.id, {
|
|
416
|
-
endpoint: this.endpointIndex,
|
|
417
|
-
message: logMessage,
|
|
418
|
-
direction: "inbound"
|
|
419
|
-
});
|
|
420
|
-
} else {
|
|
421
|
-
ctx.logNode(node.id, {
|
|
422
|
-
endpoint: this.endpointIndex,
|
|
423
|
-
message: `Querying endpoint #${endpoint2} capabilities timed out, aborting interview...`,
|
|
424
|
-
level: "warn"
|
|
425
|
-
});
|
|
426
|
-
return this.throwMissingCriticalInterviewResponse();
|
|
427
509
|
}
|
|
510
|
+
this.setValue(ctx, MultiChannelCCValues.endpointIndizes, allEndpoints);
|
|
511
|
+
this.setInterviewComplete(ctx, true);
|
|
428
512
|
}
|
|
429
|
-
|
|
430
|
-
const
|
|
431
|
-
|
|
432
|
-
|
|
513
|
+
async interviewV1(ctx) {
|
|
514
|
+
const node = this.getNode(ctx);
|
|
515
|
+
const endpoint = this.getEndpoint(ctx);
|
|
516
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Multi Channel"], ctx, endpoint);
|
|
517
|
+
const valueDB = this.getValueDB(ctx);
|
|
518
|
+
const supportedCCs = [...node.getCCs()].filter(([, info]) => info.isSupported).map(([cc]) => cc).filter((cc) => !import_CommandClass.CommandClass.createInstanceUnchecked(node, cc)?.skipEndpointInterview());
|
|
519
|
+
const endpointCounts = /* @__PURE__ */ new Map();
|
|
520
|
+
for (const ccId of supportedCCs) {
|
|
433
521
|
ctx.logNode(node.id, {
|
|
434
|
-
message: `
|
|
435
|
-
|
|
436
|
-
} else if (preserve === "*") {
|
|
437
|
-
ctx.logNode(node.id, {
|
|
438
|
-
message: `Endpoints seem unnecessary, but are configured to be preserved.`
|
|
439
|
-
});
|
|
440
|
-
} else {
|
|
441
|
-
allEndpoints = allEndpoints.filter((ep) => preserve.includes(ep));
|
|
442
|
-
ctx.logNode(node.id, {
|
|
443
|
-
message: `Endpoints seem unnecessary, but endpoints ${allEndpoints.join(", ")} are configured to be preserved.`
|
|
522
|
+
message: `Querying endpoint count for CommandClass ${(0, import_safe.getCCName)(ccId)}...`,
|
|
523
|
+
direction: "outbound"
|
|
444
524
|
});
|
|
525
|
+
const endpointCount = await api.getEndpointCountV1(ccId);
|
|
526
|
+
if (endpointCount != void 0) {
|
|
527
|
+
endpointCounts.set(ccId, endpointCount);
|
|
528
|
+
ctx.logNode(node.id, {
|
|
529
|
+
message: `CommandClass ${(0, import_safe.getCCName)(ccId)} has ${endpointCount} endpoints`,
|
|
530
|
+
direction: "inbound"
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
const numEndpoints = Math.max(...endpointCounts.values());
|
|
535
|
+
this.setValue(ctx, MultiChannelCCValues.endpointCountIsDynamic, false);
|
|
536
|
+
this.setValue(ctx, MultiChannelCCValues.aggregatedEndpointCount, 0);
|
|
537
|
+
this.setValue(ctx, MultiChannelCCValues.individualEndpointCount, numEndpoints);
|
|
538
|
+
this.setValue(ctx, MultiChannelCCValues.endpointsHaveIdenticalCapabilities, false);
|
|
539
|
+
for (let endpoint2 = 1; endpoint2 <= numEndpoints; endpoint2++) {
|
|
540
|
+
const endpointCCs = [...endpointCounts.entries()].filter(([, ccEndpoints]) => ccEndpoints >= endpoint2).map(([ccId]) => ccId);
|
|
541
|
+
valueDB.setValue(MultiChannelCCValues.endpointCCs.endpoint(endpoint2), endpointCCs);
|
|
445
542
|
}
|
|
543
|
+
this.setInterviewComplete(ctx, true);
|
|
446
544
|
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
545
|
+
};
|
|
546
|
+
return MultiChannelCC2 = _classThis;
|
|
547
|
+
})();
|
|
548
|
+
let MultiChannelCCEndPointReport = (() => {
|
|
549
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.MultiChannelCommand.EndPointReport), (0, import_CommandClassDecorators.ccValueProperty)("countIsDynamic", MultiChannelCCValues.endpointCountIsDynamic), (0, import_CommandClassDecorators.ccValueProperty)("identicalCapabilities", MultiChannelCCValues.endpointsHaveIdenticalCapabilities), (0, import_CommandClassDecorators.ccValueProperty)("individualCount", MultiChannelCCValues.individualEndpointCount), (0, import_CommandClassDecorators.ccValueProperty)("aggregatedCount", MultiChannelCCValues.aggregatedEndpointCount)];
|
|
550
|
+
let _classDescriptor;
|
|
551
|
+
let _classExtraInitializers = [];
|
|
552
|
+
let _classThis;
|
|
553
|
+
let _classSuper = MultiChannelCC;
|
|
554
|
+
var MultiChannelCCEndPointReport2 = class extends _classSuper {
|
|
555
|
+
static {
|
|
556
|
+
_classThis = this;
|
|
557
|
+
}
|
|
558
|
+
static {
|
|
559
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
560
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
561
|
+
MultiChannelCCEndPointReport2 = _classThis = _classDescriptor.value;
|
|
562
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
563
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
564
|
+
}
|
|
565
|
+
constructor(options) {
|
|
566
|
+
super(options);
|
|
567
|
+
this.countIsDynamic = options.countIsDynamic;
|
|
568
|
+
this.identicalCapabilities = options.identicalCapabilities;
|
|
569
|
+
this.individualCount = options.individualCount;
|
|
570
|
+
this.aggregatedCount = options.aggregatedCount;
|
|
571
|
+
}
|
|
572
|
+
static from(raw, ctx) {
|
|
573
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
574
|
+
const countIsDynamic = !!(raw.payload[0] & 128);
|
|
575
|
+
const identicalCapabilities = !!(raw.payload[0] & 64);
|
|
576
|
+
const individualCount = raw.payload[1] & 127;
|
|
577
|
+
let aggregatedCount;
|
|
578
|
+
if (raw.payload.length >= 3) {
|
|
579
|
+
aggregatedCount = raw.payload[2] & 127;
|
|
580
|
+
}
|
|
581
|
+
return new this({
|
|
582
|
+
nodeId: ctx.sourceNodeId,
|
|
583
|
+
countIsDynamic,
|
|
584
|
+
identicalCapabilities,
|
|
585
|
+
individualCount,
|
|
586
|
+
aggregatedCount
|
|
461
587
|
});
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
588
|
+
}
|
|
589
|
+
countIsDynamic;
|
|
590
|
+
identicalCapabilities;
|
|
591
|
+
individualCount;
|
|
592
|
+
aggregatedCount;
|
|
593
|
+
serialize(ctx) {
|
|
594
|
+
this.payload = import_safe2.Bytes.from([
|
|
595
|
+
(this.countIsDynamic ? 128 : 0) | (this.identicalCapabilities ? 64 : 0),
|
|
596
|
+
this.individualCount & 127,
|
|
597
|
+
this.aggregatedCount ?? 0
|
|
598
|
+
]);
|
|
599
|
+
return super.serialize(ctx);
|
|
600
|
+
}
|
|
601
|
+
toLogEntry(ctx) {
|
|
602
|
+
const message = {
|
|
603
|
+
"endpoint count (individual)": this.individualCount,
|
|
604
|
+
"count is dynamic": this.countIsDynamic,
|
|
605
|
+
"identical capabilities": this.identicalCapabilities
|
|
606
|
+
};
|
|
607
|
+
if (this.aggregatedCount != void 0) {
|
|
608
|
+
message["endpoint count (aggregated)"] = this.aggregatedCount;
|
|
469
609
|
}
|
|
610
|
+
const ret = {
|
|
611
|
+
...super.toLogEntry(ctx),
|
|
612
|
+
message
|
|
613
|
+
};
|
|
614
|
+
return ret;
|
|
470
615
|
}
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
616
|
+
};
|
|
617
|
+
return MultiChannelCCEndPointReport2 = _classThis;
|
|
618
|
+
})();
|
|
619
|
+
let MultiChannelCCEndPointGet = (() => {
|
|
620
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.MultiChannelCommand.EndPointGet), (0, import_CommandClassDecorators.expectedCCResponse)(MultiChannelCCEndPointReport)];
|
|
621
|
+
let _classDescriptor;
|
|
622
|
+
let _classExtraInitializers = [];
|
|
623
|
+
let _classThis;
|
|
624
|
+
let _classSuper = MultiChannelCC;
|
|
625
|
+
var MultiChannelCCEndPointGet2 = class extends _classSuper {
|
|
626
|
+
static {
|
|
627
|
+
_classThis = this;
|
|
479
628
|
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
};
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
(0, import_CommandClassDecorators.ccValues)(MultiChannelCCValues)
|
|
487
|
-
], MultiChannelCC);
|
|
488
|
-
let MultiChannelCCEndPointReport = MultiChannelCCEndPointReport_1 = class MultiChannelCCEndPointReport2 extends MultiChannelCC {
|
|
489
|
-
constructor(options) {
|
|
490
|
-
super(options);
|
|
491
|
-
this.countIsDynamic = options.countIsDynamic;
|
|
492
|
-
this.identicalCapabilities = options.identicalCapabilities;
|
|
493
|
-
this.individualCount = options.individualCount;
|
|
494
|
-
this.aggregatedCount = options.aggregatedCount;
|
|
495
|
-
}
|
|
496
|
-
static from(raw, ctx) {
|
|
497
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
498
|
-
const countIsDynamic = !!(raw.payload[0] & 128);
|
|
499
|
-
const identicalCapabilities = !!(raw.payload[0] & 64);
|
|
500
|
-
const individualCount = raw.payload[1] & 127;
|
|
501
|
-
let aggregatedCount;
|
|
502
|
-
if (raw.payload.length >= 3) {
|
|
503
|
-
aggregatedCount = raw.payload[2] & 127;
|
|
504
|
-
}
|
|
505
|
-
return new MultiChannelCCEndPointReport_1({
|
|
506
|
-
nodeId: ctx.sourceNodeId,
|
|
507
|
-
countIsDynamic,
|
|
508
|
-
identicalCapabilities,
|
|
509
|
-
individualCount,
|
|
510
|
-
aggregatedCount
|
|
511
|
-
});
|
|
512
|
-
}
|
|
513
|
-
countIsDynamic;
|
|
514
|
-
identicalCapabilities;
|
|
515
|
-
individualCount;
|
|
516
|
-
aggregatedCount;
|
|
517
|
-
serialize(ctx) {
|
|
518
|
-
this.payload = import_safe2.Bytes.from([
|
|
519
|
-
(this.countIsDynamic ? 128 : 0) | (this.identicalCapabilities ? 64 : 0),
|
|
520
|
-
this.individualCount & 127,
|
|
521
|
-
this.aggregatedCount ?? 0
|
|
522
|
-
]);
|
|
523
|
-
return super.serialize(ctx);
|
|
524
|
-
}
|
|
525
|
-
toLogEntry(ctx) {
|
|
526
|
-
const message = {
|
|
527
|
-
"endpoint count (individual)": this.individualCount,
|
|
528
|
-
"count is dynamic": this.countIsDynamic,
|
|
529
|
-
"identical capabilities": this.identicalCapabilities
|
|
530
|
-
};
|
|
531
|
-
if (this.aggregatedCount != void 0) {
|
|
532
|
-
message["endpoint count (aggregated)"] = this.aggregatedCount;
|
|
629
|
+
static {
|
|
630
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
631
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
632
|
+
MultiChannelCCEndPointGet2 = _classThis = _classDescriptor.value;
|
|
633
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
634
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
533
635
|
}
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
const wasRemoved = isDynamic && genericDeviceClass === 255 && specificDeviceClass === 0;
|
|
581
|
-
return new MultiChannelCCCapabilityReport_1({
|
|
582
|
-
nodeId: ctx.sourceNodeId,
|
|
583
|
-
endpointIndex,
|
|
584
|
-
isDynamic,
|
|
585
|
-
genericDeviceClass,
|
|
586
|
-
specificDeviceClass,
|
|
587
|
-
supportedCCs,
|
|
588
|
-
wasRemoved
|
|
589
|
-
});
|
|
590
|
-
}
|
|
591
|
-
persistValues(ctx) {
|
|
592
|
-
if (!super.persistValues(ctx))
|
|
593
|
-
return false;
|
|
594
|
-
const deviceClassValue = MultiChannelCCValues.endpointDeviceClass;
|
|
595
|
-
const ccsValue = MultiChannelCCValues.endpointCCs;
|
|
596
|
-
if (this.wasRemoved) {
|
|
597
|
-
this.removeValue(ctx, deviceClassValue);
|
|
598
|
-
this.removeValue(ctx, ccsValue);
|
|
599
|
-
} else {
|
|
600
|
-
this.setValue(ctx, deviceClassValue, {
|
|
601
|
-
generic: this.genericDeviceClass,
|
|
602
|
-
specific: this.specificDeviceClass
|
|
636
|
+
};
|
|
637
|
+
return MultiChannelCCEndPointGet2 = _classThis;
|
|
638
|
+
})();
|
|
639
|
+
let MultiChannelCCCapabilityReport = (() => {
|
|
640
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.MultiChannelCommand.CapabilityReport)];
|
|
641
|
+
let _classDescriptor;
|
|
642
|
+
let _classExtraInitializers = [];
|
|
643
|
+
let _classThis;
|
|
644
|
+
let _classSuper = MultiChannelCC;
|
|
645
|
+
var MultiChannelCCCapabilityReport2 = class extends _classSuper {
|
|
646
|
+
static {
|
|
647
|
+
_classThis = this;
|
|
648
|
+
}
|
|
649
|
+
static {
|
|
650
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
651
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
652
|
+
MultiChannelCCCapabilityReport2 = _classThis = _classDescriptor.value;
|
|
653
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
654
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
655
|
+
}
|
|
656
|
+
constructor(options) {
|
|
657
|
+
super(options);
|
|
658
|
+
this.endpointIndex = options.endpointIndex;
|
|
659
|
+
this.genericDeviceClass = options.genericDeviceClass;
|
|
660
|
+
this.specificDeviceClass = options.specificDeviceClass;
|
|
661
|
+
this.supportedCCs = options.supportedCCs;
|
|
662
|
+
this.isDynamic = options.isDynamic;
|
|
663
|
+
this.wasRemoved = options.wasRemoved;
|
|
664
|
+
}
|
|
665
|
+
static from(raw, ctx) {
|
|
666
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
667
|
+
const endpointIndex = raw.payload[0] & 127;
|
|
668
|
+
const isDynamic = !!(raw.payload[0] & 128);
|
|
669
|
+
const NIF = (0, import_safe.parseApplicationNodeInformation)(raw.payload.subarray(1));
|
|
670
|
+
const genericDeviceClass = NIF.genericDeviceClass;
|
|
671
|
+
const specificDeviceClass = NIF.specificDeviceClass;
|
|
672
|
+
const supportedCCs = NIF.supportedCCs;
|
|
673
|
+
const wasRemoved = isDynamic && genericDeviceClass === 255 && specificDeviceClass === 0;
|
|
674
|
+
return new this({
|
|
675
|
+
nodeId: ctx.sourceNodeId,
|
|
676
|
+
endpointIndex,
|
|
677
|
+
isDynamic,
|
|
678
|
+
genericDeviceClass,
|
|
679
|
+
specificDeviceClass,
|
|
680
|
+
supportedCCs,
|
|
681
|
+
wasRemoved
|
|
603
682
|
});
|
|
604
|
-
this.setValue(ctx, ccsValue, this.supportedCCs);
|
|
605
683
|
}
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
]);
|
|
621
|
-
return super.serialize(ctx);
|
|
622
|
-
}
|
|
623
|
-
toLogEntry(ctx) {
|
|
624
|
-
return {
|
|
625
|
-
...super.toLogEntry(ctx),
|
|
626
|
-
message: {
|
|
627
|
-
"endpoint index": this.endpointIndex,
|
|
628
|
-
"generic device class": (0, import_safe.getGenericDeviceClass)(this.genericDeviceClass).label,
|
|
629
|
-
"specific device class": (0, import_safe.getSpecificDeviceClass)(this.genericDeviceClass, this.specificDeviceClass).label,
|
|
630
|
-
"is dynamic end point": this.isDynamic,
|
|
631
|
-
"supported CCs": this.supportedCCs.map((cc) => `
|
|
632
|
-
\xB7 ${(0, import_safe.getCCName)(cc)}`).join("")
|
|
684
|
+
persistValues(ctx) {
|
|
685
|
+
if (!super.persistValues(ctx))
|
|
686
|
+
return false;
|
|
687
|
+
const deviceClassValue = MultiChannelCCValues.endpointDeviceClass;
|
|
688
|
+
const ccsValue = MultiChannelCCValues.endpointCCs;
|
|
689
|
+
if (this.wasRemoved) {
|
|
690
|
+
this.removeValue(ctx, deviceClassValue);
|
|
691
|
+
this.removeValue(ctx, ccsValue);
|
|
692
|
+
} else {
|
|
693
|
+
this.setValue(ctx, deviceClassValue, {
|
|
694
|
+
generic: this.genericDeviceClass,
|
|
695
|
+
specific: this.specificDeviceClass
|
|
696
|
+
});
|
|
697
|
+
this.setValue(ctx, ccsValue, this.supportedCCs);
|
|
633
698
|
}
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
699
|
+
return true;
|
|
700
|
+
}
|
|
701
|
+
// The endpoint index must be overridden to be able to attribute the information to the correct endpoint
|
|
702
|
+
genericDeviceClass;
|
|
703
|
+
specificDeviceClass;
|
|
704
|
+
supportedCCs;
|
|
705
|
+
isDynamic;
|
|
706
|
+
wasRemoved;
|
|
707
|
+
serialize(ctx) {
|
|
708
|
+
this.payload = import_safe2.Bytes.concat([
|
|
709
|
+
import_safe2.Bytes.from([
|
|
710
|
+
this.endpointIndex & 127 | (this.isDynamic ? 128 : 0)
|
|
711
|
+
]),
|
|
712
|
+
(0, import_safe.encodeApplicationNodeInformation)(this)
|
|
713
|
+
]);
|
|
714
|
+
return super.serialize(ctx);
|
|
715
|
+
}
|
|
716
|
+
toLogEntry(ctx) {
|
|
717
|
+
return {
|
|
718
|
+
...super.toLogEntry(ctx),
|
|
719
|
+
message: {
|
|
720
|
+
"endpoint index": this.endpointIndex,
|
|
721
|
+
"generic device class": (0, import_safe.getGenericDeviceClass)(this.genericDeviceClass).label,
|
|
722
|
+
"specific device class": (0, import_safe.getSpecificDeviceClass)(this.genericDeviceClass, this.specificDeviceClass).label,
|
|
723
|
+
"is dynamic end point": this.isDynamic,
|
|
724
|
+
"supported CCs": this.supportedCCs.map((cc) => `
|
|
725
|
+
\xB7 ${(0, import_safe.getCCName)(cc)}`).join("")
|
|
726
|
+
}
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
};
|
|
730
|
+
return MultiChannelCCCapabilityReport2 = _classThis;
|
|
731
|
+
})();
|
|
640
732
|
function testResponseForMultiChannelCapabilityGet(sent, received) {
|
|
641
733
|
return received.endpointIndex === sent.requestedEndpoint;
|
|
642
734
|
}
|
|
643
|
-
let MultiChannelCCCapabilityGet =
|
|
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
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
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
|
-
|
|
774
|
-
|
|
775
|
-
|
|
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
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
735
|
+
let MultiChannelCCCapabilityGet = (() => {
|
|
736
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.MultiChannelCommand.CapabilityGet), (0, import_CommandClassDecorators.expectedCCResponse)(MultiChannelCCCapabilityReport, testResponseForMultiChannelCapabilityGet)];
|
|
737
|
+
let _classDescriptor;
|
|
738
|
+
let _classExtraInitializers = [];
|
|
739
|
+
let _classThis;
|
|
740
|
+
let _classSuper = MultiChannelCC;
|
|
741
|
+
var MultiChannelCCCapabilityGet2 = class extends _classSuper {
|
|
742
|
+
static {
|
|
743
|
+
_classThis = this;
|
|
744
|
+
}
|
|
745
|
+
static {
|
|
746
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
747
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
748
|
+
MultiChannelCCCapabilityGet2 = _classThis = _classDescriptor.value;
|
|
749
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
750
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
751
|
+
}
|
|
752
|
+
constructor(options) {
|
|
753
|
+
super(options);
|
|
754
|
+
this.requestedEndpoint = options.requestedEndpoint;
|
|
755
|
+
}
|
|
756
|
+
static from(raw, ctx) {
|
|
757
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
758
|
+
const requestedEndpoint = raw.payload[0] & 127;
|
|
759
|
+
return new this({
|
|
760
|
+
nodeId: ctx.sourceNodeId,
|
|
761
|
+
requestedEndpoint
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
requestedEndpoint;
|
|
765
|
+
serialize(ctx) {
|
|
766
|
+
this.payload = import_safe2.Bytes.from([this.requestedEndpoint & 127]);
|
|
767
|
+
return super.serialize(ctx);
|
|
768
|
+
}
|
|
769
|
+
toLogEntry(ctx) {
|
|
770
|
+
return {
|
|
771
|
+
...super.toLogEntry(ctx),
|
|
772
|
+
message: { endpoint: this.requestedEndpoint }
|
|
773
|
+
};
|
|
774
|
+
}
|
|
775
|
+
};
|
|
776
|
+
return MultiChannelCCCapabilityGet2 = _classThis;
|
|
777
|
+
})();
|
|
778
|
+
let MultiChannelCCEndPointFindReport = (() => {
|
|
779
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.MultiChannelCommand.EndPointFindReport)];
|
|
780
|
+
let _classDescriptor;
|
|
781
|
+
let _classExtraInitializers = [];
|
|
782
|
+
let _classThis;
|
|
783
|
+
let _classSuper = MultiChannelCC;
|
|
784
|
+
var MultiChannelCCEndPointFindReport2 = class extends _classSuper {
|
|
785
|
+
static {
|
|
786
|
+
_classThis = this;
|
|
787
|
+
}
|
|
788
|
+
static {
|
|
789
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
790
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
791
|
+
MultiChannelCCEndPointFindReport2 = _classThis = _classDescriptor.value;
|
|
792
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
793
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
794
|
+
}
|
|
795
|
+
constructor(options) {
|
|
796
|
+
super(options);
|
|
797
|
+
this.genericClass = options.genericClass;
|
|
798
|
+
this.specificClass = options.specificClass;
|
|
799
|
+
this.foundEndpoints = options.foundEndpoints;
|
|
800
|
+
this.reportsToFollow = options.reportsToFollow;
|
|
801
|
+
}
|
|
802
|
+
static from(raw, ctx) {
|
|
803
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 3);
|
|
804
|
+
const reportsToFollow = raw.payload[0];
|
|
805
|
+
const genericClass = raw.payload[1];
|
|
806
|
+
const specificClass = raw.payload[2];
|
|
807
|
+
const foundEndpoints = [...raw.payload.subarray(3)].map((e) => e & 127).filter((e) => e !== 0);
|
|
808
|
+
return new this({
|
|
809
|
+
nodeId: ctx.sourceNodeId,
|
|
810
|
+
reportsToFollow,
|
|
811
|
+
genericClass,
|
|
812
|
+
specificClass,
|
|
813
|
+
foundEndpoints
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
genericClass;
|
|
817
|
+
specificClass;
|
|
818
|
+
foundEndpoints;
|
|
819
|
+
reportsToFollow;
|
|
820
|
+
serialize(ctx) {
|
|
821
|
+
this.payload = import_safe2.Bytes.concat([
|
|
822
|
+
import_safe2.Bytes.from([
|
|
823
|
+
this.reportsToFollow,
|
|
824
|
+
this.genericClass,
|
|
825
|
+
this.specificClass
|
|
826
|
+
]),
|
|
827
|
+
import_safe2.Bytes.from(this.foundEndpoints.map((e) => e & 127))
|
|
828
|
+
]);
|
|
829
|
+
return super.serialize(ctx);
|
|
830
|
+
}
|
|
831
|
+
getPartialCCSessionId() {
|
|
832
|
+
return {
|
|
833
|
+
genericClass: this.genericClass,
|
|
834
|
+
specificClass: this.specificClass
|
|
835
|
+
};
|
|
836
|
+
}
|
|
837
|
+
expectMoreMessages() {
|
|
838
|
+
return this.reportsToFollow > 0;
|
|
839
|
+
}
|
|
840
|
+
mergePartialCCs(partials, _ctx) {
|
|
841
|
+
this.foundEndpoints = [...partials, this].map((report) => report.foundEndpoints).reduce((prev, cur) => prev.concat(...cur), []);
|
|
842
|
+
}
|
|
843
|
+
toLogEntry(ctx) {
|
|
844
|
+
return {
|
|
845
|
+
...super.toLogEntry(ctx),
|
|
846
|
+
message: {
|
|
847
|
+
"generic device class": (0, import_safe.getGenericDeviceClass)(this.genericClass).label,
|
|
848
|
+
"specific device class": (0, import_safe.getSpecificDeviceClass)(this.genericClass, this.specificClass).label,
|
|
849
|
+
"found endpoints": this.foundEndpoints.join(", "),
|
|
850
|
+
"# of reports to follow": this.reportsToFollow
|
|
851
|
+
}
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
};
|
|
855
|
+
return MultiChannelCCEndPointFindReport2 = _classThis;
|
|
856
|
+
})();
|
|
857
|
+
let MultiChannelCCEndPointFind = (() => {
|
|
858
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.MultiChannelCommand.EndPointFind), (0, import_CommandClassDecorators.expectedCCResponse)(MultiChannelCCEndPointFindReport)];
|
|
859
|
+
let _classDescriptor;
|
|
860
|
+
let _classExtraInitializers = [];
|
|
861
|
+
let _classThis;
|
|
862
|
+
let _classSuper = MultiChannelCC;
|
|
863
|
+
var MultiChannelCCEndPointFind2 = class extends _classSuper {
|
|
864
|
+
static {
|
|
865
|
+
_classThis = this;
|
|
866
|
+
}
|
|
867
|
+
static {
|
|
868
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
869
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
870
|
+
MultiChannelCCEndPointFind2 = _classThis = _classDescriptor.value;
|
|
871
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
872
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
873
|
+
}
|
|
874
|
+
constructor(options) {
|
|
875
|
+
super(options);
|
|
876
|
+
this.genericClass = options.genericClass;
|
|
877
|
+
this.specificClass = options.specificClass;
|
|
878
|
+
}
|
|
879
|
+
static from(raw, ctx) {
|
|
880
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
881
|
+
const genericClass = raw.payload[0];
|
|
882
|
+
const specificClass = raw.payload[1];
|
|
883
|
+
return new this({
|
|
884
|
+
nodeId: ctx.sourceNodeId,
|
|
885
|
+
genericClass,
|
|
886
|
+
specificClass
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
genericClass;
|
|
890
|
+
specificClass;
|
|
891
|
+
serialize(ctx) {
|
|
892
|
+
this.payload = import_safe2.Bytes.from([this.genericClass, this.specificClass]);
|
|
893
|
+
return super.serialize(ctx);
|
|
894
|
+
}
|
|
895
|
+
toLogEntry(ctx) {
|
|
896
|
+
return {
|
|
897
|
+
...super.toLogEntry(ctx),
|
|
898
|
+
message: {
|
|
899
|
+
"generic device class": (0, import_safe.getGenericDeviceClass)(this.genericClass).label,
|
|
900
|
+
"specific device class": (0, import_safe.getSpecificDeviceClass)(this.genericClass, this.specificClass).label
|
|
901
|
+
}
|
|
902
|
+
};
|
|
903
|
+
}
|
|
904
|
+
};
|
|
905
|
+
return MultiChannelCCEndPointFind2 = _classThis;
|
|
906
|
+
})();
|
|
907
|
+
let MultiChannelCCAggregatedMembersReport = (() => {
|
|
908
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.MultiChannelCommand.AggregatedMembersReport), (0, import_CommandClassDecorators.ccValueProperty)("members", MultiChannelCCValues.aggregatedEndpointMembers, (self) => [self.aggregatedEndpointIndex])];
|
|
909
|
+
let _classDescriptor;
|
|
910
|
+
let _classExtraInitializers = [];
|
|
911
|
+
let _classThis;
|
|
912
|
+
let _classSuper = MultiChannelCC;
|
|
913
|
+
var MultiChannelCCAggregatedMembersReport2 = class extends _classSuper {
|
|
914
|
+
static {
|
|
915
|
+
_classThis = this;
|
|
916
|
+
}
|
|
917
|
+
static {
|
|
918
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
919
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
920
|
+
MultiChannelCCAggregatedMembersReport2 = _classThis = _classDescriptor.value;
|
|
921
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
922
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
923
|
+
}
|
|
924
|
+
constructor(options) {
|
|
925
|
+
super(options);
|
|
926
|
+
this.aggregatedEndpointIndex = options.aggregatedEndpointIndex;
|
|
927
|
+
this.members = options.members;
|
|
928
|
+
}
|
|
929
|
+
static from(raw, ctx) {
|
|
930
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
931
|
+
const aggregatedEndpointIndex = raw.payload[0] & 127;
|
|
932
|
+
const bitMaskLength = raw.payload[1];
|
|
933
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2 + bitMaskLength);
|
|
934
|
+
const bitMask = raw.payload.subarray(2, 2 + bitMaskLength);
|
|
935
|
+
const members = (0, import_safe.parseBitMask)(bitMask);
|
|
936
|
+
return new this({
|
|
937
|
+
nodeId: ctx.sourceNodeId,
|
|
938
|
+
aggregatedEndpointIndex,
|
|
939
|
+
members
|
|
940
|
+
});
|
|
941
|
+
}
|
|
942
|
+
aggregatedEndpointIndex;
|
|
943
|
+
members;
|
|
944
|
+
toLogEntry(ctx) {
|
|
945
|
+
return {
|
|
946
|
+
...super.toLogEntry(ctx),
|
|
947
|
+
message: {
|
|
948
|
+
"aggregated endpoint": this.aggregatedEndpointIndex,
|
|
949
|
+
members: this.members.join(", ")
|
|
950
|
+
}
|
|
951
|
+
};
|
|
952
|
+
}
|
|
953
|
+
};
|
|
954
|
+
return MultiChannelCCAggregatedMembersReport2 = _classThis;
|
|
955
|
+
})();
|
|
956
|
+
let MultiChannelCCAggregatedMembersGet = (() => {
|
|
957
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.MultiChannelCommand.AggregatedMembersGet), (0, import_CommandClassDecorators.expectedCCResponse)(MultiChannelCCAggregatedMembersReport)];
|
|
958
|
+
let _classDescriptor;
|
|
959
|
+
let _classExtraInitializers = [];
|
|
960
|
+
let _classThis;
|
|
961
|
+
let _classSuper = MultiChannelCC;
|
|
962
|
+
var MultiChannelCCAggregatedMembersGet2 = class extends _classSuper {
|
|
963
|
+
static {
|
|
964
|
+
_classThis = this;
|
|
965
|
+
}
|
|
966
|
+
static {
|
|
967
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
968
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
969
|
+
MultiChannelCCAggregatedMembersGet2 = _classThis = _classDescriptor.value;
|
|
970
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
971
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
972
|
+
}
|
|
973
|
+
constructor(options) {
|
|
974
|
+
super(options);
|
|
975
|
+
this.requestedEndpoint = options.requestedEndpoint;
|
|
976
|
+
}
|
|
977
|
+
static from(_raw, _ctx) {
|
|
978
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
979
|
+
}
|
|
980
|
+
requestedEndpoint;
|
|
981
|
+
serialize(ctx) {
|
|
982
|
+
this.payload = import_safe2.Bytes.from([this.requestedEndpoint & 127]);
|
|
983
|
+
return super.serialize(ctx);
|
|
984
|
+
}
|
|
985
|
+
toLogEntry(ctx) {
|
|
986
|
+
return {
|
|
987
|
+
...super.toLogEntry(ctx),
|
|
988
|
+
message: { endpoint: this.requestedEndpoint }
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
};
|
|
992
|
+
return MultiChannelCCAggregatedMembersGet2 = _classThis;
|
|
993
|
+
})();
|
|
833
994
|
function getCCResponseForCommandEncapsulation(sent) {
|
|
834
995
|
if (typeof sent.destination === "number" && sent.encapsulated.expectsCCResponse()) {
|
|
835
996
|
return [
|
|
@@ -844,141 +1005,184 @@ function testResponseForCommandEncapsulation(sent, received) {
|
|
|
844
1005
|
}
|
|
845
1006
|
return false;
|
|
846
1007
|
}
|
|
847
|
-
let MultiChannelCCCommandEncapsulation =
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
1008
|
+
let MultiChannelCCCommandEncapsulation = (() => {
|
|
1009
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.MultiChannelCommand.CommandEncapsulation), (0, import_CommandClassDecorators.expectedCCResponse)(getCCResponseForCommandEncapsulation, testResponseForCommandEncapsulation)];
|
|
1010
|
+
let _classDescriptor;
|
|
1011
|
+
let _classExtraInitializers = [];
|
|
1012
|
+
let _classThis;
|
|
1013
|
+
let _classSuper = MultiChannelCC;
|
|
1014
|
+
var MultiChannelCCCommandEncapsulation2 = class extends _classSuper {
|
|
1015
|
+
static {
|
|
1016
|
+
_classThis = this;
|
|
1017
|
+
}
|
|
1018
|
+
static {
|
|
1019
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1020
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1021
|
+
MultiChannelCCCommandEncapsulation2 = _classThis = _classDescriptor.value;
|
|
1022
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1023
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1024
|
+
}
|
|
1025
|
+
constructor(options) {
|
|
1026
|
+
super(options);
|
|
1027
|
+
this.encapsulated = options.encapsulated;
|
|
1028
|
+
this.encapsulated.encapsulatingCC = this;
|
|
1029
|
+
let cur = this;
|
|
1030
|
+
while (cur) {
|
|
1031
|
+
if ((0, import_EncapsulatingCommandClass.isMultiEncapsulatingCommandClass)(cur)) {
|
|
1032
|
+
for (const cc of cur.encapsulated) {
|
|
1033
|
+
cc.endpointIndex = this.endpointIndex;
|
|
1034
|
+
}
|
|
1035
|
+
break;
|
|
1036
|
+
} else if ((0, import_EncapsulatingCommandClass.isEncapsulatingCommandClass)(cur)) {
|
|
1037
|
+
cur.encapsulated.endpointIndex = this.endpointIndex;
|
|
1038
|
+
cur = cur.encapsulated;
|
|
1039
|
+
} else {
|
|
1040
|
+
break;
|
|
857
1041
|
}
|
|
858
|
-
break;
|
|
859
|
-
} else if ((0, import_EncapsulatingCommandClass.isEncapsulatingCommandClass)(cur)) {
|
|
860
|
-
cur.encapsulated.endpointIndex = this.endpointIndex;
|
|
861
|
-
cur = cur.encapsulated;
|
|
862
|
-
} else {
|
|
863
|
-
break;
|
|
864
1042
|
}
|
|
1043
|
+
this.destination = options.destination;
|
|
865
1044
|
}
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
destination = (0, import_safe.parseBitMask)(import_safe2.Bytes.from([destination]));
|
|
1045
|
+
static from(raw, ctx) {
|
|
1046
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
1047
|
+
let endpointIndex;
|
|
1048
|
+
let destination;
|
|
1049
|
+
if (ctx.getDeviceConfig?.(ctx.sourceNodeId)?.compat?.treatDestinationEndpointAsSource) {
|
|
1050
|
+
endpointIndex = raw.payload[1] & 127;
|
|
1051
|
+
destination = 0;
|
|
1052
|
+
} else {
|
|
1053
|
+
endpointIndex = raw.payload[0] & 127;
|
|
1054
|
+
const isBitMask = !!(raw.payload[1] & 128);
|
|
1055
|
+
destination = raw.payload[1] & 127;
|
|
1056
|
+
if (isBitMask) {
|
|
1057
|
+
destination = (0, import_safe.parseBitMask)(import_safe2.Bytes.from([destination]));
|
|
1058
|
+
}
|
|
881
1059
|
}
|
|
1060
|
+
const encapsulated = import_CommandClass.CommandClass.parse(raw.payload.subarray(2), ctx);
|
|
1061
|
+
return new this({
|
|
1062
|
+
nodeId: ctx.sourceNodeId,
|
|
1063
|
+
endpointIndex,
|
|
1064
|
+
destination,
|
|
1065
|
+
encapsulated
|
|
1066
|
+
});
|
|
882
1067
|
}
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
encapsulated;
|
|
892
|
-
/** The destination end point (0-127) or an array of destination end points (1-7) */
|
|
893
|
-
destination;
|
|
894
|
-
serialize(ctx) {
|
|
895
|
-
if (ctx.getDeviceConfig?.(this.nodeId)?.compat?.treatDestinationEndpointAsSource) {
|
|
896
|
-
if (typeof this.destination === "number") {
|
|
897
|
-
this.endpointIndex = this.destination;
|
|
1068
|
+
encapsulated;
|
|
1069
|
+
/** The destination end point (0-127) or an array of destination end points (1-7) */
|
|
1070
|
+
destination;
|
|
1071
|
+
serialize(ctx) {
|
|
1072
|
+
if (ctx.getDeviceConfig?.(this.nodeId)?.compat?.treatDestinationEndpointAsSource) {
|
|
1073
|
+
if (typeof this.destination === "number") {
|
|
1074
|
+
this.endpointIndex = this.destination;
|
|
1075
|
+
}
|
|
898
1076
|
}
|
|
1077
|
+
const destination = typeof this.destination === "number" ? this.destination & 127 : (0, import_safe.encodeBitMask)(this.destination, 7)[0] | 128;
|
|
1078
|
+
this.payload = import_safe2.Bytes.concat([
|
|
1079
|
+
import_safe2.Bytes.from([this.endpointIndex & 127, destination]),
|
|
1080
|
+
this.encapsulated.serialize(ctx)
|
|
1081
|
+
]);
|
|
1082
|
+
return super.serialize(ctx);
|
|
899
1083
|
}
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
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
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
1084
|
+
toLogEntry(ctx) {
|
|
1085
|
+
return {
|
|
1086
|
+
...super.toLogEntry(ctx),
|
|
1087
|
+
message: {
|
|
1088
|
+
source: this.endpointIndex,
|
|
1089
|
+
destination: typeof this.destination === "number" ? this.destination : this.destination.join(", ")
|
|
1090
|
+
}
|
|
1091
|
+
};
|
|
1092
|
+
}
|
|
1093
|
+
computeEncapsulationOverhead() {
|
|
1094
|
+
return super.computeEncapsulationOverhead() + 2;
|
|
1095
|
+
}
|
|
1096
|
+
};
|
|
1097
|
+
return MultiChannelCCCommandEncapsulation2 = _classThis;
|
|
1098
|
+
})();
|
|
1099
|
+
let MultiChannelCCV1Report = (() => {
|
|
1100
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.MultiChannelCommand.ReportV1)];
|
|
1101
|
+
let _classDescriptor;
|
|
1102
|
+
let _classExtraInitializers = [];
|
|
1103
|
+
let _classThis;
|
|
1104
|
+
let _classSuper = MultiChannelCC;
|
|
1105
|
+
var MultiChannelCCV1Report2 = class extends _classSuper {
|
|
1106
|
+
static {
|
|
1107
|
+
_classThis = this;
|
|
1108
|
+
}
|
|
1109
|
+
static {
|
|
1110
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1111
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1112
|
+
MultiChannelCCV1Report2 = _classThis = _classDescriptor.value;
|
|
1113
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1114
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1115
|
+
}
|
|
1116
|
+
constructor(options) {
|
|
1117
|
+
super(options);
|
|
1118
|
+
this.requestedCC = options.requestedCC;
|
|
1119
|
+
this.endpointCount = options.endpointCount;
|
|
1120
|
+
}
|
|
1121
|
+
static from(raw, ctx) {
|
|
1122
|
+
(0, import_safe.validatePayload)(raw.payload.length === 2);
|
|
1123
|
+
const requestedCC = raw.payload[0];
|
|
1124
|
+
const endpointCount = raw.payload[1];
|
|
1125
|
+
return new this({
|
|
1126
|
+
nodeId: ctx.sourceNodeId,
|
|
1127
|
+
requestedCC,
|
|
1128
|
+
endpointCount
|
|
1129
|
+
});
|
|
1130
|
+
}
|
|
1131
|
+
requestedCC;
|
|
1132
|
+
endpointCount;
|
|
1133
|
+
toLogEntry(ctx) {
|
|
1134
|
+
return {
|
|
1135
|
+
...super.toLogEntry(ctx),
|
|
1136
|
+
message: {
|
|
1137
|
+
CC: (0, import_safe.getCCName)(this.requestedCC),
|
|
1138
|
+
"# of endpoints": this.endpointCount
|
|
1139
|
+
}
|
|
1140
|
+
};
|
|
1141
|
+
}
|
|
1142
|
+
};
|
|
1143
|
+
return MultiChannelCCV1Report2 = _classThis;
|
|
1144
|
+
})();
|
|
955
1145
|
function testResponseForMultiChannelV1Get(sent, received) {
|
|
956
1146
|
return sent.requestedCC === received.requestedCC;
|
|
957
1147
|
}
|
|
958
|
-
let MultiChannelCCV1Get =
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
1148
|
+
let MultiChannelCCV1Get = (() => {
|
|
1149
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.MultiChannelCommand.GetV1), (0, import_CommandClassDecorators.expectedCCResponse)(MultiChannelCCV1Report, testResponseForMultiChannelV1Get)];
|
|
1150
|
+
let _classDescriptor;
|
|
1151
|
+
let _classExtraInitializers = [];
|
|
1152
|
+
let _classThis;
|
|
1153
|
+
let _classSuper = MultiChannelCC;
|
|
1154
|
+
var MultiChannelCCV1Get2 = class extends _classSuper {
|
|
1155
|
+
static {
|
|
1156
|
+
_classThis = this;
|
|
1157
|
+
}
|
|
1158
|
+
static {
|
|
1159
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1160
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1161
|
+
MultiChannelCCV1Get2 = _classThis = _classDescriptor.value;
|
|
1162
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1163
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1164
|
+
}
|
|
1165
|
+
constructor(options) {
|
|
1166
|
+
super(options);
|
|
1167
|
+
this.requestedCC = options.requestedCC;
|
|
1168
|
+
}
|
|
1169
|
+
static from(_raw, _ctx) {
|
|
1170
|
+
throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
1171
|
+
}
|
|
1172
|
+
requestedCC;
|
|
1173
|
+
serialize(ctx) {
|
|
1174
|
+
this.payload = import_safe2.Bytes.from([this.requestedCC]);
|
|
1175
|
+
return super.serialize(ctx);
|
|
1176
|
+
}
|
|
1177
|
+
toLogEntry(ctx) {
|
|
1178
|
+
return {
|
|
1179
|
+
...super.toLogEntry(ctx),
|
|
1180
|
+
message: { CC: (0, import_safe.getCCName)(this.requestedCC) }
|
|
1181
|
+
};
|
|
1182
|
+
}
|
|
1183
|
+
};
|
|
1184
|
+
return MultiChannelCCV1Get2 = _classThis;
|
|
1185
|
+
})();
|
|
982
1186
|
function getResponseForV1CommandEncapsulation(sent) {
|
|
983
1187
|
if (sent.encapsulated.expectsCCResponse()) {
|
|
984
1188
|
return MultiChannelCCV1CommandEncapsulation;
|
|
@@ -990,45 +1194,59 @@ function testResponseForV1CommandEncapsulation(sent, received) {
|
|
|
990
1194
|
}
|
|
991
1195
|
return false;
|
|
992
1196
|
}
|
|
993
|
-
let MultiChannelCCV1CommandEncapsulation =
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
]
|
|
1197
|
+
let MultiChannelCCV1CommandEncapsulation = (() => {
|
|
1198
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.MultiChannelCommand.CommandEncapsulationV1), (0, import_CommandClassDecorators.expectedCCResponse)(getResponseForV1CommandEncapsulation, testResponseForV1CommandEncapsulation)];
|
|
1199
|
+
let _classDescriptor;
|
|
1200
|
+
let _classExtraInitializers = [];
|
|
1201
|
+
let _classThis;
|
|
1202
|
+
let _classSuper = MultiChannelCC;
|
|
1203
|
+
var MultiChannelCCV1CommandEncapsulation2 = class extends _classSuper {
|
|
1204
|
+
static {
|
|
1205
|
+
_classThis = this;
|
|
1206
|
+
}
|
|
1207
|
+
static {
|
|
1208
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1209
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1210
|
+
MultiChannelCCV1CommandEncapsulation2 = _classThis = _classDescriptor.value;
|
|
1211
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1212
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
1213
|
+
}
|
|
1214
|
+
constructor(options) {
|
|
1215
|
+
super(options);
|
|
1216
|
+
this.encapsulated = options.encapsulated;
|
|
1217
|
+
this.endpointIndex = this.encapsulated.endpointIndex;
|
|
1218
|
+
}
|
|
1219
|
+
static from(raw, ctx) {
|
|
1220
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
1221
|
+
const endpointIndex = raw.payload[0];
|
|
1222
|
+
const isV2withV1Header = raw.payload.length >= 2 && raw.payload[1] === 0;
|
|
1223
|
+
const encapsulated = import_CommandClass.CommandClass.parse(raw.payload.subarray(isV2withV1Header ? 2 : 1), ctx);
|
|
1224
|
+
return new this({
|
|
1225
|
+
nodeId: ctx.sourceNodeId,
|
|
1226
|
+
endpointIndex,
|
|
1227
|
+
encapsulated
|
|
1228
|
+
});
|
|
1229
|
+
}
|
|
1230
|
+
encapsulated;
|
|
1231
|
+
serialize(ctx) {
|
|
1232
|
+
this.payload = import_safe2.Bytes.concat([
|
|
1233
|
+
import_safe2.Bytes.from([this.endpointIndex]),
|
|
1234
|
+
this.encapsulated.serialize(ctx)
|
|
1235
|
+
]);
|
|
1236
|
+
return super.serialize(ctx);
|
|
1237
|
+
}
|
|
1238
|
+
computeEncapsulationOverhead() {
|
|
1239
|
+
return super.computeEncapsulationOverhead() + 1;
|
|
1240
|
+
}
|
|
1241
|
+
toLogEntry(ctx) {
|
|
1242
|
+
return {
|
|
1243
|
+
...super.toLogEntry(ctx),
|
|
1244
|
+
message: { source: this.endpointIndex }
|
|
1245
|
+
};
|
|
1246
|
+
}
|
|
1247
|
+
};
|
|
1248
|
+
return MultiChannelCCV1CommandEncapsulation2 = _classThis;
|
|
1249
|
+
})();
|
|
1032
1250
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1033
1251
|
0 && (module.exports = {
|
|
1034
1252
|
MultiChannelCC,
|