mclimate-payload-helper 1.0.2 → 1.0.4
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/dist/decoders/commandsReadingHelper.d.ts +1 -1
- package/dist/decoders/commandsReadingHelper.d.ts.map +1 -1
- package/dist/decoders/commandsReadingHelper.js +583 -94
- package/dist/decoders/commandsReadingHelper.js.map +1 -1
- package/dist/decoders/payloadParsers/AQISensorPayloadParser.d.ts +2 -0
- package/dist/decoders/payloadParsers/AQISensorPayloadParser.d.ts.map +1 -0
- package/dist/decoders/payloadParsers/AQISensorPayloadParser.js +63 -0
- package/dist/decoders/payloadParsers/AQISensorPayloadParser.js.map +1 -0
- package/dist/decoders/payloadParsers/index.d.ts +4 -0
- package/dist/decoders/payloadParsers/index.d.ts.map +1 -0
- package/dist/decoders/payloadParsers/index.js +20 -0
- package/dist/decoders/payloadParsers/index.js.map +1 -0
- package/dist/decoders/payloadParsers/types/allDevices.d.ts +19 -0
- package/dist/decoders/payloadParsers/types/allDevices.d.ts.map +1 -0
- package/dist/decoders/payloadParsers/types/allDevices.js +23 -0
- package/dist/decoders/payloadParsers/types/allDevices.js.map +1 -0
- package/dist/decoders/payloadParsers/types/index.d.ts +3 -0
- package/dist/decoders/payloadParsers/types/index.d.ts.map +1 -0
- package/dist/decoders/payloadParsers/types/index.js +19 -0
- package/dist/decoders/payloadParsers/types/index.js.map +1 -0
- package/dist/decoders/payloadParsers/types/vicki.d.ts +21 -0
- package/dist/decoders/payloadParsers/types/vicki.d.ts.map +1 -0
- package/dist/decoders/payloadParsers/types/vicki.js +3 -0
- package/dist/decoders/payloadParsers/types/vicki.js.map +1 -0
- package/dist/decoders/payloadParsers/uplinkPayloadParser.d.ts +3 -0
- package/dist/decoders/payloadParsers/uplinkPayloadParser.d.ts.map +1 -0
- package/dist/decoders/payloadParsers/uplinkPayloadParser.js +46 -0
- package/dist/decoders/payloadParsers/uplinkPayloadParser.js.map +1 -0
- package/dist/decoders/payloadParsers/vickiPayloadParser.d.ts +2 -0
- package/dist/decoders/payloadParsers/vickiPayloadParser.d.ts.map +1 -0
- package/dist/decoders/payloadParsers/vickiPayloadParser.js +117 -0
- package/dist/decoders/payloadParsers/vickiPayloadParser.js.map +1 -0
- package/dist/helpers/byteArrayParser.d.ts +2 -0
- package/dist/helpers/byteArrayParser.d.ts.map +1 -0
- package/dist/helpers/byteArrayParser.js +14 -0
- package/dist/helpers/byteArrayParser.js.map +1 -0
- package/dist/helpers/index.d.ts +2 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/index.js +18 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/utils/customErrorHandler.d.ts +11 -5
- package/dist/utils/customErrorHandler.d.ts.map +1 -1
- package/dist/utils/customErrorHandler.js +2 -5
- package/dist/utils/customErrorHandler.js.map +1 -1
- package/package.json +1 -1
- package/src/decoders/commandsReadingHelper.ts +583 -115
- package/src/decoders/payloadParsers/AQISensorPayloadParser.ts +65 -0
- package/src/decoders/payloadParsers/index.ts +3 -0
- package/src/decoders/payloadParsers/types/index.ts +2 -0
- package/src/decoders/payloadParsers/types/vicki.ts +20 -0
- package/src/decoders/payloadParsers/uplinkPayloadParser.ts +42 -0
- package/src/decoders/payloadParsers/vickiPayloadParser.ts +124 -0
- package/src/helpers/byteArrayParser.ts +9 -0
- package/src/helpers/index.ts +1 -0
- package/src/index.ts +1 -1
- package/src/utils/customErrorHandler.ts +24 -10
- package/src/types/index.ts +0 -1
- /package/src/{types/deviceTypes.ts → decoders/payloadParsers/types/allDevices.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.commandsReadingHelper = void 0;
|
|
4
|
-
const types_1 = require("../types");
|
|
4
|
+
const types_1 = require("../decoders/payloadParsers/types");
|
|
5
5
|
const utils_1 = require("../utils");
|
|
6
6
|
const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
7
7
|
let resultToPass = {};
|
|
@@ -34,7 +34,6 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
34
34
|
}
|
|
35
35
|
return commands;
|
|
36
36
|
};
|
|
37
|
-
// Q: do we want to handle this?
|
|
38
37
|
if (!commands)
|
|
39
38
|
return;
|
|
40
39
|
commands.map((command, i) => {
|
|
@@ -50,7 +49,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
51
|
catch (e) {
|
|
53
|
-
throw new utils_1.CustomError(
|
|
52
|
+
throw new utils_1.CustomError({
|
|
53
|
+
message: `Failed to process command '88'`,
|
|
54
|
+
hexData,
|
|
55
|
+
command,
|
|
56
|
+
deviceType,
|
|
57
|
+
originalError: e,
|
|
58
|
+
});
|
|
54
59
|
}
|
|
55
60
|
}
|
|
56
61
|
break;
|
|
@@ -62,7 +67,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
62
67
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
63
68
|
}
|
|
64
69
|
catch (e) {
|
|
65
|
-
throw new utils_1.CustomError(
|
|
70
|
+
throw new utils_1.CustomError({
|
|
71
|
+
message: `Failed to process command '01'`,
|
|
72
|
+
hexData,
|
|
73
|
+
command,
|
|
74
|
+
deviceType,
|
|
75
|
+
originalError: e,
|
|
76
|
+
});
|
|
66
77
|
}
|
|
67
78
|
}
|
|
68
79
|
break;
|
|
@@ -74,7 +85,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
74
85
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
75
86
|
}
|
|
76
87
|
catch (e) {
|
|
77
|
-
throw new utils_1.CustomError(
|
|
88
|
+
throw new utils_1.CustomError({
|
|
89
|
+
message: `Failed to process command '81'`,
|
|
90
|
+
hexData,
|
|
91
|
+
command,
|
|
92
|
+
deviceType,
|
|
93
|
+
originalError: e,
|
|
94
|
+
});
|
|
78
95
|
}
|
|
79
96
|
}
|
|
80
97
|
break;
|
|
@@ -88,7 +105,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
88
105
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
89
106
|
}
|
|
90
107
|
catch (e) {
|
|
91
|
-
throw new utils_1.CustomError(
|
|
108
|
+
throw new utils_1.CustomError({
|
|
109
|
+
message: `Failed to process command '04'`,
|
|
110
|
+
hexData,
|
|
111
|
+
command,
|
|
112
|
+
deviceType,
|
|
113
|
+
originalError: e,
|
|
114
|
+
});
|
|
92
115
|
}
|
|
93
116
|
}
|
|
94
117
|
break;
|
|
@@ -100,7 +123,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
100
123
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
101
124
|
}
|
|
102
125
|
catch (e) {
|
|
103
|
-
throw new utils_1.CustomError(
|
|
126
|
+
throw new utils_1.CustomError({
|
|
127
|
+
message: `Failed to process command '05'`,
|
|
128
|
+
hexData,
|
|
129
|
+
command,
|
|
130
|
+
deviceType,
|
|
131
|
+
originalError: e,
|
|
132
|
+
});
|
|
104
133
|
}
|
|
105
134
|
}
|
|
106
135
|
break;
|
|
@@ -112,7 +141,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
112
141
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
113
142
|
}
|
|
114
143
|
catch (e) {
|
|
115
|
-
throw new utils_1.CustomError(
|
|
144
|
+
throw new utils_1.CustomError({
|
|
145
|
+
message: `Failed to process command '06'`,
|
|
146
|
+
hexData,
|
|
147
|
+
command,
|
|
148
|
+
deviceType,
|
|
149
|
+
originalError: e,
|
|
150
|
+
});
|
|
116
151
|
}
|
|
117
152
|
}
|
|
118
153
|
break;
|
|
@@ -126,7 +161,6 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
126
161
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
127
162
|
}
|
|
128
163
|
catch (e) {
|
|
129
|
-
// TODO: replace console.log with errors
|
|
130
164
|
console.log(e);
|
|
131
165
|
}
|
|
132
166
|
}
|
|
@@ -139,7 +173,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
139
173
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
140
174
|
}
|
|
141
175
|
catch (e) {
|
|
142
|
-
throw new utils_1.CustomError(
|
|
176
|
+
throw new utils_1.CustomError({
|
|
177
|
+
message: `Failed to process command '09'`,
|
|
178
|
+
hexData,
|
|
179
|
+
command,
|
|
180
|
+
deviceType,
|
|
181
|
+
originalError: e,
|
|
182
|
+
});
|
|
143
183
|
}
|
|
144
184
|
}
|
|
145
185
|
break;
|
|
@@ -165,7 +205,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
165
205
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
166
206
|
}
|
|
167
207
|
catch (e) {
|
|
168
|
-
throw new utils_1.CustomError(
|
|
208
|
+
throw new utils_1.CustomError({
|
|
209
|
+
message: `Failed to process command '0f'`,
|
|
210
|
+
hexData,
|
|
211
|
+
command,
|
|
212
|
+
deviceType,
|
|
213
|
+
originalError: e,
|
|
214
|
+
});
|
|
169
215
|
}
|
|
170
216
|
}
|
|
171
217
|
break;
|
|
@@ -177,7 +223,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
177
223
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
178
224
|
}
|
|
179
225
|
catch (e) {
|
|
180
|
-
throw new utils_1.CustomError(
|
|
226
|
+
throw new utils_1.CustomError({
|
|
227
|
+
message: `Failed to process command '10'`,
|
|
228
|
+
hexData,
|
|
229
|
+
command,
|
|
230
|
+
deviceType,
|
|
231
|
+
originalError: e,
|
|
232
|
+
});
|
|
181
233
|
}
|
|
182
234
|
}
|
|
183
235
|
break;
|
|
@@ -189,7 +241,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
189
241
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
190
242
|
}
|
|
191
243
|
catch (e) {
|
|
192
|
-
throw new utils_1.CustomError(
|
|
244
|
+
throw new utils_1.CustomError({
|
|
245
|
+
message: `Failed to process command '11'`,
|
|
246
|
+
hexData,
|
|
247
|
+
command,
|
|
248
|
+
deviceType,
|
|
249
|
+
originalError: e,
|
|
250
|
+
});
|
|
193
251
|
}
|
|
194
252
|
}
|
|
195
253
|
break;
|
|
@@ -205,7 +263,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
205
263
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
206
264
|
}
|
|
207
265
|
catch (e) {
|
|
208
|
-
throw new utils_1.CustomError(
|
|
266
|
+
throw new utils_1.CustomError({
|
|
267
|
+
message: `Failed to process command '12'`,
|
|
268
|
+
hexData,
|
|
269
|
+
command,
|
|
270
|
+
deviceType,
|
|
271
|
+
originalError: e,
|
|
272
|
+
});
|
|
209
273
|
}
|
|
210
274
|
}
|
|
211
275
|
break;
|
|
@@ -221,24 +285,23 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
221
285
|
command_len = 4;
|
|
222
286
|
let enabled = !!parseInt(commands[i + 1], 16);
|
|
223
287
|
let duration = parseInt(commands[i + 2], 16) * 5;
|
|
224
|
-
//
|
|
225
|
-
// let tmp = ('0' + commands[i + 4].toString(16)).substr(-2)
|
|
226
|
-
// let motorPos2 = ('0' + commands[i + 3].toString(16)).substr(-2)
|
|
227
|
-
// let motorPos1 = tmp[0]
|
|
288
|
+
// TODO: discuss/test below
|
|
228
289
|
let motorPos1 = parseInt(commands[i + 4], 16) >> 4; // upper 4 bits of Byte 4
|
|
229
290
|
let motorPos2 = parseInt(commands[i + 3], 16) & 0xff; // lower 8 bits of Byte 3
|
|
230
|
-
// let motorPosition = parseInt(`0x${motorPos1}${motorPos2}`, 16)
|
|
231
|
-
// let delta = Number(tmp[1])
|
|
232
|
-
// Combine motorPos1 (upper bits) and motorPos2 (lower bits)
|
|
233
291
|
let motorPosition = (motorPos1 << 8) | motorPos2;
|
|
234
|
-
// Byte 4 - bits 3:0 for temperature difference delta
|
|
235
292
|
let delta = parseInt(commands[i + 4], 16) & 0x0f; // lower 4 bits of Byte 4
|
|
236
293
|
data = { openWindowParams: { enabled: enabled, duration: duration, motorPosition: motorPosition, delta: delta } };
|
|
237
294
|
}
|
|
238
295
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
239
296
|
}
|
|
240
297
|
catch (e) {
|
|
241
|
-
throw new utils_1.CustomError(
|
|
298
|
+
throw new utils_1.CustomError({
|
|
299
|
+
message: `Failed to process command '13'`,
|
|
300
|
+
hexData,
|
|
301
|
+
command,
|
|
302
|
+
deviceType,
|
|
303
|
+
originalError: e,
|
|
304
|
+
});
|
|
242
305
|
}
|
|
243
306
|
}
|
|
244
307
|
break;
|
|
@@ -261,7 +324,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
261
324
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
262
325
|
}
|
|
263
326
|
catch (e) {
|
|
264
|
-
throw new utils_1.CustomError(
|
|
327
|
+
throw new utils_1.CustomError({
|
|
328
|
+
message: `Failed to process command '14'`,
|
|
329
|
+
hexData,
|
|
330
|
+
command,
|
|
331
|
+
deviceType,
|
|
332
|
+
originalError: e,
|
|
333
|
+
});
|
|
265
334
|
}
|
|
266
335
|
}
|
|
267
336
|
break;
|
|
@@ -275,7 +344,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
275
344
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
276
345
|
}
|
|
277
346
|
catch (e) {
|
|
278
|
-
throw new utils_1.CustomError(
|
|
347
|
+
throw new utils_1.CustomError({
|
|
348
|
+
message: `Failed to process command '15'`,
|
|
349
|
+
hexData,
|
|
350
|
+
command,
|
|
351
|
+
deviceType,
|
|
352
|
+
originalError: e,
|
|
353
|
+
});
|
|
279
354
|
}
|
|
280
355
|
}
|
|
281
356
|
break;
|
|
@@ -302,7 +377,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
302
377
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
303
378
|
}
|
|
304
379
|
catch (e) {
|
|
305
|
-
throw new utils_1.CustomError(
|
|
380
|
+
throw new utils_1.CustomError({
|
|
381
|
+
message: `Failed to process command '16'`,
|
|
382
|
+
hexData,
|
|
383
|
+
command,
|
|
384
|
+
deviceType,
|
|
385
|
+
originalError: e,
|
|
386
|
+
});
|
|
306
387
|
}
|
|
307
388
|
}
|
|
308
389
|
break;
|
|
@@ -316,7 +397,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
316
397
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
317
398
|
}
|
|
318
399
|
catch (e) {
|
|
319
|
-
throw new utils_1.CustomError(
|
|
400
|
+
throw new utils_1.CustomError({
|
|
401
|
+
message: `Failed to process command '17'`,
|
|
402
|
+
hexData,
|
|
403
|
+
command,
|
|
404
|
+
deviceType,
|
|
405
|
+
originalError: e,
|
|
406
|
+
});
|
|
320
407
|
}
|
|
321
408
|
}
|
|
322
409
|
break;
|
|
@@ -335,7 +422,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
335
422
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
336
423
|
}
|
|
337
424
|
catch (e) {
|
|
338
|
-
throw new utils_1.CustomError(
|
|
425
|
+
throw new utils_1.CustomError({
|
|
426
|
+
message: `Failed to process command '18'`,
|
|
427
|
+
hexData,
|
|
428
|
+
command,
|
|
429
|
+
deviceType,
|
|
430
|
+
originalError: e,
|
|
431
|
+
});
|
|
339
432
|
}
|
|
340
433
|
}
|
|
341
434
|
break;
|
|
@@ -349,7 +442,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
349
442
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
350
443
|
}
|
|
351
444
|
catch (e) {
|
|
352
|
-
throw new utils_1.CustomError(
|
|
445
|
+
throw new utils_1.CustomError({
|
|
446
|
+
message: `Failed to process command '19'`,
|
|
447
|
+
hexData,
|
|
448
|
+
command,
|
|
449
|
+
deviceType,
|
|
450
|
+
originalError: e,
|
|
451
|
+
});
|
|
353
452
|
}
|
|
354
453
|
}
|
|
355
454
|
break;
|
|
@@ -363,7 +462,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
363
462
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
364
463
|
}
|
|
365
464
|
catch (e) {
|
|
366
|
-
throw new utils_1.CustomError(
|
|
465
|
+
throw new utils_1.CustomError({
|
|
466
|
+
message: `Failed to process command '1a'`,
|
|
467
|
+
hexData,
|
|
468
|
+
command,
|
|
469
|
+
deviceType,
|
|
470
|
+
originalError: e,
|
|
471
|
+
});
|
|
367
472
|
}
|
|
368
473
|
}
|
|
369
474
|
break;
|
|
@@ -375,7 +480,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
375
480
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
376
481
|
}
|
|
377
482
|
catch (e) {
|
|
378
|
-
throw new utils_1.CustomError(
|
|
483
|
+
throw new utils_1.CustomError({
|
|
484
|
+
message: `Failed to process command '1b'`,
|
|
485
|
+
hexData,
|
|
486
|
+
command,
|
|
487
|
+
deviceType,
|
|
488
|
+
originalError: e,
|
|
489
|
+
});
|
|
379
490
|
}
|
|
380
491
|
}
|
|
381
492
|
break;
|
|
@@ -389,7 +500,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
389
500
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
390
501
|
}
|
|
391
502
|
catch (e) {
|
|
392
|
-
throw new utils_1.CustomError(
|
|
503
|
+
throw new utils_1.CustomError({
|
|
504
|
+
message: `Failed to process command '1d'`,
|
|
505
|
+
hexData,
|
|
506
|
+
command,
|
|
507
|
+
deviceType,
|
|
508
|
+
originalError: e,
|
|
509
|
+
});
|
|
393
510
|
}
|
|
394
511
|
}
|
|
395
512
|
break;
|
|
@@ -430,7 +547,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
430
547
|
}
|
|
431
548
|
}
|
|
432
549
|
catch (e) {
|
|
433
|
-
throw new utils_1.CustomError(
|
|
550
|
+
throw new utils_1.CustomError({
|
|
551
|
+
message: `Failed to process command '1f'`,
|
|
552
|
+
hexData,
|
|
553
|
+
command,
|
|
554
|
+
deviceType,
|
|
555
|
+
originalError: e,
|
|
556
|
+
});
|
|
434
557
|
}
|
|
435
558
|
}
|
|
436
559
|
break;
|
|
@@ -460,7 +583,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
460
583
|
}
|
|
461
584
|
}
|
|
462
585
|
catch (e) {
|
|
463
|
-
throw new utils_1.CustomError(
|
|
586
|
+
throw new utils_1.CustomError({
|
|
587
|
+
message: `Failed to process command '21'`,
|
|
588
|
+
hexData,
|
|
589
|
+
command,
|
|
590
|
+
deviceType,
|
|
591
|
+
originalError: e,
|
|
592
|
+
});
|
|
464
593
|
}
|
|
465
594
|
}
|
|
466
595
|
break;
|
|
@@ -474,7 +603,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
474
603
|
}
|
|
475
604
|
}
|
|
476
605
|
catch (e) {
|
|
477
|
-
throw new utils_1.CustomError(
|
|
606
|
+
throw new utils_1.CustomError({
|
|
607
|
+
message: `Failed to process command '22'`,
|
|
608
|
+
hexData,
|
|
609
|
+
command,
|
|
610
|
+
deviceType,
|
|
611
|
+
originalError: e,
|
|
612
|
+
});
|
|
478
613
|
}
|
|
479
614
|
}
|
|
480
615
|
break;
|
|
@@ -514,7 +649,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
514
649
|
}
|
|
515
650
|
}
|
|
516
651
|
catch (e) {
|
|
517
|
-
throw new utils_1.CustomError(
|
|
652
|
+
throw new utils_1.CustomError({
|
|
653
|
+
message: `Failed to process command '23'`,
|
|
654
|
+
hexData,
|
|
655
|
+
command,
|
|
656
|
+
deviceType,
|
|
657
|
+
originalError: e,
|
|
658
|
+
});
|
|
518
659
|
}
|
|
519
660
|
}
|
|
520
661
|
break;
|
|
@@ -535,7 +676,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
535
676
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
536
677
|
}
|
|
537
678
|
catch (e) {
|
|
538
|
-
throw new utils_1.CustomError(
|
|
679
|
+
throw new utils_1.CustomError({
|
|
680
|
+
message: `Failed to process command '25'`,
|
|
681
|
+
hexData,
|
|
682
|
+
command,
|
|
683
|
+
deviceType,
|
|
684
|
+
originalError: e,
|
|
685
|
+
});
|
|
539
686
|
}
|
|
540
687
|
}
|
|
541
688
|
break;
|
|
@@ -575,7 +722,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
575
722
|
}
|
|
576
723
|
}
|
|
577
724
|
catch (e) {
|
|
578
|
-
throw new utils_1.CustomError(
|
|
725
|
+
throw new utils_1.CustomError({
|
|
726
|
+
message: `Failed to process command '27'`,
|
|
727
|
+
hexData,
|
|
728
|
+
command,
|
|
729
|
+
deviceType,
|
|
730
|
+
originalError: e,
|
|
731
|
+
});
|
|
579
732
|
}
|
|
580
733
|
}
|
|
581
734
|
break;
|
|
@@ -630,7 +783,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
630
783
|
}
|
|
631
784
|
}
|
|
632
785
|
catch (e) {
|
|
633
|
-
throw new utils_1.CustomError(
|
|
786
|
+
throw new utils_1.CustomError({
|
|
787
|
+
message: `Failed to process command '29'`,
|
|
788
|
+
hexData,
|
|
789
|
+
command,
|
|
790
|
+
deviceType,
|
|
791
|
+
originalError: e,
|
|
792
|
+
});
|
|
634
793
|
}
|
|
635
794
|
}
|
|
636
795
|
break;
|
|
@@ -661,7 +820,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
661
820
|
}
|
|
662
821
|
}
|
|
663
822
|
catch (e) {
|
|
664
|
-
throw new utils_1.CustomError(
|
|
823
|
+
throw new utils_1.CustomError({
|
|
824
|
+
message: `Failed to process command '2b'`,
|
|
825
|
+
hexData,
|
|
826
|
+
command,
|
|
827
|
+
deviceType,
|
|
828
|
+
originalError: e,
|
|
829
|
+
});
|
|
665
830
|
}
|
|
666
831
|
}
|
|
667
832
|
break;
|
|
@@ -673,7 +838,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
673
838
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
674
839
|
}
|
|
675
840
|
catch (e) {
|
|
676
|
-
throw new utils_1.CustomError(
|
|
841
|
+
throw new utils_1.CustomError({
|
|
842
|
+
message: `Failed to process command '2f'`,
|
|
843
|
+
hexData,
|
|
844
|
+
command,
|
|
845
|
+
deviceType,
|
|
846
|
+
originalError: e,
|
|
847
|
+
});
|
|
677
848
|
}
|
|
678
849
|
}
|
|
679
850
|
break;
|
|
@@ -685,7 +856,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
685
856
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
686
857
|
}
|
|
687
858
|
catch (e) {
|
|
688
|
-
throw new utils_1.CustomError(
|
|
859
|
+
throw new utils_1.CustomError({
|
|
860
|
+
message: `Failed to process command '30'`,
|
|
861
|
+
hexData,
|
|
862
|
+
command,
|
|
863
|
+
deviceType,
|
|
864
|
+
originalError: e,
|
|
865
|
+
});
|
|
689
866
|
}
|
|
690
867
|
}
|
|
691
868
|
break;
|
|
@@ -704,7 +881,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
704
881
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
705
882
|
}
|
|
706
883
|
catch (e) {
|
|
707
|
-
throw new utils_1.CustomError(
|
|
884
|
+
throw new utils_1.CustomError({
|
|
885
|
+
message: `Failed to process command '32'`,
|
|
886
|
+
hexData,
|
|
887
|
+
command,
|
|
888
|
+
deviceType,
|
|
889
|
+
originalError: e,
|
|
890
|
+
});
|
|
708
891
|
}
|
|
709
892
|
}
|
|
710
893
|
break;
|
|
@@ -723,7 +906,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
723
906
|
}
|
|
724
907
|
}
|
|
725
908
|
catch (e) {
|
|
726
|
-
throw new utils_1.CustomError(
|
|
909
|
+
throw new utils_1.CustomError({
|
|
910
|
+
message: `Failed to process command '34'`,
|
|
911
|
+
hexData,
|
|
912
|
+
command,
|
|
913
|
+
deviceType,
|
|
914
|
+
originalError: e,
|
|
915
|
+
});
|
|
727
916
|
}
|
|
728
917
|
}
|
|
729
918
|
break;
|
|
@@ -748,7 +937,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
748
937
|
}
|
|
749
938
|
}
|
|
750
939
|
catch (e) {
|
|
751
|
-
throw new utils_1.CustomError(
|
|
940
|
+
throw new utils_1.CustomError({
|
|
941
|
+
message: `Failed to process command '36'`,
|
|
942
|
+
hexData,
|
|
943
|
+
command,
|
|
944
|
+
deviceType,
|
|
945
|
+
originalError: e,
|
|
946
|
+
});
|
|
752
947
|
}
|
|
753
948
|
}
|
|
754
949
|
break;
|
|
@@ -760,7 +955,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
760
955
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
761
956
|
}
|
|
762
957
|
catch (e) {
|
|
763
|
-
throw new utils_1.CustomError(
|
|
958
|
+
throw new utils_1.CustomError({
|
|
959
|
+
message: `Failed to process command '38'`,
|
|
960
|
+
hexData,
|
|
961
|
+
command,
|
|
962
|
+
deviceType,
|
|
963
|
+
originalError: e,
|
|
964
|
+
});
|
|
764
965
|
}
|
|
765
966
|
}
|
|
766
967
|
break;
|
|
@@ -772,7 +973,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
772
973
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
773
974
|
}
|
|
774
975
|
catch (e) {
|
|
775
|
-
throw new utils_1.CustomError(
|
|
976
|
+
throw new utils_1.CustomError({
|
|
977
|
+
message: `Failed to process command '3a'`,
|
|
978
|
+
hexData,
|
|
979
|
+
command,
|
|
980
|
+
deviceType,
|
|
981
|
+
originalError: e,
|
|
982
|
+
});
|
|
776
983
|
}
|
|
777
984
|
}
|
|
778
985
|
break;
|
|
@@ -792,7 +999,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
792
999
|
}
|
|
793
1000
|
}
|
|
794
1001
|
catch (e) {
|
|
795
|
-
throw new utils_1.CustomError(
|
|
1002
|
+
throw new utils_1.CustomError({
|
|
1003
|
+
message: `Failed to process command '3d'`,
|
|
1004
|
+
hexData,
|
|
1005
|
+
command,
|
|
1006
|
+
deviceType,
|
|
1007
|
+
originalError: e,
|
|
1008
|
+
});
|
|
796
1009
|
}
|
|
797
1010
|
}
|
|
798
1011
|
break;
|
|
@@ -807,7 +1020,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
807
1020
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
808
1021
|
}
|
|
809
1022
|
catch (e) {
|
|
810
|
-
throw new utils_1.CustomError(
|
|
1023
|
+
throw new utils_1.CustomError({
|
|
1024
|
+
message: `Failed to process command '3e'`,
|
|
1025
|
+
hexData,
|
|
1026
|
+
command,
|
|
1027
|
+
deviceType,
|
|
1028
|
+
originalError: e,
|
|
1029
|
+
});
|
|
811
1030
|
}
|
|
812
1031
|
}
|
|
813
1032
|
break;
|
|
@@ -826,7 +1045,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
826
1045
|
}
|
|
827
1046
|
}
|
|
828
1047
|
catch (e) {
|
|
829
|
-
throw new utils_1.CustomError(
|
|
1048
|
+
throw new utils_1.CustomError({
|
|
1049
|
+
message: `Failed to process command '3f'`,
|
|
1050
|
+
hexData,
|
|
1051
|
+
command,
|
|
1052
|
+
deviceType,
|
|
1053
|
+
originalError: e,
|
|
1054
|
+
});
|
|
830
1055
|
}
|
|
831
1056
|
}
|
|
832
1057
|
break;
|
|
@@ -838,7 +1063,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
838
1063
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
839
1064
|
}
|
|
840
1065
|
catch (e) {
|
|
841
|
-
throw new utils_1.CustomError(
|
|
1066
|
+
throw new utils_1.CustomError({
|
|
1067
|
+
message: `Failed to process command '40'`,
|
|
1068
|
+
hexData,
|
|
1069
|
+
command,
|
|
1070
|
+
deviceType,
|
|
1071
|
+
originalError: e,
|
|
1072
|
+
});
|
|
842
1073
|
}
|
|
843
1074
|
}
|
|
844
1075
|
break;
|
|
@@ -850,7 +1081,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
850
1081
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
851
1082
|
}
|
|
852
1083
|
catch (e) {
|
|
853
|
-
throw new utils_1.CustomError(
|
|
1084
|
+
throw new utils_1.CustomError({
|
|
1085
|
+
message: `Failed to process command '41'`,
|
|
1086
|
+
hexData,
|
|
1087
|
+
command,
|
|
1088
|
+
deviceType,
|
|
1089
|
+
originalError: e,
|
|
1090
|
+
});
|
|
854
1091
|
}
|
|
855
1092
|
}
|
|
856
1093
|
break;
|
|
@@ -862,7 +1099,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
862
1099
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
863
1100
|
}
|
|
864
1101
|
catch (e) {
|
|
865
|
-
throw new utils_1.CustomError(
|
|
1102
|
+
throw new utils_1.CustomError({
|
|
1103
|
+
message: `Failed to process command '42'`,
|
|
1104
|
+
hexData,
|
|
1105
|
+
command,
|
|
1106
|
+
deviceType,
|
|
1107
|
+
originalError: e,
|
|
1108
|
+
});
|
|
866
1109
|
}
|
|
867
1110
|
}
|
|
868
1111
|
break;
|
|
@@ -874,7 +1117,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
874
1117
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
875
1118
|
}
|
|
876
1119
|
catch (e) {
|
|
877
|
-
throw new utils_1.CustomError(
|
|
1120
|
+
throw new utils_1.CustomError({
|
|
1121
|
+
message: `Failed to process command '43'`,
|
|
1122
|
+
hexData,
|
|
1123
|
+
command,
|
|
1124
|
+
deviceType,
|
|
1125
|
+
originalError: e,
|
|
1126
|
+
});
|
|
878
1127
|
}
|
|
879
1128
|
}
|
|
880
1129
|
break;
|
|
@@ -886,7 +1135,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
886
1135
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
887
1136
|
}
|
|
888
1137
|
catch (e) {
|
|
889
|
-
throw new utils_1.CustomError(
|
|
1138
|
+
throw new utils_1.CustomError({
|
|
1139
|
+
message: `Failed to process command '44'`,
|
|
1140
|
+
hexData,
|
|
1141
|
+
command,
|
|
1142
|
+
deviceType,
|
|
1143
|
+
originalError: e,
|
|
1144
|
+
});
|
|
890
1145
|
}
|
|
891
1146
|
}
|
|
892
1147
|
break;
|
|
@@ -905,7 +1160,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
905
1160
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
906
1161
|
}
|
|
907
1162
|
catch (e) {
|
|
908
|
-
throw new utils_1.CustomError(
|
|
1163
|
+
throw new utils_1.CustomError({
|
|
1164
|
+
message: `Failed to process command '45'`,
|
|
1165
|
+
hexData,
|
|
1166
|
+
command,
|
|
1167
|
+
deviceType,
|
|
1168
|
+
originalError: e,
|
|
1169
|
+
});
|
|
909
1170
|
}
|
|
910
1171
|
}
|
|
911
1172
|
break;
|
|
@@ -920,7 +1181,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
920
1181
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
921
1182
|
}
|
|
922
1183
|
catch (e) {
|
|
923
|
-
throw new utils_1.CustomError(
|
|
1184
|
+
throw new utils_1.CustomError({
|
|
1185
|
+
message: `Failed to process command '46'`,
|
|
1186
|
+
hexData,
|
|
1187
|
+
command,
|
|
1188
|
+
deviceType,
|
|
1189
|
+
originalError: e,
|
|
1190
|
+
});
|
|
924
1191
|
}
|
|
925
1192
|
}
|
|
926
1193
|
break;
|
|
@@ -939,7 +1206,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
939
1206
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
940
1207
|
}
|
|
941
1208
|
catch (e) {
|
|
942
|
-
throw new utils_1.CustomError(
|
|
1209
|
+
throw new utils_1.CustomError({
|
|
1210
|
+
message: `Failed to process command '47'`,
|
|
1211
|
+
hexData,
|
|
1212
|
+
command,
|
|
1213
|
+
deviceType,
|
|
1214
|
+
originalError: e,
|
|
1215
|
+
});
|
|
943
1216
|
}
|
|
944
1217
|
}
|
|
945
1218
|
break;
|
|
@@ -951,7 +1224,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
951
1224
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
952
1225
|
}
|
|
953
1226
|
catch (e) {
|
|
954
|
-
throw new utils_1.CustomError(
|
|
1227
|
+
throw new utils_1.CustomError({
|
|
1228
|
+
message: `Failed to process command '48'`,
|
|
1229
|
+
hexData,
|
|
1230
|
+
command,
|
|
1231
|
+
deviceType,
|
|
1232
|
+
originalError: e,
|
|
1233
|
+
});
|
|
955
1234
|
}
|
|
956
1235
|
}
|
|
957
1236
|
break;
|
|
@@ -970,7 +1249,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
970
1249
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
971
1250
|
}
|
|
972
1251
|
catch (e) {
|
|
973
|
-
throw new utils_1.CustomError(
|
|
1252
|
+
throw new utils_1.CustomError({
|
|
1253
|
+
message: `Failed to process command '49'`,
|
|
1254
|
+
hexData,
|
|
1255
|
+
command,
|
|
1256
|
+
deviceType,
|
|
1257
|
+
originalError: e,
|
|
1258
|
+
});
|
|
974
1259
|
}
|
|
975
1260
|
}
|
|
976
1261
|
break;
|
|
@@ -985,7 +1270,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
985
1270
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
986
1271
|
}
|
|
987
1272
|
catch (e) {
|
|
988
|
-
throw new utils_1.CustomError(
|
|
1273
|
+
throw new utils_1.CustomError({
|
|
1274
|
+
message: `Failed to process command '4a'`,
|
|
1275
|
+
hexData,
|
|
1276
|
+
command,
|
|
1277
|
+
deviceType,
|
|
1278
|
+
originalError: e,
|
|
1279
|
+
});
|
|
989
1280
|
}
|
|
990
1281
|
}
|
|
991
1282
|
break;
|
|
@@ -1008,7 +1299,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1008
1299
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1009
1300
|
}
|
|
1010
1301
|
catch (e) {
|
|
1011
|
-
throw new utils_1.CustomError(
|
|
1302
|
+
throw new utils_1.CustomError({
|
|
1303
|
+
message: `Failed to process command '4b'`,
|
|
1304
|
+
hexData,
|
|
1305
|
+
command,
|
|
1306
|
+
deviceType,
|
|
1307
|
+
originalError: e,
|
|
1308
|
+
});
|
|
1012
1309
|
}
|
|
1013
1310
|
}
|
|
1014
1311
|
break;
|
|
@@ -1031,7 +1328,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1031
1328
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1032
1329
|
}
|
|
1033
1330
|
catch (e) {
|
|
1034
|
-
throw new utils_1.CustomError(
|
|
1331
|
+
throw new utils_1.CustomError({
|
|
1332
|
+
message: `Failed to process command '4d'`,
|
|
1333
|
+
hexData,
|
|
1334
|
+
command,
|
|
1335
|
+
deviceType,
|
|
1336
|
+
originalError: e,
|
|
1337
|
+
});
|
|
1035
1338
|
}
|
|
1036
1339
|
}
|
|
1037
1340
|
break;
|
|
@@ -1050,7 +1353,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1050
1353
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1051
1354
|
}
|
|
1052
1355
|
catch (e) {
|
|
1053
|
-
throw new utils_1.CustomError(
|
|
1356
|
+
throw new utils_1.CustomError({
|
|
1357
|
+
message: `Failed to process command '4f'`,
|
|
1358
|
+
hexData,
|
|
1359
|
+
command,
|
|
1360
|
+
deviceType,
|
|
1361
|
+
originalError: e,
|
|
1362
|
+
});
|
|
1054
1363
|
}
|
|
1055
1364
|
}
|
|
1056
1365
|
break;
|
|
@@ -1064,7 +1373,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1064
1373
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1065
1374
|
}
|
|
1066
1375
|
catch (e) {
|
|
1067
|
-
throw new utils_1.CustomError(
|
|
1376
|
+
throw new utils_1.CustomError({
|
|
1377
|
+
message: `Failed to process command '50'`,
|
|
1378
|
+
hexData,
|
|
1379
|
+
command,
|
|
1380
|
+
deviceType,
|
|
1381
|
+
originalError: e,
|
|
1382
|
+
});
|
|
1068
1383
|
}
|
|
1069
1384
|
}
|
|
1070
1385
|
break;
|
|
@@ -1085,7 +1400,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1085
1400
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1086
1401
|
}
|
|
1087
1402
|
catch (e) {
|
|
1088
|
-
throw new utils_1.CustomError(
|
|
1403
|
+
throw new utils_1.CustomError({
|
|
1404
|
+
message: `Failed to process command '51'`,
|
|
1405
|
+
hexData,
|
|
1406
|
+
command,
|
|
1407
|
+
deviceType,
|
|
1408
|
+
originalError: e,
|
|
1409
|
+
});
|
|
1089
1410
|
}
|
|
1090
1411
|
}
|
|
1091
1412
|
break;
|
|
@@ -1097,7 +1418,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1097
1418
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1098
1419
|
}
|
|
1099
1420
|
catch (e) {
|
|
1100
|
-
throw new utils_1.CustomError(
|
|
1421
|
+
throw new utils_1.CustomError({
|
|
1422
|
+
message: `Failed to process command '52'`,
|
|
1423
|
+
hexData,
|
|
1424
|
+
command,
|
|
1425
|
+
deviceType,
|
|
1426
|
+
originalError: e,
|
|
1427
|
+
});
|
|
1101
1428
|
}
|
|
1102
1429
|
}
|
|
1103
1430
|
break;
|
|
@@ -1109,7 +1436,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1109
1436
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1110
1437
|
}
|
|
1111
1438
|
catch (e) {
|
|
1112
|
-
throw new utils_1.CustomError(
|
|
1439
|
+
throw new utils_1.CustomError({
|
|
1440
|
+
message: `Failed to process command '53'`,
|
|
1441
|
+
hexData,
|
|
1442
|
+
command,
|
|
1443
|
+
deviceType,
|
|
1444
|
+
originalError: e,
|
|
1445
|
+
});
|
|
1113
1446
|
}
|
|
1114
1447
|
}
|
|
1115
1448
|
break;
|
|
@@ -1129,7 +1462,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1129
1462
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1130
1463
|
}
|
|
1131
1464
|
catch (e) {
|
|
1132
|
-
throw new utils_1.CustomError(
|
|
1465
|
+
throw new utils_1.CustomError({
|
|
1466
|
+
message: `Failed to process command '54'`,
|
|
1467
|
+
hexData,
|
|
1468
|
+
command,
|
|
1469
|
+
deviceType,
|
|
1470
|
+
originalError: e,
|
|
1471
|
+
});
|
|
1133
1472
|
}
|
|
1134
1473
|
}
|
|
1135
1474
|
break;
|
|
@@ -1144,7 +1483,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1144
1483
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1145
1484
|
}
|
|
1146
1485
|
catch (e) {
|
|
1147
|
-
throw new utils_1.CustomError(
|
|
1486
|
+
throw new utils_1.CustomError({
|
|
1487
|
+
message: `Failed to process command '55'`,
|
|
1488
|
+
hexData,
|
|
1489
|
+
command,
|
|
1490
|
+
deviceType,
|
|
1491
|
+
originalError: e,
|
|
1492
|
+
});
|
|
1148
1493
|
}
|
|
1149
1494
|
}
|
|
1150
1495
|
break;
|
|
@@ -1159,7 +1504,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1159
1504
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1160
1505
|
}
|
|
1161
1506
|
catch (e) {
|
|
1162
|
-
throw new utils_1.CustomError(
|
|
1507
|
+
throw new utils_1.CustomError({
|
|
1508
|
+
message: `Failed to process command '57'`,
|
|
1509
|
+
hexData,
|
|
1510
|
+
command,
|
|
1511
|
+
deviceType,
|
|
1512
|
+
originalError: e,
|
|
1513
|
+
});
|
|
1163
1514
|
}
|
|
1164
1515
|
}
|
|
1165
1516
|
break;
|
|
@@ -1174,7 +1525,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1174
1525
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1175
1526
|
}
|
|
1176
1527
|
catch (e) {
|
|
1177
|
-
throw new utils_1.CustomError(
|
|
1528
|
+
throw new utils_1.CustomError({
|
|
1529
|
+
message: `Failed to process command '59'`,
|
|
1530
|
+
hexData,
|
|
1531
|
+
command,
|
|
1532
|
+
deviceType,
|
|
1533
|
+
originalError: e,
|
|
1534
|
+
});
|
|
1178
1535
|
}
|
|
1179
1536
|
}
|
|
1180
1537
|
break;
|
|
@@ -1194,7 +1551,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1194
1551
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1195
1552
|
}
|
|
1196
1553
|
catch (e) {
|
|
1197
|
-
throw new utils_1.CustomError(
|
|
1554
|
+
throw new utils_1.CustomError({
|
|
1555
|
+
message: `Failed to process command '5b'`,
|
|
1556
|
+
hexData,
|
|
1557
|
+
command,
|
|
1558
|
+
deviceType,
|
|
1559
|
+
originalError: e,
|
|
1560
|
+
});
|
|
1198
1561
|
}
|
|
1199
1562
|
}
|
|
1200
1563
|
break;
|
|
@@ -1209,7 +1572,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1209
1572
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1210
1573
|
}
|
|
1211
1574
|
catch (e) {
|
|
1212
|
-
throw new utils_1.CustomError(
|
|
1575
|
+
throw new utils_1.CustomError({
|
|
1576
|
+
message: `Failed to process command '5d'`,
|
|
1577
|
+
hexData,
|
|
1578
|
+
command,
|
|
1579
|
+
deviceType,
|
|
1580
|
+
originalError: e,
|
|
1581
|
+
});
|
|
1213
1582
|
}
|
|
1214
1583
|
}
|
|
1215
1584
|
break;
|
|
@@ -1228,7 +1597,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1228
1597
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1229
1598
|
}
|
|
1230
1599
|
catch (e) {
|
|
1231
|
-
throw new utils_1.CustomError(
|
|
1600
|
+
throw new utils_1.CustomError({
|
|
1601
|
+
message: `Failed to process command '5f'`,
|
|
1602
|
+
hexData,
|
|
1603
|
+
command,
|
|
1604
|
+
deviceType,
|
|
1605
|
+
originalError: e,
|
|
1606
|
+
});
|
|
1232
1607
|
}
|
|
1233
1608
|
}
|
|
1234
1609
|
break;
|
|
@@ -1245,7 +1620,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1245
1620
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1246
1621
|
}
|
|
1247
1622
|
catch (e) {
|
|
1248
|
-
throw new utils_1.CustomError(
|
|
1623
|
+
throw new utils_1.CustomError({
|
|
1624
|
+
message: `Failed to process command '60'`,
|
|
1625
|
+
hexData,
|
|
1626
|
+
command,
|
|
1627
|
+
deviceType,
|
|
1628
|
+
originalError: e,
|
|
1629
|
+
});
|
|
1249
1630
|
}
|
|
1250
1631
|
}
|
|
1251
1632
|
break;
|
|
@@ -1269,7 +1650,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1269
1650
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1270
1651
|
}
|
|
1271
1652
|
catch (e) {
|
|
1272
|
-
throw new utils_1.CustomError(
|
|
1653
|
+
throw new utils_1.CustomError({
|
|
1654
|
+
message: `Failed to process command '61'`,
|
|
1655
|
+
hexData,
|
|
1656
|
+
command,
|
|
1657
|
+
deviceType,
|
|
1658
|
+
originalError: e,
|
|
1659
|
+
});
|
|
1273
1660
|
}
|
|
1274
1661
|
}
|
|
1275
1662
|
break;
|
|
@@ -1289,7 +1676,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1289
1676
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1290
1677
|
}
|
|
1291
1678
|
catch (e) {
|
|
1292
|
-
throw new utils_1.CustomError(
|
|
1679
|
+
throw new utils_1.CustomError({
|
|
1680
|
+
message: `Failed to process command '62'`,
|
|
1681
|
+
hexData,
|
|
1682
|
+
command,
|
|
1683
|
+
deviceType,
|
|
1684
|
+
originalError: e,
|
|
1685
|
+
});
|
|
1293
1686
|
}
|
|
1294
1687
|
}
|
|
1295
1688
|
break;
|
|
@@ -1304,7 +1697,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1304
1697
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1305
1698
|
}
|
|
1306
1699
|
catch (e) {
|
|
1307
|
-
throw new utils_1.CustomError(
|
|
1700
|
+
throw new utils_1.CustomError({
|
|
1701
|
+
message: `Failed to process command '63'`,
|
|
1702
|
+
hexData,
|
|
1703
|
+
command,
|
|
1704
|
+
deviceType,
|
|
1705
|
+
originalError: e,
|
|
1706
|
+
});
|
|
1308
1707
|
}
|
|
1309
1708
|
}
|
|
1310
1709
|
break;
|
|
@@ -1324,7 +1723,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1324
1723
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1325
1724
|
}
|
|
1326
1725
|
catch (e) {
|
|
1327
|
-
throw new utils_1.CustomError(
|
|
1726
|
+
throw new utils_1.CustomError({
|
|
1727
|
+
message: `Failed to process command '65'`,
|
|
1728
|
+
hexData,
|
|
1729
|
+
command,
|
|
1730
|
+
deviceType,
|
|
1731
|
+
originalError: e,
|
|
1732
|
+
});
|
|
1328
1733
|
}
|
|
1329
1734
|
}
|
|
1330
1735
|
break;
|
|
@@ -1339,7 +1744,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1339
1744
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1340
1745
|
}
|
|
1341
1746
|
catch (e) {
|
|
1342
|
-
throw new utils_1.CustomError(
|
|
1747
|
+
throw new utils_1.CustomError({
|
|
1748
|
+
message: `Failed to process command '69'`,
|
|
1749
|
+
hexData,
|
|
1750
|
+
command,
|
|
1751
|
+
deviceType,
|
|
1752
|
+
originalError: e,
|
|
1753
|
+
});
|
|
1343
1754
|
}
|
|
1344
1755
|
}
|
|
1345
1756
|
break;
|
|
@@ -1354,7 +1765,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1354
1765
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1355
1766
|
}
|
|
1356
1767
|
catch (e) {
|
|
1357
|
-
throw new utils_1.CustomError(
|
|
1768
|
+
throw new utils_1.CustomError({
|
|
1769
|
+
message: `Failed to process command '6b'`,
|
|
1770
|
+
hexData,
|
|
1771
|
+
command,
|
|
1772
|
+
deviceType,
|
|
1773
|
+
originalError: e,
|
|
1774
|
+
});
|
|
1358
1775
|
}
|
|
1359
1776
|
}
|
|
1360
1777
|
break;
|
|
@@ -1374,7 +1791,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1374
1791
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1375
1792
|
}
|
|
1376
1793
|
catch (e) {
|
|
1377
|
-
throw new utils_1.CustomError(
|
|
1794
|
+
throw new utils_1.CustomError({
|
|
1795
|
+
message: `Failed to process command '6d'`,
|
|
1796
|
+
hexData,
|
|
1797
|
+
command,
|
|
1798
|
+
deviceType,
|
|
1799
|
+
originalError: e,
|
|
1800
|
+
});
|
|
1378
1801
|
}
|
|
1379
1802
|
}
|
|
1380
1803
|
break;
|
|
@@ -1389,7 +1812,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1389
1812
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1390
1813
|
}
|
|
1391
1814
|
catch (e) {
|
|
1392
|
-
throw new utils_1.CustomError(
|
|
1815
|
+
throw new utils_1.CustomError({
|
|
1816
|
+
message: `Failed to process command '6e'`,
|
|
1817
|
+
hexData,
|
|
1818
|
+
command,
|
|
1819
|
+
deviceType,
|
|
1820
|
+
originalError: e,
|
|
1821
|
+
});
|
|
1393
1822
|
}
|
|
1394
1823
|
}
|
|
1395
1824
|
break;
|
|
@@ -1404,7 +1833,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1404
1833
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1405
1834
|
}
|
|
1406
1835
|
catch (e) {
|
|
1407
|
-
throw new utils_1.CustomError(
|
|
1836
|
+
throw new utils_1.CustomError({
|
|
1837
|
+
message: `Failed to process command '70'`,
|
|
1838
|
+
hexData,
|
|
1839
|
+
command,
|
|
1840
|
+
deviceType,
|
|
1841
|
+
originalError: e,
|
|
1842
|
+
});
|
|
1408
1843
|
}
|
|
1409
1844
|
}
|
|
1410
1845
|
break;
|
|
@@ -1419,7 +1854,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1419
1854
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1420
1855
|
}
|
|
1421
1856
|
catch (e) {
|
|
1422
|
-
throw new utils_1.CustomError(
|
|
1857
|
+
throw new utils_1.CustomError({
|
|
1858
|
+
message: `Failed to process command '71'`,
|
|
1859
|
+
hexData,
|
|
1860
|
+
command,
|
|
1861
|
+
deviceType,
|
|
1862
|
+
originalError: e,
|
|
1863
|
+
});
|
|
1423
1864
|
}
|
|
1424
1865
|
}
|
|
1425
1866
|
break;
|
|
@@ -1434,7 +1875,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1434
1875
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1435
1876
|
}
|
|
1436
1877
|
catch (e) {
|
|
1437
|
-
throw new utils_1.CustomError(
|
|
1878
|
+
throw new utils_1.CustomError({
|
|
1879
|
+
message: `Failed to process command '72'`,
|
|
1880
|
+
hexData,
|
|
1881
|
+
command,
|
|
1882
|
+
deviceType,
|
|
1883
|
+
originalError: e,
|
|
1884
|
+
});
|
|
1438
1885
|
}
|
|
1439
1886
|
}
|
|
1440
1887
|
break;
|
|
@@ -1449,7 +1896,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1449
1896
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1450
1897
|
}
|
|
1451
1898
|
catch (e) {
|
|
1452
|
-
throw new utils_1.CustomError(
|
|
1899
|
+
throw new utils_1.CustomError({
|
|
1900
|
+
message: `Failed to process command '73'`,
|
|
1901
|
+
hexData,
|
|
1902
|
+
command,
|
|
1903
|
+
deviceType,
|
|
1904
|
+
originalError: e,
|
|
1905
|
+
});
|
|
1453
1906
|
}
|
|
1454
1907
|
}
|
|
1455
1908
|
break;
|
|
@@ -1469,7 +1922,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1469
1922
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1470
1923
|
}
|
|
1471
1924
|
catch (e) {
|
|
1472
|
-
throw new utils_1.CustomError(
|
|
1925
|
+
throw new utils_1.CustomError({
|
|
1926
|
+
message: `Failed to process command '74'`,
|
|
1927
|
+
hexData,
|
|
1928
|
+
command,
|
|
1929
|
+
deviceType,
|
|
1930
|
+
originalError: e,
|
|
1931
|
+
});
|
|
1473
1932
|
}
|
|
1474
1933
|
}
|
|
1475
1934
|
break;
|
|
@@ -1484,7 +1943,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1484
1943
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1485
1944
|
}
|
|
1486
1945
|
catch (e) {
|
|
1487
|
-
throw new utils_1.CustomError(
|
|
1946
|
+
throw new utils_1.CustomError({
|
|
1947
|
+
message: `Failed to process command '75'`,
|
|
1948
|
+
hexData,
|
|
1949
|
+
command,
|
|
1950
|
+
deviceType,
|
|
1951
|
+
originalError: e,
|
|
1952
|
+
});
|
|
1488
1953
|
}
|
|
1489
1954
|
}
|
|
1490
1955
|
break;
|
|
@@ -1496,7 +1961,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1496
1961
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1497
1962
|
}
|
|
1498
1963
|
catch (e) {
|
|
1499
|
-
throw new utils_1.CustomError(
|
|
1964
|
+
throw new utils_1.CustomError({
|
|
1965
|
+
message: `Failed to process command '80'`,
|
|
1966
|
+
hexData,
|
|
1967
|
+
command,
|
|
1968
|
+
deviceType,
|
|
1969
|
+
originalError: e,
|
|
1970
|
+
});
|
|
1500
1971
|
}
|
|
1501
1972
|
}
|
|
1502
1973
|
break;
|
|
@@ -1512,7 +1983,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1512
1983
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1513
1984
|
}
|
|
1514
1985
|
catch (e) {
|
|
1515
|
-
throw new utils_1.CustomError(
|
|
1986
|
+
throw new utils_1.CustomError({
|
|
1987
|
+
message: `Failed to process command '83'`,
|
|
1988
|
+
hexData,
|
|
1989
|
+
command,
|
|
1990
|
+
deviceType,
|
|
1991
|
+
originalError: e,
|
|
1992
|
+
});
|
|
1516
1993
|
}
|
|
1517
1994
|
}
|
|
1518
1995
|
break;
|
|
@@ -1524,7 +2001,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1524
2001
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1525
2002
|
}
|
|
1526
2003
|
catch (e) {
|
|
1527
|
-
throw new utils_1.CustomError(
|
|
2004
|
+
throw new utils_1.CustomError({
|
|
2005
|
+
message: `Failed to process command 'b1'`,
|
|
2006
|
+
hexData,
|
|
2007
|
+
command,
|
|
2008
|
+
deviceType,
|
|
2009
|
+
originalError: e,
|
|
2010
|
+
});
|
|
1528
2011
|
}
|
|
1529
2012
|
}
|
|
1530
2013
|
break;
|
|
@@ -1537,7 +2020,13 @@ const commandsReadingHelper = (hexData, payloadLength, deviceType) => {
|
|
|
1537
2020
|
Object.assign(resultToPass, Object.assign({}, resultToPass), Object.assign({}, data));
|
|
1538
2021
|
}
|
|
1539
2022
|
catch (e) {
|
|
1540
|
-
throw new utils_1.CustomError(
|
|
2023
|
+
throw new utils_1.CustomError({
|
|
2024
|
+
message: `Failed to process command 'a0'`,
|
|
2025
|
+
hexData,
|
|
2026
|
+
command,
|
|
2027
|
+
deviceType,
|
|
2028
|
+
originalError: e,
|
|
2029
|
+
});
|
|
1541
2030
|
}
|
|
1542
2031
|
}
|
|
1543
2032
|
default:
|