smart-bus 0.7.0 → 0.9.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/CHANGELOG.md +21 -0
- package/README.md +1 -1
- package/lib/bus.js +5 -5
- package/lib/command.js +1 -1
- package/lib/commands.js +198 -70
- package/package.json +7 -8
- package/test/bus.js +24 -24
- package/test/command.js +5 -5
- package/test/device.js +1 -1
- package/test/fixtures/commands.js +199 -106
|
@@ -3,14 +3,14 @@ module.exports = {
|
|
|
3
3
|
|
|
4
4
|
// 4.1.1 Scene Control
|
|
5
5
|
'0x0002': {
|
|
6
|
-
payload:
|
|
6
|
+
payload: Buffer.from('0403', 'hex'),
|
|
7
7
|
data: { area: 4, scene: 3 }
|
|
8
8
|
},
|
|
9
9
|
|
|
10
10
|
// 4.1.2 Scene Control Response
|
|
11
11
|
'0x0003': [
|
|
12
12
|
{
|
|
13
|
-
payload:
|
|
13
|
+
payload: Buffer.from('0201060A', 'hex'),
|
|
14
14
|
data: { area: 2, scene: 1, channels: [
|
|
15
15
|
{ number: 1, status: false },
|
|
16
16
|
{ number: 2, status: true },
|
|
@@ -21,7 +21,7 @@ module.exports = {
|
|
|
21
21
|
] }
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
payload:
|
|
24
|
+
payload: Buffer.from('02010608', 'hex'),
|
|
25
25
|
data: { area: 2, scene: 1, channels: [
|
|
26
26
|
{ number: 1, status: false },
|
|
27
27
|
{ number: 2, status: false },
|
|
@@ -32,7 +32,7 @@ module.exports = {
|
|
|
32
32
|
] }
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
payload:
|
|
35
|
+
payload: Buffer.from('01010CA508', 'hex'),
|
|
36
36
|
data: { area: 1, scene: 1, channels: [
|
|
37
37
|
{ number: 1, status: true },
|
|
38
38
|
{ number: 2, status: false },
|
|
@@ -52,20 +52,20 @@ module.exports = {
|
|
|
52
52
|
|
|
53
53
|
// 4.1.3 Read Status of Scene
|
|
54
54
|
'0x000C': {
|
|
55
|
-
payload:
|
|
55
|
+
payload: Buffer.from('06', 'hex'),
|
|
56
56
|
data: { area: 6 }
|
|
57
57
|
},
|
|
58
58
|
|
|
59
59
|
// 4.1.4 Response Read Status of Scene
|
|
60
60
|
'0x000D': {
|
|
61
|
-
payload:
|
|
61
|
+
payload: Buffer.from('06FE', 'hex'),
|
|
62
62
|
data: { area: 6, scene: 254 }
|
|
63
63
|
},
|
|
64
64
|
|
|
65
65
|
// 4.1.5 Broadcast Status of Scene
|
|
66
66
|
'0xEFFF': [
|
|
67
67
|
{
|
|
68
|
-
payload:
|
|
68
|
+
payload: Buffer.from('04FEFEFEFE060B', 'hex'),
|
|
69
69
|
data: {
|
|
70
70
|
areas: [
|
|
71
71
|
{ number: 1, scene: 254 },
|
|
@@ -84,7 +84,7 @@ module.exports = {
|
|
|
84
84
|
},
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
|
-
payload:
|
|
87
|
+
payload: Buffer.from('04FEFEFEFE0C0B08', 'hex'),
|
|
88
88
|
data: {
|
|
89
89
|
areas: [
|
|
90
90
|
{ number: 1, scene: 254 },
|
|
@@ -114,7 +114,7 @@ module.exports = {
|
|
|
114
114
|
|
|
115
115
|
// 4.1.7 Response Read Area Information
|
|
116
116
|
'0x0005': {
|
|
117
|
-
payload:
|
|
117
|
+
payload: Buffer.from('0269010404010200040003', 'hex'),
|
|
118
118
|
data: {
|
|
119
119
|
device: { type: 617, subnet: 1, id: 4 },
|
|
120
120
|
areas: 4,
|
|
@@ -131,14 +131,14 @@ module.exports = {
|
|
|
131
131
|
|
|
132
132
|
// 4.1.8 Read Scene Information
|
|
133
133
|
'0x0000': {
|
|
134
|
-
payload:
|
|
134
|
+
payload: Buffer.from('0102', 'hex'),
|
|
135
135
|
data: { area: 1, scene: 2 }
|
|
136
136
|
},
|
|
137
137
|
|
|
138
138
|
// 4.1.9 Read Scene Information Response
|
|
139
139
|
'0x0001': [
|
|
140
140
|
{
|
|
141
|
-
payload:
|
|
141
|
+
payload: Buffer.from('010205AD326464323232', 'hex'),
|
|
142
142
|
data: { area: 1, scene: 2, time: 1453, channels: [
|
|
143
143
|
{ number: 1, level: 50 },
|
|
144
144
|
{ number: 2, level: 100 },
|
|
@@ -149,7 +149,7 @@ module.exports = {
|
|
|
149
149
|
] }
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
|
-
payload:
|
|
152
|
+
payload: Buffer.from('010305A032646432', 'hex'),
|
|
153
153
|
data: { area: 1, scene: 3, time: 1440, channels: [
|
|
154
154
|
{ number: 1, level: 50 },
|
|
155
155
|
{ number: 2, level: 100 },
|
|
@@ -168,31 +168,31 @@ module.exports = {
|
|
|
168
168
|
|
|
169
169
|
// 4.2.1 Sequence Control
|
|
170
170
|
'0x001A': {
|
|
171
|
-
payload:
|
|
171
|
+
payload: Buffer.from('0102', 'hex'),
|
|
172
172
|
data: { area: 1, sequence: 2 }
|
|
173
173
|
},
|
|
174
174
|
|
|
175
175
|
// 4.2.2 Response Sequence Control
|
|
176
176
|
'0x001B': {
|
|
177
|
-
payload:
|
|
177
|
+
payload: Buffer.from('020A', 'hex'),
|
|
178
178
|
data: { area: 2, sequence: 10 }
|
|
179
179
|
},
|
|
180
180
|
|
|
181
181
|
// 4.2.3 Read Status of Sequence
|
|
182
182
|
'0xE014': {
|
|
183
|
-
payload:
|
|
183
|
+
payload: Buffer.from('08', 'hex'),
|
|
184
184
|
data: { area: 8 }
|
|
185
185
|
},
|
|
186
186
|
|
|
187
187
|
// 4.2.4 Response Read Status of Sequence
|
|
188
188
|
'0xE015': {
|
|
189
|
-
payload:
|
|
189
|
+
payload: Buffer.from('08A0', 'hex'),
|
|
190
190
|
data: { area: 8, sequence: 160 }
|
|
191
191
|
},
|
|
192
192
|
|
|
193
193
|
// 4.2.5 Broadcast Status of Sequence
|
|
194
194
|
'0xF036': {
|
|
195
|
-
payload:
|
|
195
|
+
payload: Buffer.from('0A050B370163', 'hex'),
|
|
196
196
|
data: { areas: [
|
|
197
197
|
{ number: 1, sequence: 10 },
|
|
198
198
|
{ number: 2, sequence: 5 },
|
|
@@ -207,18 +207,18 @@ module.exports = {
|
|
|
207
207
|
|
|
208
208
|
// 4.3.1 Single Channel Control
|
|
209
209
|
'0x0031': {
|
|
210
|
-
payload:
|
|
210
|
+
payload: Buffer.from('04640190', 'hex'),
|
|
211
211
|
data: { channel: 4, level: 100, time: 400 }
|
|
212
212
|
},
|
|
213
213
|
|
|
214
214
|
// 4.3.2 Response Single Channel Control
|
|
215
215
|
'0x0032': [
|
|
216
216
|
{
|
|
217
|
-
payload:
|
|
217
|
+
payload: Buffer.from('0AF864', 'hex'),
|
|
218
218
|
data: { channel: 10, level: 100, success: true }
|
|
219
219
|
},
|
|
220
220
|
{
|
|
221
|
-
payload:
|
|
221
|
+
payload: Buffer.from('06F532', 'hex'),
|
|
222
222
|
data: { channel: 6, level: 50, success: false }
|
|
223
223
|
}
|
|
224
224
|
],
|
|
@@ -228,7 +228,7 @@ module.exports = {
|
|
|
228
228
|
|
|
229
229
|
// 4.3.4 Response Read Status of Channels
|
|
230
230
|
'0x0034': {
|
|
231
|
-
payload:
|
|
231
|
+
payload: Buffer.from('06643250006428', 'hex'),
|
|
232
232
|
data: { channels: [
|
|
233
233
|
{ number: 1, level: 100 },
|
|
234
234
|
{ number: 2, level: 50 },
|
|
@@ -244,7 +244,7 @@ module.exports = {
|
|
|
244
244
|
|
|
245
245
|
// 4.3.6 Response Read Current Level of Channels
|
|
246
246
|
'0x0039': {
|
|
247
|
-
payload:
|
|
247
|
+
payload: Buffer.from('06643250006428', 'hex'),
|
|
248
248
|
data: { channels: [
|
|
249
249
|
{ number: 1, level: 100 },
|
|
250
250
|
{ number: 2, level: 50 },
|
|
@@ -259,32 +259,32 @@ module.exports = {
|
|
|
259
259
|
|
|
260
260
|
// 5.1.1 Logic Control
|
|
261
261
|
'0xF116': [
|
|
262
|
-
{ payload:
|
|
263
|
-
{ payload:
|
|
262
|
+
{ payload: Buffer.from('0100', 'hex'), data: { block: 1, status: false } },
|
|
263
|
+
{ payload: Buffer.from('FA01', 'hex'), data: { block: 250, status: true } },
|
|
264
264
|
],
|
|
265
265
|
|
|
266
266
|
// 5.1.2 Response Logic Control
|
|
267
267
|
'0xF117': [
|
|
268
|
-
{ payload:
|
|
269
|
-
{ payload:
|
|
268
|
+
{ payload: Buffer.from('0201', 'hex'), data: { block: 2, status: true } },
|
|
269
|
+
{ payload: Buffer.from('FB00', 'hex'), data: { block: 251, status: false } },
|
|
270
270
|
],
|
|
271
271
|
|
|
272
272
|
// 5.1.3 Read Status of Logic Control
|
|
273
273
|
'0xF112': [
|
|
274
|
-
{ payload:
|
|
275
|
-
{ payload:
|
|
274
|
+
{ payload: Buffer.from('05', 'hex'), data: { block: 5 } },
|
|
275
|
+
{ payload: Buffer.from('FF', 'hex'), data: { block: 255 } }
|
|
276
276
|
],
|
|
277
277
|
|
|
278
278
|
// 5.1.4 Response Read Status of Logic Control
|
|
279
279
|
'0xF113': [
|
|
280
|
-
{ payload:
|
|
281
|
-
{ payload:
|
|
280
|
+
{ payload: Buffer.from('0501', 'hex'), data: { block: 5, status: true } },
|
|
281
|
+
{ payload: Buffer.from('F900', 'hex'), data: { block: 249, status: false } },
|
|
282
282
|
],
|
|
283
283
|
|
|
284
284
|
// 5.1.5 Broadcast Status of Status of Logic Control
|
|
285
285
|
'0xF12F': [
|
|
286
|
-
{ payload:
|
|
287
|
-
{ payload:
|
|
286
|
+
{ payload: Buffer.from('0101', 'hex'), data: { block: 1, status: true } },
|
|
287
|
+
{ payload: Buffer.from('F501', 'hex'), data: { block: 245, status: true } },
|
|
288
288
|
],
|
|
289
289
|
|
|
290
290
|
// 5.1.6 Read System Date and Time
|
|
@@ -292,25 +292,25 @@ module.exports = {
|
|
|
292
292
|
|
|
293
293
|
// 5.1.7 Response Read System Date and Time
|
|
294
294
|
'0xDA01': {
|
|
295
|
-
payload:
|
|
296
|
-
data: { success: true, date: new Date(2018, 1, 12, 22,
|
|
295
|
+
payload: Buffer.from('F812020C16020E01', 'hex'),
|
|
296
|
+
data: { success: true, date: new Date(2018, 1, 12, 22, 2, 14) }
|
|
297
297
|
},
|
|
298
298
|
|
|
299
299
|
// 5.1.8 Modify Read System Date and Time
|
|
300
300
|
'0xDA02': {
|
|
301
|
-
payload:
|
|
301
|
+
payload: Buffer.from('12020C161B1D01', 'hex'),
|
|
302
302
|
data: { date: new Date(2018, 1, 12, 22, 27, 29) }
|
|
303
303
|
},
|
|
304
304
|
|
|
305
305
|
// 5.1.9 Response Modify Read System Date and Time
|
|
306
306
|
'0xDA03': [
|
|
307
|
-
{ payload:
|
|
308
|
-
{ payload:
|
|
307
|
+
{ payload: Buffer.from('F8', 'hex'), data: { success: true } },
|
|
308
|
+
{ payload: Buffer.from('F5', 'hex'), data: { success: false } },
|
|
309
309
|
],
|
|
310
310
|
|
|
311
311
|
// 5.1.10 Broadcast System Date and Time (Every Minute)
|
|
312
312
|
'0xDA44': {
|
|
313
|
-
payload:
|
|
313
|
+
payload: Buffer.from('12020C162C27', 'hex'),
|
|
314
314
|
data: { date: new Date(2018, 1, 12, 22, 44, 39) }
|
|
315
315
|
},
|
|
316
316
|
|
|
@@ -318,31 +318,31 @@ module.exports = {
|
|
|
318
318
|
|
|
319
319
|
// 6.1.1 UV Switch Control
|
|
320
320
|
'0xE01C': [
|
|
321
|
-
{ payload:
|
|
322
|
-
{ payload:
|
|
321
|
+
{ payload: Buffer.from('10FF', 'hex'), data: { switch: 16, status: true } },
|
|
322
|
+
{ payload: Buffer.from('0500', 'hex'), data: { switch: 5, status: false } }
|
|
323
323
|
],
|
|
324
324
|
|
|
325
325
|
// 6.1.2 Response UV Switch Control
|
|
326
326
|
'0xE01D': [
|
|
327
|
-
{ payload:
|
|
328
|
-
{ payload:
|
|
327
|
+
{ payload: Buffer.from('0A01', 'hex'), data: { switch: 10, status: true } },
|
|
328
|
+
{ payload: Buffer.from('0200', 'hex'), data: { switch: 2, status: false } }
|
|
329
329
|
],
|
|
330
330
|
|
|
331
331
|
// 6.1.3 Read Status of UV Switch
|
|
332
332
|
'0xE018': [
|
|
333
|
-
{ payload:
|
|
334
|
-
{ payload:
|
|
333
|
+
{ payload: Buffer.from('0A', 'hex'), data: { switch: 10 } },
|
|
334
|
+
{ payload: Buffer.from('05', 'hex'), data: { switch: 5 } }
|
|
335
335
|
],
|
|
336
336
|
|
|
337
337
|
// 6.1.4 Response Read Status of UV Switch
|
|
338
338
|
'0xE019': [
|
|
339
|
-
{ payload:
|
|
340
|
-
{ payload:
|
|
339
|
+
{ payload: Buffer.from('0A01', 'hex'), data: { switch: 10, status: true } },
|
|
340
|
+
{ payload: Buffer.from('0500', 'hex'), data: { switch: 5, status: false } },
|
|
341
341
|
],
|
|
342
342
|
|
|
343
343
|
// 6.1.5 Broadcast Status of Status of UV Switches
|
|
344
344
|
'0xE017': {
|
|
345
|
-
payload:
|
|
345
|
+
payload: Buffer.from('06010001010000', 'hex'),
|
|
346
346
|
data: { switches: [
|
|
347
347
|
{ number: 1, status: true },
|
|
348
348
|
{ number: 2, status: false },
|
|
@@ -357,59 +357,72 @@ module.exports = {
|
|
|
357
357
|
|
|
358
358
|
// 7.1.1 Curtain Switch Control
|
|
359
359
|
'0xE3E0': [
|
|
360
|
-
{ payload:
|
|
361
|
-
{ payload:
|
|
360
|
+
{ payload: Buffer.from('0102', 'hex'), data: { curtain: 1, status: 2 } },
|
|
361
|
+
{ payload: Buffer.from('115A', 'hex'), data: { curtain: 17, status: 90 } }
|
|
362
362
|
],
|
|
363
363
|
|
|
364
364
|
// 7.1.2 Response Curtain Switch Control
|
|
365
365
|
'0xE3E1': [
|
|
366
|
-
{ payload:
|
|
367
|
-
{ payload:
|
|
368
|
-
{ payload:
|
|
366
|
+
{ payload: Buffer.from('0102', 'hex'), data: { curtain: 1, status: 2 } },
|
|
367
|
+
{ payload: Buffer.from('115A', 'hex'), data: { curtain: 17, status: 90 } },
|
|
368
|
+
{ payload: Buffer.from('11EE', 'hex'), data: { curtain: 17, status: 238 } }
|
|
369
369
|
],
|
|
370
370
|
|
|
371
371
|
// 7.1.3 Read Status of Curtain Switch
|
|
372
|
-
'0xE3E2': { payload:
|
|
372
|
+
'0xE3E2': { payload: Buffer.from('04', 'hex'), data: { curtain: 4 } },
|
|
373
373
|
|
|
374
374
|
// 7.1.4 Response Read Status of Curtain Switch
|
|
375
375
|
'0xE3E3': [
|
|
376
|
-
{ payload:
|
|
377
|
-
{ payload:
|
|
376
|
+
{ payload: Buffer.from('0102', 'hex'), data: { curtain: 1, status: 2 } },
|
|
377
|
+
{ payload: Buffer.from('115A', 'hex'), data: { curtain: 17, status: 90 } },
|
|
378
|
+
{ payload: Buffer.from('010201F4', 'hex'), data: { curtain: 1, status: 2, duration: 50.0 } }
|
|
378
379
|
],
|
|
379
380
|
|
|
380
381
|
// 7.1.5 Broadcast Status of Status of Curtain Switches
|
|
381
382
|
'0xE3E4': {
|
|
382
|
-
payload:
|
|
383
|
+
payload: Buffer.from('00000201', 'hex'),
|
|
383
384
|
data: { curtains: [
|
|
384
385
|
{ number: 1, level: 0, status: 2 },
|
|
385
386
|
{ number: 2, level: 0, status: 1 }
|
|
386
387
|
] }
|
|
387
388
|
},
|
|
388
389
|
|
|
390
|
+
// 7.1.6 Get Curtain Duration Request
|
|
391
|
+
'0xE800': [
|
|
392
|
+
{ payload: Buffer.from('01', 'hex'), data: { channel: 1 } },
|
|
393
|
+
{ payload: Buffer.from('0A', 'hex'), data: { channel: 10 } }
|
|
394
|
+
],
|
|
395
|
+
|
|
396
|
+
// 7.1.7 Get Curtain Duration Response
|
|
397
|
+
'0xE801': [
|
|
398
|
+
{ payload: Buffer.from('01001388', 'hex'), data: { channel: 1, duration: 5000 } },
|
|
399
|
+
{ payload: Buffer.from('030007D0', 'hex'), data: { channel: 3, duration: 2000 } }
|
|
400
|
+
],
|
|
401
|
+
|
|
389
402
|
/* 9. Panel Control */
|
|
390
403
|
|
|
391
404
|
// 9.1.1 Panel Control
|
|
392
405
|
'0xE3D8': [
|
|
393
|
-
{ payload:
|
|
394
|
-
{ payload:
|
|
406
|
+
{ payload: Buffer.from('0D64', 'hex'), data: { key: 13, value: 100 } },
|
|
407
|
+
{ payload: Buffer.from('0E32', 'hex'), data: { key: 14, value: 50 } },
|
|
395
408
|
],
|
|
396
409
|
|
|
397
410
|
// 9.1.2 Response Panel Control
|
|
398
411
|
'0xE3D9': [
|
|
399
|
-
{ payload:
|
|
400
|
-
{ payload:
|
|
412
|
+
{ payload: Buffer.from('0D64', 'hex'), data: { key: 13, value: 100 } },
|
|
413
|
+
{ payload: Buffer.from('0E32', 'hex'), data: { key: 14, value: 50 } },
|
|
401
414
|
],
|
|
402
415
|
|
|
403
416
|
// 9.1.3 Read Status of Panel Control
|
|
404
417
|
'0xE3DA': [
|
|
405
|
-
{ payload:
|
|
406
|
-
{ payload:
|
|
418
|
+
{ payload: Buffer.from('0D', 'hex'), data: { key: 13 } },
|
|
419
|
+
{ payload: Buffer.from('0E', 'hex'), data: { key: 14 } }
|
|
407
420
|
],
|
|
408
421
|
|
|
409
422
|
// 9.1.4 Response Read Status of Panel Control
|
|
410
423
|
'0xE3DB': [
|
|
411
|
-
{ payload:
|
|
412
|
-
{ payload:
|
|
424
|
+
{ payload: Buffer.from('0D64', 'hex'), data: { key: 13, value: 100 } },
|
|
425
|
+
{ payload: Buffer.from('0E32', 'hex'), data: { key: 14, value: 50 } },
|
|
413
426
|
],
|
|
414
427
|
|
|
415
428
|
/* 10. AC Control */
|
|
@@ -422,7 +435,7 @@ module.exports = {
|
|
|
422
435
|
|
|
423
436
|
// 10.1.3 Control AC Status
|
|
424
437
|
'0x193A': {
|
|
425
|
-
payload:
|
|
438
|
+
payload: Buffer.from('01001C10131516230101001311', 'hex'),
|
|
426
439
|
data: {
|
|
427
440
|
ac: 1,
|
|
428
441
|
temperature: {
|
|
@@ -452,7 +465,7 @@ module.exports = {
|
|
|
452
465
|
|
|
453
466
|
// 10.1.4 Response Control AC Status
|
|
454
467
|
'0x193B': {
|
|
455
|
-
payload:
|
|
468
|
+
payload: Buffer.from('01001C10131516010100001000', 'hex'),
|
|
456
469
|
data: {
|
|
457
470
|
ac: 1,
|
|
458
471
|
temperature: {
|
|
@@ -488,7 +501,7 @@ module.exports = {
|
|
|
488
501
|
// 11.1.2 Response Read Floor Heating Status
|
|
489
502
|
'0x1945': [
|
|
490
503
|
{
|
|
491
|
-
payload:
|
|
504
|
+
payload: Buffer.from('001800011414141401', 'hex'),
|
|
492
505
|
data: {
|
|
493
506
|
temperature: {
|
|
494
507
|
type: 0,
|
|
@@ -504,7 +517,7 @@ module.exports = {
|
|
|
504
517
|
}
|
|
505
518
|
},
|
|
506
519
|
{
|
|
507
|
-
payload:
|
|
520
|
+
payload: Buffer.from('0018000114141414', 'hex'),
|
|
508
521
|
data: {
|
|
509
522
|
temperature: {
|
|
510
523
|
type: 0,
|
|
@@ -522,7 +535,7 @@ module.exports = {
|
|
|
522
535
|
|
|
523
536
|
// 11.1.3 Control Floor Heating Status
|
|
524
537
|
'0x1946': {
|
|
525
|
-
payload:
|
|
538
|
+
payload: Buffer.from('00010116161412', 'hex'),
|
|
526
539
|
data: {
|
|
527
540
|
temperature: {
|
|
528
541
|
type: 0,
|
|
@@ -538,7 +551,7 @@ module.exports = {
|
|
|
538
551
|
|
|
539
552
|
// 11.1.4 Response Control Floor Heating Status
|
|
540
553
|
'0x1947': {
|
|
541
|
-
payload:
|
|
554
|
+
payload: Buffer.from('F800010116161412', 'hex'),
|
|
542
555
|
data: {
|
|
543
556
|
success: true,
|
|
544
557
|
temperature: {
|
|
@@ -557,13 +570,13 @@ module.exports = {
|
|
|
557
570
|
|
|
558
571
|
// 11.2.1 Read Floor Heating Status
|
|
559
572
|
'0x1C5E': [
|
|
560
|
-
{ payload:
|
|
561
|
-
{ payload:
|
|
573
|
+
{ payload: Buffer.from('01', 'hex'), data: { channel: 1 } },
|
|
574
|
+
{ payload: Buffer.from('0A', 'hex'), data: { channel: 10 } },
|
|
562
575
|
],
|
|
563
576
|
|
|
564
577
|
// 11.2.2 Response Read Floor Heating Status
|
|
565
578
|
'0x1C5F': {
|
|
566
|
-
payload:
|
|
579
|
+
payload: Buffer.from('012100021818161400011E010A', 'hex'),
|
|
567
580
|
data: {
|
|
568
581
|
channel: 1,
|
|
569
582
|
work: { type: 2, status: true },
|
|
@@ -578,7 +591,7 @@ module.exports = {
|
|
|
578
591
|
|
|
579
592
|
// 11.2.3 Control Floor Heating Status
|
|
580
593
|
'0x1C5C': {
|
|
581
|
-
payload:
|
|
594
|
+
payload: Buffer.from('0121000218181614010A', 'hex'),
|
|
582
595
|
data: {
|
|
583
596
|
channel: 1,
|
|
584
597
|
work: { type: 2, status: true },
|
|
@@ -591,7 +604,7 @@ module.exports = {
|
|
|
591
604
|
|
|
592
605
|
// 11.2.4 Response Control Floor Heating Status
|
|
593
606
|
'0x1C5D': {
|
|
594
|
-
payload:
|
|
607
|
+
payload: Buffer.from('0121000218181614010A', 'hex'),
|
|
595
608
|
data: {
|
|
596
609
|
channel: 1,
|
|
597
610
|
work: { type: 2, status: true },
|
|
@@ -606,13 +619,13 @@ module.exports = {
|
|
|
606
619
|
|
|
607
620
|
// 12.1.1 Read Sensors Status
|
|
608
621
|
'0xDB00': [
|
|
609
|
-
{ payload:
|
|
610
|
-
{ payload:
|
|
622
|
+
{ payload: Buffer.from('01', 'hex'), data: { logic: 1 } },
|
|
623
|
+
{ payload: Buffer.from('18', 'hex'), data: { logic: 24 } },
|
|
611
624
|
],
|
|
612
625
|
|
|
613
626
|
// 12.1.2 Response Read Sensors Status
|
|
614
627
|
'0xDB01': {
|
|
615
|
-
payload:
|
|
628
|
+
payload: Buffer.from('010000010000012C', 'hex'),
|
|
616
629
|
data: {
|
|
617
630
|
movement: true,
|
|
618
631
|
delay: 300,
|
|
@@ -631,7 +644,7 @@ module.exports = {
|
|
|
631
644
|
// 12.2.2 Response Read Sensors Status
|
|
632
645
|
'0x1646': [
|
|
633
646
|
{
|
|
634
|
-
payload:
|
|
647
|
+
payload: Buffer.from('F82D016A000000', 'hex'),
|
|
635
648
|
data: {
|
|
636
649
|
success: true,
|
|
637
650
|
temperature: 25,
|
|
@@ -644,7 +657,7 @@ module.exports = {
|
|
|
644
657
|
}
|
|
645
658
|
},
|
|
646
659
|
{
|
|
647
|
-
payload:
|
|
660
|
+
payload: Buffer.from('F82D016A01010000', 'hex'),
|
|
648
661
|
data: {
|
|
649
662
|
success: true,
|
|
650
663
|
temperature: 25,
|
|
@@ -665,7 +678,7 @@ module.exports = {
|
|
|
665
678
|
|
|
666
679
|
// 12.3.3 Broadcast Sensors Status Automatically
|
|
667
680
|
'0x1647': {
|
|
668
|
-
payload:
|
|
681
|
+
payload: Buffer.from('2D03F701000001', 'hex'),
|
|
669
682
|
data: {
|
|
670
683
|
temperature: 25,
|
|
671
684
|
brightness: 1015,
|
|
@@ -685,7 +698,7 @@ module.exports = {
|
|
|
685
698
|
|
|
686
699
|
// 12.4.2 Response Read Sensors Status
|
|
687
700
|
'0x1605': {
|
|
688
|
-
payload:
|
|
701
|
+
payload: Buffer.from('F82C0108280000010100', 'hex'),
|
|
689
702
|
data: {
|
|
690
703
|
success: true,
|
|
691
704
|
temperature: 24,
|
|
@@ -703,7 +716,7 @@ module.exports = {
|
|
|
703
716
|
|
|
704
717
|
// 12.4.3 Broadcast Sensors Status
|
|
705
718
|
'0x1630': {
|
|
706
|
-
payload:
|
|
719
|
+
payload: Buffer.from('F82C01080000010100', 'hex'),
|
|
707
720
|
data: {
|
|
708
721
|
success: true,
|
|
709
722
|
temperature: 24,
|
|
@@ -722,22 +735,22 @@ module.exports = {
|
|
|
722
735
|
|
|
723
736
|
// 13.1.1 Read Temperature
|
|
724
737
|
'0xE3E7': [
|
|
725
|
-
{ payload:
|
|
726
|
-
{ payload:
|
|
738
|
+
{ payload: Buffer.from('01', 'hex'), data: { channel: 1 } },
|
|
739
|
+
{ payload: Buffer.from('FF', 'hex'), data: { channel: 255 } }
|
|
727
740
|
],
|
|
728
741
|
|
|
729
742
|
// 13.1.2 Response Read Temperature
|
|
730
743
|
'0xE3E8': [
|
|
731
744
|
{
|
|
732
|
-
payload:
|
|
745
|
+
payload: Buffer.from('0100', 'hex'),
|
|
733
746
|
data: { channel: 1, temperature: 0 }
|
|
734
747
|
},
|
|
735
748
|
{
|
|
736
|
-
payload:
|
|
749
|
+
payload: Buffer.from('0116', 'hex'),
|
|
737
750
|
data: { channel: 1, temperature: 22 }
|
|
738
751
|
},
|
|
739
752
|
{
|
|
740
|
-
payload:
|
|
753
|
+
payload: Buffer.from('018F', 'hex'),
|
|
741
754
|
data: { channel: 1, temperature: -15 }
|
|
742
755
|
},
|
|
743
756
|
],
|
|
@@ -745,19 +758,19 @@ module.exports = {
|
|
|
745
758
|
// 13.1.3 Broadcast Temperature
|
|
746
759
|
'0xE3E5': [
|
|
747
760
|
{
|
|
748
|
-
payload:
|
|
761
|
+
payload: Buffer.from('0189', 'hex'),
|
|
749
762
|
data: { channel: 1, temperature: -9 }
|
|
750
763
|
},
|
|
751
764
|
{
|
|
752
|
-
payload:
|
|
765
|
+
payload: Buffer.from('0100', 'hex'),
|
|
753
766
|
data: { channel: 1, temperature: 0 }
|
|
754
767
|
},
|
|
755
768
|
{
|
|
756
|
-
payload:
|
|
769
|
+
payload: Buffer.from('0105', 'hex'),
|
|
757
770
|
data: { channel: 1, temperature: 5 }
|
|
758
771
|
},
|
|
759
772
|
{
|
|
760
|
-
payload:
|
|
773
|
+
payload: Buffer.from('0119', 'hex'),
|
|
761
774
|
data: { channel: 1, temperature: 25 }
|
|
762
775
|
}
|
|
763
776
|
],
|
|
@@ -766,37 +779,117 @@ module.exports = {
|
|
|
766
779
|
|
|
767
780
|
// 13.2.1 Read Temperature New
|
|
768
781
|
'0x1948': {
|
|
769
|
-
payload:
|
|
782
|
+
payload: Buffer.from('01', 'hex'),
|
|
770
783
|
data: { channel: 1 }
|
|
771
784
|
},
|
|
772
785
|
|
|
773
786
|
// 13.2.2 Response Temperature
|
|
774
787
|
'0x1949': [
|
|
775
788
|
{
|
|
776
|
-
payload:
|
|
789
|
+
payload: Buffer.from('019A99C141', 'hex'),
|
|
777
790
|
data: { channel: 1, temperature: 24.200000762939453 }
|
|
778
791
|
},
|
|
779
792
|
{
|
|
780
|
-
payload:
|
|
793
|
+
payload: Buffer.from('010000B441', 'hex'),
|
|
781
794
|
data: { channel: 1, temperature: 22.5 }
|
|
782
795
|
}
|
|
783
796
|
],
|
|
784
797
|
|
|
798
|
+
// 16.1.1 Auto broadcast Dry Contact Status
|
|
799
|
+
'0x15D0': [
|
|
800
|
+
{
|
|
801
|
+
payload: Buffer.from('010200', 'hex'),
|
|
802
|
+
data: { area: 1, channel: 2, status: true }
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
payload: Buffer.from('020301', 'hex'),
|
|
806
|
+
data: { area: 2, channel: 3, status: false }
|
|
807
|
+
}
|
|
808
|
+
],
|
|
809
|
+
|
|
810
|
+
// 16.1.2 Response Auto broadcast Dry Contact Status
|
|
811
|
+
'0x15D1': [
|
|
812
|
+
{
|
|
813
|
+
payload: Buffer.from('010100', 'hex'),
|
|
814
|
+
data: { area: 1, channel: 1, status: true }
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
payload: Buffer.from('030401', 'hex'),
|
|
818
|
+
data: { area: 3, channel: 4, status: false }
|
|
819
|
+
}
|
|
820
|
+
],
|
|
821
|
+
|
|
785
822
|
// 16.1.3 Read Dry Contact Status
|
|
786
823
|
'0x15CE': {
|
|
787
|
-
payload:
|
|
824
|
+
payload: Buffer.from('0102', 'hex'),
|
|
788
825
|
data: { area: 1, switch: 2 }
|
|
789
826
|
},
|
|
790
827
|
|
|
791
828
|
// 16.1.4 Response Read Dry Contact Status
|
|
792
|
-
0x15CF: [
|
|
829
|
+
'0x15CF': [
|
|
793
830
|
{
|
|
794
|
-
payload:
|
|
795
|
-
data: { area: 1, switch: 2, contact: true}
|
|
831
|
+
payload: Buffer.from('010201', 'hex'),
|
|
832
|
+
data: { area: 1, switch: 2, contact: true }
|
|
796
833
|
},
|
|
797
834
|
{
|
|
798
|
-
payload:
|
|
799
|
-
data: { area: 1, switch: 1, contact: false}
|
|
835
|
+
payload: Buffer.from('010100', 'hex'),
|
|
836
|
+
data: { area: 1, switch: 1, contact: false }
|
|
837
|
+
}
|
|
838
|
+
],
|
|
839
|
+
|
|
840
|
+
// 16.1.5 Dry Contact Multi-Channel Status
|
|
841
|
+
'0x6F00': [
|
|
842
|
+
{
|
|
843
|
+
payload: Buffer.from('01080F00', 'hex'),
|
|
844
|
+
data: {
|
|
845
|
+
subnet: 1,
|
|
846
|
+
declaredChannels: 8,
|
|
847
|
+
statusMask: 0x0F00,
|
|
848
|
+
channels: [
|
|
849
|
+
{ number: 1, status: false },
|
|
850
|
+
{ number: 2, status: false },
|
|
851
|
+
{ number: 3, status: false },
|
|
852
|
+
{ number: 4, status: false },
|
|
853
|
+
{ number: 5, status: false },
|
|
854
|
+
{ number: 6, status: false },
|
|
855
|
+
{ number: 7, status: false },
|
|
856
|
+
{ number: 8, status: false },
|
|
857
|
+
{ number: 9, status: true },
|
|
858
|
+
{ number: 10, status: true },
|
|
859
|
+
{ number: 11, status: true },
|
|
860
|
+
{ number: 12, status: true },
|
|
861
|
+
{ number: 13, status: false },
|
|
862
|
+
{ number: 14, status: false },
|
|
863
|
+
{ number: 15, status: false },
|
|
864
|
+
{ number: 16, status: false }
|
|
865
|
+
]
|
|
866
|
+
}
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
payload: Buffer.from('0216AA55', 'hex'),
|
|
870
|
+
data: {
|
|
871
|
+
subnet: 2,
|
|
872
|
+
declaredChannels: 22,
|
|
873
|
+
statusMask: 0xAA55,
|
|
874
|
+
channels: [
|
|
875
|
+
{ number: 1, status: true },
|
|
876
|
+
{ number: 2, status: false },
|
|
877
|
+
{ number: 3, status: true },
|
|
878
|
+
{ number: 4, status: false },
|
|
879
|
+
{ number: 5, status: true },
|
|
880
|
+
{ number: 6, status: false },
|
|
881
|
+
{ number: 7, status: true },
|
|
882
|
+
{ number: 8, status: false },
|
|
883
|
+
{ number: 9, status: false },
|
|
884
|
+
{ number: 10, status: true },
|
|
885
|
+
{ number: 11, status: false },
|
|
886
|
+
{ number: 12, status: true },
|
|
887
|
+
{ number: 13, status: false },
|
|
888
|
+
{ number: 14, status: true },
|
|
889
|
+
{ number: 15, status: false },
|
|
890
|
+
{ number: 16, status: true }
|
|
891
|
+
]
|
|
892
|
+
}
|
|
800
893
|
}
|
|
801
894
|
],
|
|
802
895
|
|
|
@@ -806,25 +899,25 @@ module.exports = {
|
|
|
806
899
|
|
|
807
900
|
// XX.1.1 Panel brightness/lock
|
|
808
901
|
'0xE012': {
|
|
809
|
-
payload:
|
|
902
|
+
payload: Buffer.from('140101', 'hex'),
|
|
810
903
|
data: { backlight: 20, statusLights: 1, autoLock: 1 }
|
|
811
904
|
},
|
|
812
905
|
|
|
813
906
|
// XX.1.2 Panel brighness/lock Response
|
|
814
907
|
'0xE013': [
|
|
815
908
|
{
|
|
816
|
-
payload:
|
|
909
|
+
payload: Buffer.from('F8', 'hex'),
|
|
817
910
|
data: { success: true }
|
|
818
911
|
},
|
|
819
912
|
{
|
|
820
|
-
payload:
|
|
913
|
+
payload: Buffer.from('F5', 'hex'),
|
|
821
914
|
data: { success: false }
|
|
822
915
|
}
|
|
823
916
|
],
|
|
824
917
|
|
|
825
918
|
// XX.1.3 Panel button color
|
|
826
919
|
'0xE14E': {
|
|
827
|
-
payload:
|
|
920
|
+
payload: Buffer.from('04681766FFFFFF', 'hex'),
|
|
828
921
|
data: {
|
|
829
922
|
button: 4,
|
|
830
923
|
color: {
|
|
@@ -836,7 +929,7 @@ module.exports = {
|
|
|
836
929
|
|
|
837
930
|
// XX.1.4 Panel button color Response,
|
|
838
931
|
'0xE14F': {
|
|
839
|
-
payload:
|
|
932
|
+
payload: Buffer.from('04', 'hex'),
|
|
840
933
|
data: { button: 4 }
|
|
841
934
|
}
|
|
842
935
|
};
|