forked from mihailescu2m/homebridge-airtouch4-platform
-
Notifications
You must be signed in to change notification settings - Fork 2
/
magic.js
81 lines (63 loc) · 988 Bytes
/
magic.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
module.exports = {
HEADER_BYTES: [0x55, 0x55],
ADDRESS_BYTES: [0x80, 0xb0],
MSGTYPE_GRP_CTRL: 0x2a,
MSGTYPE_GRP_STAT: 0x2b,
MSGTYPE_AC_CTRL: 0x2c,
MSGTYPE_AC_STAT: 0x2d,
MSGTYPE_SYS_DETAILS: 0x2f,
MSGDATA_SYS_DETAILS: [0x55, 0x55, 0x80, 0xb0, 0x00, 0x2f, 0x00, 0x02, 0x03, 0xff, 0x16, 0xcd],
AC_POWER_STATES: {
KEEP: 0,
NEXT: 1,
OFF: 2,
ON: 3
},
AC_MODES: {
AUTO: 0,
HEAT: 1,
DRY: 2,
FAN: 3,
COOL: 4,
KEEP: 5
},
AC_FAN_SPEEDS: {
AUTO: 0,
QUIET: 1,
LOW: 2,
MEDIUM: 3,
HIGH: 4,
POWERFUL: 5,
TURBO: 6,
KEEP: 7
},
AC_TARGET_TYPES: {
KEEP: 0,
SET_VALUE: 1,
DECREMENT: 2,
INCREMENT: 3
},
AC_UNIT_DEFAULT: 0,
AC_TARGET_KEEP: 63,
GROUP_POWER_STATES: {
KEEP: 0,
NEXT: 1,
OFF: 2,
ON: 3,
TURBO: 5
},
GROUP_CONTROL_TYPES: {
KEEP: 0,
NEXT: 1,
DAMPER: 2,
TEMPERATURE: 3
},
GROUP_TARGET_TYPES: {
KEEP: 0,
DECREMENT: 2,
INCREMENT: 3,
DAMPER: 4,
TEMPERATURE: 5
},
GROUP_NUMBER_DEFAULT: 0
}