@zwave-js/cc 11.0.0-beta.0 → 11.0.0-beta.2
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 +2 -2
- package/build/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/cc/AlarmSensorCC.js.map +1 -1
- package/build/cc/AssociationCC.d.ts +4 -4
- package/build/cc/AssociationCC.d.ts.map +1 -1
- package/build/cc/AssociationCC.js +1 -1
- package/build/cc/AssociationCC.js.map +1 -1
- package/build/cc/AssociationGroupInfoCC.d.ts +7 -7
- package/build/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/cc/BarrierOperatorCC.d.ts +9 -9
- package/build/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/cc/BarrierOperatorCC.js +73 -57
- package/build/cc/BarrierOperatorCC.js.map +1 -1
- package/build/cc/BasicCC.d.ts +8 -9
- package/build/cc/BasicCC.d.ts.map +1 -1
- package/build/cc/BasicCC.js +45 -45
- package/build/cc/BasicCC.js.map +1 -1
- package/build/cc/BatteryCC.d.ts +6 -6
- package/build/cc/BatteryCC.d.ts.map +1 -1
- package/build/cc/BatteryCC.js +11 -14
- package/build/cc/BatteryCC.js.map +1 -1
- package/build/cc/BinarySensorCC.d.ts +5 -5
- package/build/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/cc/BinarySensorCC.js +10 -13
- package/build/cc/BinarySensorCC.js.map +1 -1
- package/build/cc/BinarySwitchCC.d.ts +11 -13
- package/build/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/cc/BinarySwitchCC.js +35 -33
- package/build/cc/BinarySwitchCC.js.map +1 -1
- package/build/cc/CRC16CC.d.ts +2 -2
- package/build/cc/CRC16CC.d.ts.map +1 -1
- package/build/cc/CRC16CC.js.map +1 -1
- package/build/cc/CentralSceneCC.d.ts +6 -6
- package/build/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/cc/CentralSceneCC.js +24 -24
- package/build/cc/CentralSceneCC.js.map +1 -1
- package/build/cc/ClimateControlScheduleCC.d.ts +5 -5
- package/build/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/cc/ClimateControlScheduleCC.js +1 -1
- package/build/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/cc/ClockCC.d.ts +3 -2
- package/build/cc/ClockCC.d.ts.map +1 -1
- package/build/cc/ClockCC.js.map +1 -1
- package/build/cc/ColorSwitchCC.d.ts +8 -7
- package/build/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/cc/ColorSwitchCC.js +88 -89
- package/build/cc/ColorSwitchCC.js.map +1 -1
- package/build/cc/ConfigurationCC.d.ts +17 -17
- package/build/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/cc/ConfigurationCC.js +170 -122
- package/build/cc/ConfigurationCC.js.map +1 -1
- package/build/cc/DeviceResetLocallyCC.d.ts +1 -1
- package/build/cc/DeviceResetLocallyCC.d.ts.map +1 -1
- package/build/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/cc/DoorLockCC.d.ts +6 -6
- package/build/cc/DoorLockCC.d.ts.map +1 -1
- package/build/cc/DoorLockCC.js +17 -18
- package/build/cc/DoorLockCC.js.map +1 -1
- package/build/cc/DoorLockLoggingCC.d.ts +5 -5
- package/build/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/cc/EnergyProductionCC.d.ts +8 -7
- package/build/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/cc/EnergyProductionCC.js +9 -12
- package/build/cc/EnergyProductionCC.js.map +1 -1
- package/build/cc/EntryControlCC.d.ts +5 -5
- package/build/cc/EntryControlCC.d.ts.map +1 -1
- package/build/cc/EntryControlCC.js +37 -38
- package/build/cc/EntryControlCC.js.map +1 -1
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts +8 -8
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/cc/FirmwareUpdateMetaDataCC.js +32 -16
- package/build/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/cc/HailCC.js.map +1 -1
- package/build/cc/HumidityControlModeCC.d.ts +7 -7
- package/build/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/cc/HumidityControlModeCC.js +15 -16
- package/build/cc/HumidityControlModeCC.js.map +1 -1
- package/build/cc/HumidityControlOperatingStateCC.d.ts +4 -4
- package/build/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/cc/HumidityControlOperatingStateCC.js +9 -12
- package/build/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/cc/HumidityControlSetpointCC.d.ts +10 -10
- package/build/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/cc/HumidityControlSetpointCC.js +16 -17
- package/build/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/cc/InclusionControllerCC.d.ts +3 -2
- package/build/cc/InclusionControllerCC.d.ts.map +1 -1
- package/build/cc/InclusionControllerCC.js.map +1 -1
- package/build/cc/IndicatorCC.d.ts +48 -9
- package/build/cc/IndicatorCC.d.ts.map +1 -1
- package/build/cc/IndicatorCC.js +177 -20
- package/build/cc/IndicatorCC.js.map +1 -1
- package/build/cc/IrrigationCC.d.ts +9 -9
- package/build/cc/IrrigationCC.d.ts.map +1 -1
- package/build/cc/IrrigationCC.js +139 -140
- package/build/cc/IrrigationCC.js.map +1 -1
- package/build/cc/LanguageCC.d.ts +6 -6
- package/build/cc/LanguageCC.d.ts.map +1 -1
- package/build/cc/LanguageCC.js.map +1 -1
- package/build/cc/LockCC.d.ts +6 -6
- package/build/cc/LockCC.d.ts.map +1 -1
- package/build/cc/LockCC.js +23 -24
- package/build/cc/LockCC.js.map +1 -1
- package/build/cc/ManufacturerProprietaryCC.d.ts +1 -1
- package/build/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/cc/ManufacturerProprietaryCC.js +1 -1
- package/build/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/cc/ManufacturerSpecificCC.d.ts +4 -4
- package/build/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/cc/MeterCC.d.ts +13 -13
- package/build/cc/MeterCC.d.ts.map +1 -1
- package/build/cc/MeterCC.js +45 -46
- package/build/cc/MeterCC.js.map +1 -1
- package/build/cc/MultiChannelAssociationCC.d.ts +4 -4
- package/build/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/cc/MultiChannelAssociationCC.js +4 -2
- package/build/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/cc/MultiChannelCC.d.ts +8 -8
- package/build/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/cc/MultiChannelCC.js.map +1 -1
- package/build/cc/MultiCommandCC.d.ts +3 -2
- package/build/cc/MultiCommandCC.d.ts.map +1 -1
- package/build/cc/MultiCommandCC.js +3 -1
- package/build/cc/MultiCommandCC.js.map +1 -1
- package/build/cc/MultilevelSensorCC.d.ts +11 -11
- package/build/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/cc/MultilevelSensorCC.js +13 -16
- package/build/cc/MultilevelSensorCC.js.map +1 -1
- package/build/cc/MultilevelSwitchCC.d.ts +16 -12
- package/build/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/cc/MultilevelSwitchCC.js +100 -78
- package/build/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/cc/NoOperationCC.js.map +1 -1
- package/build/cc/NodeNamingCC.d.ts +7 -7
- package/build/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/cc/NodeNamingCC.js +15 -16
- package/build/cc/NodeNamingCC.js.map +1 -1
- package/build/cc/NotificationCC.d.ts +7 -7
- package/build/cc/NotificationCC.d.ts.map +1 -1
- package/build/cc/NotificationCC.js +16 -19
- package/build/cc/NotificationCC.js.map +1 -1
- package/build/cc/PowerlevelCC.d.ts +4 -4
- package/build/cc/PowerlevelCC.d.ts.map +1 -1
- package/build/cc/PowerlevelCC.js.map +1 -1
- package/build/cc/ProtectionCC.d.ts +7 -7
- package/build/cc/ProtectionCC.d.ts.map +1 -1
- package/build/cc/ProtectionCC.js +26 -29
- package/build/cc/ProtectionCC.js.map +1 -1
- package/build/cc/SceneActivationCC.d.ts +5 -5
- package/build/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/cc/SceneActivationCC.js +6 -12
- package/build/cc/SceneActivationCC.js.map +1 -1
- package/build/cc/SceneActuatorConfigurationCC.d.ts +7 -7
- package/build/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/cc/SceneActuatorConfigurationCC.js +32 -25
- package/build/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/cc/SceneControllerConfigurationCC.d.ts +7 -7
- package/build/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/cc/SceneControllerConfigurationCC.js +14 -15
- package/build/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/cc/ScheduleEntryLockCC.d.ts +15 -14
- package/build/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/cc/ScheduleEntryLockCC.js +1 -1
- package/build/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/cc/Security2CC.d.ts +4 -3
- package/build/cc/Security2CC.d.ts.map +1 -1
- package/build/cc/Security2CC.js.map +1 -1
- package/build/cc/SecurityCC.d.ts +3 -2
- package/build/cc/SecurityCC.d.ts.map +1 -1
- package/build/cc/SecurityCC.js.map +1 -1
- package/build/cc/SoundSwitchCC.d.ts +7 -7
- package/build/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/cc/SoundSwitchCC.js +57 -55
- package/build/cc/SoundSwitchCC.js.map +1 -1
- package/build/cc/SupervisionCC.d.ts +2 -2
- package/build/cc/SupervisionCC.d.ts.map +1 -1
- package/build/cc/SupervisionCC.js.map +1 -1
- package/build/cc/ThermostatFanModeCC.d.ts +6 -6
- package/build/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/cc/ThermostatFanModeCC.js +15 -16
- package/build/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/cc/ThermostatFanStateCC.d.ts +4 -4
- package/build/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/cc/ThermostatFanStateCC.js +9 -12
- package/build/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/cc/ThermostatModeCC.d.ts +6 -6
- package/build/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/cc/ThermostatModeCC.js +15 -16
- package/build/cc/ThermostatModeCC.js.map +1 -1
- package/build/cc/ThermostatOperatingStateCC.d.ts +6 -6
- package/build/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/cc/ThermostatOperatingStateCC.js +9 -12
- package/build/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/cc/ThermostatSetbackCC.d.ts +6 -6
- package/build/cc/ThermostatSetbackCC.d.ts.map +1 -1
- package/build/cc/ThermostatSetbackCC.js +12 -15
- package/build/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/cc/ThermostatSetpointCC.d.ts +6 -6
- package/build/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/cc/ThermostatSetpointCC.js +23 -19
- package/build/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/cc/TimeCC.d.ts +4 -3
- package/build/cc/TimeCC.d.ts.map +1 -1
- package/build/cc/TimeCC.js +1 -1
- package/build/cc/TimeCC.js.map +1 -1
- package/build/cc/TimeParametersCC.d.ts +7 -6
- package/build/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/cc/TimeParametersCC.js +14 -15
- package/build/cc/TimeParametersCC.js.map +1 -1
- package/build/cc/TransportServiceCC.d.ts +1 -1
- package/build/cc/TransportServiceCC.d.ts.map +1 -1
- package/build/cc/TransportServiceCC.js +6 -2
- package/build/cc/TransportServiceCC.js.map +1 -1
- package/build/cc/UserCodeCC.d.ts +18 -18
- package/build/cc/UserCodeCC.d.ts.map +1 -1
- package/build/cc/UserCodeCC.js +31 -32
- package/build/cc/UserCodeCC.js.map +1 -1
- package/build/cc/VersionCC.d.ts +3 -3
- package/build/cc/VersionCC.d.ts.map +1 -1
- package/build/cc/VersionCC.js +1 -4
- package/build/cc/VersionCC.js.map +1 -1
- package/build/cc/WakeUpCC.d.ts +4 -4
- package/build/cc/WakeUpCC.d.ts.map +1 -1
- package/build/cc/WakeUpCC.js +17 -18
- package/build/cc/WakeUpCC.js.map +1 -1
- package/build/cc/WindowCoveringCC.d.ts +9 -8
- package/build/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/cc/WindowCoveringCC.js +60 -57
- package/build/cc/WindowCoveringCC.js.map +1 -1
- package/build/cc/ZWavePlusCC.d.ts +2 -2
- package/build/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/cc/ZWavePlusCC.js.map +1 -1
- package/build/cc/ZWaveProtocolCC.d.ts +2 -2
- package/build/cc/ZWaveProtocolCC.d.ts.map +1 -1
- package/build/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/cc/index.d.ts +6 -6
- package/build/cc/index.d.ts.map +1 -1
- package/build/cc/index.js +38 -38
- package/build/cc/index.js.map +1 -1
- package/build/cc/manufacturerProprietary/Decorators.d.ts +1 -1
- package/build/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts +5 -5
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
- package/build/cc/manufacturerProprietary/FibaroCC.js +34 -43
- package/build/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/index.d.ts +3 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +5 -5
- package/build/index.js.map +1 -1
- package/build/lib/API.d.ts +10 -8
- package/build/lib/API.d.ts.map +1 -1
- package/build/lib/API.js +11 -3
- package/build/lib/API.js.map +1 -1
- package/build/lib/CommandClass.d.ts +5 -5
- package/build/lib/CommandClass.d.ts.map +1 -1
- package/build/lib/CommandClass.js +2 -2
- package/build/lib/CommandClass.js.map +1 -1
- package/build/lib/CommandClassDecorators.d.ts +1 -1
- package/build/lib/CommandClassDecorators.d.ts.map +1 -1
- package/build/lib/EncapsulatingCommandClass.d.ts +1 -1
- package/build/lib/EncapsulatingCommandClass.d.ts.map +1 -1
- package/build/lib/EncapsulatingCommandClass.js.map +1 -1
- package/build/lib/Security2/Extension.d.ts +1 -1
- package/build/lib/Security2/Extension.d.ts.map +1 -1
- package/build/lib/Security2/Extension.js.map +1 -1
- package/build/lib/Values.d.ts +1 -1
- package/build/lib/Values.d.ts.map +1 -1
- package/build/lib/_Types.d.ts +14 -16
- package/build/lib/_Types.d.ts.map +1 -1
- package/build/lib/_Types.js.map +1 -1
- package/build/lib/utils.d.ts +1 -1
- package/build/lib/utils.d.ts.map +1 -1
- package/package.json +11 -11
|
@@ -5,7 +5,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
-
var _a, _b;
|
|
9
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
9
|
exports.ConfigurationCCDefaultReset = exports.ConfigurationCCPropertiesGet = exports.ConfigurationCCPropertiesReport = exports.ConfigurationCCInfoGet = exports.ConfigurationCCInfoReport = exports.ConfigurationCCNameGet = exports.ConfigurationCCNameReport = exports.ConfigurationCCBulkGet = exports.ConfigurationCCBulkReport = exports.ConfigurationCCBulkSet = exports.ConfigurationCCSet = exports.ConfigurationCCGet = exports.ConfigurationCCReport = exports.ConfigurationCC = exports.ConfigurationCCAPI = exports.ConfigurationCCValues = exports.ConfigurationCCError = void 0;
|
|
11
10
|
function __assertType(argName, typeName, boundHasError) {
|
|
@@ -104,18 +103,6 @@ const __assertType__ConfigurationCCAPISetOptions = $o => {
|
|
|
104
103
|
function _undefined($o) {
|
|
105
104
|
return $o !== undefined ? {} : null;
|
|
106
105
|
}
|
|
107
|
-
function _ignore() {
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
110
|
-
function su__number__11_9_9_9_eu($o) {
|
|
111
|
-
const conditions = [_number, _ignore];
|
|
112
|
-
for (const condition of conditions) {
|
|
113
|
-
const error = condition($o);
|
|
114
|
-
if (!error)
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
return {};
|
|
118
|
-
}
|
|
119
106
|
function _3($o) {
|
|
120
107
|
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
121
108
|
return {};
|
|
@@ -125,7 +112,7 @@ const __assertType__ConfigurationCCAPISetOptions = $o => {
|
|
|
125
112
|
return error;
|
|
126
113
|
}
|
|
127
114
|
if ("value" in $o && $o["value"] !== undefined) {
|
|
128
|
-
const error =
|
|
115
|
+
const error = _number($o["value"]);
|
|
129
116
|
if (error)
|
|
130
117
|
return error;
|
|
131
118
|
}
|
|
@@ -142,17 +129,17 @@ const __assertType__ConfigurationCCAPISetOptions = $o => {
|
|
|
142
129
|
}
|
|
143
130
|
return null;
|
|
144
131
|
}
|
|
145
|
-
function
|
|
146
|
-
return $o !== 2 ? {} : null;
|
|
147
|
-
}
|
|
148
|
-
function _14($o) {
|
|
132
|
+
function _9($o) {
|
|
149
133
|
return $o !== 1 ? {} : null;
|
|
150
134
|
}
|
|
151
|
-
function
|
|
135
|
+
function _10($o) {
|
|
136
|
+
return $o !== 2 ? {} : null;
|
|
137
|
+
}
|
|
138
|
+
function _11($o) {
|
|
152
139
|
return $o !== 4 ? {} : null;
|
|
153
140
|
}
|
|
154
|
-
function
|
|
155
|
-
const conditions = [
|
|
141
|
+
function su__9__10__11_eu($o) {
|
|
142
|
+
const conditions = [_9, _10, _11];
|
|
156
143
|
for (const condition of conditions) {
|
|
157
144
|
const error = condition($o);
|
|
158
145
|
if (!error)
|
|
@@ -160,7 +147,7 @@ const __assertType__ConfigurationCCAPISetOptions = $o => {
|
|
|
160
147
|
}
|
|
161
148
|
return {};
|
|
162
149
|
}
|
|
163
|
-
function
|
|
150
|
+
function su__13__14__15__16_eu($o) {
|
|
164
151
|
return ![0, 1, 2, 3].includes($o) ? {} : null;
|
|
165
152
|
}
|
|
166
153
|
function _5($o) {
|
|
@@ -172,21 +159,21 @@ const __assertType__ConfigurationCCAPISetOptions = $o => {
|
|
|
172
159
|
return error;
|
|
173
160
|
}
|
|
174
161
|
if ("value" in $o && $o["value"] !== undefined) {
|
|
175
|
-
const error =
|
|
162
|
+
const error = _number($o["value"]);
|
|
176
163
|
if (error)
|
|
177
164
|
return error;
|
|
178
165
|
}
|
|
179
166
|
else
|
|
180
167
|
return {};
|
|
181
168
|
if ("valueSize" in $o && $o["valueSize"] !== undefined) {
|
|
182
|
-
const error =
|
|
169
|
+
const error = su__9__10__11_eu($o["valueSize"]);
|
|
183
170
|
if (error)
|
|
184
171
|
return error;
|
|
185
172
|
}
|
|
186
173
|
else
|
|
187
174
|
return {};
|
|
188
175
|
if ("valueFormat" in $o && $o["valueFormat"] !== undefined) {
|
|
189
|
-
const error =
|
|
176
|
+
const error = su__13__14__15__16_eu($o["valueFormat"]);
|
|
190
177
|
if (error)
|
|
191
178
|
return error;
|
|
192
179
|
}
|
|
@@ -261,18 +248,6 @@ const __assertType__sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2 = $o => {
|
|
|
261
248
|
function _undefined($o) {
|
|
262
249
|
return $o !== undefined ? {} : null;
|
|
263
250
|
}
|
|
264
|
-
function _ignore() {
|
|
265
|
-
return null;
|
|
266
|
-
}
|
|
267
|
-
function su__number__13_11_11_11_eu($o) {
|
|
268
|
-
const conditions = [_number, _ignore];
|
|
269
|
-
for (const condition of conditions) {
|
|
270
|
-
const error = condition($o);
|
|
271
|
-
if (!error)
|
|
272
|
-
return null;
|
|
273
|
-
}
|
|
274
|
-
return {};
|
|
275
|
-
}
|
|
276
251
|
function _5($o) {
|
|
277
252
|
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
278
253
|
return {};
|
|
@@ -282,7 +257,7 @@ const __assertType__sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2 = $o => {
|
|
|
282
257
|
return error;
|
|
283
258
|
}
|
|
284
259
|
if ("value" in $o && $o["value"] !== undefined) {
|
|
285
|
-
const error =
|
|
260
|
+
const error = _number($o["value"]);
|
|
286
261
|
if (error)
|
|
287
262
|
return error;
|
|
288
263
|
}
|
|
@@ -299,17 +274,17 @@ const __assertType__sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2 = $o => {
|
|
|
299
274
|
}
|
|
300
275
|
return null;
|
|
301
276
|
}
|
|
302
|
-
function
|
|
303
|
-
return $o !== 2 ? {} : null;
|
|
304
|
-
}
|
|
305
|
-
function _16($o) {
|
|
277
|
+
function _11($o) {
|
|
306
278
|
return $o !== 1 ? {} : null;
|
|
307
279
|
}
|
|
308
|
-
function
|
|
280
|
+
function _12($o) {
|
|
281
|
+
return $o !== 2 ? {} : null;
|
|
282
|
+
}
|
|
283
|
+
function _13($o) {
|
|
309
284
|
return $o !== 4 ? {} : null;
|
|
310
285
|
}
|
|
311
|
-
function
|
|
312
|
-
const conditions = [
|
|
286
|
+
function su__11__12__13_eu($o) {
|
|
287
|
+
const conditions = [_11, _12, _13];
|
|
313
288
|
for (const condition of conditions) {
|
|
314
289
|
const error = condition($o);
|
|
315
290
|
if (!error)
|
|
@@ -317,7 +292,7 @@ const __assertType__sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2 = $o => {
|
|
|
317
292
|
}
|
|
318
293
|
return {};
|
|
319
294
|
}
|
|
320
|
-
function
|
|
295
|
+
function su__15__16__17__18_eu($o) {
|
|
321
296
|
return ![0, 1, 2, 3].includes($o) ? {} : null;
|
|
322
297
|
}
|
|
323
298
|
function _7($o) {
|
|
@@ -329,21 +304,21 @@ const __assertType__sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2 = $o => {
|
|
|
329
304
|
return error;
|
|
330
305
|
}
|
|
331
306
|
if ("value" in $o && $o["value"] !== undefined) {
|
|
332
|
-
const error =
|
|
307
|
+
const error = _number($o["value"]);
|
|
333
308
|
if (error)
|
|
334
309
|
return error;
|
|
335
310
|
}
|
|
336
311
|
else
|
|
337
312
|
return {};
|
|
338
313
|
if ("valueSize" in $o && $o["valueSize"] !== undefined) {
|
|
339
|
-
const error =
|
|
314
|
+
const error = su__11__12__13_eu($o["valueSize"]);
|
|
340
315
|
if (error)
|
|
341
316
|
return error;
|
|
342
317
|
}
|
|
343
318
|
else
|
|
344
319
|
return {};
|
|
345
320
|
if ("valueFormat" in $o && $o["valueFormat"] !== undefined) {
|
|
346
|
-
const error =
|
|
321
|
+
const error = su__15__16__17__18_eu($o["valueFormat"]);
|
|
347
322
|
if (error)
|
|
348
323
|
return error;
|
|
349
324
|
}
|
|
@@ -562,9 +537,25 @@ function getParamInformationFromConfigFile(applHost, nodeId, endpointIndex) {
|
|
|
562
537
|
}
|
|
563
538
|
}
|
|
564
539
|
let ConfigurationCCAPI = class ConfigurationCCAPI extends API_1.CCAPI {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
540
|
+
supportsCommand(cmd) {
|
|
541
|
+
switch (cmd) {
|
|
542
|
+
case _Types_1.ConfigurationCommand.Get:
|
|
543
|
+
case _Types_1.ConfigurationCommand.Set:
|
|
544
|
+
return true; // This is mandatory
|
|
545
|
+
case _Types_1.ConfigurationCommand.BulkGet:
|
|
546
|
+
case _Types_1.ConfigurationCommand.BulkSet:
|
|
547
|
+
return this.version >= 2;
|
|
548
|
+
case _Types_1.ConfigurationCommand.NameGet:
|
|
549
|
+
case _Types_1.ConfigurationCommand.InfoGet:
|
|
550
|
+
case _Types_1.ConfigurationCommand.PropertiesGet:
|
|
551
|
+
return this.version >= 3;
|
|
552
|
+
case _Types_1.ConfigurationCommand.DefaultReset:
|
|
553
|
+
return this.version >= 4;
|
|
554
|
+
}
|
|
555
|
+
return super.supportsCommand(cmd);
|
|
556
|
+
}
|
|
557
|
+
get [API_1.SET_VALUE]() {
|
|
558
|
+
return async function ({ property, propertyKey }, value) {
|
|
568
559
|
// Config parameters are addressed with numeric properties/keys
|
|
569
560
|
if (typeof property !== "number") {
|
|
570
561
|
(0, API_1.throwUnsupportedProperty)(this.ccId, property);
|
|
@@ -649,7 +640,9 @@ let ConfigurationCCAPI = class ConfigurationCCAPI extends API_1.CCAPI {
|
|
|
649
640
|
}
|
|
650
641
|
return result;
|
|
651
642
|
};
|
|
652
|
-
|
|
643
|
+
}
|
|
644
|
+
get [API_1.POLL_VALUE]() {
|
|
645
|
+
return async function ({ property, propertyKey }) {
|
|
653
646
|
// Config parameters are addressed with numeric properties/keys
|
|
654
647
|
if (typeof property !== "number") {
|
|
655
648
|
(0, API_1.throwUnsupportedProperty)(this.ccId, property);
|
|
@@ -660,23 +653,6 @@ let ConfigurationCCAPI = class ConfigurationCCAPI extends API_1.CCAPI {
|
|
|
660
653
|
return this.get(property, { valueBitMask: propertyKey });
|
|
661
654
|
};
|
|
662
655
|
}
|
|
663
|
-
supportsCommand(cmd) {
|
|
664
|
-
switch (cmd) {
|
|
665
|
-
case _Types_1.ConfigurationCommand.Get:
|
|
666
|
-
case _Types_1.ConfigurationCommand.Set:
|
|
667
|
-
return true; // This is mandatory
|
|
668
|
-
case _Types_1.ConfigurationCommand.BulkGet:
|
|
669
|
-
case _Types_1.ConfigurationCommand.BulkSet:
|
|
670
|
-
return this.version >= 2;
|
|
671
|
-
case _Types_1.ConfigurationCommand.NameGet:
|
|
672
|
-
case _Types_1.ConfigurationCommand.InfoGet:
|
|
673
|
-
case _Types_1.ConfigurationCommand.PropertiesGet:
|
|
674
|
-
return this.version >= 3;
|
|
675
|
-
case _Types_1.ConfigurationCommand.DefaultReset:
|
|
676
|
-
return this.version >= 4;
|
|
677
|
-
}
|
|
678
|
-
return super.supportsCommand(cmd);
|
|
679
|
-
}
|
|
680
656
|
/**
|
|
681
657
|
* Requests the current value of a given config parameter from the device.
|
|
682
658
|
* This may timeout and return `undefined` if the node does not respond.
|
|
@@ -1041,7 +1017,6 @@ let ConfigurationCCAPI = class ConfigurationCCAPI extends API_1.CCAPI {
|
|
|
1041
1017
|
}
|
|
1042
1018
|
}
|
|
1043
1019
|
};
|
|
1044
|
-
_a = API_1.SET_VALUE, _b = API_1.POLL_VALUE;
|
|
1045
1020
|
ConfigurationCCAPI = __decorate([
|
|
1046
1021
|
(0, CommandClassDecorators_1.API)(safe_1.CommandClasses.Configuration)
|
|
1047
1022
|
], ConfigurationCCAPI);
|
|
@@ -1435,31 +1410,42 @@ let ConfigurationCCReport = class ConfigurationCCReport extends ConfigurationCC
|
|
|
1435
1410
|
persistValues(applHost) {
|
|
1436
1411
|
if (!super.persistValues(applHost))
|
|
1437
1412
|
return false;
|
|
1438
|
-
//
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1413
|
+
// This parameter may be a partial param in the following cases:
|
|
1414
|
+
// * a config file defines it as such
|
|
1415
|
+
// * it was reported by the device as a bit field
|
|
1416
|
+
const partialParams = this.getPartialParamInfos(applHost, this.parameter);
|
|
1417
|
+
let cachedValueFormat;
|
|
1418
|
+
if (partialParams.length > 0) {
|
|
1419
|
+
// This is a partial param. All definitions should have the same format, so we just take the first one
|
|
1420
|
+
cachedValueFormat = partialParams[0].metadata.format;
|
|
1421
|
+
}
|
|
1422
|
+
else {
|
|
1423
|
+
// Check if the initial assumption of SignedInteger holds true
|
|
1424
|
+
const oldParamInformation = this.getParamInformation(applHost, this.parameter);
|
|
1425
|
+
cachedValueFormat = oldParamInformation.format;
|
|
1426
|
+
// On older CC versions, these reports may be the only way we can retrieve the value size
|
|
1427
|
+
// Therefore we store it here
|
|
1428
|
+
this.extendParamInformation(applHost, this.parameter, undefined, {
|
|
1429
|
+
valueSize: this.valueSize,
|
|
1430
|
+
});
|
|
1431
|
+
if (this.version < 3 &&
|
|
1432
|
+
!this.isParamInformationFromConfig &&
|
|
1433
|
+
oldParamInformation.min == undefined &&
|
|
1434
|
+
oldParamInformation.max == undefined) {
|
|
1435
|
+
const isSigned = oldParamInformation.format == undefined ||
|
|
1436
|
+
oldParamInformation.format ===
|
|
1437
|
+
safe_1.ConfigValueFormat.SignedInteger;
|
|
1438
|
+
this.extendParamInformation(applHost, this.parameter, undefined, (0, safe_1.getIntegerLimits)(this.valueSize, isSigned));
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
// We may have to re-interpret the value as unsigned, depending on the cached value format
|
|
1442
|
+
if (cachedValueFormat != undefined &&
|
|
1443
|
+
cachedValueFormat !== safe_1.ConfigValueFormat.SignedInteger) {
|
|
1442
1444
|
// Re-interpret the value with the new format
|
|
1443
|
-
this.value = reInterpretSignedValue(this.value, this.valueSize,
|
|
1444
|
-
}
|
|
1445
|
-
// Store the parameter size and value
|
|
1446
|
-
this.extendParamInformation(applHost, this.parameter, undefined, {
|
|
1447
|
-
valueSize: this.valueSize,
|
|
1448
|
-
type: oldParamInformation.format === safe_1.ConfigValueFormat.BitField
|
|
1449
|
-
? "number[]"
|
|
1450
|
-
: "number",
|
|
1451
|
-
});
|
|
1452
|
-
if (this.version < 3 &&
|
|
1453
|
-
!this.isParamInformationFromConfig &&
|
|
1454
|
-
oldParamInformation.min == undefined &&
|
|
1455
|
-
oldParamInformation.max == undefined) {
|
|
1456
|
-
const isSigned = oldParamInformation.format == undefined ||
|
|
1457
|
-
oldParamInformation.format === safe_1.ConfigValueFormat.SignedInteger;
|
|
1458
|
-
this.extendParamInformation(applHost, this.parameter, undefined, (0, safe_1.getIntegerLimits)(this.valueSize, isSigned));
|
|
1445
|
+
this.value = reInterpretSignedValue(this.value, this.valueSize, cachedValueFormat);
|
|
1459
1446
|
}
|
|
1460
1447
|
// And store the value itself
|
|
1461
1448
|
// If we have partial config params defined, we need to split the value
|
|
1462
|
-
const partialParams = this.getPartialParamInfos(applHost, this.parameter);
|
|
1463
1449
|
if (partialParams.length > 0) {
|
|
1464
1450
|
for (const param of partialParams) {
|
|
1465
1451
|
if (typeof param.propertyKey === "number") {
|
|
@@ -1478,10 +1464,7 @@ let ConfigurationCCReport = class ConfigurationCCReport extends ConfigurationCC
|
|
|
1478
1464
|
Buffer.from([this.parameter, this.valueSize & 0b111]),
|
|
1479
1465
|
Buffer.allocUnsafe(this.valueSize),
|
|
1480
1466
|
]);
|
|
1481
|
-
|
|
1482
|
-
? this.valueFormat ?? safe_1.ConfigValueFormat.SignedInteger
|
|
1483
|
-
: safe_1.ConfigValueFormat.BitField;
|
|
1484
|
-
serializeValue(this.payload, 2, this.valueSize, valueFormat, this.value);
|
|
1467
|
+
serializeValue(this.payload, 2, this.valueSize, this.valueFormat ?? safe_1.ConfigValueFormat.SignedInteger, this.value);
|
|
1485
1468
|
return super.serialize();
|
|
1486
1469
|
}
|
|
1487
1470
|
toLogEntry(applHost) {
|
|
@@ -1858,9 +1841,31 @@ let ConfigurationCCNameReport = class ConfigurationCCNameReport extends Configur
|
|
|
1858
1841
|
persistValues(applHost) {
|
|
1859
1842
|
if (!super.persistValues(applHost))
|
|
1860
1843
|
return false;
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1844
|
+
// Bitfield parameters that are not documented in a config file
|
|
1845
|
+
// are split into multiple partial parameters. We need to set the name for
|
|
1846
|
+
// all of them.
|
|
1847
|
+
const partialParams = this.getPartialParamInfos(applHost, this.parameter);
|
|
1848
|
+
if (partialParams.length === 0) {
|
|
1849
|
+
this.extendParamInformation(applHost, this.parameter, undefined, {
|
|
1850
|
+
label: this.name,
|
|
1851
|
+
});
|
|
1852
|
+
}
|
|
1853
|
+
else {
|
|
1854
|
+
for (const param of partialParams) {
|
|
1855
|
+
const paramNumber = param.property;
|
|
1856
|
+
const bitMask = param.propertyKey;
|
|
1857
|
+
const bitNumber = Math.log2(bitMask) % 1 === 0
|
|
1858
|
+
? Math.log2(bitMask)
|
|
1859
|
+
: undefined;
|
|
1860
|
+
let label = `${this.name} - ${bitMask}`;
|
|
1861
|
+
if (bitNumber != undefined) {
|
|
1862
|
+
label += ` (bit ${bitNumber})`;
|
|
1863
|
+
}
|
|
1864
|
+
this.extendParamInformation(applHost, paramNumber, bitMask, {
|
|
1865
|
+
label,
|
|
1866
|
+
});
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1864
1869
|
return true;
|
|
1865
1870
|
}
|
|
1866
1871
|
serialize() {
|
|
@@ -1950,9 +1955,38 @@ let ConfigurationCCInfoReport = class ConfigurationCCInfoReport extends Configur
|
|
|
1950
1955
|
persistValues(applHost) {
|
|
1951
1956
|
if (!super.persistValues(applHost))
|
|
1952
1957
|
return false;
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1958
|
+
// Bitfield parameters that are not documented in a config file
|
|
1959
|
+
// are split into multiple partial parameters. We need to set the description for
|
|
1960
|
+
// all of them. However, these can get very long, so we put the reported
|
|
1961
|
+
// description on the first partial param, and refer to it from the others
|
|
1962
|
+
const partialParams = this.getPartialParamInfos(applHost, this.parameter).sort((a, b) => (a.propertyKey ?? 0) -
|
|
1963
|
+
(b.propertyKey ?? 0));
|
|
1964
|
+
if (partialParams.length === 0) {
|
|
1965
|
+
this.extendParamInformation(applHost, this.parameter, undefined, {
|
|
1966
|
+
description: this.info,
|
|
1967
|
+
});
|
|
1968
|
+
}
|
|
1969
|
+
else {
|
|
1970
|
+
let firstParamLabel;
|
|
1971
|
+
for (const param of partialParams) {
|
|
1972
|
+
const paramNumber = param.property;
|
|
1973
|
+
const bitMask = param.propertyKey;
|
|
1974
|
+
// We put the description on the first partial param
|
|
1975
|
+
const description = firstParamLabel
|
|
1976
|
+
? `Refer to ${firstParamLabel}`
|
|
1977
|
+
: this.info;
|
|
1978
|
+
this.extendParamInformation(applHost, paramNumber, bitMask, {
|
|
1979
|
+
description,
|
|
1980
|
+
});
|
|
1981
|
+
// Then we store the name of the first param to refer to it on the
|
|
1982
|
+
// following partial params
|
|
1983
|
+
if (firstParamLabel == undefined) {
|
|
1984
|
+
firstParamLabel =
|
|
1985
|
+
this.getParamInformation(applHost, paramNumber, bitMask)
|
|
1986
|
+
.label ?? `parameter ${paramNumber} - ${bitMask}`;
|
|
1987
|
+
}
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1956
1990
|
return true;
|
|
1957
1991
|
}
|
|
1958
1992
|
serialize() {
|
|
@@ -2037,7 +2071,10 @@ let ConfigurationCCPropertiesReport = class ConfigurationCCPropertiesReport exte
|
|
|
2037
2071
|
const nextParameterOffset = 3 + 3 * this.valueSize;
|
|
2038
2072
|
(0, safe_1.validatePayload)(this.payload.length >= nextParameterOffset + 2);
|
|
2039
2073
|
if (this.valueSize > 0) {
|
|
2040
|
-
if (this.valueFormat
|
|
2074
|
+
if (this.valueFormat === safe_1.ConfigValueFormat.BitField) {
|
|
2075
|
+
this.minValue = 0;
|
|
2076
|
+
}
|
|
2077
|
+
else {
|
|
2041
2078
|
this.minValue = parseValue(this.payload.slice(3), this.valueSize, this.valueFormat);
|
|
2042
2079
|
}
|
|
2043
2080
|
this.maxValue = parseValue(this.payload.slice(3 + this.valueSize), this.valueSize, this.valueFormat);
|
|
@@ -2090,17 +2127,10 @@ let ConfigurationCCPropertiesReport = class ConfigurationCCPropertiesReport exte
|
|
|
2090
2127
|
return false;
|
|
2091
2128
|
// If we actually received parameter info, store it
|
|
2092
2129
|
if (this.valueSize > 0) {
|
|
2093
|
-
const
|
|
2094
|
-
|
|
2095
|
-
? "number"
|
|
2096
|
-
: "number[]";
|
|
2097
|
-
const paramInfo = (0, safe_1.stripUndefined)({
|
|
2098
|
-
type: valueType,
|
|
2130
|
+
const baseInfo = {
|
|
2131
|
+
type: "number",
|
|
2099
2132
|
format: this.valueFormat,
|
|
2100
2133
|
valueSize: this.valueSize,
|
|
2101
|
-
min: this.minValue,
|
|
2102
|
-
max: this.maxValue,
|
|
2103
|
-
default: this.defaultValue,
|
|
2104
2134
|
requiresReInclusion: this.altersCapabilities,
|
|
2105
2135
|
readable: true,
|
|
2106
2136
|
writeable: !this.isReadonly,
|
|
@@ -2108,8 +2138,31 @@ let ConfigurationCCPropertiesReport = class ConfigurationCCPropertiesReport exte
|
|
|
2108
2138
|
isAdvanced: this.isAdvanced,
|
|
2109
2139
|
noBulkSupport: this.noBulkSupport,
|
|
2110
2140
|
isFromConfig: false,
|
|
2111
|
-
}
|
|
2112
|
-
|
|
2141
|
+
};
|
|
2142
|
+
if (this.valueFormat !== safe_1.ConfigValueFormat.BitField) {
|
|
2143
|
+
const paramInfo = (0, safe_1.stripUndefined)({
|
|
2144
|
+
...baseInfo,
|
|
2145
|
+
min: this.minValue,
|
|
2146
|
+
max: this.maxValue,
|
|
2147
|
+
default: this.defaultValue,
|
|
2148
|
+
});
|
|
2149
|
+
this.extendParamInformation(applHost, this.parameter, undefined, paramInfo);
|
|
2150
|
+
}
|
|
2151
|
+
else {
|
|
2152
|
+
// Bit fields are split into multiple single-bit partial parameters
|
|
2153
|
+
const bits = this.maxValue;
|
|
2154
|
+
let mask = 1;
|
|
2155
|
+
while (mask <= bits) {
|
|
2156
|
+
const paramInfo = (0, safe_1.stripUndefined)({
|
|
2157
|
+
...baseInfo,
|
|
2158
|
+
min: 0,
|
|
2159
|
+
max: 1,
|
|
2160
|
+
default: this.defaultValue & mask ? 1 : 0,
|
|
2161
|
+
});
|
|
2162
|
+
this.extendParamInformation(applHost, this.parameter, mask, paramInfo);
|
|
2163
|
+
mask <<= 1;
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2113
2166
|
}
|
|
2114
2167
|
return true;
|
|
2115
2168
|
}
|
|
@@ -2224,10 +2277,10 @@ function isSafeValue(value, size, format) {
|
|
|
2224
2277
|
break;
|
|
2225
2278
|
case safe_1.ConfigValueFormat.UnsignedInteger:
|
|
2226
2279
|
case safe_1.ConfigValueFormat.Enumerated:
|
|
2280
|
+
case safe_1.ConfigValueFormat.BitField:
|
|
2227
2281
|
minValue = 0;
|
|
2228
2282
|
maxValue = Math.pow(2, 8 * size);
|
|
2229
2283
|
break;
|
|
2230
|
-
case safe_1.ConfigValueFormat.BitField:
|
|
2231
2284
|
default:
|
|
2232
2285
|
throw new Error("not implemented");
|
|
2233
2286
|
}
|
|
@@ -2240,9 +2293,8 @@ function parseValue(raw, size, format) {
|
|
|
2240
2293
|
return raw.readIntBE(0, size);
|
|
2241
2294
|
case safe_1.ConfigValueFormat.UnsignedInteger:
|
|
2242
2295
|
case safe_1.ConfigValueFormat.Enumerated:
|
|
2243
|
-
return raw.readUIntBE(0, size);
|
|
2244
2296
|
case safe_1.ConfigValueFormat.BitField:
|
|
2245
|
-
return
|
|
2297
|
+
return raw.readUIntBE(0, size);
|
|
2246
2298
|
}
|
|
2247
2299
|
}
|
|
2248
2300
|
function throwInvalidValueError(value, parameter, valueSize, valueFormat) {
|
|
@@ -2264,13 +2316,9 @@ function serializeValue(payload, offset, size, format, value) {
|
|
|
2264
2316
|
return;
|
|
2265
2317
|
case safe_1.ConfigValueFormat.UnsignedInteger:
|
|
2266
2318
|
case safe_1.ConfigValueFormat.Enumerated:
|
|
2319
|
+
case safe_1.ConfigValueFormat.BitField:
|
|
2267
2320
|
payload.writeUIntBE(value, offset, size);
|
|
2268
2321
|
return;
|
|
2269
|
-
case safe_1.ConfigValueFormat.BitField: {
|
|
2270
|
-
const mask = (0, safe_1.encodeBitMask)([...value.values()], size * 8);
|
|
2271
|
-
mask.copy(payload, offset);
|
|
2272
|
-
return;
|
|
2273
|
-
}
|
|
2274
2322
|
}
|
|
2275
2323
|
}
|
|
2276
2324
|
//# sourceMappingURL=ConfigurationCC.js.map
|