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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
|
## Bot configuration
```
[bot]
token = "bot token"
users = [ id1, id2 ]
#notify_users = [ 1, 2 ]
[mqtt]
host = "192.168.88.49"
port = 1883
client_id = "kettle_bot"
[logging]
verbose = true
default_fmt = true
[kettle]
mac = 'kettle mac'
token = 'kettle token'
temp_max = 100
temp_min = 30
temp_step = 5
```
## Random research notes
### Device features
From `devices.json`:
```
"id": "cec1f5ed-be5e-4545-9ce9-e2d843032587",
"vendor": "polaris",
"type": 6,
"class": "kettle",
"name": "PWK 1725CGLD",
"connectivity": [
"wifi",
"hotspot"
],
...
"features": [
"program",
"temperature",
"current_temperature",
"schedule",
"child_lock",
"semi_recipe",
"demo"
],
"temperature_units": "celsius",
"limits": {
"temperature": {
"min": 30,
"max": 100,
"default": 40,
"step": 5
},
"child_lock": {
"min": 0,
"max": 1,
"default": 0,
"step": 1
}
},
```
### Protocol commands
From `com/polaris/iot/api/commands`:
```
$ grep -A1 -r "public byte getType()" .
./CmdAccessControl.java: public byte getType() {
./CmdAccessControl.java- return -123;
--
./CmdBattery.java: public byte getType() {
./CmdBattery.java- return 27;
--
./CmdCurrentHumidity.java: public byte getType() {
./CmdCurrentHumidity.java- return 19;
--
./CmdMultiStepCurrent.java: public byte getType() {
./CmdMultiStepCurrent.java- return 21;
--
./CmdSmartMode.java: public byte getType() {
./CmdSmartMode.java- return 40;
--
./CmdTimeStart.java: public byte getType() {
./CmdTimeStart.java- return 0;
--
./CmdProgramData.java: public byte getType() {
./CmdProgramData.java- return 66;
--
./CmdTank.java: public byte getType() {
./CmdTank.java- return 31;
--
./CmdSpeed.java: public byte getType() {
./CmdSpeed.java- return 15;
--
./CmdTargetHumidity.java: public byte getType() {
./CmdTargetHumidity.java- return 18;
--
./CmdTargetTime.java: public byte getType() {
./CmdTargetTime.java- return 3;
--
./CmdRecipeStep.java: public byte getType() {
./CmdRecipeStep.java- return 5;
--
./CmdWarmStream.java: public byte getType() {
./CmdWarmStream.java- return 25;
--
./CmdMapData.java: public byte getType() {
./CmdMapData.java- return 10;
--
./CmdRecipeId.java: public byte getType() {
./CmdRecipeId.java- return 4;
--
./CmdBacklight.java: public byte getType() {
./CmdBacklight.java- return 28;
--
./CmdCurrentTemperature.java: public byte getType() {
./CmdCurrentTemperature.java- return 20;
--
./CmdIonization.java: public byte getType() {
./CmdIonization.java- return 24;
--
./CmdMapTarget.java: public byte getType() {
./CmdMapTarget.java- return 67;
--
./CmdKeepWarm.java: public byte getType() {
./CmdKeepWarm.java- return 16;
--
./CmdMultiStep.java: public byte getType() {
./CmdMultiStep.java- return 14;
--
./CmdCleanArea.java: public byte getType() {
./CmdCleanArea.java- return 36;
--
./CmdVolume.java: public byte getType() {
./CmdVolume.java- return 9;
--
./CmdTargetTemperature.java: public byte getType() {
./CmdTargetTemperature.java- return 2;
--
./CmdError.java: public byte getType() {
./CmdError.java- return 7;
--
./CmdCleanTime.java: public byte getType() {
./CmdCleanTime.java- return 35;
--
./CmdScheduleRemove.java: public byte getType() {
./CmdScheduleRemove.java- return 65;
--
./CmdBatteryState.java: public byte getType() {
./CmdBatteryState.java- return 29;
--
./CmdExpendables.java: public byte getType() {
./CmdExpendables.java- return 34;
--
./CmdContour.java: public byte getType() {
./CmdContour.java- return 68;
--
./CmdJoystick.java: public byte getType() {
./CmdJoystick.java- return 8;
--
./CmdMode.java: public byte getType() {
./CmdMode.java- return 1;
--
./CmdDelayStart.java: public byte getType() {
./CmdDelayStart.java- return 13;
--
./CmdTargetId.java: public byte getType() {
./CmdTargetId.java- return -112;
--
./CmdInternalLogs.java: public byte getType() {
./CmdInternalLogs.java- return -16;
--
./CmdFindMe.java: public byte getType() {
./CmdFindMe.java- return 69;
--
./CmdCustomCommand.java: public byte getType() {
./CmdCustomCommand.java- return 0;
--
./CmdScheduleSet.java: public byte getType() {
./CmdScheduleSet.java- return 64;
--
./CmdTotalTime.java: public byte getType() {
./CmdTotalTime.java- return 26;
--
./CmdChildLock.java: public byte getType() {
./CmdChildLock.java- return 30;
```
From `com/syncleoiot/iottransport/udp/commands`:
```
$ grep -A1 -r "public byte getType()" .
./CmdDeviceDiagnostics.java: public byte getType() {
./CmdDeviceDiagnostics.java- return -111;
--
./CmdHandshake.java: public byte getType() {
./CmdHandshake.java- return 0;
--
./CmdUdpFirmware.java: public byte getType() {
./CmdUdpFirmware.java- return -3;
--
./CmdTimeSync.java: public byte getType() {
./CmdTimeSync.java- return -128;
--
./CmdPing.java: public byte getType() {
./CmdPing.java- return -1;
```
From `com/syncleoiot/iottransport/commands`:
```
$ grep -A1 -r "public byte getType()" .
./CmdCrossConfig.java: public byte getType() {
./CmdCrossConfig.java- return -125;
--
./CmdWifiConfiguration.java: public byte getType() {
./CmdWifiConfiguration.java- return -126;
--
./CmdDiagnostics.java: public byte getType() {
./CmdDiagnostics.java- return -115;
--
./CmdWifiStatus.java: public byte getType() {
./CmdWifiStatus.java- return -126;
--
./CmdHardware.java: public byte getType() {
./CmdHardware.java- return 0;
--
./CmdWifiList.java: public byte getType() {
./CmdWifiList.java- return -127;
```
See also class `com/syncleiot/iottransport/commands/CmdHardware`.
|