File: example_data.py

package info (click to toggle)
python-anova-wifi 0.17.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 320 kB
  • sloc: python: 959; javascript: 8; makefile: 5
file content (280 lines) | stat: -rw-r--r-- 10,547 bytes parent folder | download
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
from typing import Any

A3_MESSAGE: dict[str, Any] = {
    "command": "EVENT_APC_STATE",
    "payload": {
        "cookerId": "anova random-id",
        "type": "a3",
        "state": {
            "firmwareVersion": "ver 5.5.1",
            "isCooking": True,
            "currentTemperature": 96.1,
            "targetTemperature": 96.1,
            "timerInSeconds": 840,
            "unit": "f",
            "isTimerRunning": True,
            "isSpeakerOn": True,
            "isAlarmActive": False,
            "currentJobID": "random_job_id",
            "currentJob": {
                "jobType": "manual_cook",
                "jobStage": "cooking",
                "targetTemperature": 96.1,
                "timerLength": 840,
                "tempUnit": "f",
                "thresholdTemperature": 40,
                "thresholdTemperatureUnit": "f",
            },
            "isKeepingWarm": False,
            "isCheckingTemperatureForIceBath": False,
            "isMonitoringIcebath": False,
            "isConnected": True,
        },
    },
}

A4_MESSAGE: dict[str, Any] = {
    "command": "EVENT_APC_STATE",
    "payload": {
        "cookerId": "XXXXXXXX",
        "type": "a4",
        "state": {
            "boot-id": "43435004281963",
            "job": {
                "cook-time-seconds": 0,
                "id": "98827197488379",
                "mode": "COOK",
                "ota-url": "",
                "target-temperature": 66.11,
                "temperature-unit": "F",
            },
            "job-status": {
                "cook-time-remaining": 0,
                "job-start-systick": 1553,
                "provisioning-pairing-code": 0,
                "state": "COOKING",
                "state-change-systick": 1553,
            },
            "network-info": {
                "bssid": "XXXXXXXX",
                "connection-status": "connected-station",
                "is-provisioning": False,
                "mac-address": "XXXXXXXX",
                "mode": "station",
                "security-type": "WPA2",
                "ssid": "XXXXXXXX",
            },
            "pin-info": {
                "device-safe": 0,
                "water-leak": 0,
                "water-level-critical": 0,
                "water-temp-too-high": 0,
            },
            "system-info-3220": {
                "firmware-version": "1.4.4",
                "firmware-version-raw": "VM176_A_01.04.04",
                "largest-free-heap-size": 28008,
                "stack-low-level": 180,
                "stack-low-task": 7,
                "systick": 15315965,
                "total-free-heap-size": 28688,
            },
            "system-info-nxp": {"version-string": "VM171_A_01.04.04"},
            "temperature-info": {
                "heater-temperature": 66.74,
                "triac-temperature": 54.99,
                "water-temperature": 66.09,
            },
        },
    },
}

A6_MESSAGE: dict[str, Any] = {
    "command": "EVENT_APC_STATE",
    "payload": {
        "cookerId": "a6_device",
        "type": "a6",
        "state": {
            "version": 1,
            "updatedTimestamp": "2024-06-13T03:11:31Z",
            "systemInfo": {
                "deviceId": "a6_device",
                "online": True,
                "firmwareVersion": "01.01.12",
                "releaseTrack": "production",
                "firmwareUpdatedTimestamp": "2024-05-20T04:40:01Z",
                "lastConnectedTimestamp": "2024-06-13T01:34:31Z",
                "lastDisconnectedTimestamp": "2024-06-09T13:31:09Z",
                "hardwareVersion": "1.0.0",
                "triacsFailed": False,
            },
            "state": {
                "mode": "idle",
                "temperatureUnit": "C",
                "processedCommandIds": [
                    "cd442f58-2b8f-42bb-9e17-17d0be83005f",
                    "7bef2615-84e6-4736-bb9e-4ed2bc94c545",
                    "91d01cba-de6c-40b4-9562-5c8b1e500cc4",
                    "d52e0f5b-09af-4160-860a-5c48fa08ddd5",
                    "d00ac964-d304-4fdf-9a0d-bf175bc7dc8f",
                    "2426cd8d-e930-4f56-8edf-19032a6fff56",
                    "ebcf91ee-c385-4612-8fab-675d4541e57c",
                    "e038b103-61d3-4612-b20a-d73ee1e3e5df",
                    "526596ec-592b-4c47-bb70-a3cf9bdf75a4",
                    "84b3af5c-c31a-477c-9160-bd64caa32851",
                ],
                "resumeAfterPowerInterruption": False,
            },
            "nodes": {
                "lowWater": {"warning": False, "empty": False},
                "waterTemperatureSensor": {
                    "current": {"celsius": 24.72},
                    "setpoint": {"celsius": 57.2},
                    "enabled": True,
                },
                "timer": {"mode": "idle", "initial": 7200},
            },
            "metadata": {},
        },
    },
}

