@zwave-js/cc 15.29.0 → 15.31.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/cjs/cc/AlarmSensorCC.d.ts +3 -1
- package/build/cjs/cc/AlarmSensorCC.js +22 -2
- package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
- package/build/cjs/cc/BarrierOperatorCC.d.ts +6 -3
- package/build/cjs/cc/BarrierOperatorCC.js +40 -6
- package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
- package/build/cjs/cc/CentralSceneCC.d.ts +4 -1
- package/build/cjs/cc/CentralSceneCC.js +34 -2
- package/build/cjs/cc/CentralSceneCC.js.map +2 -2
- package/build/cjs/cc/ClimateControlScheduleCC.d.ts +6 -3
- package/build/cjs/cc/ClimateControlScheduleCC.js +54 -6
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +2 -2
- package/build/cjs/cc/ClockCC.d.ts +2 -1
- package/build/cjs/cc/ClockCC.js +19 -2
- package/build/cjs/cc/ClockCC.js.map +2 -2
- package/build/cjs/cc/ConfigurationCC.d.ts +3 -2
- package/build/cjs/cc/ConfigurationCC.js +61 -4
- package/build/cjs/cc/ConfigurationCC.js.map +2 -2
- package/build/cjs/cc/DoorLockLoggingCC.d.ts +3 -1
- package/build/cjs/cc/DoorLockLoggingCC.js +35 -2
- package/build/cjs/cc/DoorLockLoggingCC.js.map +2 -2
- package/build/cjs/cc/EntryControlCC.d.ts +5 -1
- package/build/cjs/cc/EntryControlCC.js +57 -2
- package/build/cjs/cc/EntryControlCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlModeCC.d.ts +3 -1
- package/build/cjs/cc/HumidityControlModeCC.js +14 -2
- package/build/cjs/cc/HumidityControlModeCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +3 -1
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +4 -0
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.d.ts +8 -4
- package/build/cjs/cc/HumidityControlSetpointCC.js +51 -8
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
- package/build/cjs/cc/IrrigationCC.d.ts +15 -9
- package/build/cjs/cc/IrrigationCC.js +260 -24
- package/build/cjs/cc/IrrigationCC.js.map +2 -2
- package/build/cjs/cc/LanguageCC.d.ts +2 -1
- package/build/cjs/cc/LanguageCC.js +18 -2
- package/build/cjs/cc/LanguageCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelCC.d.ts +2 -1
- package/build/cjs/cc/MultiChannelCC.js +14 -2
- package/build/cjs/cc/MultiChannelCC.js.map +2 -2
- package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +3 -2
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +38 -5
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +2 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +3 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.js +25 -4
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanModeCC.d.ts +3 -1
- package/build/cjs/cc/ThermostatFanModeCC.js +17 -2
- package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanStateCC.d.ts +3 -1
- package/build/cjs/cc/ThermostatFanStateCC.js +4 -0
- package/build/cjs/cc/ThermostatFanStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatModeCC.js +2 -2
- package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
- package/build/cjs/cc/TimeCC.d.ts +1 -1
- package/build/cjs/cc/TimeCC.js +11 -2
- package/build/cjs/cc/TimeCC.js.map +2 -2
- package/build/cjs/cc/UserCodeCC.d.ts +2 -1
- package/build/cjs/cc/UserCodeCC.js +31 -2
- package/build/cjs/cc/UserCodeCC.js.map +2 -2
- package/build/cjs/cc/VersionCC.d.ts +1 -0
- package/build/cjs/cc/VersionCC.js +32 -0
- package/build/cjs/cc/VersionCC.js.map +2 -2
- package/build/cjs/cc/WakeUpCC.d.ts +2 -0
- package/build/cjs/cc/WakeUpCC.js +14 -0
- package/build/cjs/cc/WakeUpCC.js.map +2 -2
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +2 -1
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +30 -2
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +2 -2
- package/build/esm/cc/AlarmSensorCC.d.ts +3 -1
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +25 -7
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts +6 -3
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +45 -18
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts +4 -1
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +35 -6
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts +6 -3
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +57 -16
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.d.ts +2 -1
- package/build/esm/cc/ClockCC.d.ts.map +1 -1
- package/build/esm/cc/ClockCC.js +20 -7
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts +3 -2
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +63 -12
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts +3 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +39 -5
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts +5 -1
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +64 -7
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts +3 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +15 -7
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +3 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +5 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts +8 -4
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +52 -25
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts +15 -9
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +268 -61
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts +2 -1
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +18 -6
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts +2 -1
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +15 -7
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +3 -2
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +39 -13
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts +3 -2
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +25 -12
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts +3 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +18 -7
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts +3 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +5 -1
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +2 -2
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/TimeCC.d.ts +1 -1
- package/build/esm/cc/TimeCC.d.ts.map +1 -1
- package/build/esm/cc/TimeCC.js +12 -7
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts +2 -1
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +31 -6
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts +1 -0
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +34 -0
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts +2 -0
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +14 -0
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +2 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +34 -4
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/package.json +2 -2
|
@@ -64,6 +64,7 @@ export declare class IrrigationCCSystemInfoReport extends IrrigationCC {
|
|
|
64
64
|
readonly numValveTables: number;
|
|
65
65
|
readonly supportsMasterValve: boolean;
|
|
66
66
|
readonly maxValveTableSize: number;
|
|
67
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
67
68
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
68
69
|
}
|
|
69
70
|
export declare class IrrigationCCSystemInfoGet extends IrrigationCC {
|
|
@@ -103,6 +104,7 @@ export declare class IrrigationCCSystemStatusReport extends IrrigationCC {
|
|
|
103
104
|
errorValve: boolean;
|
|
104
105
|
masterValveOpen: boolean;
|
|
105
106
|
firstOpenZoneId?: number;
|
|
107
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
106
108
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
107
109
|
}
|
|
108
110
|
export declare class IrrigationCCSystemStatusGet extends IrrigationCC {
|
|
@@ -116,7 +118,7 @@ export type IrrigationCCSystemConfigSetOptions = {
|
|
|
116
118
|
};
|
|
117
119
|
export declare class IrrigationCCSystemConfigSet extends IrrigationCC {
|
|
118
120
|
constructor(options: WithAddress<IrrigationCCSystemConfigSetOptions>);
|
|
119
|
-
static from(
|
|
121
|
+
static from(raw: CCRaw, ctx: CCParsingContext): IrrigationCCSystemConfigSet;
|
|
120
122
|
masterValveDelay: number;
|
|
121
123
|
highPressureThreshold: number;
|
|
122
124
|
lowPressureThreshold: number;
|
|
@@ -140,6 +142,7 @@ export declare class IrrigationCCSystemConfigReport extends IrrigationCC {
|
|
|
140
142
|
readonly lowPressureThreshold: number;
|
|
141
143
|
readonly rainSensorPolarity?: IrrigationSensorPolarity;
|
|
142
144
|
readonly moistureSensorPolarity?: IrrigationSensorPolarity;
|
|
145
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
143
146
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
144
147
|
}
|
|
145
148
|
export declare class IrrigationCCSystemConfigGet extends IrrigationCC {
|
|
@@ -167,6 +170,7 @@ export declare class IrrigationCCValveInfoReport extends IrrigationCC {
|
|
|
167
170
|
readonly errorMaximumFlow?: boolean;
|
|
168
171
|
readonly errorHighFlow?: boolean;
|
|
169
172
|
readonly errorLowFlow?: boolean;
|
|
173
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
170
174
|
persistValues(ctx: PersistValuesContext): boolean;
|
|
171
175
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
172
176
|
}
|
|
@@ -175,7 +179,7 @@ export interface IrrigationCCValveInfoGetOptions {
|
|
|
175
179
|
}
|
|
176
180
|
export declare class IrrigationCCValveInfoGet extends IrrigationCC {
|
|
177
181
|
constructor(options: WithAddress<IrrigationCCValveInfoGetOptions>);
|
|
178
|
-
static from(
|
|
182
|
+
static from(raw: CCRaw, ctx: CCParsingContext): IrrigationCCValveInfoGet;
|
|
179
183
|
valveId: ValveId;
|
|
180
184
|
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
181
185
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
@@ -192,7 +196,7 @@ export type IrrigationCCValveConfigSetOptions = {
|
|
|
192
196
|
};
|
|
193
197
|
export declare class IrrigationCCValveConfigSet extends IrrigationCC {
|
|
194
198
|
constructor(options: WithAddress<IrrigationCCValveConfigSetOptions>);
|
|
195
|
-
static from(
|
|
199
|
+
static from(raw: CCRaw, ctx: CCParsingContext): IrrigationCCValveConfigSet;
|
|
196
200
|
valveId: ValveId;
|
|
197
201
|
nominalCurrentHighThreshold: number;
|
|
198
202
|
nominalCurrentLowThreshold: number;
|
|
@@ -226,6 +230,7 @@ export declare class IrrigationCCValveConfigReport extends IrrigationCC {
|
|
|
226
230
|
lowFlowThreshold: number;
|
|
227
231
|
useRainSensor: boolean;
|
|
228
232
|
useMoistureSensor: boolean;
|
|
233
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
229
234
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
230
235
|
}
|
|
231
236
|
export interface IrrigationCCValveConfigGetOptions {
|
|
@@ -233,7 +238,7 @@ export interface IrrigationCCValveConfigGetOptions {
|
|
|
233
238
|
}
|
|
234
239
|
export declare class IrrigationCCValveConfigGet extends IrrigationCC {
|
|
235
240
|
constructor(options: WithAddress<IrrigationCCValveConfigGetOptions>);
|
|
236
|
-
static from(
|
|
241
|
+
static from(raw: CCRaw, ctx: CCParsingContext): IrrigationCCValveConfigGet;
|
|
237
242
|
valveId: ValveId;
|
|
238
243
|
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
239
244
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
@@ -244,7 +249,7 @@ export interface IrrigationCCValveRunOptions {
|
|
|
244
249
|
}
|
|
245
250
|
export declare class IrrigationCCValveRun extends IrrigationCC {
|
|
246
251
|
constructor(options: WithAddress<IrrigationCCValveRunOptions>);
|
|
247
|
-
static from(
|
|
252
|
+
static from(raw: CCRaw, ctx: CCParsingContext): IrrigationCCValveRun;
|
|
248
253
|
valveId: ValveId;
|
|
249
254
|
duration: number;
|
|
250
255
|
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
@@ -256,7 +261,7 @@ export interface IrrigationCCValveTableSetOptions {
|
|
|
256
261
|
}
|
|
257
262
|
export declare class IrrigationCCValveTableSet extends IrrigationCC {
|
|
258
263
|
constructor(options: WithAddress<IrrigationCCValveTableSetOptions>);
|
|
259
|
-
static from(
|
|
264
|
+
static from(raw: CCRaw, ctx: CCParsingContext): IrrigationCCValveTableSet;
|
|
260
265
|
tableId: number;
|
|
261
266
|
entries: ValveTableEntry[];
|
|
262
267
|
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
@@ -271,6 +276,7 @@ export declare class IrrigationCCValveTableReport extends IrrigationCC {
|
|
|
271
276
|
static from(raw: CCRaw, ctx: CCParsingContext): IrrigationCCValveTableReport;
|
|
272
277
|
readonly tableId: number;
|
|
273
278
|
readonly entries: ValveTableEntry[];
|
|
279
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
274
280
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
275
281
|
}
|
|
276
282
|
export interface IrrigationCCValveTableGetOptions {
|
|
@@ -278,7 +284,7 @@ export interface IrrigationCCValveTableGetOptions {
|
|
|
278
284
|
}
|
|
279
285
|
export declare class IrrigationCCValveTableGet extends IrrigationCC {
|
|
280
286
|
constructor(options: WithAddress<IrrigationCCValveTableGetOptions>);
|
|
281
|
-
static from(
|
|
287
|
+
static from(raw: CCRaw, ctx: CCParsingContext): IrrigationCCValveTableGet;
|
|
282
288
|
tableId: number;
|
|
283
289
|
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
284
290
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
@@ -288,7 +294,7 @@ export interface IrrigationCCValveTableRunOptions {
|
|
|
288
294
|
}
|
|
289
295
|
export declare class IrrigationCCValveTableRun extends IrrigationCC {
|
|
290
296
|
constructor(options: WithAddress<IrrigationCCValveTableRunOptions>);
|
|
291
|
-
static from(
|
|
297
|
+
static from(raw: CCRaw, ctx: CCParsingContext): IrrigationCCValveTableRun;
|
|
292
298
|
tableIDs: number[];
|
|
293
299
|
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
294
300
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
@@ -302,7 +308,7 @@ export interface IrrigationCCSystemShutoffOptions {
|
|
|
302
308
|
}
|
|
303
309
|
export declare class IrrigationCCSystemShutoff extends IrrigationCC {
|
|
304
310
|
constructor(options: WithAddress<IrrigationCCSystemShutoffOptions>);
|
|
305
|
-
static from(
|
|
311
|
+
static from(raw: CCRaw, ctx: CCParsingContext): IrrigationCCSystemShutoff;
|
|
306
312
|
duration?: number;
|
|
307
313
|
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
308
314
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
@@ -667,6 +667,15 @@ let IrrigationCCSystemInfoReport = (() => {
|
|
|
667
667
|
numValveTables;
|
|
668
668
|
supportsMasterValve;
|
|
669
669
|
maxValveTableSize;
|
|
670
|
+
serialize(ctx) {
|
|
671
|
+
this.payload = import_shared.Bytes.from([
|
|
672
|
+
this.supportsMasterValve ? 1 : 0,
|
|
673
|
+
this.numValves,
|
|
674
|
+
this.numValveTables,
|
|
675
|
+
this.maxValveTableSize & 15
|
|
676
|
+
]);
|
|
677
|
+
return super.serialize(ctx);
|
|
678
|
+
}
|
|
670
679
|
toLogEntry(ctx) {
|
|
671
680
|
return {
|
|
672
681
|
...super.toLogEntry(ctx),
|
|
@@ -812,6 +821,40 @@ let IrrigationCCSystemStatusReport = (() => {
|
|
|
812
821
|
errorValve;
|
|
813
822
|
masterValveOpen;
|
|
814
823
|
firstOpenZoneId;
|
|
824
|
+
serialize(ctx) {
|
|
825
|
+
let sensorFlags = 0;
|
|
826
|
+
if (this.flowSensorActive)
|
|
827
|
+
sensorFlags |= 1;
|
|
828
|
+
if (this.pressureSensorActive)
|
|
829
|
+
sensorFlags |= 2;
|
|
830
|
+
if (this.rainSensorActive)
|
|
831
|
+
sensorFlags |= 4;
|
|
832
|
+
if (this.moistureSensorActive)
|
|
833
|
+
sensorFlags |= 8;
|
|
834
|
+
let errorFlags = 0;
|
|
835
|
+
if (this.errorNotProgrammed)
|
|
836
|
+
errorFlags |= 1;
|
|
837
|
+
if (this.errorEmergencyShutdown)
|
|
838
|
+
errorFlags |= 2;
|
|
839
|
+
if (this.errorHighPressure)
|
|
840
|
+
errorFlags |= 4;
|
|
841
|
+
if (this.errorLowPressure)
|
|
842
|
+
errorFlags |= 8;
|
|
843
|
+
if (this.errorValve)
|
|
844
|
+
errorFlags |= 16;
|
|
845
|
+
this.payload = import_shared.Bytes.concat([
|
|
846
|
+
[this.systemVoltage, sensorFlags],
|
|
847
|
+
(0, import_core.encodeFloatWithScale)(this.flow ?? 0, 0),
|
|
848
|
+
(0, import_core.encodeFloatWithScale)(this.pressure ?? 0, 0),
|
|
849
|
+
[
|
|
850
|
+
this.shutoffDuration,
|
|
851
|
+
errorFlags,
|
|
852
|
+
this.masterValveOpen ? 1 : 0,
|
|
853
|
+
this.firstOpenZoneId ?? 0
|
|
854
|
+
]
|
|
855
|
+
]);
|
|
856
|
+
return super.serialize(ctx);
|
|
857
|
+
}
|
|
815
858
|
toLogEntry(ctx) {
|
|
816
859
|
const message = {
|
|
817
860
|
"system voltage": `${this.systemVoltage} V`,
|
|
@@ -900,8 +943,40 @@ let IrrigationCCSystemConfigSet = (() => {
|
|
|
900
943
|
this.rainSensorPolarity = options.rainSensorPolarity;
|
|
901
944
|
this.moistureSensorPolarity = options.moistureSensorPolarity;
|
|
902
945
|
}
|
|
903
|
-
static from(
|
|
904
|
-
|
|
946
|
+
static from(raw, ctx) {
|
|
947
|
+
(0, import_core.validatePayload)(raw.payload.length >= 2);
|
|
948
|
+
const masterValveDelay = raw.payload[0];
|
|
949
|
+
let offset = 1;
|
|
950
|
+
let highPressureThreshold;
|
|
951
|
+
{
|
|
952
|
+
const { value, scale, bytesRead } = (0, import_core.parseFloatWithScale)(raw.payload.subarray(offset));
|
|
953
|
+
(0, import_core.validatePayload)(scale === 0);
|
|
954
|
+
highPressureThreshold = value;
|
|
955
|
+
offset += bytesRead;
|
|
956
|
+
}
|
|
957
|
+
let lowPressureThreshold;
|
|
958
|
+
{
|
|
959
|
+
const { value, scale, bytesRead } = (0, import_core.parseFloatWithScale)(raw.payload.subarray(offset));
|
|
960
|
+
(0, import_core.validatePayload)(scale === 0);
|
|
961
|
+
lowPressureThreshold = value;
|
|
962
|
+
offset += bytesRead;
|
|
963
|
+
}
|
|
964
|
+
(0, import_core.validatePayload)(raw.payload.length >= offset + 1);
|
|
965
|
+
const polarity = raw.payload[offset];
|
|
966
|
+
let rainSensorPolarity;
|
|
967
|
+
let moistureSensorPolarity;
|
|
968
|
+
if (!!(polarity & 128)) {
|
|
969
|
+
rainSensorPolarity = polarity & 1;
|
|
970
|
+
moistureSensorPolarity = (polarity & 2) >>> 1;
|
|
971
|
+
}
|
|
972
|
+
return new this({
|
|
973
|
+
nodeId: ctx.sourceNodeId,
|
|
974
|
+
masterValveDelay,
|
|
975
|
+
highPressureThreshold,
|
|
976
|
+
lowPressureThreshold,
|
|
977
|
+
rainSensorPolarity,
|
|
978
|
+
moistureSensorPolarity
|
|
979
|
+
});
|
|
905
980
|
}
|
|
906
981
|
masterValveDelay;
|
|
907
982
|
highPressureThreshold;
|
|
@@ -909,12 +984,8 @@ let IrrigationCCSystemConfigSet = (() => {
|
|
|
909
984
|
rainSensorPolarity;
|
|
910
985
|
moistureSensorPolarity;
|
|
911
986
|
serialize(ctx) {
|
|
912
|
-
let polarity = 0;
|
|
913
|
-
if (this.rainSensorPolarity != void 0)
|
|
914
|
-
polarity |= 1;
|
|
915
|
-
if (this.moistureSensorPolarity != void 0)
|
|
916
|
-
polarity |= 2;
|
|
917
|
-
if (this.rainSensorPolarity == void 0 && this.moistureSensorPolarity == void 0) {
|
|
987
|
+
let polarity = (this.rainSensorPolarity ?? 0) | (this.moistureSensorPolarity ?? 0) << 1;
|
|
988
|
+
if (this.rainSensorPolarity != void 0 || this.moistureSensorPolarity != void 0) {
|
|
918
989
|
polarity |= 128;
|
|
919
990
|
}
|
|
920
991
|
this.payload = import_shared.Bytes.concat([
|
|
@@ -1027,6 +1098,19 @@ let IrrigationCCSystemConfigReport = (() => {
|
|
|
1027
1098
|
lowPressureThreshold;
|
|
1028
1099
|
rainSensorPolarity;
|
|
1029
1100
|
moistureSensorPolarity;
|
|
1101
|
+
serialize(ctx) {
|
|
1102
|
+
let polarity = (this.rainSensorPolarity ?? 0) | (this.moistureSensorPolarity ?? 0) << 1;
|
|
1103
|
+
if (this.rainSensorPolarity != void 0 || this.moistureSensorPolarity != void 0) {
|
|
1104
|
+
polarity |= 128;
|
|
1105
|
+
}
|
|
1106
|
+
this.payload = import_shared.Bytes.concat([
|
|
1107
|
+
[this.masterValveDelay],
|
|
1108
|
+
(0, import_core.encodeFloatWithScale)(this.highPressureThreshold, 0),
|
|
1109
|
+
(0, import_core.encodeFloatWithScale)(this.lowPressureThreshold, 0),
|
|
1110
|
+
[polarity]
|
|
1111
|
+
]);
|
|
1112
|
+
return super.serialize(ctx);
|
|
1113
|
+
}
|
|
1030
1114
|
toLogEntry(ctx) {
|
|
1031
1115
|
const message = {
|
|
1032
1116
|
"master valve delay": `${this.masterValveDelay} s`,
|
|
@@ -1145,6 +1229,35 @@ let IrrigationCCValveInfoReport = (() => {
|
|
|
1145
1229
|
errorMaximumFlow;
|
|
1146
1230
|
errorHighFlow;
|
|
1147
1231
|
errorLowFlow;
|
|
1232
|
+
serialize(ctx) {
|
|
1233
|
+
let byte0 = 0;
|
|
1234
|
+
if (this.valveId === "master")
|
|
1235
|
+
byte0 |= 1;
|
|
1236
|
+
if (this.connected)
|
|
1237
|
+
byte0 |= 2;
|
|
1238
|
+
let errorFlags = 0;
|
|
1239
|
+
if (this.errorShortCircuit)
|
|
1240
|
+
errorFlags |= 1;
|
|
1241
|
+
if (this.errorHighCurrent)
|
|
1242
|
+
errorFlags |= 2;
|
|
1243
|
+
if (this.errorLowCurrent)
|
|
1244
|
+
errorFlags |= 4;
|
|
1245
|
+
if (this.valveId === "master") {
|
|
1246
|
+
if (this.errorMaximumFlow)
|
|
1247
|
+
errorFlags |= 8;
|
|
1248
|
+
if (this.errorHighFlow)
|
|
1249
|
+
errorFlags |= 16;
|
|
1250
|
+
if (this.errorLowFlow)
|
|
1251
|
+
errorFlags |= 32;
|
|
1252
|
+
}
|
|
1253
|
+
this.payload = import_shared.Bytes.from([
|
|
1254
|
+
byte0,
|
|
1255
|
+
this.valveId === "master" ? 1 : this.valveId,
|
|
1256
|
+
Math.floor(this.nominalCurrent / 10),
|
|
1257
|
+
errorFlags
|
|
1258
|
+
]);
|
|
1259
|
+
return super.serialize(ctx);
|
|
1260
|
+
}
|
|
1148
1261
|
persistValues(ctx) {
|
|
1149
1262
|
if (!super.persistValues(ctx))
|
|
1150
1263
|
return false;
|
|
@@ -1233,8 +1346,18 @@ let IrrigationCCValveInfoGet = (() => {
|
|
|
1233
1346
|
super(options);
|
|
1234
1347
|
this.valveId = options.valveId;
|
|
1235
1348
|
}
|
|
1236
|
-
static from(
|
|
1237
|
-
|
|
1349
|
+
static from(raw, ctx) {
|
|
1350
|
+
(0, import_core.validatePayload)(raw.payload.length >= 2);
|
|
1351
|
+
let valveId;
|
|
1352
|
+
if (raw.payload[0] & 1) {
|
|
1353
|
+
valveId = "master";
|
|
1354
|
+
} else {
|
|
1355
|
+
valveId = raw.payload[1];
|
|
1356
|
+
}
|
|
1357
|
+
return new this({
|
|
1358
|
+
nodeId: ctx.sourceNodeId,
|
|
1359
|
+
valveId
|
|
1360
|
+
});
|
|
1238
1361
|
}
|
|
1239
1362
|
valveId;
|
|
1240
1363
|
serialize(ctx) {
|
|
@@ -1286,8 +1409,52 @@ let IrrigationCCValveConfigSet = (() => {
|
|
|
1286
1409
|
this.useRainSensor = options.useRainSensor;
|
|
1287
1410
|
this.useMoistureSensor = options.useMoistureSensor;
|
|
1288
1411
|
}
|
|
1289
|
-
static from(
|
|
1290
|
-
|
|
1412
|
+
static from(raw, ctx) {
|
|
1413
|
+
(0, import_core.validatePayload)(raw.payload.length >= 4);
|
|
1414
|
+
let valveId;
|
|
1415
|
+
if (raw.payload[0] & 1) {
|
|
1416
|
+
valveId = "master";
|
|
1417
|
+
} else {
|
|
1418
|
+
valveId = raw.payload[1];
|
|
1419
|
+
}
|
|
1420
|
+
const nominalCurrentHighThreshold = 10 * raw.payload[2];
|
|
1421
|
+
const nominalCurrentLowThreshold = 10 * raw.payload[3];
|
|
1422
|
+
let offset = 4;
|
|
1423
|
+
let maximumFlow;
|
|
1424
|
+
{
|
|
1425
|
+
const { value, scale, bytesRead } = (0, import_core.parseFloatWithScale)(raw.payload.subarray(offset));
|
|
1426
|
+
(0, import_core.validatePayload)(scale === 0);
|
|
1427
|
+
maximumFlow = value;
|
|
1428
|
+
offset += bytesRead;
|
|
1429
|
+
}
|
|
1430
|
+
let highFlowThreshold;
|
|
1431
|
+
{
|
|
1432
|
+
const { value, scale, bytesRead } = (0, import_core.parseFloatWithScale)(raw.payload.subarray(offset));
|
|
1433
|
+
(0, import_core.validatePayload)(scale === 0);
|
|
1434
|
+
highFlowThreshold = value;
|
|
1435
|
+
offset += bytesRead;
|
|
1436
|
+
}
|
|
1437
|
+
let lowFlowThreshold;
|
|
1438
|
+
{
|
|
1439
|
+
const { value, scale, bytesRead } = (0, import_core.parseFloatWithScale)(raw.payload.subarray(offset));
|
|
1440
|
+
(0, import_core.validatePayload)(scale === 0);
|
|
1441
|
+
lowFlowThreshold = value;
|
|
1442
|
+
offset += bytesRead;
|
|
1443
|
+
}
|
|
1444
|
+
(0, import_core.validatePayload)(raw.payload.length >= offset + 1);
|
|
1445
|
+
const useRainSensor = !!(raw.payload[offset] & 1);
|
|
1446
|
+
const useMoistureSensor = !!(raw.payload[offset] & 2);
|
|
1447
|
+
return new this({
|
|
1448
|
+
nodeId: ctx.sourceNodeId,
|
|
1449
|
+
valveId,
|
|
1450
|
+
nominalCurrentHighThreshold,
|
|
1451
|
+
nominalCurrentLowThreshold,
|
|
1452
|
+
maximumFlow,
|
|
1453
|
+
highFlowThreshold,
|
|
1454
|
+
lowFlowThreshold,
|
|
1455
|
+
useRainSensor,
|
|
1456
|
+
useMoistureSensor
|
|
1457
|
+
});
|
|
1291
1458
|
}
|
|
1292
1459
|
valveId;
|
|
1293
1460
|
nominalCurrentHighThreshold;
|
|
@@ -1465,6 +1632,26 @@ let IrrigationCCValveConfigReport = (() => {
|
|
|
1465
1632
|
lowFlowThreshold;
|
|
1466
1633
|
useRainSensor;
|
|
1467
1634
|
useMoistureSensor;
|
|
1635
|
+
serialize(ctx) {
|
|
1636
|
+
let sensorFlags = 0;
|
|
1637
|
+
if (this.useRainSensor)
|
|
1638
|
+
sensorFlags |= 1;
|
|
1639
|
+
if (this.useMoistureSensor)
|
|
1640
|
+
sensorFlags |= 2;
|
|
1641
|
+
this.payload = import_shared.Bytes.concat([
|
|
1642
|
+
[
|
|
1643
|
+
this.valveId === "master" ? 1 : 0,
|
|
1644
|
+
this.valveId === "master" ? 1 : this.valveId,
|
|
1645
|
+
Math.floor(this.nominalCurrentHighThreshold / 10),
|
|
1646
|
+
Math.floor(this.nominalCurrentLowThreshold / 10)
|
|
1647
|
+
],
|
|
1648
|
+
(0, import_core.encodeFloatWithScale)(this.maximumFlow, 0),
|
|
1649
|
+
(0, import_core.encodeFloatWithScale)(this.highFlowThreshold, 0),
|
|
1650
|
+
(0, import_core.encodeFloatWithScale)(this.lowFlowThreshold, 0),
|
|
1651
|
+
[sensorFlags]
|
|
1652
|
+
]);
|
|
1653
|
+
return super.serialize(ctx);
|
|
1654
|
+
}
|
|
1468
1655
|
toLogEntry(ctx) {
|
|
1469
1656
|
return {
|
|
1470
1657
|
...super.toLogEntry(ctx),
|
|
@@ -1507,8 +1694,18 @@ let IrrigationCCValveConfigGet = (() => {
|
|
|
1507
1694
|
super(options);
|
|
1508
1695
|
this.valveId = options.valveId;
|
|
1509
1696
|
}
|
|
1510
|
-
static from(
|
|
1511
|
-
|
|
1697
|
+
static from(raw, ctx) {
|
|
1698
|
+
(0, import_core.validatePayload)(raw.payload.length >= 2);
|
|
1699
|
+
let valveId;
|
|
1700
|
+
if (raw.payload[0] & 1) {
|
|
1701
|
+
valveId = "master";
|
|
1702
|
+
} else {
|
|
1703
|
+
valveId = raw.payload[1];
|
|
1704
|
+
}
|
|
1705
|
+
return new this({
|
|
1706
|
+
nodeId: ctx.sourceNodeId,
|
|
1707
|
+
valveId
|
|
1708
|
+
});
|
|
1512
1709
|
}
|
|
1513
1710
|
valveId;
|
|
1514
1711
|
serialize(ctx) {
|
|
@@ -1554,8 +1751,20 @@ let IrrigationCCValveRun = (() => {
|
|
|
1554
1751
|
this.valveId = options.valveId;
|
|
1555
1752
|
this.duration = options.duration;
|
|
1556
1753
|
}
|
|
1557
|
-
static from(
|
|
1558
|
-
|
|
1754
|
+
static from(raw, ctx) {
|
|
1755
|
+
(0, import_core.validatePayload)(raw.payload.length >= 4);
|
|
1756
|
+
let valveId;
|
|
1757
|
+
if (raw.payload[0] & 1) {
|
|
1758
|
+
valveId = "master";
|
|
1759
|
+
} else {
|
|
1760
|
+
valveId = raw.payload[1];
|
|
1761
|
+
}
|
|
1762
|
+
const duration = raw.payload.readUInt16BE(2);
|
|
1763
|
+
return new this({
|
|
1764
|
+
nodeId: ctx.sourceNodeId,
|
|
1765
|
+
valveId,
|
|
1766
|
+
duration
|
|
1767
|
+
});
|
|
1559
1768
|
}
|
|
1560
1769
|
valveId;
|
|
1561
1770
|
duration;
|
|
@@ -1611,8 +1820,13 @@ let IrrigationCCValveTableSet = (() => {
|
|
|
1611
1820
|
this.tableId = options.tableId;
|
|
1612
1821
|
this.entries = options.entries;
|
|
1613
1822
|
}
|
|
1614
|
-
static from(
|
|
1615
|
-
|
|
1823
|
+
static from(raw, ctx) {
|
|
1824
|
+
const report = IrrigationCCValveTableReport.from(raw, ctx);
|
|
1825
|
+
return new this({
|
|
1826
|
+
nodeId: ctx.sourceNodeId,
|
|
1827
|
+
tableId: report.tableId,
|
|
1828
|
+
entries: report.entries
|
|
1829
|
+
});
|
|
1616
1830
|
}
|
|
1617
1831
|
tableId;
|
|
1618
1832
|
entries;
|
|
@@ -1691,6 +1905,16 @@ let IrrigationCCValveTableReport = (() => {
|
|
|
1691
1905
|
}
|
|
1692
1906
|
tableId;
|
|
1693
1907
|
entries;
|
|
1908
|
+
serialize(ctx) {
|
|
1909
|
+
this.payload = new import_shared.Bytes(1 + this.entries.length * 3);
|
|
1910
|
+
this.payload[0] = this.tableId;
|
|
1911
|
+
for (let i = 0; i < this.entries.length; i++) {
|
|
1912
|
+
const offset = 1 + i * 3;
|
|
1913
|
+
this.payload[offset] = this.entries[i].valveId;
|
|
1914
|
+
this.payload.writeUInt16BE(this.entries[i].duration, offset + 1);
|
|
1915
|
+
}
|
|
1916
|
+
return super.serialize(ctx);
|
|
1917
|
+
}
|
|
1694
1918
|
toLogEntry(ctx) {
|
|
1695
1919
|
const message = {
|
|
1696
1920
|
"table ID": this.tableId
|
|
@@ -1740,8 +1964,12 @@ let IrrigationCCValveTableGet = (() => {
|
|
|
1740
1964
|
super(options);
|
|
1741
1965
|
this.tableId = options.tableId;
|
|
1742
1966
|
}
|
|
1743
|
-
static from(
|
|
1744
|
-
|
|
1967
|
+
static from(raw, ctx) {
|
|
1968
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1);
|
|
1969
|
+
return new this({
|
|
1970
|
+
nodeId: ctx.sourceNodeId,
|
|
1971
|
+
tableId: raw.payload[0]
|
|
1972
|
+
});
|
|
1745
1973
|
}
|
|
1746
1974
|
tableId;
|
|
1747
1975
|
serialize(ctx) {
|
|
@@ -1786,8 +2014,12 @@ let IrrigationCCValveTableRun = (() => {
|
|
|
1786
2014
|
throw new import_core.ZWaveError(`${this.constructor.name}: At least one table ID must be specified.`, import_core.ZWaveErrorCodes.Argument_Invalid);
|
|
1787
2015
|
}
|
|
1788
2016
|
}
|
|
1789
|
-
static from(
|
|
1790
|
-
|
|
2017
|
+
static from(raw, ctx) {
|
|
2018
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1);
|
|
2019
|
+
return new this({
|
|
2020
|
+
nodeId: ctx.sourceNodeId,
|
|
2021
|
+
tableIDs: [...raw.payload]
|
|
2022
|
+
});
|
|
1791
2023
|
}
|
|
1792
2024
|
tableIDs;
|
|
1793
2025
|
serialize(ctx) {
|
|
@@ -1829,8 +2061,12 @@ let IrrigationCCSystemShutoff = (() => {
|
|
|
1829
2061
|
super(options);
|
|
1830
2062
|
this.duration = options.duration;
|
|
1831
2063
|
}
|
|
1832
|
-
static from(
|
|
1833
|
-
|
|
2064
|
+
static from(raw, ctx) {
|
|
2065
|
+
(0, import_core.validatePayload)(raw.payload.length >= 1);
|
|
2066
|
+
return new this({
|
|
2067
|
+
nodeId: ctx.sourceNodeId,
|
|
2068
|
+
duration: raw.payload[0]
|
|
2069
|
+
});
|
|
1834
2070
|
}
|
|
1835
2071
|
duration;
|
|
1836
2072
|
serialize(ctx) {
|