@zwave-js/cc 13.10.1 → 14.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cc/AlarmSensorCC.d.ts +31 -20
- package/build/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/cc/AlarmSensorCC.js +106 -87
- package/build/cc/AlarmSensorCC.js.map +1 -1
- package/build/cc/AssociationCC.d.ts +38 -32
- package/build/cc/AssociationCC.d.ts.map +1 -1
- package/build/cc/AssociationCC.js +193 -176
- package/build/cc/AssociationCC.js.map +1 -1
- package/build/cc/AssociationGroupInfoCC.d.ts +42 -36
- package/build/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/cc/AssociationGroupInfoCC.js +218 -200
- package/build/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/cc/BarrierOperatorCC.d.ts +41 -24
- package/build/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/cc/BarrierOperatorCC.js +143 -109
- package/build/cc/BarrierOperatorCC.js.map +1 -1
- package/build/cc/BasicCC.d.ts +22 -23
- package/build/cc/BasicCC.d.ts.map +1 -1
- package/build/cc/BasicCC.js +83 -77
- package/build/cc/BasicCC.js.map +1 -1
- package/build/cc/BatteryCC.d.ts +22 -14
- package/build/cc/BatteryCC.d.ts.map +1 -1
- package/build/cc/BatteryCC.js +116 -87
- package/build/cc/BatteryCC.js.map +1 -1
- package/build/cc/BinarySensorCC.d.ts +22 -19
- package/build/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/cc/BinarySensorCC.js +103 -93
- package/build/cc/BinarySensorCC.js.map +1 -1
- package/build/cc/BinarySwitchCC.d.ts +20 -20
- package/build/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/cc/BinarySwitchCC.js +71 -59
- package/build/cc/BinarySwitchCC.js.map +1 -1
- package/build/cc/CRC16CC.d.ts +9 -9
- package/build/cc/CRC16CC.d.ts.map +1 -1
- package/build/cc/CRC16CC.js +36 -36
- package/build/cc/CRC16CC.js.map +1 -1
- package/build/cc/CentralSceneCC.d.ts +34 -16
- package/build/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/cc/CentralSceneCC.js +116 -79
- package/build/cc/CentralSceneCC.js.map +1 -1
- package/build/cc/ClimateControlScheduleCC.d.ts +38 -21
- package/build/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/cc/ClimateControlScheduleCC.js +113 -81
- package/build/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/cc/ClockCC.d.ts +18 -11
- package/build/cc/ClockCC.d.ts.map +1 -1
- package/build/cc/ClockCC.js +57 -43
- package/build/cc/ClockCC.js.map +1 -1
- package/build/cc/ColorSwitchCC.d.ts +37 -33
- package/build/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/cc/ColorSwitchCC.js +216 -189
- package/build/cc/ColorSwitchCC.js.map +1 -1
- package/build/cc/ConfigurationCC.d.ts +89 -74
- package/build/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/cc/ConfigurationCC.js +541 -485
- package/build/cc/ConfigurationCC.js.map +1 -1
- package/build/cc/DeviceResetLocallyCC.d.ts +3 -3
- package/build/cc/DeviceResetLocallyCC.d.ts.map +1 -1
- package/build/cc/DeviceResetLocallyCC.js +14 -14
- package/build/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/cc/DoorLockCC.d.ts +66 -27
- package/build/cc/DoorLockCC.d.ts.map +1 -1
- package/build/cc/DoorLockCC.js +288 -197
- package/build/cc/DoorLockCC.js.map +1 -1
- package/build/cc/DoorLockLoggingCC.d.ts +23 -13
- package/build/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/cc/DoorLockLoggingCC.js +81 -63
- package/build/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/cc/EnergyProductionCC.d.ts +16 -14
- package/build/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/cc/EnergyProductionCC.js +58 -52
- package/build/cc/EnergyProductionCC.js.map +1 -1
- package/build/cc/EntryControlCC.d.ts +44 -18
- package/build/cc/EntryControlCC.d.ts.map +1 -1
- package/build/cc/EntryControlCC.js +163 -112
- package/build/cc/EntryControlCC.js.map +1 -1
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts +69 -34
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/cc/FirmwareUpdateMetaDataCC.js +311 -245
- package/build/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/cc/HumidityControlModeCC.d.ts +24 -16
- package/build/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/cc/HumidityControlModeCC.js +80 -65
- package/build/cc/HumidityControlModeCC.js.map +1 -1
- package/build/cc/HumidityControlOperatingStateCC.d.ts +11 -7
- package/build/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/cc/HumidityControlOperatingStateCC.js +31 -22
- package/build/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/cc/HumidityControlSetpointCC.d.ts +68 -49
- package/build/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/cc/HumidityControlSetpointCC.js +203 -181
- package/build/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/cc/InclusionControllerCC.d.ts +13 -11
- package/build/cc/InclusionControllerCC.d.ts.map +1 -1
- package/build/cc/InclusionControllerCC.js +49 -42
- package/build/cc/InclusionControllerCC.js.map +1 -1
- package/build/cc/IndicatorCC.d.ts +46 -39
- package/build/cc/IndicatorCC.d.ts.map +1 -1
- package/build/cc/IndicatorCC.js +298 -277
- package/build/cc/IndicatorCC.js.map +1 -1
- package/build/cc/IrrigationCC.d.ts +127 -57
- package/build/cc/IrrigationCC.d.ts.map +1 -1
- package/build/cc/IrrigationCC.js +496 -352
- package/build/cc/IrrigationCC.js.map +1 -1
- package/build/cc/LanguageCC.d.ts +17 -11
- package/build/cc/LanguageCC.d.ts.map +1 -1
- package/build/cc/LanguageCC.js +54 -44
- package/build/cc/LanguageCC.js.map +1 -1
- package/build/cc/LockCC.d.ts +16 -11
- package/build/cc/LockCC.d.ts.map +1 -1
- package/build/cc/LockCC.js +48 -38
- package/build/cc/LockCC.js.map +1 -1
- package/build/cc/ManufacturerProprietaryCC.d.ts +12 -11
- package/build/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/cc/ManufacturerProprietaryCC.js +45 -50
- package/build/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/cc/ManufacturerSpecificCC.d.ts +20 -13
- package/build/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/cc/ManufacturerSpecificCC.js +79 -63
- package/build/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/cc/MeterCC.d.ts +30 -26
- package/build/cc/MeterCC.d.ts.map +1 -1
- package/build/cc/MeterCC.js +236 -204
- package/build/cc/MeterCC.js.map +1 -1
- package/build/cc/MultiChannelAssociationCC.d.ts +31 -26
- package/build/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/cc/MultiChannelAssociationCC.js +177 -168
- package/build/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/cc/MultiChannelCC.d.ts +70 -49
- package/build/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/cc/MultiChannelCC.js +377 -318
- package/build/cc/MultiChannelCC.js.map +1 -1
- package/build/cc/MultiCommandCC.d.ts +9 -9
- package/build/cc/MultiCommandCC.d.ts.map +1 -1
- package/build/cc/MultiCommandCC.js +35 -36
- package/build/cc/MultiCommandCC.js.map +1 -1
- package/build/cc/MultilevelSensorCC.d.ts +38 -33
- package/build/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/cc/MultilevelSensorCC.js +172 -152
- package/build/cc/MultilevelSensorCC.js.map +1 -1
- package/build/cc/MultilevelSwitchCC.d.ts +29 -25
- package/build/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/cc/MultilevelSwitchCC.js +147 -127
- package/build/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/cc/NoOperationCC.d.ts +0 -8
- package/build/cc/NoOperationCC.d.ts.map +1 -1
- package/build/cc/NoOperationCC.js +2 -11
- package/build/cc/NoOperationCC.js.map +1 -1
- package/build/cc/NodeNamingCC.d.ts +27 -17
- package/build/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/cc/NodeNamingCC.js +86 -69
- package/build/cc/NodeNamingCC.js.map +1 -1
- package/build/cc/NotificationCC.d.ts +46 -43
- package/build/cc/NotificationCC.d.ts.map +1 -1
- package/build/cc/NotificationCC.js +317 -303
- package/build/cc/NotificationCC.js.map +1 -1
- package/build/cc/PowerlevelCC.d.ts +22 -18
- package/build/cc/PowerlevelCC.d.ts.map +1 -1
- package/build/cc/PowerlevelCC.js +125 -95
- package/build/cc/PowerlevelCC.js.map +1 -1
- package/build/cc/ProtectionCC.d.ts +49 -26
- package/build/cc/ProtectionCC.d.ts.map +1 -1
- package/build/cc/ProtectionCC.js +172 -126
- package/build/cc/ProtectionCC.js.map +1 -1
- package/build/cc/SceneActivationCC.d.ts +8 -7
- package/build/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/cc/SceneActivationCC.js +28 -23
- package/build/cc/SceneActivationCC.js.map +1 -1
- package/build/cc/SceneActuatorConfigurationCC.d.ts +23 -15
- package/build/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/cc/SceneActuatorConfigurationCC.js +79 -62
- package/build/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/cc/SceneControllerConfigurationCC.d.ts +25 -17
- package/build/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/cc/SceneControllerConfigurationCC.js +92 -78
- package/build/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/cc/ScheduleEntryLockCC.d.ts +86 -72
- package/build/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/cc/ScheduleEntryLockCC.js +607 -455
- package/build/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/cc/Security2CC.d.ts +78 -87
- package/build/cc/Security2CC.d.ts.map +1 -1
- package/build/cc/Security2CC.js +798 -765
- package/build/cc/Security2CC.js.map +1 -1
- package/build/cc/SecurityCC.d.ts +47 -42
- package/build/cc/SecurityCC.d.ts.map +1 -1
- package/build/cc/SecurityCC.js +240 -218
- package/build/cc/SecurityCC.js.map +1 -1
- package/build/cc/SoundSwitchCC.d.ts +36 -29
- package/build/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/cc/SoundSwitchCC.js +180 -157
- package/build/cc/SoundSwitchCC.js.map +1 -1
- package/build/cc/SupervisionCC.d.ts +17 -14
- package/build/cc/SupervisionCC.d.ts.map +1 -1
- package/build/cc/SupervisionCC.js +86 -66
- package/build/cc/SupervisionCC.js.map +1 -1
- package/build/cc/ThermostatFanModeCC.d.ts +25 -15
- package/build/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/cc/ThermostatFanModeCC.js +79 -60
- package/build/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/cc/ThermostatFanStateCC.d.ts +11 -7
- package/build/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/cc/ThermostatFanStateCC.js +31 -22
- package/build/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/cc/ThermostatModeCC.d.ts +24 -21
- package/build/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/cc/ThermostatModeCC.js +106 -90
- package/build/cc/ThermostatModeCC.js.map +1 -1
- package/build/cc/ThermostatOperatingStateCC.d.ts +11 -7
- package/build/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/cc/ThermostatOperatingStateCC.js +31 -22
- package/build/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/cc/ThermostatSetbackCC.d.ts +14 -13
- package/build/cc/ThermostatSetbackCC.d.ts.map +1 -1
- package/build/cc/ThermostatSetbackCC.js +64 -57
- package/build/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/cc/ThermostatSetpointCC.d.ts +38 -57
- package/build/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/cc/ThermostatSetpointCC.js +200 -264
- package/build/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/cc/TimeCC.d.ts +24 -20
- package/build/cc/TimeCC.d.ts.map +1 -1
- package/build/cc/TimeCC.js +119 -108
- package/build/cc/TimeCC.js.map +1 -1
- package/build/cc/TimeParametersCC.d.ts +18 -14
- package/build/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/cc/TimeParametersCC.js +77 -69
- package/build/cc/TimeParametersCC.js.map +1 -1
- package/build/cc/TransportServiceCC.d.ts +29 -32
- package/build/cc/TransportServiceCC.d.ts.map +1 -1
- package/build/cc/TransportServiceCC.js +159 -161
- package/build/cc/TransportServiceCC.js.map +1 -1
- package/build/cc/UserCodeCC.d.ts +83 -66
- package/build/cc/UserCodeCC.d.ts.map +1 -1
- package/build/cc/UserCodeCC.js +449 -402
- package/build/cc/UserCodeCC.js.map +1 -1
- package/build/cc/VersionCC.d.ts +36 -20
- package/build/cc/VersionCC.d.ts.map +1 -1
- package/build/cc/VersionCC.js +190 -149
- package/build/cc/VersionCC.js.map +1 -1
- package/build/cc/WakeUpCC.d.ts +27 -13
- package/build/cc/WakeUpCC.d.ts.map +1 -1
- package/build/cc/WakeUpCC.js +105 -77
- package/build/cc/WakeUpCC.js.map +1 -1
- package/build/cc/WindowCoveringCC.d.ts +39 -27
- package/build/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/cc/WindowCoveringCC.js +169 -137
- package/build/cc/WindowCoveringCC.js.map +1 -1
- package/build/cc/ZWavePlusCC.d.ts +8 -7
- package/build/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/cc/ZWavePlusCC.js +44 -37
- package/build/cc/ZWavePlusCC.js.map +1 -1
- package/build/cc/ZWaveProtocolCC.d.ts +111 -84
- package/build/cc/ZWaveProtocolCC.d.ts.map +1 -1
- package/build/cc/ZWaveProtocolCC.js +583 -508
- package/build/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/cc/index.d.ts +37 -34
- package/build/cc/index.d.ts.map +1 -1
- package/build/cc/index.js +6 -7
- package/build/cc/index.js.map +1 -1
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts +29 -24
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
- package/build/cc/manufacturerProprietary/FibaroCC.js +109 -112
- package/build/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/index.d.ts +0 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +0 -1
- package/build/index.js.map +1 -1
- package/build/lib/API.d.ts +21 -18
- package/build/lib/API.d.ts.map +1 -1
- package/build/lib/API.js +25 -49
- package/build/lib/API.js.map +1 -1
- package/build/lib/CommandClass.d.ts +51 -89
- package/build/lib/CommandClass.d.ts.map +1 -1
- package/build/lib/CommandClass.js +177 -249
- package/build/lib/CommandClass.js.map +1 -1
- package/build/lib/EncapsulatingCommandClass.d.ts +1 -15
- package/build/lib/EncapsulatingCommandClass.d.ts.map +1 -1
- package/build/lib/EncapsulatingCommandClass.js.map +1 -1
- package/build/lib/ICommandClassContainer.d.ts +1 -8
- package/build/lib/ICommandClassContainer.d.ts.map +1 -1
- package/build/lib/ICommandClassContainer.js +0 -8
- package/build/lib/ICommandClassContainer.js.map +1 -1
- package/build/lib/Values.d.ts +3 -3
- package/build/lib/Values.d.ts.map +1 -1
- package/build/lib/_Types.d.ts.map +1 -1
- package/build/lib/_Types.js +1 -0
- package/build/lib/_Types.js.map +1 -1
- package/build/lib/utils.d.ts +14 -13
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +94 -92
- package/build/lib/utils.js.map +1 -1
- package/package.json +4 -5
|
@@ -28,6 +28,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
28
28
|
__setModuleDefault(result, mod);
|
|
29
29
|
return result;
|
|
30
30
|
};
|
|
31
|
+
var MultiChannelAssociationCCSet_1, MultiChannelAssociationCCRemove_1, MultiChannelAssociationCCReport_1, MultiChannelAssociationCCGet_1, MultiChannelAssociationCCSupportedGroupingsReport_1;
|
|
31
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
33
|
exports.MultiChannelAssociationCCSupportedGroupingsGet = exports.MultiChannelAssociationCCSupportedGroupingsReport = exports.MultiChannelAssociationCCGet = exports.MultiChannelAssociationCCReport = exports.MultiChannelAssociationCCRemove = exports.MultiChannelAssociationCCSet = exports.MultiChannelAssociationCC = exports.MultiChannelAssociationCCAPI = exports.MultiChannelAssociationCCValues = void 0;
|
|
33
34
|
function __assertType(argName, typeName, boundHasError) {
|
|
@@ -466,22 +467,22 @@ let MultiChannelAssociationCCAPI = class MultiChannelAssociationCCAPI extends AP
|
|
|
466
467
|
*/
|
|
467
468
|
async getGroupCount() {
|
|
468
469
|
this.assertSupportsCommand(_Types_1.MultiChannelAssociationCommand, _Types_1.MultiChannelAssociationCommand.SupportedGroupingsGet);
|
|
469
|
-
const cc = new MultiChannelAssociationCCSupportedGroupingsGet(
|
|
470
|
+
const cc = new MultiChannelAssociationCCSupportedGroupingsGet({
|
|
470
471
|
nodeId: this.endpoint.nodeId,
|
|
471
|
-
|
|
472
|
+
endpointIndex: this.endpoint.index,
|
|
472
473
|
});
|
|
473
|
-
const response = await this.
|
|
474
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
474
475
|
return response?.groupCount;
|
|
475
476
|
}
|
|
476
477
|
async reportGroupCount(groupCount) {
|
|
477
478
|
__assertType("groupCount", "number", __assertType__number.bind(void 0, groupCount));
|
|
478
479
|
this.assertSupportsCommand(_Types_1.MultiChannelAssociationCommand, _Types_1.MultiChannelAssociationCommand.SupportedGroupingsReport);
|
|
479
|
-
const cc = new MultiChannelAssociationCCSupportedGroupingsReport(
|
|
480
|
+
const cc = new MultiChannelAssociationCCSupportedGroupingsReport({
|
|
480
481
|
nodeId: this.endpoint.nodeId,
|
|
481
|
-
|
|
482
|
+
endpointIndex: this.endpoint.index,
|
|
482
483
|
groupCount,
|
|
483
484
|
});
|
|
484
|
-
await this.
|
|
485
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
485
486
|
}
|
|
486
487
|
/**
|
|
487
488
|
* Returns information about an association group.
|
|
@@ -489,12 +490,12 @@ let MultiChannelAssociationCCAPI = class MultiChannelAssociationCCAPI extends AP
|
|
|
489
490
|
async getGroup(groupId) {
|
|
490
491
|
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
491
492
|
this.assertSupportsCommand(_Types_1.MultiChannelAssociationCommand, _Types_1.MultiChannelAssociationCommand.Get);
|
|
492
|
-
const cc = new MultiChannelAssociationCCGet(
|
|
493
|
+
const cc = new MultiChannelAssociationCCGet({
|
|
493
494
|
nodeId: this.endpoint.nodeId,
|
|
494
|
-
|
|
495
|
+
endpointIndex: this.endpoint.index,
|
|
495
496
|
groupId,
|
|
496
497
|
});
|
|
497
|
-
const response = await this.
|
|
498
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
498
499
|
if (response) {
|
|
499
500
|
return (0, safe_2.pick)(response, ["maxNodes", "nodeIds", "endpoints"]);
|
|
500
501
|
}
|
|
@@ -502,12 +503,12 @@ let MultiChannelAssociationCCAPI = class MultiChannelAssociationCCAPI extends AP
|
|
|
502
503
|
async sendReport(options) {
|
|
503
504
|
__assertType("options", "MultiChannelAssociationCCReportOptions", __assertType__MultiChannelAssociationCCReportOptions.bind(void 0, options));
|
|
504
505
|
this.assertSupportsCommand(_Types_1.MultiChannelAssociationCommand, _Types_1.MultiChannelAssociationCommand.Report);
|
|
505
|
-
const cc = new MultiChannelAssociationCCReport(
|
|
506
|
+
const cc = new MultiChannelAssociationCCReport({
|
|
506
507
|
nodeId: this.endpoint.nodeId,
|
|
507
|
-
|
|
508
|
+
endpointIndex: this.endpoint.index,
|
|
508
509
|
...options,
|
|
509
510
|
});
|
|
510
|
-
await this.
|
|
511
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
511
512
|
}
|
|
512
513
|
/**
|
|
513
514
|
* Adds new nodes or endpoints to an association group
|
|
@@ -515,12 +516,12 @@ let MultiChannelAssociationCCAPI = class MultiChannelAssociationCCAPI extends AP
|
|
|
515
516
|
async addDestinations(options) {
|
|
516
517
|
__assertType("options", "MultiChannelAssociationCCSetOptions", __assertType__MultiChannelAssociationCCSetOptions.bind(void 0, options));
|
|
517
518
|
this.assertSupportsCommand(_Types_1.MultiChannelAssociationCommand, _Types_1.MultiChannelAssociationCommand.Set);
|
|
518
|
-
const cc = new MultiChannelAssociationCCSet(
|
|
519
|
+
const cc = new MultiChannelAssociationCCSet({
|
|
519
520
|
nodeId: this.endpoint.nodeId,
|
|
520
|
-
|
|
521
|
+
endpointIndex: this.endpoint.index,
|
|
521
522
|
...options,
|
|
522
523
|
});
|
|
523
|
-
return this.
|
|
524
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
524
525
|
}
|
|
525
526
|
/**
|
|
526
527
|
* Removes nodes or endpoints from an association group
|
|
@@ -532,11 +533,11 @@ let MultiChannelAssociationCCAPI = class MultiChannelAssociationCCAPI extends AP
|
|
|
532
533
|
// V1 does not support omitting the group, manually remove the destination from all groups
|
|
533
534
|
// We don't want to do too much work, so find out which groups the destination is in
|
|
534
535
|
const currentDestinations = MultiChannelAssociationCC
|
|
535
|
-
.getAllDestinationsCached(this.
|
|
536
|
+
.getAllDestinationsCached(this.host, this.endpoint);
|
|
536
537
|
for (const [group, destinations] of currentDestinations) {
|
|
537
|
-
const cc = new MultiChannelAssociationCCRemove(
|
|
538
|
+
const cc = new MultiChannelAssociationCCRemove({
|
|
538
539
|
nodeId: this.endpoint.nodeId,
|
|
539
|
-
|
|
540
|
+
endpointIndex: this.endpoint.index,
|
|
540
541
|
groupId: group,
|
|
541
542
|
nodeIds: destinations
|
|
542
543
|
.filter((d) => d.endpoint != undefined)
|
|
@@ -544,16 +545,19 @@ let MultiChannelAssociationCCAPI = class MultiChannelAssociationCCAPI extends AP
|
|
|
544
545
|
endpoints: destinations.filter((d) => d.endpoint != undefined),
|
|
545
546
|
});
|
|
546
547
|
// TODO: evaluate intermediate supervision results
|
|
547
|
-
await this.
|
|
548
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
548
549
|
}
|
|
549
550
|
}
|
|
551
|
+
else if (options.groupId && options.groupId < 0) {
|
|
552
|
+
throw new safe_1.ZWaveError("The group id must not be negative!", safe_1.ZWaveErrorCodes.Argument_Invalid);
|
|
553
|
+
}
|
|
550
554
|
else {
|
|
551
|
-
const cc = new MultiChannelAssociationCCRemove(
|
|
555
|
+
const cc = new MultiChannelAssociationCCRemove({
|
|
552
556
|
nodeId: this.endpoint.nodeId,
|
|
553
|
-
|
|
557
|
+
endpointIndex: this.endpoint.index,
|
|
554
558
|
...options,
|
|
555
559
|
});
|
|
556
|
-
return this.
|
|
560
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
557
561
|
}
|
|
558
562
|
}
|
|
559
563
|
};
|
|
@@ -577,28 +581,28 @@ let MultiChannelAssociationCC = class MultiChannelAssociationCC extends CommandC
|
|
|
577
581
|
* Returns the number of association groups reported by the node/endpoint.
|
|
578
582
|
* This only works AFTER the interview process
|
|
579
583
|
*/
|
|
580
|
-
static getGroupCountCached(
|
|
581
|
-
return
|
|
584
|
+
static getGroupCountCached(ctx, endpoint) {
|
|
585
|
+
return ctx
|
|
582
586
|
.getValueDB(endpoint.nodeId)
|
|
583
|
-
.getValue(exports.MultiChannelAssociationCCValues.groupCount.endpoint(endpoint.index)) || 0
|
|
587
|
+
.getValue(exports.MultiChannelAssociationCCValues.groupCount.endpoint(endpoint.index)) || 0;
|
|
584
588
|
}
|
|
585
589
|
/**
|
|
586
590
|
* Returns the number of nodes an association group supports.
|
|
587
591
|
* This only works AFTER the interview process
|
|
588
592
|
*/
|
|
589
|
-
static getMaxNodesCached(
|
|
590
|
-
return
|
|
593
|
+
static getMaxNodesCached(ctx, endpoint, groupId) {
|
|
594
|
+
return ctx
|
|
591
595
|
.getValueDB(endpoint.nodeId)
|
|
592
|
-
.getValue(exports.MultiChannelAssociationCCValues.maxNodes(groupId).endpoint(endpoint.index)) ?? 0
|
|
596
|
+
.getValue(exports.MultiChannelAssociationCCValues.maxNodes(groupId).endpoint(endpoint.index)) ?? 0;
|
|
593
597
|
}
|
|
594
598
|
/**
|
|
595
599
|
* Returns all the destinations of all association groups reported by the node/endpoint.
|
|
596
600
|
* This only works AFTER the interview process
|
|
597
601
|
*/
|
|
598
|
-
static getAllDestinationsCached(
|
|
602
|
+
static getAllDestinationsCached(ctx, endpoint) {
|
|
599
603
|
const ret = new Map();
|
|
600
|
-
const groupCount = this.getGroupCountCached(
|
|
601
|
-
const valueDB =
|
|
604
|
+
const groupCount = this.getGroupCountCached(ctx, endpoint);
|
|
605
|
+
const valueDB = ctx.getValueDB(endpoint.nodeId);
|
|
602
606
|
for (let i = 1; i <= groupCount; i++) {
|
|
603
607
|
const groupDestinations = [];
|
|
604
608
|
// Add all node destinations
|
|
@@ -628,31 +632,31 @@ let MultiChannelAssociationCC = class MultiChannelAssociationCC extends CommandC
|
|
|
628
632
|
}
|
|
629
633
|
return ret;
|
|
630
634
|
}
|
|
631
|
-
async interview(
|
|
632
|
-
const node = this.getNode(
|
|
633
|
-
const endpoint = this.getEndpoint(
|
|
634
|
-
const mcAPI = API_1.CCAPI.create(safe_1.CommandClasses["Multi Channel Association"],
|
|
635
|
-
|
|
635
|
+
async interview(ctx) {
|
|
636
|
+
const node = this.getNode(ctx);
|
|
637
|
+
const endpoint = this.getEndpoint(ctx);
|
|
638
|
+
const mcAPI = API_1.CCAPI.create(safe_1.CommandClasses["Multi Channel Association"], ctx, endpoint);
|
|
639
|
+
ctx.logNode(node.id, {
|
|
636
640
|
endpoint: this.endpointIndex,
|
|
637
641
|
message: `Interviewing ${this.ccName}...`,
|
|
638
642
|
direction: "none",
|
|
639
643
|
});
|
|
640
644
|
// First find out how many groups are supported as multi channel
|
|
641
|
-
|
|
645
|
+
ctx.logNode(node.id, {
|
|
642
646
|
endpoint: this.endpointIndex,
|
|
643
647
|
message: "querying number of multi channel association groups...",
|
|
644
648
|
direction: "outbound",
|
|
645
649
|
});
|
|
646
650
|
const mcGroupCount = await mcAPI.getGroupCount();
|
|
647
651
|
if (mcGroupCount != undefined) {
|
|
648
|
-
|
|
652
|
+
ctx.logNode(node.id, {
|
|
649
653
|
endpoint: this.endpointIndex,
|
|
650
654
|
message: `supports ${mcGroupCount} multi channel association groups`,
|
|
651
655
|
direction: "inbound",
|
|
652
656
|
});
|
|
653
657
|
}
|
|
654
658
|
else {
|
|
655
|
-
|
|
659
|
+
ctx.logNode(node.id, {
|
|
656
660
|
endpoint: this.endpointIndex,
|
|
657
661
|
message: "Querying multi channel association groups timed out, skipping interview...",
|
|
658
662
|
level: "warn",
|
|
@@ -660,28 +664,28 @@ let MultiChannelAssociationCC = class MultiChannelAssociationCC extends CommandC
|
|
|
660
664
|
return;
|
|
661
665
|
}
|
|
662
666
|
// Query each association group for its members
|
|
663
|
-
await this.refreshValues(
|
|
667
|
+
await this.refreshValues(ctx);
|
|
664
668
|
// And set up lifeline associations
|
|
665
|
-
await ccUtils.configureLifelineAssociations(
|
|
669
|
+
await ccUtils.configureLifelineAssociations(ctx, endpoint);
|
|
666
670
|
// Remember that the interview is complete
|
|
667
|
-
this.setInterviewComplete(
|
|
671
|
+
this.setInterviewComplete(ctx, true);
|
|
668
672
|
}
|
|
669
|
-
async refreshValues(
|
|
670
|
-
const node = this.getNode(
|
|
671
|
-
const endpoint = this.getEndpoint(
|
|
672
|
-
const mcAPI = API_1.CCAPI.create(safe_1.CommandClasses["Multi Channel Association"],
|
|
673
|
+
async refreshValues(ctx) {
|
|
674
|
+
const node = this.getNode(ctx);
|
|
675
|
+
const endpoint = this.getEndpoint(ctx);
|
|
676
|
+
const mcAPI = API_1.CCAPI.create(safe_1.CommandClasses["Multi Channel Association"], ctx, endpoint).withOptions({
|
|
673
677
|
priority: safe_1.MessagePriority.NodeQuery,
|
|
674
678
|
});
|
|
675
|
-
const assocAPI = API_1.CCAPI.create(safe_1.CommandClasses.Association,
|
|
679
|
+
const assocAPI = API_1.CCAPI.create(safe_1.CommandClasses.Association, ctx, endpoint).withOptions({
|
|
676
680
|
priority: safe_1.MessagePriority.NodeQuery,
|
|
677
681
|
});
|
|
678
|
-
const mcGroupCount = this.getValue(
|
|
682
|
+
const mcGroupCount = this.getValue(ctx, exports.MultiChannelAssociationCCValues.groupCount) ?? 0;
|
|
679
683
|
// Some devices report more association groups than multi channel association groups, so we need this info here
|
|
680
|
-
const assocGroupCount = this.getValue(
|
|
684
|
+
const assocGroupCount = this.getValue(ctx, AssociationCC_1.AssociationCCValues.groupCount)
|
|
681
685
|
|| mcGroupCount;
|
|
682
686
|
// Then query each multi channel association group
|
|
683
687
|
for (let groupId = 1; groupId <= mcGroupCount; groupId++) {
|
|
684
|
-
|
|
688
|
+
ctx.logNode(node.id, {
|
|
685
689
|
endpoint: this.endpointIndex,
|
|
686
690
|
message: `querying multi channel association group #${groupId}...`,
|
|
687
691
|
direction: "outbound",
|
|
@@ -702,7 +706,7 @@ currently assigned endpoints: ${group.endpoints
|
|
|
702
706
|
}
|
|
703
707
|
})
|
|
704
708
|
.join("")}`;
|
|
705
|
-
|
|
709
|
+
ctx.logNode(node.id, {
|
|
706
710
|
endpoint: this.endpointIndex,
|
|
707
711
|
message: logMessage,
|
|
708
712
|
direction: "inbound",
|
|
@@ -710,13 +714,13 @@ currently assigned endpoints: ${group.endpoints
|
|
|
710
714
|
}
|
|
711
715
|
// Check if there are more non-multi-channel association groups we haven't queried yet
|
|
712
716
|
if (assocAPI.isSupported() && assocGroupCount > mcGroupCount) {
|
|
713
|
-
|
|
717
|
+
ctx.logNode(node.id, {
|
|
714
718
|
endpoint: this.endpointIndex,
|
|
715
719
|
message: `querying additional non-multi-channel association groups...`,
|
|
716
720
|
direction: "outbound",
|
|
717
721
|
});
|
|
718
722
|
for (let groupId = mcGroupCount + 1; groupId <= assocGroupCount; groupId++) {
|
|
719
|
-
|
|
723
|
+
ctx.logNode(node.id, {
|
|
720
724
|
endpoint: this.endpointIndex,
|
|
721
725
|
message: `querying association group #${groupId}...`,
|
|
722
726
|
direction: "outbound",
|
|
@@ -727,7 +731,7 @@ currently assigned endpoints: ${group.endpoints
|
|
|
727
731
|
const logMessage = `received information for association group #${groupId}:
|
|
728
732
|
maximum # of nodes: ${group.maxNodes}
|
|
729
733
|
currently assigned nodes: ${group.nodeIds.map(String).join(", ")}`;
|
|
730
|
-
|
|
734
|
+
ctx.logNode(node.id, {
|
|
731
735
|
endpoint: this.endpointIndex,
|
|
732
736
|
message: logMessage,
|
|
733
737
|
direction: "inbound",
|
|
@@ -742,41 +746,44 @@ exports.MultiChannelAssociationCC = MultiChannelAssociationCC = __decorate([
|
|
|
742
746
|
(0, CommandClassDecorators_1.implementedVersion)(5),
|
|
743
747
|
(0, CommandClassDecorators_1.ccValues)(exports.MultiChannelAssociationCCValues)
|
|
744
748
|
], MultiChannelAssociationCC);
|
|
745
|
-
let MultiChannelAssociationCCSet = class MultiChannelAssociationCCSet extends MultiChannelAssociationCC {
|
|
746
|
-
constructor(
|
|
747
|
-
super(
|
|
748
|
-
if (
|
|
749
|
-
(
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
749
|
+
let MultiChannelAssociationCCSet = MultiChannelAssociationCCSet_1 = class MultiChannelAssociationCCSet extends MultiChannelAssociationCC {
|
|
750
|
+
constructor(options) {
|
|
751
|
+
super(options);
|
|
752
|
+
if (options.groupId < 1) {
|
|
753
|
+
throw new safe_1.ZWaveError("The group id must be positive!", safe_1.ZWaveErrorCodes.Argument_Invalid);
|
|
754
|
+
}
|
|
755
|
+
this.groupId = options.groupId;
|
|
756
|
+
this.nodeIds = ("nodeIds" in options && options.nodeIds) || [];
|
|
757
|
+
if (this.nodeIds.some((n) => n < 1 || n > safe_1.MAX_NODES)) {
|
|
758
|
+
throw new safe_1.ZWaveError(`All node IDs must be between 1 and ${safe_1.MAX_NODES}!`, safe_1.ZWaveErrorCodes.Argument_Invalid);
|
|
759
|
+
}
|
|
760
|
+
this.endpoints = ("endpoints" in options && options.endpoints)
|
|
761
|
+
|| [];
|
|
762
|
+
}
|
|
763
|
+
static from(raw, ctx) {
|
|
764
|
+
(0, safe_1.validatePayload)(raw.payload.length >= 1);
|
|
765
|
+
const groupId = raw.payload[0];
|
|
766
|
+
const { nodeIds, endpoints } = deserializeMultiChannelAssociationDestination(raw.payload.subarray(1));
|
|
767
|
+
return new MultiChannelAssociationCCSet_1({
|
|
768
|
+
nodeId: ctx.sourceNodeId,
|
|
769
|
+
groupId,
|
|
770
|
+
nodeIds,
|
|
771
|
+
endpoints,
|
|
772
|
+
});
|
|
766
773
|
}
|
|
767
774
|
groupId;
|
|
768
775
|
nodeIds;
|
|
769
776
|
endpoints;
|
|
770
|
-
serialize() {
|
|
777
|
+
serialize(ctx) {
|
|
771
778
|
this.payload = Buffer.concat([
|
|
772
779
|
Buffer.from([this.groupId]),
|
|
773
780
|
serializeMultiChannelAssociationDestination(this.nodeIds, this.endpoints),
|
|
774
781
|
]);
|
|
775
|
-
return super.serialize();
|
|
782
|
+
return super.serialize(ctx);
|
|
776
783
|
}
|
|
777
|
-
toLogEntry(
|
|
784
|
+
toLogEntry(ctx) {
|
|
778
785
|
return {
|
|
779
|
-
...super.toLogEntry(
|
|
786
|
+
...super.toLogEntry(ctx),
|
|
780
787
|
message: {
|
|
781
788
|
"group id": this.groupId,
|
|
782
789
|
"node ids": this.nodeIds.join(", "),
|
|
@@ -786,48 +793,41 @@ let MultiChannelAssociationCCSet = class MultiChannelAssociationCCSet extends Mu
|
|
|
786
793
|
}
|
|
787
794
|
};
|
|
788
795
|
exports.MultiChannelAssociationCCSet = MultiChannelAssociationCCSet;
|
|
789
|
-
exports.MultiChannelAssociationCCSet = MultiChannelAssociationCCSet = __decorate([
|
|
796
|
+
exports.MultiChannelAssociationCCSet = MultiChannelAssociationCCSet = MultiChannelAssociationCCSet_1 = __decorate([
|
|
790
797
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.MultiChannelAssociationCommand.Set),
|
|
791
798
|
(0, CommandClassDecorators_1.useSupervision)()
|
|
792
799
|
], MultiChannelAssociationCCSet);
|
|
793
|
-
let MultiChannelAssociationCCRemove = class MultiChannelAssociationCCRemove extends MultiChannelAssociationCC {
|
|
794
|
-
constructor(
|
|
795
|
-
super(
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
}
|
|
813
|
-
// When removing associations, we allow invalid node IDs.
|
|
814
|
-
// See GH#3606 - it is possible that those exist.
|
|
815
|
-
this.groupId = options.groupId;
|
|
816
|
-
this.nodeIds = options.nodeIds;
|
|
817
|
-
this.endpoints = options.endpoints;
|
|
818
|
-
}
|
|
800
|
+
let MultiChannelAssociationCCRemove = MultiChannelAssociationCCRemove_1 = class MultiChannelAssociationCCRemove extends MultiChannelAssociationCC {
|
|
801
|
+
constructor(options) {
|
|
802
|
+
super(options);
|
|
803
|
+
// When removing associations, we allow invalid node IDs.
|
|
804
|
+
// See GH#3606 - it is possible that those exist.
|
|
805
|
+
this.groupId = options.groupId;
|
|
806
|
+
this.nodeIds = options.nodeIds;
|
|
807
|
+
this.endpoints = options.endpoints;
|
|
808
|
+
}
|
|
809
|
+
static from(raw, ctx) {
|
|
810
|
+
(0, safe_1.validatePayload)(raw.payload.length >= 1);
|
|
811
|
+
const groupId = raw.payload[0];
|
|
812
|
+
const { nodeIds, endpoints } = deserializeMultiChannelAssociationDestination(raw.payload.subarray(1));
|
|
813
|
+
return new MultiChannelAssociationCCRemove_1({
|
|
814
|
+
nodeId: ctx.sourceNodeId,
|
|
815
|
+
groupId,
|
|
816
|
+
nodeIds,
|
|
817
|
+
endpoints,
|
|
818
|
+
});
|
|
819
819
|
}
|
|
820
820
|
groupId;
|
|
821
821
|
nodeIds;
|
|
822
822
|
endpoints;
|
|
823
|
-
serialize() {
|
|
823
|
+
serialize(ctx) {
|
|
824
824
|
this.payload = Buffer.concat([
|
|
825
825
|
Buffer.from([this.groupId || 0]),
|
|
826
826
|
serializeMultiChannelAssociationDestination(this.nodeIds || [], this.endpoints || []),
|
|
827
827
|
]);
|
|
828
|
-
return super.serialize();
|
|
828
|
+
return super.serialize(ctx);
|
|
829
829
|
}
|
|
830
|
-
toLogEntry(
|
|
830
|
+
toLogEntry(ctx) {
|
|
831
831
|
const message = {
|
|
832
832
|
"group id": this.groupId || "(all groups)",
|
|
833
833
|
};
|
|
@@ -838,34 +838,39 @@ let MultiChannelAssociationCCRemove = class MultiChannelAssociationCCRemove exte
|
|
|
838
838
|
message.endpoints = endpointAddressesToString(this.endpoints);
|
|
839
839
|
}
|
|
840
840
|
return {
|
|
841
|
-
...super.toLogEntry(
|
|
841
|
+
...super.toLogEntry(ctx),
|
|
842
842
|
message,
|
|
843
843
|
};
|
|
844
844
|
}
|
|
845
845
|
};
|
|
846
846
|
exports.MultiChannelAssociationCCRemove = MultiChannelAssociationCCRemove;
|
|
847
|
-
exports.MultiChannelAssociationCCRemove = MultiChannelAssociationCCRemove = __decorate([
|
|
847
|
+
exports.MultiChannelAssociationCCRemove = MultiChannelAssociationCCRemove = MultiChannelAssociationCCRemove_1 = __decorate([
|
|
848
848
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.MultiChannelAssociationCommand.Remove),
|
|
849
849
|
(0, CommandClassDecorators_1.useSupervision)()
|
|
850
850
|
], MultiChannelAssociationCCRemove);
|
|
851
|
-
let MultiChannelAssociationCCReport = class MultiChannelAssociationCCReport extends MultiChannelAssociationCC {
|
|
852
|
-
constructor(
|
|
853
|
-
super(
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
851
|
+
let MultiChannelAssociationCCReport = MultiChannelAssociationCCReport_1 = class MultiChannelAssociationCCReport extends MultiChannelAssociationCC {
|
|
852
|
+
constructor(options) {
|
|
853
|
+
super(options);
|
|
854
|
+
this.groupId = options.groupId;
|
|
855
|
+
this.maxNodes = options.maxNodes;
|
|
856
|
+
this.nodeIds = options.nodeIds;
|
|
857
|
+
this.endpoints = options.endpoints;
|
|
858
|
+
this.reportsToFollow = options.reportsToFollow;
|
|
859
|
+
}
|
|
860
|
+
static from(raw, ctx) {
|
|
861
|
+
(0, safe_1.validatePayload)(raw.payload.length >= 3);
|
|
862
|
+
const groupId = raw.payload[0];
|
|
863
|
+
const maxNodes = raw.payload[1];
|
|
864
|
+
const reportsToFollow = raw.payload[2];
|
|
865
|
+
const { nodeIds, endpoints } = deserializeMultiChannelAssociationDestination(raw.payload.subarray(3));
|
|
866
|
+
return new MultiChannelAssociationCCReport_1({
|
|
867
|
+
nodeId: ctx.sourceNodeId,
|
|
868
|
+
groupId,
|
|
869
|
+
maxNodes,
|
|
870
|
+
nodeIds,
|
|
871
|
+
endpoints,
|
|
872
|
+
reportsToFollow,
|
|
873
|
+
});
|
|
869
874
|
}
|
|
870
875
|
groupId;
|
|
871
876
|
maxNodes;
|
|
@@ -879,7 +884,7 @@ let MultiChannelAssociationCCReport = class MultiChannelAssociationCCReport exte
|
|
|
879
884
|
expectMoreMessages() {
|
|
880
885
|
return this.reportsToFollow > 0;
|
|
881
886
|
}
|
|
882
|
-
mergePartialCCs(
|
|
887
|
+
mergePartialCCs(partials, _ctx) {
|
|
883
888
|
// Concat the list of nodes
|
|
884
889
|
this.nodeIds = [...partials, this]
|
|
885
890
|
.map((report) => [...report.nodeIds])
|
|
@@ -889,7 +894,7 @@ let MultiChannelAssociationCCReport = class MultiChannelAssociationCCReport exte
|
|
|
889
894
|
.map((report) => [...report.endpoints])
|
|
890
895
|
.reduce((prev, cur) => prev.concat(...cur), []);
|
|
891
896
|
}
|
|
892
|
-
serialize() {
|
|
897
|
+
serialize(ctx) {
|
|
893
898
|
const destinations = serializeMultiChannelAssociationDestination(this.nodeIds, this.endpoints);
|
|
894
899
|
this.payload = Buffer.concat([
|
|
895
900
|
Buffer.from([
|
|
@@ -899,11 +904,11 @@ let MultiChannelAssociationCCReport = class MultiChannelAssociationCCReport exte
|
|
|
899
904
|
]),
|
|
900
905
|
destinations,
|
|
901
906
|
]);
|
|
902
|
-
return super.serialize();
|
|
907
|
+
return super.serialize(ctx);
|
|
903
908
|
}
|
|
904
|
-
toLogEntry(
|
|
909
|
+
toLogEntry(ctx) {
|
|
905
910
|
return {
|
|
906
|
-
...super.toLogEntry(
|
|
911
|
+
...super.toLogEntry(ctx),
|
|
907
912
|
message: {
|
|
908
913
|
"group id": this.groupId,
|
|
909
914
|
"maximum # of nodes": this.maxNodes,
|
|
@@ -923,59 +928,63 @@ __decorate([
|
|
|
923
928
|
__decorate([
|
|
924
929
|
(0, CommandClassDecorators_1.ccValue)(exports.MultiChannelAssociationCCValues.endpoints, (self) => [self.groupId])
|
|
925
930
|
], MultiChannelAssociationCCReport.prototype, "endpoints", void 0);
|
|
926
|
-
exports.MultiChannelAssociationCCReport = MultiChannelAssociationCCReport = __decorate([
|
|
931
|
+
exports.MultiChannelAssociationCCReport = MultiChannelAssociationCCReport = MultiChannelAssociationCCReport_1 = __decorate([
|
|
927
932
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.MultiChannelAssociationCommand.Report)
|
|
928
933
|
], MultiChannelAssociationCCReport);
|
|
929
|
-
let MultiChannelAssociationCCGet = class MultiChannelAssociationCCGet extends MultiChannelAssociationCC {
|
|
930
|
-
constructor(
|
|
931
|
-
super(
|
|
932
|
-
if (
|
|
933
|
-
(
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
934
|
+
let MultiChannelAssociationCCGet = MultiChannelAssociationCCGet_1 = class MultiChannelAssociationCCGet extends MultiChannelAssociationCC {
|
|
935
|
+
constructor(options) {
|
|
936
|
+
super(options);
|
|
937
|
+
if (options.groupId < 1) {
|
|
938
|
+
throw new safe_1.ZWaveError("The group id must be positive!", safe_1.ZWaveErrorCodes.Argument_Invalid);
|
|
939
|
+
}
|
|
940
|
+
this.groupId = options.groupId;
|
|
941
|
+
}
|
|
942
|
+
static from(raw, ctx) {
|
|
943
|
+
(0, safe_1.validatePayload)(raw.payload.length >= 1);
|
|
944
|
+
const groupId = raw.payload[0];
|
|
945
|
+
return new MultiChannelAssociationCCGet_1({
|
|
946
|
+
nodeId: ctx.sourceNodeId,
|
|
947
|
+
groupId,
|
|
948
|
+
});
|
|
942
949
|
}
|
|
943
950
|
groupId;
|
|
944
|
-
serialize() {
|
|
951
|
+
serialize(ctx) {
|
|
945
952
|
this.payload = Buffer.from([this.groupId]);
|
|
946
|
-
return super.serialize();
|
|
953
|
+
return super.serialize(ctx);
|
|
947
954
|
}
|
|
948
|
-
toLogEntry(
|
|
955
|
+
toLogEntry(ctx) {
|
|
949
956
|
return {
|
|
950
|
-
...super.toLogEntry(
|
|
957
|
+
...super.toLogEntry(ctx),
|
|
951
958
|
message: { "group id": this.groupId },
|
|
952
959
|
};
|
|
953
960
|
}
|
|
954
961
|
};
|
|
955
962
|
exports.MultiChannelAssociationCCGet = MultiChannelAssociationCCGet;
|
|
956
|
-
exports.MultiChannelAssociationCCGet = MultiChannelAssociationCCGet = __decorate([
|
|
963
|
+
exports.MultiChannelAssociationCCGet = MultiChannelAssociationCCGet = MultiChannelAssociationCCGet_1 = __decorate([
|
|
957
964
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.MultiChannelAssociationCommand.Get),
|
|
958
965
|
(0, CommandClassDecorators_1.expectedCCResponse)(MultiChannelAssociationCCReport)
|
|
959
966
|
], MultiChannelAssociationCCGet);
|
|
960
|
-
let MultiChannelAssociationCCSupportedGroupingsReport = class MultiChannelAssociationCCSupportedGroupingsReport extends MultiChannelAssociationCC {
|
|
961
|
-
constructor(
|
|
962
|
-
super(
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
967
|
+
let MultiChannelAssociationCCSupportedGroupingsReport = MultiChannelAssociationCCSupportedGroupingsReport_1 = class MultiChannelAssociationCCSupportedGroupingsReport extends MultiChannelAssociationCC {
|
|
968
|
+
constructor(options) {
|
|
969
|
+
super(options);
|
|
970
|
+
this.groupCount = options.groupCount;
|
|
971
|
+
}
|
|
972
|
+
static from(raw, ctx) {
|
|
973
|
+
(0, safe_1.validatePayload)(raw.payload.length >= 1);
|
|
974
|
+
const groupCount = raw.payload[0];
|
|
975
|
+
return new MultiChannelAssociationCCSupportedGroupingsReport_1({
|
|
976
|
+
nodeId: ctx.sourceNodeId,
|
|
977
|
+
groupCount,
|
|
978
|
+
});
|
|
970
979
|
}
|
|
971
980
|
groupCount;
|
|
972
|
-
serialize() {
|
|
981
|
+
serialize(ctx) {
|
|
973
982
|
this.payload = Buffer.from([this.groupCount]);
|
|
974
|
-
return super.serialize();
|
|
983
|
+
return super.serialize(ctx);
|
|
975
984
|
}
|
|
976
|
-
toLogEntry(
|
|
985
|
+
toLogEntry(ctx) {
|
|
977
986
|
return {
|
|
978
|
-
...super.toLogEntry(
|
|
987
|
+
...super.toLogEntry(ctx),
|
|
979
988
|
message: { "group count": this.groupCount },
|
|
980
989
|
};
|
|
981
990
|
}
|
|
@@ -984,7 +993,7 @@ exports.MultiChannelAssociationCCSupportedGroupingsReport = MultiChannelAssociat
|
|
|
984
993
|
__decorate([
|
|
985
994
|
(0, CommandClassDecorators_1.ccValue)(exports.MultiChannelAssociationCCValues.groupCount)
|
|
986
995
|
], MultiChannelAssociationCCSupportedGroupingsReport.prototype, "groupCount", void 0);
|
|
987
|
-
exports.MultiChannelAssociationCCSupportedGroupingsReport = MultiChannelAssociationCCSupportedGroupingsReport = __decorate([
|
|
996
|
+
exports.MultiChannelAssociationCCSupportedGroupingsReport = MultiChannelAssociationCCSupportedGroupingsReport = MultiChannelAssociationCCSupportedGroupingsReport_1 = __decorate([
|
|
988
997
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.MultiChannelAssociationCommand.SupportedGroupingsReport)
|
|
989
998
|
], MultiChannelAssociationCCSupportedGroupingsReport);
|
|
990
999
|
let MultiChannelAssociationCCSupportedGroupingsGet = class MultiChannelAssociationCCSupportedGroupingsGet extends MultiChannelAssociationCC {
|