A7_MESSAGE: dict[str, Any] = {
    "command": "EVENT_APC_STATE",
    "payload": {
        "cookerId": "a7_device",
        "type": "a7",
        "state": {
            "version": 1,
            "updatedTimestamp": "2024-06-13T03:11:47Z",
            "systemInfo": {
                "deviceId": "a7_device",
                "online": True,
                "firmwareVersion": "01.01.12",
                "releaseTrack": "production",
                "firmwareUpdatedTimestamp": "2024-05-20T04:15:07Z",
                "lastConnectedTimestamp": "2024-06-13T02:41:07Z",
                "lastDisconnectedTimestamp": "2024-05-31T05:25:50Z",
                "hardwareVersion": "1.0.0",
                "triacsFailed": False,
            },
            "state": {
                "mode": "idle",
                "temperatureUnit": "C",
                "processedCommandIds": [
                    "7345f32f-090f-4014-935d-a46855c35ca6",
                    "fc3e31da-ddd1-4b82-991e-7b52f767ce42",
                    "84ae5817-76e3-4dac-96d1-0f2a49979629",
                    "a272b1df-baed-45d1-aaa4-9ab59eb3fff5",
                    "9aa0ae14-f32b-4a63-9258-9d86463b89a6",
                    "06d9ea5a-d19e-453a-989c-79158c18bc6e",
                    "eb7ed511-807e-4bc8-ac87-bc0f9c88a605",
                    "1fc21251-f1f6-49f9-8747-533edd79a3c3",
                    "492231e1-c3b3-4750-8e5c-df07fa539477",
                    "47d0f847-b5f4-4072-a22a-311c4e71ebcc",
                ],
                "resumeAfterPowerInterruption": False,
            },
            "nodes": {
                "lowWater": {"warning": False, "empty": False},
                "waterTemperatureSensor": {
                    "current": {"celsius": 25.25},
                    "setpoint": {"celsius": 84.4},
                    "enabled": True,
                },
                "timer": {"mode": "idle", "initial": 36000},
            },
            "metadata": {},
        },
    },
}

A7_COOKING: dict[str, Any] = {
    "command": "EVENT_APC_STATE",
    "payload": {
        "cookerId": "a7_id",
        "type": "a7",
        "state": {
            "cook": {
                "activeStageIndex": 0,
                "stageTransitionPendingUserAction": False,
                "activeStageId": "6b70634f-ed6b-9154-6b30-05e73cec7a4e",
                "stages": [
                    {
                        "do": {
                            "timer": {
                                "entry": {
                                    "conditions": {
                                        "and": {
                                            "nodes.waterTemperatureSensor.current.celsius": {
                                                ">=": 54.17,
                                                "<=": 54.77,
                                            }
                                        }
                                    }
                                },
                                "initial": 0,
                            },
                            "type": "cook",
                            "waterTemperatureSensor": {"setpoint": {"celsius": 54.47}},
                        },
                        "id": "6b70634f-ed6b-9154-6b30-05e73cec7a4e",
                        "entry": {
                            "conditions": {
                                "and": {
                                    "nodes.waterTemperatureSensor.current.celsius": {
                                        "<=": 54.77,
                                        ">=": 54.17,
                                    }
                                }
                            }
                        },
                        "exit": {"conditions": {}},
                        "title": "Cook Stage",
                    }
                ],
                "originSource": "hardware",
                "activeStageStartedTimestamp": "2024-07-05T21:48:29Z",
                "startedTimestamp": "2024-07-05T21:48:29Z",
                "activeStageMode": "running",
                "cookId": "a098de4a-8714-2dd8-1bdc-d067008f2d4f",
            },
            "nodes": {
                "lowWater": {"empty": False, "warning": False},
                "timer": {
                    "mode": "running",
                    "initial": 1200,
                    "startedAtTimestamp": "2024-07-05T21:49:10Z",
                },
                "waterTemperatureSensor": {
                    "enabled": True,
                    "setpoint": {"celsius": 54.46},
                    "current": {"celsius": 55.27},
                },
            },
            "state": {
                "temperatureUnit": "F",
                "resumeAfterPowerInterruption": False,
                "processedCommandIds": [
                    "876cfbc9-03f1-400b-89ec-ef5391270846",
                    "e2e3ce06-45b4-4485-b4fa-9211c082b90d",
                ],
                "mode": "cook",
            },
            "systemInfo": {
                "firmwareVersion": "01.01.25",
                "deviceId": "5yMOd0D2lasOE2U8SkcIcS",
                "lastDisconnectedTimestamp": "2024-07-05T21:47:59Z",
                "triacsFailed": False,
                "releaseTrack": "production",
                "hardwareVersion": "1.0.0",
                "lastConnectedTimestamp": "2024-07-05T21:47:59Z",
                "online": True,
                "firmwareUpdatedTimestamp": "2024-06-07T18:56:03Z",
            },
            "metadata": {},
            "updatedTimestamp": "2024-07-05T21:49:56Z",
            "version": 1,
        },
    },
}