node-red-contrib-octopus-intelligent 1.4.0 โ 1.6.1
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 +487 -408
- package/README.md +1004 -980
- package/examples/basic-monitoring.json +1 -1
- package/examples/ha-dashboard.yaml +602 -486
- package/examples/mqtt-integration.json +1 -1
- package/examples/node-red-dashboard-flow.json +1287 -0
- package/examples/set-preferences.json +1 -1
- package/lib/api-metrics.js +31 -31
- package/lib/auth.js +20 -20
- package/lib/categories/account.js +32 -32
- package/lib/categories/applicable-rates.js +127 -91
- package/lib/categories/completed-dispatches.js +35 -35
- package/lib/categories/electricity.js +146 -133
- package/lib/categories/flex-planned-dispatches.js +36 -36
- package/lib/categories/free-electricity.js +61 -61
- package/lib/categories/gas.js +95 -95
- package/lib/categories/home-mini.js +37 -37
- package/lib/categories/intelligent.js +155 -124
- package/lib/categories/octoplus.js +32 -32
- package/lib/categories/saving-sessions.js +64 -64
- package/lib/categories/wheel-of-fortune.js +49 -49
- package/lib/commands.js +47 -0
- package/lib/discovery-retry.js +13 -0
- package/lib/discovery.js +92 -85
- package/lib/graphql-errors.js +18 -0
- package/lib/graphql.js +44 -44
- package/lib/http-get-json.js +22 -0
- package/lib/payload.js +89 -77
- package/lib/poll-tick.js +44 -44
- package/lib/preferences.js +32 -0
- package/lib/scheduler.js +47 -47
- package/lib/sensor-definitions.js +219 -0
- package/lib/timezone.js +49 -49
- package/lib/update-check.js +38 -0
- package/octopus-intelligent.html +218 -205
- package/octopus-intelligent.js +1687 -1685
- package/package.json +54 -54
package/README.md
CHANGED
|
@@ -1,980 +1,1004 @@
|
|
|
1
|
-
# node-red-contrib-octopus-intelligent
|
|
2
|
-
|
|
3
|
-
> Node-RED integration for **Octopus Energy** with automatic Home Assistant MQTT discovery
|
|
4
|
-
|
|
5
|
-
Monitor electricity and gas rates (import + export), EV charging schedules, real-time home energy usage, account balance, saving sessions, and Wheel of Fortune spins โ all automatically configured as Home Assistant entities via MQTT discovery.
|
|
6
|
-
|
|
7
|
-
[](https://www.npmjs.com/package/node-red-contrib-octopus-intelligent)
|
|
8
|
-
[](https://opensource.org/licenses/MIT)
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## ๐ค Support This Project
|
|
13
|
-
|
|
14
|
-
Found this useful? Support continued development:
|
|
15
|
-
|
|
16
|
-
<table>
|
|
17
|
-
<tr>
|
|
18
|
-
<td width="33%" align="center">
|
|
19
|
-
|
|
20
|
-
### โญ GitHub Star
|
|
21
|
-
Star the repository to show your support!
|
|
22
|
-
|
|
23
|
-
[โญ Star on GitHub](https://github.com/ASomerN/node-red-contrib-octopus-intelligent)
|
|
24
|
-
|
|
25
|
-
</td>
|
|
26
|
-
<td width="33%" align="center">
|
|
27
|
-
|
|
28
|
-
### ๐ Sponsor
|
|
29
|
-
Support ongoing development and maintenance
|
|
30
|
-
|
|
31
|
-
[Become a Sponsor](https://github.com/sponsors/ASomerN)
|
|
32
|
-
|
|
33
|
-
</td>
|
|
34
|
-
<td width="33%" align="center">
|
|
35
|
-
|
|
36
|
-
### โ Buy Me a Coffee
|
|
37
|
-
If this project has helped you!
|
|
38
|
-
|
|
39
|
-
[](https://www.paypal.com/donate?hosted_button_id=A2B8ZFEJBE2S6)
|
|
40
|
-
|
|
41
|
-
</td>
|
|
42
|
-
</tr>
|
|
43
|
-
</table>
|
|
44
|
-
|
|
45
|
-
**Your support helps with:** Bug fixes and maintenance โข New feature development โข Documentation improvements โข Community support โข Feeding my children
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## โจ Features
|
|
50
|
-
|
|
51
|
-
### ๐ฎ EV Smart Controls
|
|
52
|
-
- **Target Charge Slider** (
|
|
53
|
-
- **Ready Time Dropdown** (
|
|
54
|
-
- **Apply Changes Button** โ Prevents API spam while adjusting settings
|
|
55
|
-
- **Confirmed Values** โ See your current API-validated settings
|
|
56
|
-
- **Smart Charging Toggle** โ Suspend or resume Octopus intelligent charging from Node-RED or Home Assistant
|
|
57
|
-
|
|
58
|
-
### โก Real-Time Charging Data
|
|
59
|
-
- **Next Charge Time** โ When your next slot starts
|
|
60
|
-
- **Total Planned Energy** โ Total kWh across all upcoming slots
|
|
61
|
-
- **Individual Slot Times** โ Up to 3 slots with start/end times
|
|
62
|
-
- **Charging Window** โ Overall window from first to last slot
|
|
63
|
-
- **Charge Source** โ Smart-charge vs bump-charge indicator
|
|
64
|
-
- **Completed Dispatches** โ History of completed intelligent charging sessions
|
|
65
|
-
- **Flex Planned Dispatches** โ Upcoming flex dispatch schedule
|
|
66
|
-
|
|
67
|
-
### ๐ Electricity & Gas Rates
|
|
68
|
-
- **Live Unit Rate** โ Current electricity rate (p/kWh) and gas rate (p/kWh)
|
|
69
|
-
- **Standing Charges** โ Daily standing charges for electricity and gas
|
|
70
|
-
- **Tariff Code** โ Your current tariff identifier and validity dates
|
|
71
|
-
- **Recent Consumption** โ Previous day kWh for electricity (import + export) and gas
|
|
72
|
-
- **Current Rate Slot** โ Live rate from your 24h applicable rates schedule
|
|
73
|
-
- **Previous / Next Rate** โ Adjacent slot rates and transition timestamps
|
|
74
|
-
- **Energy Dashboard Rate** โ Electricity rate in GBP/kWh, ready for HA's Energy Dashboard cost tracking
|
|
75
|
-
|
|
76
|
-
### ๐ Electricity Export (Solar / Battery)
|
|
77
|
-
- **Export Tariff** โ Tariff code, standing charge, validity dates for the OUTGOING agreement
|
|
78
|
-
- **Export Half-Hourly Rates** โ Full 48-slot schedule for variable export tariffs (e.g. Agile Outgoing)
|
|
79
|
-
- **Live Export Rate** โ Current p/kWh and GBP/kWh
|
|
80
|
-
- **Previous / Next Export Rate** โ Adjacent slot rates and transition timestamps
|
|
81
|
-
- **Export Consumption** โ Previous day kWh exported to the grid (read from the export meter point)
|
|
82
|
-
|
|
83
|
-
### ๐ Home Energy (Octopus Home Mini)
|
|
84
|
-
- **Live Demand** โ Real-time grid import in kW
|
|
85
|
-
- **Period Consumption** โ Energy consumed in the last half-hour period (kWh)
|
|
86
|
-
- Requires Octopus Home Mini device registered to your account (opt-in)
|
|
87
|
-
|
|
88
|
-
### ๐ฐ Account & Rewards
|
|
89
|
-
- **Account Balance** โ Current credit/debit balance in ยฃ
|
|
90
|
-
- **Saving Sessions** โ Next session availability, start/end times, joined status, and Octopus Points
|
|
91
|
-
- **Free Electricity** โ Upcoming free electricity window detection (active JuneโOctober)
|
|
92
|
-
- **Wheel of Fortune** โ Remaining electricity and gas spins (opt-in)
|
|
93
|
-
- **Octoplus** โ Enrollment status and loyalty points
|
|
94
|
-
|
|
95
|
-
### ๐ง Advanced Features
|
|
96
|
-
- **Account Discovery** โ Automatic product detection at startup; categories auto-enable based on registered products
|
|
97
|
-
- **Per-Category Polling** โ Each data category polls on its own configurable interval
|
|
98
|
-
- **Manual Refresh Button** โ Force API refresh from Home Assistant (30s cooldown)
|
|
99
|
-
- **Next Poll Timer** โ See when the next automatic refresh will occur
|
|
100
|
-
- **API Usage Tracking** โ Monitor requests and complexity in diagnostics
|
|
101
|
-
- **Exponential Backoff** โ Smart retry prevents sensor unavailability
|
|
102
|
-
- **Comprehensive Debugging** โ Full API call tracking in msg.debug
|
|
103
|
-
|
|
104
|
-
### ๐ก Home Assistant Integration
|
|
105
|
-
- **Zero Configuration** โ MQTT auto-discovery sets everything up
|
|
106
|
-
- **Two-Tier Entity Organisation** โ Main entities (controls, live rates, consumption, tariff metadata, rewards) and Diagnostics (errors, raw timestamps, API metrics, locale timestamps)
|
|
107
|
-
- **Suggested Area** โ Auto-suggests "Energy" area
|
|
108
|
-
- **Reference dashboard YAML** โ `examples/ha-dashboard.yaml` covers every entity in a packed sections layout, ready to paste into HA's Raw Configuration Editor
|
|
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
|
-
| Electricity /
|
|
166
|
-
| Gas
|
|
167
|
-
|
|
|
168
|
-
|
|
|
169
|
-
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
- **
|
|
179
|
-
|
|
180
|
-
- Octopus
|
|
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
|
-
- โ Enable
|
|
215
|
-
- Enable
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
- All
|
|
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
|
-
| Octopus
|
|
273
|
-
| Octopus
|
|
274
|
-
| Octopus
|
|
275
|
-
|
|
|
276
|
-
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
|
283
|
-
|
|
284
|
-
| Octopus
|
|
285
|
-
| Octopus
|
|
286
|
-
| Octopus
|
|
287
|
-
| Octopus
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
|
294
|
-
|
|
295
|
-
| Octopus
|
|
296
|
-
| Octopus
|
|
297
|
-
| Octopus Next
|
|
298
|
-
| Octopus
|
|
299
|
-
| Octopus Slot
|
|
300
|
-
| Octopus
|
|
301
|
-
| Octopus Slot
|
|
302
|
-
| Octopus Slot
|
|
303
|
-
| Octopus Slot
|
|
304
|
-
| Octopus Slot
|
|
305
|
-
| Octopus
|
|
306
|
-
| Octopus
|
|
307
|
-
| Octopus
|
|
308
|
-
| Octopus
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
|
315
|
-
|
|
316
|
-
| Octopus
|
|
317
|
-
| Octopus Electricity
|
|
318
|
-
| Octopus Electricity
|
|
319
|
-
| Octopus Electricity
|
|
320
|
-
| Octopus Electricity
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
|
327
|
-
|
|
328
|
-
| Octopus
|
|
329
|
-
| Octopus Electricity Export
|
|
330
|
-
| Octopus Electricity Export
|
|
331
|
-
| Octopus Electricity Export
|
|
332
|
-
| Octopus Electricity Export
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
|
339
|
-
|
|
340
|
-
| Octopus Gas
|
|
341
|
-
| Octopus Gas
|
|
342
|
-
| Octopus Gas
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
|
349
|
-
|
|
350
|
-
| Octopus
|
|
351
|
-
| Octopus
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
|
367
|
-
|
|
368
|
-
| Octopus
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
|
386
|
-
|
|
387
|
-
| Octopus API
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
|
396
|
-
|
|
397
|
-
| Octopus
|
|
398
|
-
| Octopus
|
|
399
|
-
| Octopus Slot
|
|
400
|
-
| Octopus Slot
|
|
401
|
-
| Octopus Slot
|
|
402
|
-
| Octopus Slot
|
|
403
|
-
| Octopus
|
|
404
|
-
| Octopus
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
|
413
|
-
|
|
414
|
-
| Octopus
|
|
415
|
-
| Octopus Slot
|
|
416
|
-
| Octopus Slot
|
|
417
|
-
| Octopus Slot
|
|
418
|
-
| Octopus Slot
|
|
419
|
-
| Octopus
|
|
420
|
-
| Octopus
|
|
421
|
-
| Octopus
|
|
422
|
-
| Octopus
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
|
429
|
-
|
|
430
|
-
| Octopus Electricity
|
|
431
|
-
| Octopus Electricity
|
|
432
|
-
| Octopus
|
|
433
|
-
| Octopus
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
|
440
|
-
|
|
441
|
-
| Octopus
|
|
442
|
-
| Octopus Electricity Export Rate
|
|
443
|
-
| Octopus Electricity Export Rate
|
|
444
|
-
| Octopus Electricity Export Rate
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
|
453
|
-
|
|
454
|
-
| Octopus
|
|
455
|
-
| Octopus
|
|
456
|
-
| Octopus
|
|
457
|
-
| Octopus
|
|
458
|
-
| Octopus
|
|
459
|
-
| Octopus
|
|
460
|
-
| Octopus
|
|
461
|
-
| Octopus
|
|
462
|
-
| Octopus
|
|
463
|
-
| Octopus WoF
|
|
464
|
-
| Octopus WoF
|
|
465
|
-
| Octopus WoF
|
|
466
|
-
| Octopus
|
|
467
|
-
| Octopus
|
|
468
|
-
| Octopus
|
|
469
|
-
| Octopus
|
|
470
|
-
| Octopus
|
|
471
|
-
| Octopus
|
|
472
|
-
| Octopus
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
|
538
|
-
|
|
539
|
-
|
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
```
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
```
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
```
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
```
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
"
|
|
616
|
-
"
|
|
617
|
-
"
|
|
618
|
-
"
|
|
619
|
-
"
|
|
620
|
-
"
|
|
621
|
-
"
|
|
622
|
-
"
|
|
623
|
-
"
|
|
624
|
-
"
|
|
625
|
-
"
|
|
626
|
-
"
|
|
627
|
-
"
|
|
628
|
-
"
|
|
629
|
-
"
|
|
630
|
-
"
|
|
631
|
-
"
|
|
632
|
-
"
|
|
633
|
-
"
|
|
634
|
-
"
|
|
635
|
-
"
|
|
636
|
-
"
|
|
637
|
-
"
|
|
638
|
-
"
|
|
639
|
-
"
|
|
640
|
-
"
|
|
641
|
-
"
|
|
642
|
-
"
|
|
643
|
-
"
|
|
644
|
-
"
|
|
645
|
-
"
|
|
646
|
-
"
|
|
647
|
-
"
|
|
648
|
-
"
|
|
649
|
-
"
|
|
650
|
-
"
|
|
651
|
-
"
|
|
652
|
-
"
|
|
653
|
-
"
|
|
654
|
-
"
|
|
655
|
-
"
|
|
656
|
-
"
|
|
657
|
-
"
|
|
658
|
-
"
|
|
659
|
-
"
|
|
660
|
-
"
|
|
661
|
-
"
|
|
662
|
-
"
|
|
663
|
-
"
|
|
664
|
-
"
|
|
665
|
-
"
|
|
666
|
-
"
|
|
667
|
-
"
|
|
668
|
-
"
|
|
669
|
-
"
|
|
670
|
-
"
|
|
671
|
-
"
|
|
672
|
-
"
|
|
673
|
-
"
|
|
674
|
-
"
|
|
675
|
-
"
|
|
676
|
-
"
|
|
677
|
-
"
|
|
678
|
-
"
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
"
|
|
682
|
-
"
|
|
683
|
-
"
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
- alias: "
|
|
734
|
-
trigger:
|
|
735
|
-
platform: state
|
|
736
|
-
entity_id: binary_sensor.
|
|
737
|
-
to: "
|
|
738
|
-
action:
|
|
739
|
-
service:
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
```
|
|
743
|
-
|
|
744
|
-
###
|
|
745
|
-
|
|
746
|
-
```yaml
|
|
747
|
-
automation:
|
|
748
|
-
- alias: "
|
|
749
|
-
trigger:
|
|
750
|
-
platform:
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
{
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
###
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
###
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
###
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
###
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
###
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
###
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
See [
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
**
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
- **
|
|
954
|
-
- **
|
|
955
|
-
|
|
956
|
-
**
|
|
957
|
-
- **
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
- **
|
|
974
|
-
- **
|
|
975
|
-
- **
|
|
976
|
-
- **
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
**
|
|
1
|
+
# node-red-contrib-octopus-intelligent
|
|
2
|
+
|
|
3
|
+
> Node-RED integration for **Octopus Energy** with automatic Home Assistant MQTT discovery
|
|
4
|
+
|
|
5
|
+
Monitor electricity and gas rates (import + export), EV charging schedules, real-time home energy usage, account balance, saving sessions, and Wheel of Fortune spins โ all automatically configured as Home Assistant entities via MQTT discovery.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/node-red-contrib-octopus-intelligent)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## ๐ค Support This Project
|
|
13
|
+
|
|
14
|
+
Found this useful? Support continued development:
|
|
15
|
+
|
|
16
|
+
<table>
|
|
17
|
+
<tr>
|
|
18
|
+
<td width="33%" align="center">
|
|
19
|
+
|
|
20
|
+
### โญ GitHub Star
|
|
21
|
+
Star the repository to show your support!
|
|
22
|
+
|
|
23
|
+
[โญ Star on GitHub](https://github.com/ASomerN/node-red-contrib-octopus-intelligent)
|
|
24
|
+
|
|
25
|
+
</td>
|
|
26
|
+
<td width="33%" align="center">
|
|
27
|
+
|
|
28
|
+
### ๐ Sponsor
|
|
29
|
+
Support ongoing development and maintenance
|
|
30
|
+
|
|
31
|
+
[Become a Sponsor](https://github.com/sponsors/ASomerN)
|
|
32
|
+
|
|
33
|
+
</td>
|
|
34
|
+
<td width="33%" align="center">
|
|
35
|
+
|
|
36
|
+
### โ Buy Me a Coffee
|
|
37
|
+
If this project has helped you!
|
|
38
|
+
|
|
39
|
+
[](https://www.paypal.com/donate?hosted_button_id=A2B8ZFEJBE2S6)
|
|
40
|
+
|
|
41
|
+
</td>
|
|
42
|
+
</tr>
|
|
43
|
+
</table>
|
|
44
|
+
|
|
45
|
+
**Your support helps with:** Bug fixes and maintenance โข New feature development โข Documentation improvements โข Community support โข Feeding my children
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## โจ Features
|
|
50
|
+
|
|
51
|
+
### ๐ฎ EV Smart Controls
|
|
52
|
+
- **Target Charge Slider** (5โ100%) โ Set your desired battery level
|
|
53
|
+
- **Ready Time Dropdown** (any half-hour slot, 00:00โ23:30) โ When your car needs to be ready. Matches the Octopus app; other values are rejected with an error and nothing is sent to Octopus.
|
|
54
|
+
- **Apply Changes Button** โ Prevents API spam while adjusting settings
|
|
55
|
+
- **Confirmed Values** โ See your current API-validated settings
|
|
56
|
+
- **Smart Charging Toggle** โ Suspend or resume Octopus intelligent charging from Node-RED or Home Assistant
|
|
57
|
+
|
|
58
|
+
### โก Real-Time Charging Data
|
|
59
|
+
- **Next Charge Time** โ When your next slot starts
|
|
60
|
+
- **Total Planned Energy** โ Total kWh across all upcoming slots
|
|
61
|
+
- **Individual Slot Times** โ Up to 3 slots with start/end times
|
|
62
|
+
- **Charging Window** โ Overall window from first to last slot
|
|
63
|
+
- **Charge Source** โ Smart-charge vs bump-charge indicator
|
|
64
|
+
- **Completed Dispatches** โ History of completed intelligent charging sessions
|
|
65
|
+
- **Flex Planned Dispatches** โ Upcoming flex dispatch schedule
|
|
66
|
+
|
|
67
|
+
### ๐ Electricity & Gas Rates
|
|
68
|
+
- **Live Unit Rate** โ Current electricity rate (p/kWh) and gas rate (p/kWh)
|
|
69
|
+
- **Standing Charges** โ Daily standing charges for electricity and gas
|
|
70
|
+
- **Tariff Code** โ Your current tariff identifier and validity dates
|
|
71
|
+
- **Recent Consumption** โ Previous day kWh for electricity (import + export) and gas
|
|
72
|
+
- **Current Rate Slot** โ Live rate from your 24h applicable rates schedule
|
|
73
|
+
- **Previous / Next Rate** โ Adjacent slot rates and transition timestamps
|
|
74
|
+
- **Energy Dashboard Rate** โ Electricity rate in GBP/kWh, ready for HA's Energy Dashboard cost tracking
|
|
75
|
+
|
|
76
|
+
### ๐ Electricity Export (Solar / Battery)
|
|
77
|
+
- **Export Tariff** โ Tariff code, standing charge, validity dates for the OUTGOING agreement
|
|
78
|
+
- **Export Half-Hourly Rates** โ Full 48-slot schedule for variable export tariffs (e.g. Agile Outgoing)
|
|
79
|
+
- **Live Export Rate** โ Current p/kWh and GBP/kWh
|
|
80
|
+
- **Previous / Next Export Rate** โ Adjacent slot rates and transition timestamps
|
|
81
|
+
- **Export Consumption** โ Previous day kWh exported to the grid (read from the export meter point)
|
|
82
|
+
|
|
83
|
+
### ๐ Home Energy (Octopus Home Mini)
|
|
84
|
+
- **Live Demand** โ Real-time grid import in kW
|
|
85
|
+
- **Period Consumption** โ Energy consumed in the last half-hour period (kWh)
|
|
86
|
+
- Requires Octopus Home Mini device registered to your account (opt-in)
|
|
87
|
+
|
|
88
|
+
### ๐ฐ Account & Rewards
|
|
89
|
+
- **Account Balance** โ Current credit/debit balance in ยฃ
|
|
90
|
+
- **Saving Sessions** โ Next session availability, start/end times, joined status, and Octopus Points
|
|
91
|
+
- **Free Electricity** โ Upcoming free electricity window detection (active JuneโOctober)
|
|
92
|
+
- **Wheel of Fortune** โ Remaining electricity and gas spins (opt-in)
|
|
93
|
+
- **Octoplus** โ Enrollment status and loyalty points
|
|
94
|
+
|
|
95
|
+
### ๐ง Advanced Features
|
|
96
|
+
- **Account Discovery** โ Automatic product detection at startup; categories auto-enable based on registered products
|
|
97
|
+
- **Per-Category Polling** โ Each data category polls on its own configurable interval
|
|
98
|
+
- **Manual Refresh Button** โ Force API refresh from Home Assistant (30s cooldown)
|
|
99
|
+
- **Next Poll Timer** โ See when the next automatic refresh will occur
|
|
100
|
+
- **API Usage Tracking** โ Monitor requests and complexity in diagnostics
|
|
101
|
+
- **Exponential Backoff** โ Smart retry prevents sensor unavailability
|
|
102
|
+
- **Comprehensive Debugging** โ Full API call tracking in msg.debug
|
|
103
|
+
|
|
104
|
+
### ๐ก Home Assistant Integration
|
|
105
|
+
- **Zero Configuration** โ MQTT auto-discovery sets everything up
|
|
106
|
+
- **Two-Tier Entity Organisation** โ Main entities (controls, live rates, consumption, tariff metadata, rewards) and Diagnostics (errors, raw timestamps, API metrics, locale timestamps)
|
|
107
|
+
- **Suggested Area** โ Auto-suggests "Energy" area
|
|
108
|
+
- **Reference dashboard YAML** โ `examples/ha-dashboard.yaml` covers every entity (including the Smart Charging and Charge Cap switches) in a packed sections layout, ready to paste into HA's Raw Configuration Editor
|
|
109
|
+
- **Node-RED Dashboard 2.0 example** โ `examples/node-red-dashboard-flow.json` is an importable [@flowfuse/node-red-dashboard](https://github.com/FlowFuse/node-red-dashboard) flow whose Controls page has the target limit, all 48 ready-by times, the Smart Charging and Charge Cap switches, refresh and timezone override
|
|
110
|
+
|
|
111
|
+
### ๐ Timezone Support
|
|
112
|
+
- **Locale Timestamps** (`*_locale` fields) โ always in server auto-detected timezone
|
|
113
|
+
- **Resolved Display Fields** โ slot and window times in your configured timezone
|
|
114
|
+
- **HA Timezone Select** โ change timezone from Home Assistant without redeploying
|
|
115
|
+
- **Node Config Override** โ set IANA timezone directly in the node editor
|
|
116
|
+
- **Zero Dependencies** โ native `Intl` API, no new packages
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## ๐ธ Screenshots
|
|
121
|
+
|
|
122
|
+
### Node Configuration
|
|
123
|
+
|
|
124
|
+

|
|
125
|
+
|
|
126
|
+
Configure your account credentials, polling intervals, and MQTT broker in the node editor. The MQTT Broker dropdown connects directly to your Home Assistant Mosquitto instance. Per-category intervals let you tune how often each data source is polled โ electricity and gas rates update hourly by default, while Home Mini polls every minute for live demand.
|
|
127
|
+
|
|
128
|
+
### Node-RED Flow Example
|
|
129
|
+
|
|
130
|
+

|
|
131
|
+
|
|
132
|
+
### Home Assistant โ Dashboard
|
|
133
|
+
|
|
134
|
+
`examples/ha-dashboard.yaml` is a comprehensive Lovelace dashboard that exposes every entity the plugin publishes. Paste it into HA's Raw Configuration Editor to get the layout below. The layout uses HA's sections view and packs cards uniformly across up to 4 columns on wide screens. The EV controls card includes the Smart Charging and Charge Cap switches (the screenshots below predate the Charge Cap switch).
|
|
135
|
+
|
|
136
|
+
#### EV controls, electricity import & export
|
|
137
|
+
|
|
138
|
+

|
|
139
|
+
|
|
140
|
+
EV target slider and ready-time dropdown at top, then live import rate / standing / today's kWh, full import tariff card, half-hourly applicable rates summary, and the same trio for export (live export rate, export tariff, export consumption, half-hourly Agile Outgoing rates).
|
|
141
|
+
|
|
142
|
+
#### Gas, account, rewards, Home Mini
|
|
143
|
+
|
|
144
|
+

|
|
145
|
+
|
|
146
|
+
Gas rate / standing / consumption + tariff. Account balance, Octoplus enrolment, Saving Sessions card, Free Electricity card, Wheel of Fortune spins, and the Home Mini live-demand gauge with current half-hour kWh.
|
|
147
|
+
|
|
148
|
+
#### Diagnostics โ UTC timestamps, raw timestamps, errors
|
|
149
|
+
|
|
150
|
+

|
|
151
|
+
|
|
152
|
+
UTC-class slot/window timestamps (HA renders them as relative "n hours ago"), raw API strings for verbatim debugging, timezone + API usage rows, and a consolidated error panel covering every category.
|
|
153
|
+
|
|
154
|
+
#### Gas โ live data from a real account
|
|
155
|
+
|
|
156
|
+

|
|
157
|
+
|
|
158
|
+
For accounts with a gas meter point, the gas card populates with live tariff code, unit rate (p/kWh), standing charge, daily consumption (kWh), and tariff validity dates. Above shows v1.3.0 reading correctly from a real account on Octopus standard variable gas tariff.
|
|
159
|
+
|
|
160
|
+
#### Seasonal / conditional entities โ when they show "Unavailable"
|
|
161
|
+
|
|
162
|
+
| Sensor | Active period | Outside season / condition |
|
|
163
|
+
|---|---|---|
|
|
164
|
+
| Saving Session Start / End | OctoberโMarch | `null` โ no sessions scheduled |
|
|
165
|
+
| Free Electricity Start / End | typically JuneโOctober | `null` โ no sessions scheduled |
|
|
166
|
+
| Electricity / Gas Tariff Valid To | When tariff has an end date | `null` โ open-ended tariff |
|
|
167
|
+
| Gas entities | Only if account has a gas meter point | `null` โ electricity-only accounts |
|
|
168
|
+
| Home Mini | Only if a Home Mini device is registered | Entity skipped if not registered |
|
|
169
|
+
| Electricity Export entities | Only if account has an OUTGOING agreement | Entity values null without an export tariff |
|
|
170
|
+
| EV planned slots / dispatches | Only when a charge is scheduled | `null` between plug-in cycles |
|
|
171
|
+
|
|
172
|
+
These are normal MQTT behaviours, not bugs. The plugin publishes the entity definitions so HA registers them; their values populate when the API returns data for that period.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## ๐ Requirements
|
|
177
|
+
|
|
178
|
+
- **Node-RED** v2.0+
|
|
179
|
+
- **Octopus Energy Account** โ any electricity account works for rates/consumption/account data
|
|
180
|
+
- [Intelligent Octopus Go](https://octopus.energy/intelligent/) tariff required for EV charging features
|
|
181
|
+
- Octopus Home Mini device required for real-time consumption (opt-in)
|
|
182
|
+
- Wheel of Fortune is opt-in and requires an active electricity agreement
|
|
183
|
+
- **API Key** โ [Generate here](https://octopus.energy/dashboard/new/accounts/personal-details/api-access)
|
|
184
|
+
- **MQTT Broker** (optional, for Home Assistant integration)
|
|
185
|
+
- **Home Assistant** (optional, for MQTT features)
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## ๐ Quick Start
|
|
190
|
+
|
|
191
|
+
### 1. Install via Node-RED Palette
|
|
192
|
+
|
|
193
|
+
1. Open Node-RED โ **Menu** โ **Manage Palette**
|
|
194
|
+
2. **Install** tab โ Search `node-red-contrib-octopus-intelligent`
|
|
195
|
+
3. Click **Install**
|
|
196
|
+
|
|
197
|
+
### 2. Get Your Credentials
|
|
198
|
+
|
|
199
|
+
**Account Number** (format: `A-XXXXXXXX`):
|
|
200
|
+
- Found at https://octopus.energy/dashboard/
|
|
201
|
+
|
|
202
|
+
**API Key** (format: `sk_live_...`):
|
|
203
|
+
- Get from https://octopus.energy/dashboard/new/accounts/personal-details/api-access
|
|
204
|
+
- Click "Generate API Key"
|
|
205
|
+
|
|
206
|
+
### 3. Configure the Node
|
|
207
|
+
|
|
208
|
+
1. Drag **Octopus Intelligent** into your flow
|
|
209
|
+
2. Double-click to configure:
|
|
210
|
+
- Account Number (format: `A-XXXXXXXX`)
|
|
211
|
+
- API Key (stored securely)
|
|
212
|
+
- Refresh Interval (default: 5 min โ controls EV charging data polling)
|
|
213
|
+
- Per-category polling intervals (electricity, gas, etc.)
|
|
214
|
+
- โ Enable Home Mini โ tick if you have an Octopus Home Mini device
|
|
215
|
+
- โ Enable Wheel of Fortune โ tick to track remaining spins
|
|
216
|
+
- Enable MQTT if using Home Assistant and select your MQTT broker
|
|
217
|
+
3. **Deploy** โ account discovery runs automatically and enables categories based on your registered products
|
|
218
|
+
|
|
219
|
+
### 4. Home Assistant (Optional)
|
|
220
|
+
|
|
221
|
+
If MQTT enabled:
|
|
222
|
+
1. Wait ~5 seconds after deploy
|
|
223
|
+
2. **Settings** โ **Devices & Services** โ **MQTT**
|
|
224
|
+
3. Find "Octopus Intelligent" device
|
|
225
|
+
4. All entities created automatically โ no YAML required
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## โฌ๏ธ Upgrading from v1.2.x
|
|
230
|
+
|
|
231
|
+
v1.3.0 is additive โ no breaking changes. Existing flows, automations, and dashboards continue working unchanged.
|
|
232
|
+
|
|
233
|
+
**What happens on upgrade:**
|
|
234
|
+
- All existing entity IDs are preserved (HA's MQTT integration matches by `unique_id`, which is stable)
|
|
235
|
+
- All v1.2.x payload fields remain in the same positions
|
|
236
|
+
- ~70 new sensors appear in Home Assistant automatically after first poll โ electricity import/export tariff and rates, gas tariff and consumption, Home Mini, Octoplus, saving sessions, free electricity, Wheel of Fortune, account balance, applicable rates
|
|
237
|
+
- New node config options (Home Mini, Wheel of Fortune) default to off
|
|
238
|
+
- Two existing Octoplus booleans (`octoplus_enrolled`, `octoplus_loyalty_points_user`) move from `sensor.` to `binary_sensor.` domain โ a fresh install picks the right domain automatically; a clean upgrade may register both. Delete the old `sensor.` entries via Dev Tools if you want a tidy device card.
|
|
239
|
+
|
|
240
|
+
If you installed an early dev build of v1.3 and have stale entities in Home Assistant, see [Stale Entities After Early v1.3 Dev Build](#stale-entities-after-early-v13-dev-build) in the Troubleshooting section.
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## ๐ Home Assistant Entities
|
|
245
|
+
|
|
246
|
+
**164 MQTT entities** are published under a single **Octopus Intelligent** device on a fresh install. All entities are organised into two tiers: **Main** (controls, live data, tariff metadata, rewards) and **Diagnostics** (errors, raw timestamps, locale timestamps, API metrics).
|
|
247
|
+
|
|
248
|
+
If your device card shows more than 164 entities, the extras are likely leftovers from earlier installed versions or interrupted discovery. They can be deleted via Settings โ Devices & Services โ MQTT โ Octopus Intelligent โ entity โ cog โ "Delete from registry" without affecting current operation.
|
|
249
|
+
|
|
250
|
+
### Node-RED payload vs MQTT entities
|
|
251
|
+
|
|
252
|
+
`msg.payload` from the Node-RED node contains **~133 fields**. Some payload fields are intentionally **not** exposed as individual HA entities; they exist for template/automation use inside Node-RED or HA Jinja:
|
|
253
|
+
|
|
254
|
+
| Category | Fields (count) | Why no MQTT entity |
|
|
255
|
+
|---|---|---|
|
|
256
|
+
| Bulk array data | `applicable_rates`, `electricity_export_rate`, `completed_dispatches`, `flex_planned_dispatches` (4) | Each is an array of 48 half-hour slots or N dispatches. Exposing each row as an MQTT entity would clutter the registry. The `_count` summary entity exists; consume the full array via templates / `apexcharts-card` for visualisation. |
|
|
257
|
+
| Pending controls | `pending_limit`, `pending_time` (2) | The number/select control entities (`Target Charge`, `Ready By`) render the pending value through their own `value_template`. No separate sensor entity needed. |
|
|
258
|
+
| Import rate adjacency | `applicable_rates_prev_pence`, `_prev_gbp`, `_prev_to`, `_next_pence`, `_next_gbp`, `_next_from` (6) | Available in `msg.payload` for templates / dashboards. Export equivalents (`electricity_export_rate_prev_*` / `_next_*`) ARE exposed as MQTT entities โ the inconsistency is intentional pending v1.4 promotion. |
|
|
259
|
+
| Cost placeholders | `electricity_consumption_cost`, `gas_consumption_cost` (2) | Reserved for future cost-calculation feature (consumption ร rate). Always `null` in v1.3. |
|
|
260
|
+
| Vestigial | `saving_session_points` (1) | Octopus moved loyalty points out of saving sessions into the Octoplus query. The payload field remains for backward compatibility but is always `null`; use `binary_sensor.octopus_intelligent_octopus_octoplus_loyalty_points` instead. |
|
|
261
|
+
|
|
262
|
+
**Implication for HA users:** every value you might want to display is reachable. Direct values use the MQTT entity. Adjacent-slot import rates require an MQTT template sensor reading from `applicable_rates_prev_pence` etc. (or use the Node-RED debug node to inspect the full payload).
|
|
263
|
+
|
|
264
|
+
**Why the import / export asymmetry?** Phase 2 of v1.3.0 added the full export rate ecosystem as new MQTT entities. The pre-existing import prev/next fields were added in v1.0 as payload-only and weren't promoted at the time. Promoting them is straightforward but was descoped from v1.3 to keep release scope tight; tracked for v1.4.
|
|
265
|
+
|
|
266
|
+
### Controls
|
|
267
|
+
|
|
268
|
+
Interactive entities that accept commands. **Timezone**, **Smart Charging** and **Charge Cap** still carry the HA `entity_category: config` flag (they ARE user-configurable, so the category is semantically correct).
|
|
269
|
+
|
|
270
|
+
| Name | Description |
|
|
271
|
+
|---|---|
|
|
272
|
+
| Octopus Target Charge | Slider (5โ100%) โ set desired battery charge level; shows the pending value until applied |
|
|
273
|
+
| Octopus Ready Time | Dropdown (00:00โ23:30, half-hour slots) โ time by which the car must be ready. Other values are rejected with an error and nothing is sent to Octopus |
|
|
274
|
+
| Octopus Apply Changes | Submit pending limit/time changes to the Octopus API |
|
|
275
|
+
| Octopus Refresh API | Force an immediate API refresh (30-second cooldown enforced) |
|
|
276
|
+
| Timezone | Display timezone for all slot and window times โ 15 IANA options; persists across Node-RED restarts |
|
|
277
|
+
| Smart Charging | Enable (unsuspend) or disable (suspend) Octopus intelligent charging |
|
|
278
|
+
| Charge Cap | Limit smart charging to off-peak rates only (as in the Octopus app) |
|
|
279
|
+
|
|
280
|
+
### Binary Sensors
|
|
281
|
+
|
|
282
|
+
| Name | Description |
|
|
283
|
+
|---|---|
|
|
284
|
+
| Octopus Charging Now | `ON` while the EV is actively inside a dispatch charging slot |
|
|
285
|
+
| Octopus Saving Session Available | `ON` if a saving session is upcoming or joinable |
|
|
286
|
+
| Octopus Free Electricity Active | `ON` while a free electricity window is in progress right now |
|
|
287
|
+
| Octopus Free Electricity Available | `ON` if a free electricity window is scheduled in the future |
|
|
288
|
+
| Octopus Octoplus Enrolled | `ON` if the account is enrolled in Octoplus |
|
|
289
|
+
| Octopus Octoplus Loyalty Points | `ON` if the account participates in Octoplus loyalty points (boolean flag from the API) |
|
|
290
|
+
|
|
291
|
+
### Main Sensors โ EV Charging
|
|
292
|
+
|
|
293
|
+
| Name | Description |
|
|
294
|
+
|---|---|
|
|
295
|
+
| Octopus Confirmed Charge Limit | API-confirmed target charge percentage โ last setting accepted by Octopus |
|
|
296
|
+
| Octopus Confirmed Ready Time | API-confirmed ready time โ last setting accepted by Octopus |
|
|
297
|
+
| Octopus Next Charge Time | Start time of the next planned charging slot (display timezone) |
|
|
298
|
+
| Octopus Total Planned Energy | Total kWh across all upcoming planned dispatch slots |
|
|
299
|
+
| Octopus Next Slot Energy | Energy (kWh) scheduled for the next individual slot |
|
|
300
|
+
| Octopus Charge Source | Source of next charge: `smart-charge` (scheduled by Octopus algorithm) or `bump-charge` (car plugged in outside schedule) |
|
|
301
|
+
| Octopus Slot 1 Start | Start time of planned slot 1 |
|
|
302
|
+
| Octopus Slot 1 End | End time of planned slot 1 |
|
|
303
|
+
| Octopus Slot 2 Start | Start time of planned slot 2 (`null` if fewer than 2 slots) |
|
|
304
|
+
| Octopus Slot 2 End | End time of planned slot 2 |
|
|
305
|
+
| Octopus Slot 3 Start | Start time of planned slot 3 (`null` if fewer than 3 slots) |
|
|
306
|
+
| Octopus Slot 3 End | End time of planned slot 3 |
|
|
307
|
+
| Octopus Overall Window Start | Start of the first planned slot โ when the charging window opens |
|
|
308
|
+
| Octopus Overall Window End | End of the last planned slot โ when the charging window closes |
|
|
309
|
+
| Octopus Completed Dispatches | Count of completed intelligent dispatch sessions on record |
|
|
310
|
+
| Octopus Flex Planned Dispatches | Count of upcoming flex dispatch slots |
|
|
311
|
+
|
|
312
|
+
### Main Sensors โ Electricity (Import)
|
|
313
|
+
|
|
314
|
+
| Name | Description |
|
|
315
|
+
|---|---|
|
|
316
|
+
| Octopus Electricity Standing Charge | Daily electricity standing charge (p/day) from current tariff |
|
|
317
|
+
| Octopus Electricity Consumption | Electricity consumed in the previous day (kWh) from the import meter |
|
|
318
|
+
| Octopus Current Electricity Rate | Live unit rate (p/kWh) from the 24h applicable rates schedule โ use this on half-hourly tariffs (e.g. Intelligent Octopus Go) instead of Electricity Unit Rate |
|
|
319
|
+
| Octopus Electricity Rate | Live unit rate in GBP/kWh โ measurement state class, ready for the HA Energy Dashboard |
|
|
320
|
+
| Octopus Electricity Unit Rate | Fixed unit rate (p/kWh) โ `null` on half-hourly tariffs |
|
|
321
|
+
| Octopus Electricity Tariff Code | Current import tariff product code |
|
|
322
|
+
| Octopus Electricity Tariff Valid From / Valid To | Validity window of the current import tariff (`Valid To` is `null` for open-ended tariffs) |
|
|
323
|
+
|
|
324
|
+
### Main Sensors โ Electricity (Export)
|
|
325
|
+
|
|
326
|
+
| Name | Description |
|
|
327
|
+
|---|---|
|
|
328
|
+
| Octopus Electricity Export Standing Charge | Daily export standing charge (p/day) โ typically `0` for Agile Outgoing |
|
|
329
|
+
| Octopus Electricity Export Consumption | Electricity exported to the grid in the previous day (kWh) from the export meter |
|
|
330
|
+
| Octopus Current Electricity Export Rate | Live export rate (p/kWh) for the current half-hour slot |
|
|
331
|
+
| Octopus Electricity Export Rate | Live export rate (GBP/kWh) โ measurement state class |
|
|
332
|
+
| Octopus Electricity Export Unit Rate | Fixed unit rate โ `null` on half-hourly export tariffs (e.g. Agile Outgoing) |
|
|
333
|
+
| Octopus Electricity Export Tariff Code | Current export tariff product code (e.g. `AGILE-OUTGOING-19-05-13`) |
|
|
334
|
+
| Octopus Electricity Export Tariff Valid From / Valid To | Validity window of the current export tariff |
|
|
335
|
+
|
|
336
|
+
### Main Sensors โ Gas
|
|
337
|
+
|
|
338
|
+
| Name | Description |
|
|
339
|
+
|---|---|
|
|
340
|
+
| Octopus Gas Standing Charge | Daily gas standing charge (p/day) from current tariff |
|
|
341
|
+
| Octopus Gas Consumption | Gas consumed in the previous day (kWh) |
|
|
342
|
+
| Octopus Gas Unit Rate | Gas unit rate (p/kWh) |
|
|
343
|
+
| Octopus Gas Tariff Code | Gas product code |
|
|
344
|
+
| Octopus Gas Tariff Valid From / Valid To | Validity window of the current gas tariff |
|
|
345
|
+
|
|
346
|
+
### Main Sensors โ Account & Rewards
|
|
347
|
+
|
|
348
|
+
| Name | Description |
|
|
349
|
+
|---|---|
|
|
350
|
+
| Octopus Account Balance | Current account credit or debit balance (ยฃ) |
|
|
351
|
+
| Octopus Saving Session Joined | Whether you have joined the current saving session campaign |
|
|
352
|
+
| Octopus WoF Electricity Spins | Wheel of Fortune electricity spins remaining (opt-in) |
|
|
353
|
+
| Octopus WoF Gas Spins | Wheel of Fortune gas spins remaining (opt-in) |
|
|
354
|
+
|
|
355
|
+
### Main Sensors โ Home Mini
|
|
356
|
+
|
|
357
|
+
| Name | Description |
|
|
358
|
+
|---|---|
|
|
359
|
+
| Octopus Home Mini Demand | Real-time grid import in kW โ requires Octopus Home Mini and opt-in checkbox in node config |
|
|
360
|
+
| Octopus Home Mini Period Consumption | Energy consumed in the current half-hour period (kWh) |
|
|
361
|
+
|
|
362
|
+
### Main Sensors โ Account, Octoplus, Rewards (continued)
|
|
363
|
+
|
|
364
|
+
The following appear in the main device entity list (not the Diagnostics tab):
|
|
365
|
+
|
|
366
|
+
| Name | Description |
|
|
367
|
+
|---|---|
|
|
368
|
+
| Octopus Octoplus Status | Octoplus enrollment status string (e.g. `ENROLLED`) |
|
|
369
|
+
| Octopus Saving Session Start / End | Start and end of the next saving session (`null` outside OctoberโMarch) |
|
|
370
|
+
| Octopus Free Electricity Start / End | Start and end of the next free electricity window (`null` outside the active period) |
|
|
371
|
+
|
|
372
|
+
### Diagnostic Sensors
|
|
373
|
+
|
|
374
|
+
Appears under the **Diagnostics** tab of the HA device card.
|
|
375
|
+
|
|
376
|
+
#### Polling & Refresh
|
|
377
|
+
|
|
378
|
+
| Name | Description |
|
|
379
|
+
|---|---|
|
|
380
|
+
| Octopus Next Poll Time | Timestamp of the next scheduled automatic API refresh |
|
|
381
|
+
| Octopus Refresh Available At | Timestamp when the manual refresh cooldown expires (`null` = available now) |
|
|
382
|
+
|
|
383
|
+
#### API Usage
|
|
384
|
+
|
|
385
|
+
| Name | Description |
|
|
386
|
+
|---|---|
|
|
387
|
+
| Octopus API Requests (Last Hour) | Number of API calls made in the last 60 minutes |
|
|
388
|
+
| Octopus API Complexity (Last Hour) | Total estimated GraphQL complexity used in the last hour |
|
|
389
|
+
| Octopus API Complexity Usage | Percentage of the 50,000/hour GraphQL complexity limit consumed |
|
|
390
|
+
|
|
391
|
+
#### Raw Timestamps (UTC)
|
|
392
|
+
|
|
393
|
+
Exact UTC strings from the API, unaffected by timezone settings. Use these when you need unambiguous UTC values in automations.
|
|
394
|
+
|
|
395
|
+
| Name | Description |
|
|
396
|
+
|---|---|
|
|
397
|
+
| Octopus Next Charge Time (Raw) | Next charge time โ exact UTC string from API |
|
|
398
|
+
| Octopus Next Poll Time (Raw) | Next poll time โ exact UTC string |
|
|
399
|
+
| Octopus Slot 1 Start (Raw) | Slot 1 start โ exact UTC from API |
|
|
400
|
+
| Octopus Slot 1 End (Raw) | Slot 1 end โ exact UTC from API |
|
|
401
|
+
| Octopus Slot 2 Start (Raw) | Slot 2 start โ exact UTC from API |
|
|
402
|
+
| Octopus Slot 2 End (Raw) | Slot 2 end โ exact UTC from API |
|
|
403
|
+
| Octopus Slot 3 Start (Raw) | Slot 3 start โ exact UTC from API |
|
|
404
|
+
| Octopus Slot 3 End (Raw) | Slot 3 end โ exact UTC from API |
|
|
405
|
+
| Octopus Overall Window Start (Raw) | Window start โ exact UTC from API |
|
|
406
|
+
| Octopus Overall Window End (Raw) | Window end โ exact UTC from API |
|
|
407
|
+
|
|
408
|
+
#### Server-Timezone Timestamps (Locale)
|
|
409
|
+
|
|
410
|
+
Times in the Node-RED server's auto-detected timezone. Unlike display fields, these are never affected by the Timezone selector or `set_timezone` command.
|
|
411
|
+
|
|
412
|
+
| Name | Description |
|
|
413
|
+
|---|---|
|
|
414
|
+
| Octopus Next Charge Time (Locale) | Next charge time in Node-RED server timezone |
|
|
415
|
+
| Octopus Slot 1 Start (Locale) | Slot 1 start in server timezone |
|
|
416
|
+
| Octopus Slot 1 End (Locale) | Slot 1 end in server timezone |
|
|
417
|
+
| Octopus Slot 2 Start (Locale) | Slot 2 start in server timezone |
|
|
418
|
+
| Octopus Slot 2 End (Locale) | Slot 2 end in server timezone |
|
|
419
|
+
| Octopus Slot 3 Start (Locale) | Slot 3 start in server timezone |
|
|
420
|
+
| Octopus Slot 3 End (Locale) | Slot 3 end in server timezone |
|
|
421
|
+
| Octopus Overall Window Start (Locale) | Window start in server timezone |
|
|
422
|
+
| Octopus Overall Window End (Locale) | Window end in server timezone |
|
|
423
|
+
| Octopus Timezone Detected | IANA timezone auto-detected from the Node-RED server (e.g. `Europe/London`) |
|
|
424
|
+
| Octopus Timezone Applied | Active timezone currently used for all display timestamp fields |
|
|
425
|
+
|
|
426
|
+
#### Consumption Metadata
|
|
427
|
+
|
|
428
|
+
| Name | Description |
|
|
429
|
+
|---|---|
|
|
430
|
+
| Octopus Electricity Consumption From | Start of the electricity (import) consumption measurement period |
|
|
431
|
+
| Octopus Electricity Consumption To | End of the electricity (import) consumption measurement period |
|
|
432
|
+
| Octopus Electricity Export Consumption From | Start of the export consumption measurement period |
|
|
433
|
+
| Octopus Electricity Export Consumption To | End of the export consumption measurement period |
|
|
434
|
+
| Octopus Gas Consumption From | Start of the gas consumption measurement period |
|
|
435
|
+
| Octopus Gas Consumption To | End of the gas consumption measurement period |
|
|
436
|
+
|
|
437
|
+
#### Applicable Rates โ Import + Export
|
|
438
|
+
|
|
439
|
+
| Name | Description |
|
|
440
|
+
|---|---|
|
|
441
|
+
| Octopus Applicable Rates Slots | Number of import rate slots in the current 24-hour window |
|
|
442
|
+
| Octopus Electricity Export Rate Slots | Number of export rate slots in the current 24-hour window |
|
|
443
|
+
| Octopus Electricity Export Rate Prev | Previous half-hour export rate (p/kWh) |
|
|
444
|
+
| Octopus Electricity Export Rate Prev Ends | Timestamp when the previous export slot ended |
|
|
445
|
+
| Octopus Electricity Export Rate Next | Next half-hour export rate (p/kWh) |
|
|
446
|
+
| Octopus Electricity Export Rate Next From | Timestamp when the next export slot begins |
|
|
447
|
+
|
|
448
|
+
#### Error & Detail Sensors
|
|
449
|
+
|
|
450
|
+
`null` = healthy. Non-null = the last error message from that API category.
|
|
451
|
+
|
|
452
|
+
| Name | Description |
|
|
453
|
+
|---|---|
|
|
454
|
+
| Octopus Electricity Rates Error | Last error fetching electricity rates |
|
|
455
|
+
| Octopus Electricity Consumption Error | Last error fetching electricity consumption |
|
|
456
|
+
| Octopus Gas Rates Error | Last error fetching gas rates |
|
|
457
|
+
| Octopus Gas Consumption Error | Last error fetching gas consumption |
|
|
458
|
+
| Octopus Applicable Rates Error | Last error fetching the import applicable rates schedule |
|
|
459
|
+
| Octopus Electricity Export Rate Error | Last error fetching the export applicable rates schedule |
|
|
460
|
+
| Octopus Account Balance (Pence) | Account balance in pence (raw integer) |
|
|
461
|
+
| Octopus Account Error | Last error fetching account data |
|
|
462
|
+
| Octopus Octoplus Error | Last error fetching Octoplus data |
|
|
463
|
+
| Octopus WoF Electricity Max | Maximum Wheel of Fortune electricity spins allowed per period |
|
|
464
|
+
| Octopus WoF Electricity Used | Wheel of Fortune electricity spins used this period |
|
|
465
|
+
| Octopus WoF Gas Max | Maximum Wheel of Fortune gas spins allowed per period |
|
|
466
|
+
| Octopus WoF Gas Used | Wheel of Fortune gas spins used this period |
|
|
467
|
+
| Octopus WoF Error | Last error fetching Wheel of Fortune data |
|
|
468
|
+
| Octopus Home Mini Reading Time | Timestamp of the most recent Home Mini telemetry reading |
|
|
469
|
+
| Octopus Home Mini Error | Last error fetching Home Mini data |
|
|
470
|
+
| Octopus Saving Sessions Error | Last error fetching saving sessions data |
|
|
471
|
+
| Octopus Free Electricity Error | Last error fetching free electricity data |
|
|
472
|
+
| Octopus Completed Dispatches Error | Last error fetching completed dispatch history |
|
|
473
|
+
| Octopus Flex Planned Dispatches Error | Last error fetching flex planned dispatch schedule |
|
|
474
|
+
| Octopus Intelligent Error | Last error from the intelligent charging (EV slots) query |
|
|
475
|
+
|
|
476
|
+
---
|
|
477
|
+
|
|
478
|
+
## ๐ Free Electricity & Seasonal Sensors
|
|
479
|
+
|
|
480
|
+
Octopus Energy runs free electricity sessions (typically JuneโOctober) and saving sessions (typically OctoberโMarch). The node polls for both and exposes binary sensors for automation use.
|
|
481
|
+
|
|
482
|
+
### Free Electricity
|
|
483
|
+
- **`binary_sensor.octopus_free_electricity_active`** โ `ON` while a free window is in progress right now
|
|
484
|
+
- **`binary_sensor.octopus_free_electricity_available`** โ `ON` if an upcoming free window is scheduled
|
|
485
|
+
|
|
486
|
+
Use these to automatically start charging your car or battery when electricity is free:
|
|
487
|
+
|
|
488
|
+
```yaml
|
|
489
|
+
automation:
|
|
490
|
+
- alias: "Charge during free electricity"
|
|
491
|
+
trigger:
|
|
492
|
+
platform: state
|
|
493
|
+
entity_id: binary_sensor.octopus_free_electricity_active
|
|
494
|
+
to: "on"
|
|
495
|
+
action:
|
|
496
|
+
service: switch.turn_on
|
|
497
|
+
target:
|
|
498
|
+
entity_id: switch.battery_charger
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
### Saving Sessions
|
|
502
|
+
- **`binary_sensor.octopus_saving_session_available`** โ `ON` if a saving session is upcoming
|
|
503
|
+
- **`sensor.octopus_saving_session_start`** / **`sensor.octopus_saving_session_end`** โ start and end times
|
|
504
|
+
|
|
505
|
+
### Why These Sensors Are Null Outside Season
|
|
506
|
+
|
|
507
|
+
The Octopus API only returns free electricity and saving session data when those programmes are active. Outside their respective seasons the API returns an empty list (or in the case of saving sessions, the query itself is unavailable). The node handles this gracefully:
|
|
508
|
+
|
|
509
|
+
- Binary sensors remain `OFF` (not `unavailable`)
|
|
510
|
+
- Timestamp sensors (`saving_session_start`, `free_electricity_start`, etc.) return `null`
|
|
511
|
+
- In Home Assistant, `null`-valued configuration sensors may show as **unavailable** โ this is normal and expected
|
|
512
|
+
|
|
513
|
+
---
|
|
514
|
+
|
|
515
|
+
## ๐ Timezone Configuration
|
|
516
|
+
|
|
517
|
+
By default, slot and window times are converted to the **server's auto-detected timezone** (wherever Node-RED is running). Three ways to configure:
|
|
518
|
+
|
|
519
|
+
### Option 1: Node Config (static)
|
|
520
|
+
Set a fixed IANA timezone in the node editor:
|
|
521
|
+
- Open node โ **Timezone** field โ type `Australia/Sydney`
|
|
522
|
+
- Leave blank to use server auto-detect
|
|
523
|
+
|
|
524
|
+
### Option 2: Home Assistant Select (dynamic, persists across restarts)
|
|
525
|
+
Use the **Timezone** select entity in Home Assistant:
|
|
526
|
+
- Home Assistant โ Octopus Intelligent device โ Timezone
|
|
527
|
+
- Change takes effect on next poll
|
|
528
|
+
- Persists across Node-RED restarts
|
|
529
|
+
|
|
530
|
+
### Option 3: `set_timezone` Input Command
|
|
531
|
+
```javascript
|
|
532
|
+
msg.payload = { set_timezone: "Europe/London" };
|
|
533
|
+
// Send to Octopus Intelligent node input
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
### Timestamp Tiers
|
|
537
|
+
| Field suffix | Timezone | Configurable? |
|
|
538
|
+
|---|---|---|
|
|
539
|
+
| `*_raw` | Always UTC (exact API string) | Never |
|
|
540
|
+
| `*_locale` | Server auto-detected | Never (always server TZ) |
|
|
541
|
+
| Display fields (`slot1_start`, `window_start`, etc.) | Resolved TZ | Yes โ via HA, config, or command |
|
|
542
|
+
|
|
543
|
+
### Supported Timezones (HA select)
|
|
544
|
+
`Europe/London`, `Europe/Berlin`, `Europe/Madrid`, `Australia/Sydney`, `Australia/Melbourne`, `Australia/Brisbane`, `Australia/Perth`, `Australia/Adelaide`, `Pacific/Auckland`, `America/New_York`, `America/Chicago`, `America/Denver`, `America/Los_Angeles`, `Asia/Tokyo`, `UTC`
|
|
545
|
+
|
|
546
|
+
Any valid IANA timezone works in the node config field or `set_timezone` command.
|
|
547
|
+
|
|
548
|
+
---
|
|
549
|
+
|
|
550
|
+
## ๐ก Node-RED Usage
|
|
551
|
+
|
|
552
|
+
### Basic Monitoring
|
|
553
|
+
|
|
554
|
+
```
|
|
555
|
+
[Inject: Every 5 min] โ [Octopus Intelligent] โ [Debug]
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
### Set Preferences from Flow
|
|
559
|
+
|
|
560
|
+
```javascript
|
|
561
|
+
msg.payload = {
|
|
562
|
+
set_limit: 85, // 85% charge
|
|
563
|
+
set_time: "07:30" // Ready by 07:30
|
|
564
|
+
};
|
|
565
|
+
return msg;
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
Ready-by time: any half-hour slot from 00:00 to 23:30 (matches the Octopus app). Other values are rejected with an error and nothing is sent to Octopus. Charge limit values clamp to 5โ100 and round to 5; non-numeric values and `set_limit: 0` are rejected.
|
|
569
|
+
|
|
570
|
+
### Set Timezone from Flow
|
|
571
|
+
|
|
572
|
+
```javascript
|
|
573
|
+
msg.payload = { set_timezone: "Australia/Sydney" };
|
|
574
|
+
return msg;
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
### Toggle Smart Charging from Flow
|
|
578
|
+
|
|
579
|
+
```javascript
|
|
580
|
+
msg.payload = { set_smart_charging: true }; // enable (unsuspend)
|
|
581
|
+
msg.payload = { set_smart_charging: false }; // disable (suspend)
|
|
582
|
+
return msg;
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
**Example: suspend charging when home battery is in use**
|
|
586
|
+
```
|
|
587
|
+
[Inject: suspend] โ [Function: set_smart_charging=false] โ [Octopus Intelligent]
|
|
588
|
+
[Inject: resume] โ [Function: set_smart_charging=true] โ [Octopus Intelligent]
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
### `set_charge_cap`
|
|
592
|
+
|
|
593
|
+
```js
|
|
594
|
+
msg.payload = { set_charge_cap: true }; // limit smart charging to off-peak rates only
|
|
595
|
+
msg.payload = { set_charge_cap: false };
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
Non-boolean values are ignored. Also available as the **Charge Cap** switch in Home Assistant.
|
|
599
|
+
|
|
600
|
+
### Combining commands
|
|
601
|
+
|
|
602
|
+
One message can carry several commands, and each is applied independently:
|
|
603
|
+
|
|
604
|
+
```js
|
|
605
|
+
msg.payload = { set_limit: 90, set_time: "06:30", set_charge_cap: true };
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
`set_limit` and `set_time` are sent to Octopus together, so an invalid value in either rejects both; other commands in the same message still apply.
|
|
609
|
+
|
|
610
|
+
### Output Format
|
|
611
|
+
|
|
612
|
+
```json
|
|
613
|
+
{
|
|
614
|
+
"payload": {
|
|
615
|
+
"next_start": "2026-05-03 01:30:00+01:00",
|
|
616
|
+
"total_energy": 42.5,
|
|
617
|
+
"next_kwh": "15.20",
|
|
618
|
+
"next_source": "smart-charge",
|
|
619
|
+
"confirmed_limit": 80,
|
|
620
|
+
"confirmed_time": "07:00",
|
|
621
|
+
"pending_limit": 80,
|
|
622
|
+
"pending_time": "07:00",
|
|
623
|
+
"charging_now": false,
|
|
624
|
+
"smart_charging": true,
|
|
625
|
+
"charge_cap": false,
|
|
626
|
+
"next_poll": "2026-05-03T10:35:00Z",
|
|
627
|
+
"refresh_available_at": null,
|
|
628
|
+
"api_requests_hour": 12,
|
|
629
|
+
"api_complexity_hour": 3600,
|
|
630
|
+
"api_complexity_percent": 7.2,
|
|
631
|
+
"slot1_start": "2026-05-03 01:30:00+01:00",
|
|
632
|
+
"slot1_end": "2026-05-03 05:30:00+01:00",
|
|
633
|
+
"slot2_start": null,
|
|
634
|
+
"slot2_end": null,
|
|
635
|
+
"slot3_start": null,
|
|
636
|
+
"slot3_end": null,
|
|
637
|
+
"window_start": "2026-05-03 01:30:00+01:00",
|
|
638
|
+
"window_end": "2026-05-03 05:30:00+01:00",
|
|
639
|
+
"timezone_detected": "Europe/London",
|
|
640
|
+
"timezone_applied": "Europe/London",
|
|
641
|
+
"next_start_locale": "2026-05-03 01:30:00+01:00",
|
|
642
|
+
"slot1_start_locale": "2026-05-03 01:30:00+01:00",
|
|
643
|
+
"slot1_end_locale": "2026-05-03 05:30:00+01:00",
|
|
644
|
+
"window_start_locale": "2026-05-03 01:30:00+01:00",
|
|
645
|
+
"window_end_locale": "2026-05-03 05:30:00+01:00",
|
|
646
|
+
"completed_dispatches_count": 3,
|
|
647
|
+
"completed_dispatches_error": null,
|
|
648
|
+
"flex_planned_dispatches_count": 1,
|
|
649
|
+
"flex_planned_dispatches_error": null,
|
|
650
|
+
"intelligent_error": null,
|
|
651
|
+
"electricity_unit_rate": null,
|
|
652
|
+
"electricity_standing_charge": 53.94,
|
|
653
|
+
"electricity_tariff_code": "E-1R-INTELLI-VAR-22-01-01-A",
|
|
654
|
+
"electricity_valid_from": "2022-01-01T00:00:00Z",
|
|
655
|
+
"electricity_valid_to": null,
|
|
656
|
+
"electricity_consumption_kwh": 8.4,
|
|
657
|
+
"electricity_consumption_from": "2026-05-02T00:00:00Z",
|
|
658
|
+
"electricity_consumption_to": "2026-05-03T00:00:00Z",
|
|
659
|
+
"electricity_rates_error": null,
|
|
660
|
+
"electricity_consumption_error": null,
|
|
661
|
+
"applicable_rates_count": 28,
|
|
662
|
+
"applicable_rates_current_pence": 10.33,
|
|
663
|
+
"applicable_rates_error": null,
|
|
664
|
+
"gas_unit_rate": 6.24,
|
|
665
|
+
"gas_standing_charge": 31.05,
|
|
666
|
+
"gas_tariff_code": "G-1R-VAR-22-11-01-A",
|
|
667
|
+
"gas_valid_from": "2022-11-01T00:00:00Z",
|
|
668
|
+
"gas_valid_to": null,
|
|
669
|
+
"gas_consumption_kwh": 12.1,
|
|
670
|
+
"gas_consumption_from": "2026-05-02T00:00:00Z",
|
|
671
|
+
"gas_consumption_to": "2026-05-03T00:00:00Z",
|
|
672
|
+
"gas_rates_error": null,
|
|
673
|
+
"gas_consumption_error": null,
|
|
674
|
+
"account_balance_pence": 10900,
|
|
675
|
+
"account_balance_pounds": 109,
|
|
676
|
+
"account_error": null,
|
|
677
|
+
"octoplus_enrolled": true,
|
|
678
|
+
"octoplus_enrollment_status": "ENROLLED",
|
|
679
|
+
"octoplus_loyalty_points_user": true,
|
|
680
|
+
"octoplus_error": null,
|
|
681
|
+
"wheel_of_fortune_electricity_spins": 2,
|
|
682
|
+
"wheel_of_fortune_electricity_max": 3,
|
|
683
|
+
"wheel_of_fortune_electricity_used": 1,
|
|
684
|
+
"wheel_of_fortune_gas_spins": 1,
|
|
685
|
+
"wheel_of_fortune_gas_max": 1,
|
|
686
|
+
"wheel_of_fortune_gas_used": 0,
|
|
687
|
+
"wheel_of_fortune_error": null,
|
|
688
|
+
"mini_demand_kw": 0.082,
|
|
689
|
+
"mini_consumption_delta_kwh": 0.002,
|
|
690
|
+
"mini_read_at": "2026-05-03T10:00:00Z",
|
|
691
|
+
"home_mini_error": null,
|
|
692
|
+
"saving_session_available": false,
|
|
693
|
+
"saving_session_start": null,
|
|
694
|
+
"saving_session_end": null,
|
|
695
|
+
"saving_session_joined": false,
|
|
696
|
+
"saving_session_points": null,
|
|
697
|
+
"saving_sessions_error": null,
|
|
698
|
+
"free_electricity_active": false,
|
|
699
|
+
"free_electricity_available": false,
|
|
700
|
+
"free_electricity_start": null,
|
|
701
|
+
"free_electricity_end": null,
|
|
702
|
+
"free_electricity_error": null
|
|
703
|
+
},
|
|
704
|
+
"debug": {
|
|
705
|
+
"success": true,
|
|
706
|
+
"step": "complete",
|
|
707
|
+
"apiCalls": [
|
|
708
|
+
{"name": "authentication", "tokenObtained": true},
|
|
709
|
+
{"name": "intelligent", "slotsFound": 1},
|
|
710
|
+
{"name": "electricity_rates", "success": true},
|
|
711
|
+
{"name": "electricity_consumption", "success": true},
|
|
712
|
+
{"name": "gas_rates", "success": true},
|
|
713
|
+
{"name": "gas_consumption", "success": true},
|
|
714
|
+
{"name": "home_mini", "success": true},
|
|
715
|
+
{"name": "account", "success": true}
|
|
716
|
+
]
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
```
|
|
720
|
+
|
|
721
|
+
> **Note:** `electricity_unit_rate` is `null` for half-hourly tariffs (e.g. Intelligent Octopus Go). Use `applicable_rates_current_pence` for the live rate on HH tariffs.
|
|
722
|
+
|
|
723
|
+
> **v1.3.0 additions:** The example above shows the v1.2.x payload shape for clarity. v1.3.0 adds ~14 additional fields covering electricity export (`electricity_export_unit_rate`, `electricity_export_tariff_code`, `electricity_export_consumption_kwh`, full `electricity_export_rate[]` half-hourly array with current/prev/next slot summaries) and import rate adjacency (`applicable_rates_prev_pence`, `_prev_gbp`, `_prev_to`, `_next_pence`, `_next_gbp`, `_next_from`). For the authoritative current set, inspect `msg.payload` in a Debug node after a real poll, or read `lib/payload.js` in the source.
|
|
724
|
+
|
|
725
|
+
---
|
|
726
|
+
|
|
727
|
+
## ๐ก Home Assistant Automation Examples
|
|
728
|
+
|
|
729
|
+
### Notify When Charging Starts
|
|
730
|
+
|
|
731
|
+
```yaml
|
|
732
|
+
automation:
|
|
733
|
+
- alias: "EV Charging Starting"
|
|
734
|
+
trigger:
|
|
735
|
+
platform: state
|
|
736
|
+
entity_id: binary_sensor.octopus_charging_now
|
|
737
|
+
to: "on"
|
|
738
|
+
action:
|
|
739
|
+
service: notify.mobile_app
|
|
740
|
+
data:
|
|
741
|
+
message: "EV charging started"
|
|
742
|
+
```
|
|
743
|
+
|
|
744
|
+
### Charge During Free Electricity Window
|
|
745
|
+
|
|
746
|
+
```yaml
|
|
747
|
+
automation:
|
|
748
|
+
- alias: "Start battery charge on free electricity"
|
|
749
|
+
trigger:
|
|
750
|
+
platform: state
|
|
751
|
+
entity_id: binary_sensor.octopus_free_electricity_active
|
|
752
|
+
to: "on"
|
|
753
|
+
action:
|
|
754
|
+
service: switch.turn_on
|
|
755
|
+
target:
|
|
756
|
+
entity_id: switch.battery_charger
|
|
757
|
+
- alias: "Stop battery charge after free electricity"
|
|
758
|
+
trigger:
|
|
759
|
+
platform: state
|
|
760
|
+
entity_id: binary_sensor.octopus_free_electricity_active
|
|
761
|
+
to: "off"
|
|
762
|
+
action:
|
|
763
|
+
service: switch.turn_off
|
|
764
|
+
target:
|
|
765
|
+
entity_id: switch.battery_charger
|
|
766
|
+
```
|
|
767
|
+
|
|
768
|
+
### Run Dishwasher During Cheap Rate
|
|
769
|
+
|
|
770
|
+
```yaml
|
|
771
|
+
automation:
|
|
772
|
+
- alias: "Dishwasher During Cheap Window"
|
|
773
|
+
trigger:
|
|
774
|
+
platform: time_pattern
|
|
775
|
+
minutes: "/5"
|
|
776
|
+
condition:
|
|
777
|
+
- condition: template
|
|
778
|
+
value_template: >
|
|
779
|
+
{% set start = as_timestamp(states('sensor.octopus_slot_1_start')) %}
|
|
780
|
+
{% set end = as_timestamp(states('sensor.octopus_slot_1_end')) %}
|
|
781
|
+
{% set now = as_timestamp(now()) %}
|
|
782
|
+
{{ start <= now <= end }}
|
|
783
|
+
action:
|
|
784
|
+
service: switch.turn_on
|
|
785
|
+
target:
|
|
786
|
+
entity_id: switch.dishwasher
|
|
787
|
+
```
|
|
788
|
+
|
|
789
|
+
### Alert When Saving Session Available
|
|
790
|
+
|
|
791
|
+
```yaml
|
|
792
|
+
automation:
|
|
793
|
+
- alias: "Saving session alert"
|
|
794
|
+
trigger:
|
|
795
|
+
platform: state
|
|
796
|
+
entity_id: binary_sensor.octopus_saving_session_available
|
|
797
|
+
to: "on"
|
|
798
|
+
action:
|
|
799
|
+
service: notify.mobile_app
|
|
800
|
+
data:
|
|
801
|
+
message: >
|
|
802
|
+
Saving session available:
|
|
803
|
+
{{ states('sensor.octopus_saving_session_start') }}
|
|
804
|
+
to {{ states('sensor.octopus_saving_session_end') }}
|
|
805
|
+
```
|
|
806
|
+
|
|
807
|
+
---
|
|
808
|
+
|
|
809
|
+
## ๐ Troubleshooting
|
|
810
|
+
|
|
811
|
+
### No Data (All Sensors Null/0)
|
|
812
|
+
|
|
813
|
+
Check `msg.debug` output in a Debug node:
|
|
814
|
+
|
|
815
|
+
- Account format must include `A-` prefix
|
|
816
|
+
- Invalid API key โ regenerate at Octopus dashboard
|
|
817
|
+
- Not on a recognised Octopus tariff (EV sensors require Intelligent Octopus Go)
|
|
818
|
+
- Car not plugged in (no slots scheduled) โ EV sensors null is normal when no charging is planned
|
|
819
|
+
|
|
820
|
+
### Authentication Failing
|
|
821
|
+
|
|
822
|
+
Check `msg.debug.apiCalls[0].errors` for details. Regenerate your API key and update the node configuration.
|
|
823
|
+
|
|
824
|
+
### Sensors Unavailable in Home Assistant
|
|
825
|
+
|
|
826
|
+
1. Verify MQTT broker is running
|
|
827
|
+
2. Check Node-RED can connect to MQTT broker
|
|
828
|
+
3. Deploy the flow to trigger discovery
|
|
829
|
+
4. Confirm Home Assistant MQTT integration is enabled
|
|
830
|
+
|
|
831
|
+
### electricity_unit_rate Always Null
|
|
832
|
+
|
|
833
|
+
This is expected on half-hourly tariffs like Intelligent Octopus Go. The tariff has no single unit rate โ prices vary by half-hour slot. Use `applicable_rates_current_pence` for the live rate instead.
|
|
834
|
+
|
|
835
|
+
### Upgrading from v1.2.x โ Sensors Look Different
|
|
836
|
+
|
|
837
|
+
v1.3.0 adds ~70 new sensors but does not rename or remove any v1.2 sensors. Existing automations and dashboards continue working unchanged. New sensors appear automatically in Home Assistant after the first poll following upgrade.
|
|
838
|
+
|
|
839
|
+
Two existing Octoplus booleans (`octoplus_enrolled` and `octoplus_loyalty_points_user`) move from the `sensor.` domain to `binary_sensor.` in v1.3 because they are boolean values and HA's sensor domain doesn't accept booleans cleanly. If you have automations referencing the old `sensor.` entity IDs, update them to the new `binary_sensor.` IDs after upgrade.
|
|
840
|
+
|
|
841
|
+
### Stale Entities After Early v1.3 Dev Build
|
|
842
|
+
|
|
843
|
+
If you installed an early v2 build before final release, some entity IDs may have changed. To clean up stale entities:
|
|
844
|
+
|
|
845
|
+
1. In HA โ **Settings โ Devices & Services โ MQTT**
|
|
846
|
+
2. Find each stale entity name in Developer Tools โ MQTT
|
|
847
|
+
3. Publish an **empty retained payload** to its config topic:
|
|
848
|
+
```
|
|
849
|
+
Topic: homeassistant/sensor/nodered_A-XXXX_<entity_id>/config
|
|
850
|
+
Payload: (empty)
|
|
851
|
+
Retain: โ
|
|
852
|
+
```
|
|
853
|
+
This removes the entity from the broker โ HA drops it automatically.
|
|
854
|
+
|
|
855
|
+
### Home Mini Not Showing
|
|
856
|
+
|
|
857
|
+
1. Tick **Enable Home Mini** in node config
|
|
858
|
+
2. Verify your Octopus account has a smart meter registered (visible in the Octopus app)
|
|
859
|
+
3. Check `msg.payload.home_mini_error` in a debug node for the specific error
|
|
860
|
+
|
|
861
|
+
### New Category Sensors All Null After Deploy
|
|
862
|
+
|
|
863
|
+
Account discovery runs once at startup. If it fails, check `msg.debug` for auth errors, verify your API key, and redeploy.
|
|
864
|
+
|
|
865
|
+
### Seasonal Sensors Show "Unavailable"
|
|
866
|
+
|
|
867
|
+
Saving session sensors are only populated OctoberโMarch. Free electricity sensors are only populated JuneโOctober. Outside season, `null` values cause these sensors to show as unavailable in HA โ this is correct behaviour, not a bug.
|
|
868
|
+
|
|
869
|
+
### Changes Not Applying
|
|
870
|
+
|
|
871
|
+
This is by design. Use the **Apply Changes** button to submit. This prevents API spam when making multiple adjustments.
|
|
872
|
+
|
|
873
|
+
---
|
|
874
|
+
|
|
875
|
+
## ๐ ๏ธ How It Works
|
|
876
|
+
|
|
877
|
+
### Startup โ Account Discovery
|
|
878
|
+
|
|
879
|
+
On first deploy, the node queries the Octopus API to detect which products are registered on your account:
|
|
880
|
+
|
|
881
|
+
- **Electricity** โ always enabled if an electricity agreement exists
|
|
882
|
+
- **Gas** โ enabled if a gas agreement exists
|
|
883
|
+
- **Intelligent EV** โ enabled if an EV device is registered (Intelligent Octopus Go)
|
|
884
|
+
- **Home Mini** โ enabled if a smart meter device is registered AND the Home Mini checkbox is ticked
|
|
885
|
+
- **Wheel of Fortune / Saving Sessions / Account** โ always polled if credentials are valid
|
|
886
|
+
|
|
887
|
+
Discovery sets which categories are active. No manual configuration required.
|
|
888
|
+
|
|
889
|
+
### Category Scheduler
|
|
890
|
+
|
|
891
|
+
Each data category polls on its own interval (configurable per category in the node editor). A 1-second clock-aligned scheduler checks which categories are due each tick. Categories poll independently โ a slow gas API response does not delay your EV slot update.
|
|
892
|
+
|
|
893
|
+
### Authentication Flow
|
|
894
|
+
|
|
895
|
+
1. **Exchange API key** for a short-lived token
|
|
896
|
+
2. **Run category polls** in parallel โ each category makes its own GraphQL query
|
|
897
|
+
3. **Merge results** into a single payload object
|
|
898
|
+
4. **Publish** to Node-RED output + MQTT state topic
|
|
899
|
+
|
|
900
|
+
### Exponential Backoff (preference changes)
|
|
901
|
+
|
|
902
|
+
When changing charge limit or ready time:
|
|
903
|
+
|
|
904
|
+
```
|
|
905
|
+
Mutation sent โ Wait 15s โ Validate
|
|
906
|
+
โ Not confirmed yet?
|
|
907
|
+
โ Wait 30s โ Validate
|
|
908
|
+
โ Not confirmed yet?
|
|
909
|
+
โ Wait 60s โ Validate
|
|
910
|
+
โ Not confirmed yet?
|
|
911
|
+
โ Wait 120s โ Final check
|
|
912
|
+
โ Then normal interval resumes
|
|
913
|
+
```
|
|
914
|
+
|
|
915
|
+
This prevents sensors becoming "unavailable" during updates.
|
|
916
|
+
|
|
917
|
+
### Debug Information
|
|
918
|
+
|
|
919
|
+
Every message includes `msg.debug`:
|
|
920
|
+
|
|
921
|
+
```json
|
|
922
|
+
{
|
|
923
|
+
"timestamp": "2026-05-03T10:30:00Z",
|
|
924
|
+
"success": true,
|
|
925
|
+
"step": "complete",
|
|
926
|
+
"apiCalls": [
|
|
927
|
+
{"name": "authentication", "tokenObtained": true},
|
|
928
|
+
{"name": "intelligent", "slotsFound": 1}
|
|
929
|
+
]
|
|
930
|
+
}
|
|
931
|
+
```
|
|
932
|
+
|
|
933
|
+
---
|
|
934
|
+
|
|
935
|
+
## ๐ License
|
|
936
|
+
|
|
937
|
+
MIT License - Copyright (c) 2025 Andrew Somerharju Neale
|
|
938
|
+
|
|
939
|
+
See [LICENSE](LICENSE) file for full details.
|
|
940
|
+
|
|
941
|
+
---
|
|
942
|
+
|
|
943
|
+
## โ ๏ธ Disclaimer
|
|
944
|
+
|
|
945
|
+
This is an **unofficial integration** and is not affiliated with, endorsed by, or connected to Octopus Energy Ltd.
|
|
946
|
+
|
|
947
|
+
Use at your own risk. The Octopus Energy name and logo are trademarks of Octopus Energy Ltd.
|
|
948
|
+
|
|
949
|
+
---
|
|
950
|
+
|
|
951
|
+
## ๐ Links
|
|
952
|
+
|
|
953
|
+
- **npm**: https://www.npmjs.com/package/node-red-contrib-octopus-intelligent
|
|
954
|
+
- **GitHub**: https://github.com/ASomerN/node-red-contrib-octopus-intelligent
|
|
955
|
+
- **Issues**: https://github.com/ASomerN/node-red-contrib-octopus-intelligent/issues
|
|
956
|
+
- **Octopus Intelligent**: https://octopus.energy/intelligent/
|
|
957
|
+
- **API Docs**: https://developer.octopus.energy/docs/api/
|
|
958
|
+
|
|
959
|
+
---
|
|
960
|
+
|
|
961
|
+
## ๐ Changelog
|
|
962
|
+
|
|
963
|
+
See [CHANGELOG.md](CHANGELOG.md) for detailed version history and release notes.
|
|
964
|
+
|
|
965
|
+
### v1.3.0 (2026-05-12)
|
|
966
|
+
|
|
967
|
+
Major additive release โ full consumer read coverage. No breaking changes; all v1.2.x entity IDs, payload fields, and automations continue working unchanged.
|
|
968
|
+
|
|
969
|
+
**New read categories:**
|
|
970
|
+
- **Electricity import** โ live unit rate, standing charge, tariff code + validity dates, daily consumption, half-hourly applicable rates (current / prev / next), GBP/kWh rate for Energy Dashboard
|
|
971
|
+
- **Electricity export** โ full read parity with import: live export rate, standing charge, tariff code (e.g. `AGILE-OUTGOING-19-05-13`), validity dates, daily export consumption, half-hourly export rate slots (48 entries), prev / next slot rates and transition timestamps
|
|
972
|
+
- **Gas** โ unit rate, standing charge, tariff code + validity, daily consumption (account-conditional)
|
|
973
|
+
- **Octopus Home Mini** โ real-time grid demand (kW), half-hour consumption (kWh), last reading timestamp
|
|
974
|
+
- **Saving sessions** โ upcoming session start/end, joined status (now read from `api.backend.octopus.energy`)
|
|
975
|
+
- **Free electricity** โ upcoming/active session detection, binary sensors for automation
|
|
976
|
+
- **Wheel of Fortune** โ electricity and gas spin counts (now using non-deprecated `wheelOfFortuneSpinsAllowed` on backend endpoint)
|
|
977
|
+
- **Account balance** โ credit/debit in ยฃ and pence
|
|
978
|
+
- **Octoplus** โ enrollment status (string) + enrolled and loyalty-points-user booleans
|
|
979
|
+
|
|
980
|
+
**Bug fixes carried in alongside the additive work:**
|
|
981
|
+
- **Import / export meter point selection** โ meter point selection now uses the `direction` field, not array position. Earlier dev builds on accounts with both import + export meters could surface export data as if it were import (live "current rate" showing the export Agile rate instead of the import tariff). Fixed before release; no stable v1.x build was affected.
|
|
982
|
+
- **MQTT transport** โ added `User-Agent` header required by `api.backend.octopus.energy`. Without it the backend returns 403 at the edge, which surfaced as "WoF returns HTML" / saving sessions silently broken.
|
|
983
|
+
- **MQTT discovery for boolean sensors** โ `octoplus_enrolled` and `octoplus_loyalty_points_user` were previously published to the `sensor` MQTT domain; HA's sensor handler doesn't accept raw boolean values cleanly, so the entities never registered on some installs. Now published as `binary_sensor` โ registers reliably.
|
|
984
|
+
- **MQTT discovery for read-only info sensors** โ removed `entity_category: config` from tariff codes, validity dates, etc. That category is intended for user-configurable entities; on read-only sensors HA's state handling caused them to stick at "unavailable". Moved to the main entity list.
|
|
985
|
+
|
|
986
|
+
**Backwards compatibility:** zero breaking changes. New entities appear automatically after first poll following upgrade. Existing automations continue unchanged.
|
|
987
|
+
|
|
988
|
+
### v1.2.1 (2026-04-29)
|
|
989
|
+
- **Deprecated API migration** โ moved to current `devices` query and `setDevicePreferences` mutation
|
|
990
|
+
|
|
991
|
+
### v1.2.0 (2026-04-26)
|
|
992
|
+
- **Smart Charging Toggle** โ suspend/resume Octopus intelligent charging from Node-RED or Home Assistant
|
|
993
|
+
- **HA MQTT Switch** โ auto-discovered Smart Charging switch entity
|
|
994
|
+
- **`smart_charging` payload field** โ live state in every message
|
|
995
|
+
|
|
996
|
+
### v1.0.4 (2025-12-11)
|
|
997
|
+
- **Manual Refresh Button** โ Force API refresh via Home Assistant with 30s cooldown
|
|
998
|
+
- **Next Poll Timer** โ See when next automatic refresh occurs
|
|
999
|
+
- **API Complexity Monitoring** โ Track API usage against 50,000/hour limit
|
|
1000
|
+
- **Rate Limiting** โ MQTT button (30s cooldown), Node-RED input (no limit)
|
|
1001
|
+
|
|
1002
|
+
---
|
|
1003
|
+
|
|
1004
|
+
**Made with โก for the Octopus Energy & Home Assistant communities**
|