Repository navigation
Expand file tree
/
Copy pathapi-reference.html
More file actions
841 lines (841 loc) · 62.1 KB
/
Copy pathapi-reference.html
File metadata and controls
841 lines (841 loc) · 62.1 KB
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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
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
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
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
<!doctype html>
<html lang="en" data-page="api-reference">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>API reference - Open Firenet</title>
<meta name="description" content="Every endpoint of the Open Firenet bridge, with its fields, types, units and ranges.">
<link rel="alternate" hreflang="en" href="https://openfirenet.github.io/api-reference.html">
<link rel="alternate" hreflang="fr" href="https://openfirenet.github.io/fr/api-reference.html">
<link rel="alternate" hreflang="de" href="https://openfirenet.github.io/de/api-reference.html">
<link rel="alternate" hreflang="it" href="https://openfirenet.github.io/it/api-reference.html">
<link rel="alternate" hreflang="es" href="https://openfirenet.github.io/es/api-reference.html">
<link rel="alternate" hreflang="x-default" href="https://openfirenet.github.io/api-reference.html">
<script>
// Language: a visitor arriving from outside the site gets the language they chose before, or else the first language of
// their browser that the site is written in. On the home page, a first visit shows the animated logo meanwhile.
(function () {
var html = document.documentElement, here = html.lang, stored = null, target = null, chosen = null;
try { stored = localStorage.getItem('site-lang'); } catch (e) {}
var handoff = false;
try { handoff = sessionStorage.getItem('site-splash') === '1'; sessionStorage.removeItem('site-splash'); } catch (e) {}
var inside = document.referrer.indexOf(location.origin + '/') === 0;
function alt(code) {
var l = document.querySelector('link[rel="alternate"][hreflang="' + code + '"]');
return l ? new URL(l.href).pathname : null; // same site, whatever host serves it
}
if (!inside) {
var wanted = stored ? [stored] : (navigator.languages || [navigator.language || '']);
for (var i = 0; i < wanted.length; i++) {
var code = String(wanted[i]).slice(0, 2).toLowerCase();
if (code === here) { chosen = here; break; }
if (alt(code)) { chosen = code; target = alt(code); break; }
}
}
var still = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
var splash = !still && html.getAttribute('data-page') === 'index' && (handoff || (!stored && !inside));
if (chosen && !stored) { try { localStorage.setItem('site-lang', chosen); } catch (e) {} }
if (!splash) { if (target) location.replace(target); return; }
// How long the logo shows, then fades; one colour wave crosses it in that time, whatever the durations.
var SHOW = 900, FADE = 400;
html.style.setProperty('--splash-fade', FADE + 'ms');
html.style.setProperty('--splash-wave', (SHOW + FADE) + 'ms');
html.classList.add('splash');
if (handoff) html.classList.add('splash-handoff');
// The logo shows briefly, then fades out on this page, or goes on to the page in the right language, which fades it out.
setTimeout(function () {
if (target) {
try { sessionStorage.setItem('site-splash', '1'); } catch (e) {}
location.replace(target);
return;
}
html.classList.add('splash-out');
setTimeout(function () { html.classList.remove('splash', 'splash-out', 'splash-handoff'); }, FADE);
}, handoff ? 100 : SHOW);
})();
</script>
<link rel="icon" href="assets/img/brand-icon.png">
<link rel="stylesheet" href="assets/style.css">
</head>
<body>
<div class="splash-screen" aria-hidden="true"><div class="splash-logo"><span class="splash-emblem"></span><span class="splash-words"><span class="splash-open">Open</span><span class="splash-fire">Firenet</span></span></div></div>
<header class="site-header">
<div class="inner">
<a class="brand" href="index.html"><img src="assets/img/brand-icon.png" alt="">Open Firenet</a>
<button class="nav-toggle" type="button" aria-expanded="false" aria-controls="site-nav">☰ Menu</button>
<nav class="nav" id="site-nav" aria-label="Main">
<a href="how-it-works.html">How it works</a>
<a href="download.html">Download</a>
<a href="get-started.html">Get started</a>
<details class="nav-group">
<summary>Stove & board</summary>
<div class="nav-menu">
<a href="compatibility.html">Stove compatibility</a>
<a href="hardware.html">Hardware</a>
<a href="screen.html">Stick screen</a>
</div>
</details>
<details class="nav-group active">
<summary>Integrations</summary>
<div class="nav-menu">
<a href="home-assistant.html">Home Assistant</a>
<a href="mqtt.html">MQTT</a>
<a href="api.html" class="active" aria-current="page">REST API</a>
</div>
</details>
<a href="troubleshooting.html">Troubleshooting</a>
<details class="nav-group nav-lang">
<summary aria-label="Language"><svg class="flag" viewBox="0 0 3 2" preserveAspectRatio="none" aria-hidden="true"><rect width="3" height="2" fill="#012169"/><path d="M0 0L3 2M3 0L0 2" stroke="#fff" stroke-width="0.4"/><path d="M0 0L3 2M3 0L0 2" stroke="#c8102e" stroke-width="0.14"/><path d="M1.5 0V2M0 1H3" stroke="#fff" stroke-width="0.66"/><path d="M1.5 0V2M0 1H3" stroke="#c8102e" stroke-width="0.4"/></svg>English</summary>
<div class="nav-menu">
<a href="api-reference.html" hreflang="en" lang="en" data-lang="en" class="active" aria-current="page"><svg class="flag" viewBox="0 0 3 2" preserveAspectRatio="none" aria-hidden="true"><rect width="3" height="2" fill="#012169"/><path d="M0 0L3 2M3 0L0 2" stroke="#fff" stroke-width="0.4"/><path d="M0 0L3 2M3 0L0 2" stroke="#c8102e" stroke-width="0.14"/><path d="M1.5 0V2M0 1H3" stroke="#fff" stroke-width="0.66"/><path d="M1.5 0V2M0 1H3" stroke="#c8102e" stroke-width="0.4"/></svg>English</a>
<a href="fr/api-reference.html" hreflang="fr" lang="fr" data-lang="fr"><svg class="flag" viewBox="0 0 3 2" preserveAspectRatio="none" aria-hidden="true"><rect width="1" height="2" fill="#0055a4"/><rect x="1" width="1" height="2" fill="#fff"/><rect x="2" width="1" height="2" fill="#ef4135"/></svg>Français</a>
<a href="de/api-reference.html" hreflang="de" lang="de" data-lang="de"><svg class="flag" viewBox="0 0 3 2" preserveAspectRatio="none" aria-hidden="true"><rect width="3" height="0.67" fill="#000"/><rect y="0.67" width="3" height="0.67" fill="#dd0000"/><rect y="1.33" width="3" height="0.67" fill="#ffce00"/></svg>Deutsch</a>
<a href="it/api-reference.html" hreflang="it" lang="it" data-lang="it"><svg class="flag" viewBox="0 0 3 2" preserveAspectRatio="none" aria-hidden="true"><rect width="1" height="2" fill="#009246"/><rect x="1" width="1" height="2" fill="#fff"/><rect x="2" width="1" height="2" fill="#ce2b37"/></svg>Italiano</a>
<a href="es/api-reference.html" hreflang="es" lang="es" data-lang="es"><svg class="flag" viewBox="0 0 3 2" preserveAspectRatio="none" aria-hidden="true"><rect width="3" height="2" fill="#c60b1e"/><rect y="0.5" width="3" height="1" fill="#ffc400"/></svg>Español</a>
</div>
</details>
</nav>
</div>
</header>
<main>
<h1>API reference</h1>
<p class="lead">Every endpoint of the bridge, with its fields, types, units and ranges. Generated from the <a href="openapi.yaml">OpenAPI description</a> of firmware 5.0.0.</p>
<p>Local REST API of the Open Firenet bridge, the ESP32-S3 that replaces the RIKA Firenet stick. It is served on your network at <code>http://open-firenet.local</code> (or the bridge's IP address), without key or account.</p>
<p>Units are natural ones: temperatures in °C, power in percent, readable mode names.</p>
<p><b>Field names.</b> Only the recommended names are described here, the ones used by the Home Assistant integration and by MQTT. For historical reasons the bridge also accepts older aliases in commands (for example <code>tempRoomTarget</code> for <code>target_temperature</code>, or the plain-text form <code>onOff=1; heatingPower=70;</code>), and <code>GET /api/controls</code> also returns the settings under the stove's own names and units (<code>onOff</code>, <code>tempRoomTarget</code> in tenths of a degree...). New code should not rely on them.</p>
<p><b>Who can call it.</b> Programs on your network (Home Assistant, scripts, <code>curl</code>) and the bridge's own web page. A page of another website opened in a browser cannot: the bridge sends no cross-origin permission and answers 403 to a request that names another page as its origin, or that was addressed to a name other than its IP address, a name without a dot, a <code>.local</code> name, or a domain you added in the Bridge tab, section Access (<code>/api/access</code>). The 403 is JSON: <code>refused</code> tells which check refused (<code>host</code> or <code>origin</code>) and <code>ip</code> gives the address that always works.</p>
<p><b>Before the stove is linked.</b> Until the stove has answered, <code>version_ack</code> is <code>false</code>, the stove model and firmware version are <code>null</code>, and the other values are defaults, not measurements.</p>
<h2>Endpoints</h2>
<div class="table-wrap">
<table>
<tr><th>Endpoint</th><th>Purpose</th></tr>
<tr><td><a href="#get-api-state"><span class="method get">GET</span> <code>/api/state</code></a></td><td>Everything at once</td></tr>
<tr><td><a href="#get-api-controls"><span class="method get">GET</span> <code>/api/controls</code></a></td><td>Current settings</td></tr>
<tr><td><a href="#post-api-controls"><span class="method post">POST</span> <code>/api/controls</code></a></td><td>Change settings</td></tr>
<tr><td><a href="#get-api-schedule"><span class="method get">GET</span> <code>/api/schedule</code></a></td><td>Weekly heating schedule</td></tr>
<tr><td><a href="#post-api-schedule"><span class="method post">POST</span> <code>/api/schedule</code></a></td><td>Change the weekly heating schedule</td></tr>
<tr><td><a href="#get-api-mqtt"><span class="method get">GET</span> <code>/api/mqtt</code></a></td><td>MQTT settings and connection status</td></tr>
<tr><td><a href="#post-api-mqtt"><span class="method post">POST</span> <code>/api/mqtt</code></a></td><td>Change the MQTT settings</td></tr>
<tr><td><a href="#get-api-version"><span class="method get">GET</span> <code>/api/version</code></a></td><td>Firmware version of the bridge</td></tr>
<tr><td><a href="#get-api-scan"><span class="method get">GET</span> <code>/api/scan</code></a></td><td>Wi-Fi networks seen by the bridge</td></tr>
<tr><td><a href="#post-api-wifi"><span class="method post">POST</span> <code>/api/wifi</code></a></td><td>Set the Wi-Fi network, then restart</td></tr>
<tr><td><a href="#post-api-forget"><span class="method post">POST</span> <code>/api/forget</code></a></td><td>Erase the saved settings, then restart in setup mode</td></tr>
<tr><td><a href="#get-api-access"><span class="method get">GET</span> <code>/api/access</code></a></td><td>Domains under which the bridge accepts to answer</td></tr>
<tr><td><a href="#post-api-access"><span class="method post">POST</span> <code>/api/access</code></a></td><td>Set the added domains</td></tr>
<tr><td><a href="#get-api-display"><span class="method get">GET</span> <code>/api/display</code></a></td><td>Screens of the bridge's small display</td></tr>
<tr><td><a href="#post-api-display"><span class="method post">POST</span> <code>/api/display</code></a></td><td>Choose the board of the display, and order its screens</td></tr>
<tr><td><a href="#get-api-wifi-power-saving"><span class="method get">GET</span> <code>/api/wifi_power_saving</code></a></td><td>Whether Wi-Fi power saving is on</td></tr>
<tr><td><a href="#post-api-wifi-power-saving"><span class="method post">POST</span> <code>/api/wifi_power_saving</code></a></td><td>Switch Wi-Fi power saving on or off</td></tr>
<tr><td><a href="#get-api-log-size"><span class="method get">GET</span> <code>/api/log_size</code></a></td><td>Size of the history of the exchanges with the stove</td></tr>
<tr><td><a href="#post-api-log-size"><span class="method post">POST</span> <code>/api/log_size</code></a></td><td>Choose the size of the history</td></tr>
<tr><td><a href="#post-api-restart"><span class="method post">POST</span> <code>/api/restart</code></a></td><td>Restart the bridge</td></tr>
<tr><td><a href="#get-api-update"><span class="method get">GET</span> <code>/api/update</code></a></td><td>Firmware update status</td></tr>
<tr><td><a href="#post-api-update"><span class="method post">POST</span> <code>/api/update</code></a></td><td>Trigger an update check, installation, or change auto-check settings</td></tr>
<tr><td><a href="#get-api-txgap"><span class="method get">GET</span> <code>/api/txgap</code></a></td><td>Delay between frames sent to the stove</td></tr>
<tr><td><a href="#post-api-txgap"><span class="method post">POST</span> <code>/api/txgap</code></a></td><td>Change the delay between frames sent to the stove</td></tr>
<tr><td><a href="#get-log"><span class="method get">GET</span> <code>/log</code></a></td><td>Log of the exchanges with the stove</td></tr>
</table>
</div>
<h2 id="stove">Stove</h2>
<p>Read the stove and change its settings</p>
<div class="endpoint" id="get-api-state">
<h3><span class="method get">GET</span> <code>/api/state</code></h3>
<p><b>Everything at once</b></p>
<p>Bridge, stove, sensors, settings and link diagnostics. This is what the web page and the Home Assistant integration poll.</p>
<h4>Answer 200 <small>Current state</small></h4>
<p>Fields: see <a href="#schema-state">State</a>.</p>
</div>
<div class="endpoint" id="get-api-controls">
<h3><span class="method get">GET</span> <code>/api/controls</code></h3>
<p><b>Current settings</b></p>
<h4>Answer 200 <small>The settings, under the recommended names (the stove's own names and units are returned too)</small></h4>
<p>Fields: see <a href="#schema-controls">Controls</a>.</p>
</div>
<div class="endpoint" id="post-api-controls">
<h3><span class="method post">POST</span> <code>/api/controls</code></h3>
<p><b>Change settings</b></p>
<p>Send only the fields to change; the others keep their value. Ignored while the stove is not linked. On stove firmware 2.28 only <code>on</code>, <code>mode</code>, <code>power_percent</code> and <code>target_temperature</code> are applied.</p>
<h4>Request body <small>application/json</small></h4>
<p>Fields: see <a href="#schema-controlscommand">ControlsCommand</a>.</p>
<p>21 °C in comfort mode:</p>
<pre><code>{"target_temperature": 21, "mode": "comfort"}</code></pre>
<p>Switch on at 80 % power:</p>
<pre><code>{"on": true, "power_percent": 80}</code></pre>
<h4>Answer 200 <small>The base settings sent to the stove</small></h4>
<p>Fields: see <a href="#schema-controlsresult">ControlsResult</a>.</p>
<h4>Answer 503 <small>The stove is not linked, or has not sent its settings yet (a few seconds after the link comes up). Nothing was sent; try again.</small></h4>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>ok</code></td><td>boolean</td><td></td></tr>
<tr><td><code>error</code></td><td><code>stove_not_ready</code></td><td></td></tr>
<tr><td><code>message</code></td><td>string</td><td></td></tr>
</table>
</div>
</div>
<div class="endpoint" id="get-api-schedule">
<h3><span class="method get">GET</span> <code>/api/schedule</code></h3>
<p><b>Weekly heating schedule</b></p>
<h4>Answer 200 <small>The 14 time slots and the setback temperature</small></h4>
<p>Fields: see <a href="#schema-schedule">Schedule</a>.</p>
</div>
<div class="endpoint" id="post-api-schedule">
<h3><span class="method post">POST</span> <code>/api/schedule</code></h3>
<p><b>Change the weekly heating schedule</b></p>
<p>Same handling as <code>POST /api/controls</code>; send the slots to change under their names.</p>
<h4>Request body <small>application/json</small></h4>
<p>Fields: see <a href="#schema-schedulecommand">ScheduleCommand</a>.</p>
<p>Example:</p>
<pre><code>{"heating_times_active": true, "setback_temperature": 16, "heatTimeMon1": 6000800, "heatTimeMon2": 17002200}</code></pre>
<h4>Answer 200 <small>The base settings sent to the stove</small></h4>
<p>Fields: see <a href="#schema-controlsresult">ControlsResult</a>.</p>
<h4>Answer 503 <small>The stove is not linked, or has not sent its settings yet (a few seconds after the link comes up). Nothing was sent; try again.</small></h4>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>ok</code></td><td>boolean</td><td></td></tr>
<tr><td><code>error</code></td><td><code>stove_not_ready</code></td><td></td></tr>
<tr><td><code>message</code></td><td>string</td><td></td></tr>
</table>
</div>
</div>
<h2 id="bridge">Bridge</h2>
<p>Settings and maintenance of the bridge itself</p>
<div class="endpoint" id="get-api-mqtt">
<h3><span class="method get">GET</span> <code>/api/mqtt</code></h3>
<p><b>MQTT settings and connection status</b></p>
<h4>Answer 200 <small>The settings (the password is never returned) and the status</small></h4>
<p>Fields: see <a href="#schema-mqtt">Mqtt</a>.</p>
</div>
<div class="endpoint" id="post-api-mqtt">
<h3><span class="method post">POST</span> <code>/api/mqtt</code></h3>
<p><b>Change the MQTT settings</b></p>
<p>A field left out keeps its value. The client restarts with the new settings; the status follows at the next GET.</p>
<h4>Request body <small>application/json</small></h4>
<p>Fields: see <a href="#schema-mqttcommand">MqttCommand</a>.</p>
<h4>Answer 200 <small>The saved settings</small></h4>
<p>Fields: see <a href="#schema-mqtt">Mqtt</a>.</p>
</div>
<div class="endpoint" id="get-api-version">
<h3><span class="method get">GET</span> <code>/api/version</code></h3>
<p><b>Firmware version of the bridge</b></p>
<h4>Answer 200 <small>Version and build date</small></h4>
<p>Fields: see <a href="#schema-version">Version</a>.</p>
</div>
<div class="endpoint" id="get-api-scan">
<h3><span class="method get">GET</span> <code>/api/scan</code></h3>
<p><b>Wi-Fi networks seen by the bridge</b></p>
<p>The first call starts a scan and answers 202; call again a few seconds later for the list.</p>
<h4>Answer 200 <small>Networks found (2.4 GHz), each name once</small></h4>
<p>A list of:</p>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>ssid</code> <span class="req">required</span></td><td>string</td><td></td></tr>
<tr><td><code>rssi</code> <span class="req">required</span></td><td>integer</td><td>Signal strength in dBm</td></tr>
</table>
</div>
<h4>Answer 202 <small>Scan in progress</small></h4>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>status</code></td><td><code>scanning</code></td><td></td></tr>
</table>
</div>
</div>
<div class="endpoint" id="post-api-wifi">
<h3><span class="method post">POST</span> <code>/api/wifi</code></h3>
<p><b>Set the Wi-Fi network, then restart</b></p>
<p>Sent by the setup form. Answers an HTML confirmation page (it has to work in captive portal browsers), then the bridge restarts on that network.</p>
<h4>Request body <small>application/x-www-form-urlencoded</small></h4>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>ssid</code> <span class="req">required</span></td><td>string</td><td></td></tr>
<tr><td><code>pass</code></td><td>string</td><td>Empty for an open network</td></tr>
</table>
</div>
<h4>Answer 200 <small>Saved; the bridge restarts</small></h4>
<p><code>text/html</code></p>
<h4>Answer 400 <small>Missing network name</small></h4>
<p><code>text/html</code></p>
</div>
<div class="endpoint" id="post-api-forget">
<h3><span class="method post">POST</span> <code>/api/forget</code></h3>
<p><b>Erase the saved settings, then restart in setup mode</b></p>
<p>Erases the Wi-Fi network, the MQTT settings and the frame delay. The bridge then creates the <code>Open-Firenet-Setup</code> network.</p>
<h4>Answer 200 <small>Erased; the bridge restarts</small></h4>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>ok</code></td><td>boolean</td><td></td></tr>
</table>
</div>
</div>
<div class="endpoint" id="get-api-access">
<h3><span class="method get">GET</span> <code>/api/access</code></h3>
<p><b>Domains under which the bridge accepts to answer</b></p>
<p>Besides its IP address and <code>open-firenet.local</code>, see "Who can call it" above.</p>
<h4>Answer 200 <small>The added domains</small></h4>
<p>Fields: see <a href="#schema-access">Access</a>.</p>
</div>
<div class="endpoint" id="post-api-access">
<h3><span class="method post">POST</span> <code>/api/access</code></h3>
<p><b>Set the added domains</b></p>
<h4>Request body <small>application/json</small></h4>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>extra_hosts</code></td><td>string</td><td>One domain per line (commas and spaces also separate them); an empty text removes them all. An entry needs at least one dot inside (<code>example.org</code>, not <code>org</code>), and also covers the names under it. At most 8 entries of 63 characters; entries that do not fit these rules are dropped.</td></tr>
</table>
</div>
<h4>Answer 200 <small>The domains as saved</small></h4>
<p>Fields: see <a href="#schema-access">Access</a>.</p>
</div>
<div class="endpoint" id="get-api-display">
<h3><span class="method get">GET</span> <code>/api/display</code></h3>
<p><b>Screens of the bridge's small display</b></p>
<p>The small display of boards that have one: which board the owner says it is (<code>board</code>, default <code>none</code>), and, while it runs, which screens it shows, in which order, and for how long each.</p>
<h4>Answer 200 <small>The setting</small></h4>
<p>Fields: see <a href="#schema-display">Display</a>.</p>
</div>
<div class="endpoint" id="post-api-display">
<h3><span class="method post">POST</span> <code>/api/display</code></h3>
<p><b>Choose the board of the display, and order its screens</b></p>
<p>Saved and kept after a restart. <code>screens</code> and <code>seconds</code> apply at once: the screens listed come first, in that order; those left out follow in their previous order. <code>board</code> applies at the next restart. Any field may be left out.</p>
<h4>Request body <small>application/json</small></h4>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>board</code></td><td><code>none</code> | <code>tdongle</code> | <code>tdongle_off</code> | <code>pocket_dongle</code> | <code>pocket_dongle_off</code></td><td></td></tr>
<tr><td><code>seconds</code></td><td>integer, 2 to 30</td><td>Seconds each screen stays</td></tr>
<tr><td><code>brightness</code></td><td>integer, 5 to 100</td><td></td></tr>
<tr><td><code>dim</code></td><td>boolean</td><td></td></tr>
<tr><td><code>dim_after</code></td><td>integer, 30 to 3600</td><td></td></tr>
<tr><td><code>dim_level</code></td><td>integer, 0 to 50</td><td></td></tr>
<tr><td><code>rotate</code></td><td>boolean</td><td>Rotate the screen by 180 degrees</td></tr>
<tr><td><code>language</code></td><td><code>en</code> | <code>fr</code> | <code>it</code> | <code>de</code> | <code>es</code></td><td>Language of the texts on the screen</td></tr>
<tr><td><code>screens</code></td><td>list of object</td><td></td></tr>
</table>
</div>
<h4>Answer 200 <small>The setting as saved</small></h4>
<p>Fields: see <a href="#schema-display">Display</a>.</p>
<h4>Answer 400 <small>Unknown board, unknown or repeated screen id, or seconds out of range</small></h4>
</div>
<div class="endpoint" id="get-api-wifi-power-saving">
<h3><span class="method get">GET</span> <code>/api/wifi_power_saving</code></h3>
<p><b>Whether Wi-Fi power saving is on</b></p>
<p>On by default: the bridge runs cooler and draws less power, and an answer can wait up to a quarter of a second. Off: it answers at once; for networks on which the bridge keeps losing the Wi-Fi.</p>
<h4>Answer 200 <small>The setting</small></h4>
<p>Fields: see <a href="#schema-wifipowersaving">WifiPowerSaving</a>.</p>
</div>
<div class="endpoint" id="post-api-wifi-power-saving">
<h3><span class="method post">POST</span> <code>/api/wifi_power_saving</code></h3>
<p><b>Switch Wi-Fi power saving on or off</b></p>
<p>Saved, and applied at once without a restart.</p>
<h4>Request body <small>application/json</small></h4>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>enabled</code></td><td>boolean</td><td></td></tr>
</table>
</div>
<h4>Answer 200 <small>The setting as saved</small></h4>
<p>Fields: see <a href="#schema-wifipowersaving">WifiPowerSaving</a>.</p>
</div>
<div class="endpoint" id="get-api-log-size">
<h3><span class="method get">GET</span> <code>/api/log_size</code></h3>
<p><b>Size of the history of the exchanges with the stove</b></p>
<p>The bridge keeps the latest messages exchanged with the stove (<code>/api/log</code>, diagnostic file). 16 kB by default; 32 kB keeps twice as much history and uses 16 kB more memory.</p>
<h4>Answer 200 <small>The setting</small></h4>
<p>Fields: see <a href="#schema-logsize">LogSize</a>.</p>
</div>
<div class="endpoint" id="post-api-log-size">
<h3><span class="method post">POST</span> <code>/api/log_size</code></h3>
<p><b>Choose the size of the history</b></p>
<p>Saved; applied at the next restart (<code>restart_needed</code> tells).</p>
<h4>Request body <small>application/json</small></h4>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>kb</code></td><td><code>16</code> | <code>32</code></td><td></td></tr>
</table>
</div>
<h4>Answer 200 <small>The setting as saved</small></h4>
<p>Fields: see <a href="#schema-logsize">LogSize</a>.</p>
<h4>Answer 400 <small><code>kb</code> is neither 16 nor 32</small></h4>
</div>
<div class="endpoint" id="post-api-restart">
<h3><span class="method post">POST</span> <code>/api/restart</code></h3>
<p><b>Restart the bridge</b></p>
<p>The stove keeps running; the link comes back in about a minute.</p>
<h4>Answer 200 <small>The bridge restarts</small></h4>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>ok</code></td><td>boolean</td><td></td></tr>
<tr><td><code>reboot</code></td><td>boolean</td><td></td></tr>
</table>
</div>
</div>
<div class="endpoint" id="get-api-update">
<h3><span class="method get">GET</span> <code>/api/update</code></h3>
<p><b>Firmware update status</b></p>
<p>Returns the current self-update state, installed and available versions, progress, and settings.</p>
<h4>Answer 200 <small>Update status</small></h4>
<p>Fields: see <a href="#schema-updatestatus">UpdateStatus</a>.</p>
</div>
<div class="endpoint" id="post-api-update">
<h3><span class="method post">POST</span> <code>/api/update</code></h3>
<p><b>Trigger an update check, installation, or change auto-check settings</b></p>
<p>Send <code>{"action": "check"}</code> to check GitHub releases, <code>{"action": "install"}</code> to download and flash the available release (only permitted when the stove is off), or <code>{"auto_check": true, "check_hours": 24}</code> to configure periodic checks.</p>
<h4>Request body <small>application/json</small></h4>
<p>Fields: see <a href="#schema-updatecommand">UpdateCommand</a>.</p>
<h4>Answer 200 <small>Settings updated (when auto_check was sent)</small></h4>
<p>Fields: see <a href="#schema-updatestatus">UpdateStatus</a>.</p>
<h4>Answer 202 <small>Action accepted and running in the background</small></h4>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>ok</code></td><td>boolean</td><td></td></tr>
</table>
</div>
<h4>Answer 400 <small>Invalid request payload</small></h4>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>ok</code></td><td>boolean</td><td></td></tr>
<tr><td><code>error</code></td><td>string</td><td></td></tr>
</table>
</div>
<h4>Answer 409 <small>Busy, nothing to install, or the stove is not off</small></h4>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>ok</code></td><td>boolean</td><td></td></tr>
<tr><td><code>error</code></td><td>string</td><td></td></tr>
</table>
</div>
</div>
<h2 id="diagnostics">Diagnostics</h2>
<div class="endpoint" id="get-api-txgap">
<h3><span class="method get">GET</span> <code>/api/txgap</code></h3>
<p><b>Delay between frames sent to the stove</b></p>
<h4>Answer 200 <small>Current delay and its bounds</small></h4>
<p>Fields: see <a href="#schema-txgap">TxGap</a>.</p>
</div>
<div class="endpoint" id="post-api-txgap">
<h3><span class="method post">POST</span> <code>/api/txgap</code></h3>
<p><b>Change the delay between frames sent to the stove</b></p>
<p>Diagnostic setting, kept after a restart. Too low, the stove may only process one frame out of two.</p>
<h4>Request body <small>application/json</small></h4>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>ms</code> <span class="req">required</span></td><td>integer, 50 to 600</td><td>Delay in milliseconds</td></tr>
</table>
</div>
<h4>Answer 200 <small>The delay now in use</small></h4>
<p>Fields: see <a href="#schema-txgap">TxGap</a>.</p>
</div>
<div class="endpoint" id="get-log">
<h3><span class="method get">GET</span> <code>/log</code></h3>
<p><b>Log of the exchanges with the stove</b></p>
<p>Plain text, one line per frame: <code>[uptime in ms][rx|tx] content</code>. Identical consecutive lines are merged (<code>xN</code>). The Wi-Fi password is masked. Kept in memory only (about the last 32 kB).</p>
<h4>Answer 200 <small>The log</small></h4>
<p><code>text/plain</code></p>
</div>
<h2 id="schemas">Objects</h2>
<p>The objects exchanged with the bridge, referred to above.</p>
<h3 id="schema-display">Display</h3>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>available</code></td><td>boolean</td><td>True while the display is running (decided at boot by <code>board</code>); the screens below can then be set</td></tr>
<tr><td><code>board</code></td><td><code>none</code> | <code>tdongle</code> | <code>tdongle_off</code> | <code>pocket_dongle</code> | <code>pocket_dongle_off</code></td><td>The board the owner says has a screen: <code>none</code> (default), <code>tdongle</code> (LilyGO T-Dongle-S3, screen running), <code>pocket_dongle</code> (ESP32-S3 Pocket Dongle, screen running), or their <code>_off</code> variant (screen switched off). Stored; applies at the next restart</td></tr>
<tr><td><code>boards</code></td><td>list of string</td><td>Boards this firmware can drive</td></tr>
<tr><td><code>restart_needed</code></td><td>boolean</td><td>True when <code>board</code> differs from what is running now</td></tr>
<tr><td><code>seconds</code></td><td>integer, 2 to 30</td><td></td></tr>
<tr><td><code>brightness</code></td><td>integer, 5 to 100</td><td>Backlight, in percent</td></tr>
<tr><td><code>dim</code></td><td>boolean</td><td>Lower the backlight after a while without a press of BOOT or an alert</td></tr>
<tr><td><code>dim_after</code></td><td>integer, 30 to 3600</td><td>Seconds without activity before dimming</td></tr>
<tr><td><code>dim_level</code></td><td>integer, 0 to 50</td><td>Backlight while dimmed, percent (0 = off)</td></tr>
<tr><td><code>rotate</code></td><td>boolean</td><td>The screen is rotated by 180 degrees</td></tr>
<tr><td><code>language</code></td><td><code></code> | <code>en</code> | <code>fr</code> | <code>it</code> | <code>de</code> | <code>es</code></td><td>Language of the texts on the screen; empty until one is chosen (English is shown meanwhile)</td></tr>
<tr><td><code>screens</code></td><td>list of object</td><td>Every screen once, in the order they are shown</td></tr>
</table>
</div>
<h3 id="schema-wifipowersaving">WifiPowerSaving</h3>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>ok</code></td><td>boolean</td><td></td></tr>
<tr><td><code>enabled</code></td><td>boolean</td><td></td></tr>
</table>
</div>
<h3 id="schema-logsize">LogSize</h3>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>ok</code></td><td>boolean</td><td></td></tr>
<tr><td><code>kb</code></td><td>integer</td><td>The stored choice, in kB</td></tr>
<tr><td><code>running_kb</code></td><td>integer</td><td>The size in use since the last restart, in kB</td></tr>
<tr><td><code>options</code></td><td>list of integer</td><td></td></tr>
<tr><td><code>restart_needed</code></td><td>boolean</td><td>The stored choice is not the one in use</td></tr>
</table>
</div>
<h3 id="schema-access">Access</h3>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>ok</code></td><td>boolean</td><td></td></tr>
<tr><td><code>extra_hosts</code></td><td>list of string</td><td>Domains added by the owner</td></tr>
<tr><td><code>max_extra_hosts</code></td><td>integer</td><td></td></tr>
<tr><td><code>host</code></td><td>string</td><td>Name this request was addressed to</td></tr>
</table>
</div>
<h3 id="schema-health">Health</h3>
<p>How the bridge itself is doing. The counters live in memory and restart from zero at each boot. Also published over MQTT under <code><base>/health/<name></code>, except <code>stove_last_frame_seconds</code>.</p>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>restart_reason</code></td><td><code>power_on</code> | <code>brownout</code> | <code>crash</code> | <code>watchdog</code> | <code>reset_button</code> | <code>usb</code> | <code>user</code> | <code>wifi_change</code> | <code>update</code> | <code>stove_silent</code> | <code>stove_lost</code> | <code>software</code> | <code>unknown</code></td><td>Cause of the last restart: <code>power_on</code> (the stove powered the bridge), <code>brownout</code> (supply voltage too low), <code>crash</code>, <code>watchdog</code> (the program froze), <code>reset_button</code>, <code>usb</code> (reset over USB), <code>user</code> (restart asked through the page or the API), <code>wifi_change</code>, <code>update</code> (wireless update), <code>stove_silent</code> (nothing received from the stove for 60 seconds), <code>stove_lost</code> (the stove had acknowledged the bridge, then refused it for 5 minutes), <code>software</code> (another restart asked by the firmware)</td></tr>
<tr><td><code>min_free_heap</code></td><td>integer</td><td>Lowest free memory since boot, in bytes</td></tr>
<tr><td><code>elf_sha256</code></td><td>string</td><td>First characters of the SHA-256 of the running firmware (not published over MQTT)</td></tr>
<tr><td><code>crash</code></td><td>object</td><td>The last crash the chip saved in its flash, present only after one (not published over MQTT). It stays until another crash replaces it, so it can predate the last restart: <code>elf_sha256</code> is the firmware that crashed. The addresses can be turned into function names with the ELF file of that release.</td></tr>
<tr><td><code>chip_temperature</code></td><td>number or <code>null</code></td><td>Temperature of the chip in °C</td></tr>
<tr><td><code>wifi_disconnects</code></td><td>integer</td><td>Wi-Fi connections lost since boot</td></tr>
<tr><td><code>stove_last_frame_seconds</code></td><td>integer or <code>null</code></td><td>Seconds since the last byte received from the stove; null when nothing was ever received</td></tr>
<tr><td><code>stove_detections</code></td><td>integer</td><td>Times the stove accepted the bridge since boot (1 on a stable link)</td></tr>
<tr><td><code>stove_link_losses</code></td><td>integer</td><td>Times the stove dropped an established link since boot</td></tr>
<tr><td><code>stove_rx_dropped_bytes</code></td><td>integer</td><td>Bytes sent by the stove that the bridge had no room to receive since boot (0 on a healthy bridge)</td></tr>
<tr><td><code>mqtt_disconnects</code></td><td>integer</td><td>Connections to the broker lost since boot</td></tr>
</table>
</div>
<h3 id="schema-state">State</h3>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>device</code> <span class="req">required</span></td><td><a href="#schema-device">Device</a></td><td></td></tr>
<tr><td><code>stove</code> <span class="req">required</span></td><td><a href="#schema-stove">Stove</a></td><td></td></tr>
<tr><td><code>sensors</code> <span class="req">required</span></td><td><a href="#schema-sensors">Sensors</a></td><td></td></tr>
<tr><td><code>controls</code> <span class="req">required</span></td><td><a href="#schema-controlsstate">ControlsState</a></td><td></td></tr>
<tr><td><code>wifi_mode</code></td><td><code>STA</code> | <code>AP</code></td><td><code>AP</code> while the bridge is in setup mode</td></tr>
<tr><td><code>wifi_power_saving</code></td><td>boolean</td><td>Whether Wi-Fi power saving is on, see <code>/api/wifi_power_saving</code></td></tr>
<tr><td><code>ip</code></td><td>string</td><td></td></tr>
<tr><td><code>wifi_connected</code></td><td>boolean</td><td></td></tr>
<tr><td><code>uptime_seconds</code></td><td>integer</td><td></td></tr>
<tr><td><code>write_enabled</code></td><td>boolean</td><td>Always true</td></tr>
<tr><td><code>version_ack</code> <span class="req">required</span></td><td>boolean</td><td>Whether the stove accepted the bridge (the link is up)</td></tr>
<tr><td><code>version_frame</code></td><td><code>V3</code> | <code>V28</code> | <code>V1</code> | <code>?</code></td><td>Protocol variant the stove answered: <code>V3</code> (firmware 2.29), <code>V28</code> (2.28), <code>V1</code> (2.26 / 2.27)</td></tr>
<tr><td><code>generation</code></td><td>integer</td><td></td></tr>
<tr><td><code>schedule_slots_per_day</code></td><td>integer</td><td>How many heating time slots a day the stove takes: 2, or 1 for a stove with firmware 2.25</td></tr>
<tr><td><code>usb</code> <span class="req">required</span></td><td>object</td><td>USB link diagnostics</td></tr>
<tr><td><code>mqtt</code></td><td>object</td><td></td></tr>
<tr><td><code>health</code></td><td><a href="#schema-health">Health</a></td><td></td></tr>
<tr><td><code>frames_in</code></td><td>integer</td><td>Frames received from the stove since boot</td></tr>
<tr><td><code>frames_out</code></td><td>integer</td><td>Frames sent to the stove since boot</td></tr>
<tr><td><code>revision</code></td><td>integer</td><td></td></tr>
<tr><td><code>state_label</code></td><td>string</td><td></td></tr>
<tr><td><code>raw_sensors</code> <span class="req">required</span></td><td>object, any name → integer</td><td>Every value the stove reports, under its RIKA name, in the stove's units (temperatures often in tenths of a degree). Empty until the stove is linked.</td></tr>
<tr><td><code>status</code></td><td>object, any name → string</td><td>Status record exchanged with the stove (the Wi-Fi password is masked)</td></tr>
<tr><td><code>sensors_pos</code></td><td>list of integer</td><td>The sensor records by position (diagnostics)</td></tr>
<tr><td><code>controls_pos</code></td><td>list of integer</td><td>The control records by position (diagnostics)</td></tr>
</table>
</div>
<h3 id="schema-device">Device</h3>
<p>The bridge</p>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>name</code></td><td>string</td><td></td></tr>
<tr><td><code>version</code></td><td>string</td><td>Firmware version of the bridge</td></tr>
<tr><td><code>app_version</code></td><td>string</td><td>Same as <code>version</code></td></tr>
<tr><td><code>firmware_version</code></td><td>string</td><td>Same as <code>version</code></td></tr>
<tr><td><code>ip</code></td><td>string</td><td></td></tr>
<tr><td><code>mac</code></td><td>string</td><td></td></tr>
<tr><td><code>wifi_ssid</code></td><td>string</td><td></td></tr>
<tr><td><code>wifi_rssi</code></td><td>integer</td><td>Wi-Fi signal in dBm</td></tr>
<tr><td><code>uptime_seconds</code></td><td>integer</td><td></td></tr>
<tr><td><code>free_heap</code></td><td>integer</td><td>Free memory in bytes</td></tr>
<tr><td><code>firmware_variant</code></td><td>string</td><td>Firmware variant: standard or psram</td></tr>
<tr><td><code>hardware_psram</code></td><td>boolean</td><td>True when the board has physical PSRAM detected via silicon eFuses</td></tr>
<tr><td><code>hardware_psram_size</code></td><td>integer</td><td>Physical PSRAM size in bytes detected via silicon eFuses (0 when none)</td></tr>
<tr><td><code>psram_build_supported</code></td><td>boolean</td><td>True when the PSRAM can be used by the PSRAM build of the firmware: octal PSRAM, 8 or 16 MB. Quad PSRAM (2 MB) is not supported and the board keeps the standard build</td></tr>
<tr><td><code>psram_size</code></td><td>integer</td><td>Total PSRAM size in bytes (0 when absent or disabled)</td></tr>
<tr><td><code>free_psram</code></td><td>integer</td><td>Free PSRAM memory in bytes (0 when absent or disabled)</td></tr>
<tr><td><code>ota_slot_bytes</code></td><td>integer</td><td>Size in bytes of the slot a wireless update is written to. A firmware larger than this must be installed over USB</td></tr>
<tr><td><code>ota_password_set</code></td><td>boolean</td><td>A password is asked for wireless updates. It is set or removed over USB with the installer, never over the network</td></tr>
<tr><td><code>connected</code></td><td>boolean</td><td>Same as <code>version_ack</code></td></tr>
</table>
</div>
<h3 id="schema-stove">Stove</h3>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>state</code></td><td><code>off</code> | <code>standby</code> | <code>ignition</code> | <code>flame_start</code> | <code>heating</code> | <code>cleaning</code> | <code>burn_off</code> | <code>splitlog</code> | <code>splitlog_check</code> | <code>splitlog_refuel</code> | <code>splitlog_no_refuel</code> | <code>unknown</code></td><td></td></tr>
<tr><td><code>state_code</code></td><td>integer</td><td></td></tr>
<tr><td><code>state_label</code></td><td>string</td><td></td></tr>
<tr><td><code>sub_state</code></td><td>integer</td><td></td></tr>
<tr><td><code>is_burning</code></td><td>boolean</td><td></td></tr>
<tr><td><code>has_error</code></td><td>boolean</td><td></td></tr>
<tr><td><code>error_code</code></td><td>integer</td><td>0 when there is no error</td></tr>
<tr><td><code>error_sub</code></td><td>integer</td><td></td></tr>
<tr><td><code>warning_code</code></td><td>integer</td><td>0 when there is no warning</td></tr>
<tr><td><code>model</code></td><td>integer or <code>null</code></td><td>RIKA model number, null until the stove has sent it</td></tr>
<tr><td><code>model_name</code></td><td>string or <code>null</code></td><td>For example <code>DOMO</code>; null until the stove has sent it</td></tr>
<tr><td><code>brand</code></td><td><code>RIKA</code> | <code>ANIMO</code> or <code>null</code></td><td>Make the stove is set to (sensor <code>fabNumber</code>: 1 = RIKA, 2 = ANIMO); null until the stove has sent its model</td></tr>
<tr><td><code>mainboard_version</code></td><td>string or <code>null</code></td><td>Stove firmware, for example <code>2.29</code>; null until the stove has sent it</td></tr>
<tr><td><code>firmware_build</code></td><td>string or <code>null</code></td><td></td></tr>
</table>
</div>
<h3 id="schema-sensors">Sensors</h3>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>room_temperature</code></td><td>number or <code>null</code></td><td>°C; null when no RIKA room sensor is connected</td></tr>
<tr><td><code>room_sensor_connected</code></td><td>boolean</td><td></td></tr>
<tr><td><code>combustion_temperature</code></td><td>number</td><td>°C</td></tr>
<tr><td><code>board_temperature</code></td><td>number</td><td>°C</td></tr>
<tr><td><code>pellets_total_kg</code></td><td>integer or <code>null</code></td><td>null until the stove has sent it (after a restart of the bridge)</td></tr>
<tr><td><code>pellet_hours</code></td><td>integer or <code>null</code></td><td>Running hours with pellets; null until the stove has sent it</td></tr>
<tr><td><code>log_runtime</code></td><td>integer or <code>null</code></td><td>Running time with split logs of a combined stove, in minutes (0 on a stove that burns pellets only; null until the stove has sent it)</td></tr>
<tr><td><code>log_runtime_hours</code></td><td>integer or <code>null</code></td><td>log_runtime in whole hours</td></tr>
<tr><td><code>service_countdown_kg</code></td><td>integer or <code>null</code></td><td>Pellets left before the next service; null until the stove has sent it</td></tr>
<tr><td><code>fan_speed_rpm</code></td><td>integer</td><td></td></tr>
<tr><td><code>auger_speed_rpm</code></td><td>integer</td><td></td></tr>
<tr><td><code>power_actual_percent</code></td><td>integer</td><td>Power the stove really runs at. In comfort mode the stove sets it itself, whatever <code>power_percent</code> says. 0 when it is not heating.</td></tr>
<tr><td><code>air_flaps_percent</code></td><td>number or <code>null</code></td><td></td></tr>
<tr><td><code>air_flaps_target_percent</code></td><td>number or <code>null</code></td><td></td></tr>
</table>
</div>
<h3 id="schema-controlsstate">ControlsState</h3>
<p>The current settings</p>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>on</code></td><td>boolean</td><td></td></tr>
<tr><td><code>mode</code></td><td><code>manual</code> | <code>auto</code> | <code>comfort</code></td><td><code>manual</code>: fixed power. <code>auto</code>: follows the weekly schedule. <code>comfort</code>: follows the room temperature.</td></tr>
<tr><td><code>mode_code</code></td><td>integer</td><td>0 = manual, 1 = auto, 2 = comfort</td></tr>
<tr><td><code>target_temperature</code></td><td>number</td><td>°C</td></tr>
<tr><td><code>power_percent</code></td><td>integer</td><td></td></tr>
<tr><td><code>heating_times_active</code></td><td>boolean</td><td>Weekly schedule on / off</td></tr>
<tr><td><code>setback_temperature</code></td><td>number</td><td>°C outside the scheduled slots</td></tr>
<tr><td><code>convection_fan1_active</code></td><td>boolean</td><td></td></tr>
<tr><td><code>convection_fan1_level</code></td><td>integer</td><td>0 = automatic, 1 to 5</td></tr>
<tr><td><code>convection_fan1_area</code></td><td>integer</td><td>Trim in percent, -30 to +30</td></tr>
<tr><td><code>convection_fan2_active</code></td><td>boolean</td><td></td></tr>
<tr><td><code>convection_fan2_level</code></td><td>integer</td><td></td></tr>
<tr><td><code>convection_fan2_area</code></td><td>integer</td><td></td></tr>
<tr><td><code>frost_protection_active</code></td><td>boolean</td><td></td></tr>
<tr><td><code>frost_protection_temperature</code></td><td>number</td><td>°C</td></tr>
<tr><td><code>bake_target_temperature</code></td><td>integer</td><td>°C (DOMO BACK only)</td></tr>
<tr><td><code>room_temperature_offset</code></td><td>number</td><td>Room sensor calibration in °C</td></tr>
<tr><td><code>eco_mode</code></td><td>boolean</td><td></td></tr>
<tr><td><code>eco_mode_possible</code></td><td>boolean</td><td>Whether the stove allows eco mode right now</td></tr>
</table>
</div>
<h3 id="schema-controls">Controls</h3>
<p>The current settings. The stove's own names (<code>onOff</code>, <code>tempRoomTarget</code>...) are returned as well and are not described here.</p>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>on</code></td><td>boolean</td><td></td></tr>
<tr><td><code>mode</code></td><td><code>manual</code> | <code>auto</code> | <code>comfort</code></td><td><code>manual</code>: fixed power. <code>auto</code>: follows the weekly schedule. <code>comfort</code>: follows the room temperature.</td></tr>
<tr><td><code>mode_code</code></td><td>integer</td><td></td></tr>
<tr><td><code>target_temperature</code></td><td>number</td><td></td></tr>
<tr><td><code>power_percent</code></td><td>integer</td><td></td></tr>
<tr><td><code>heating_times_active</code></td><td>boolean</td><td></td></tr>
<tr><td><code>setback_temperature</code></td><td>number</td><td></td></tr>
<tr><td><code>frost_protection_active</code></td><td>boolean</td><td></td></tr>
<tr><td><code>frost_protection_temperature</code></td><td>number</td><td></td></tr>
<tr><td><code>bake_target_temperature</code></td><td>integer</td><td></td></tr>
<tr><td><code>room_temperature_offset</code></td><td>number</td><td></td></tr>
<tr><td><code>eco_mode</code></td><td>boolean</td><td></td></tr>
<tr><td><i>other fields</i></td><td></td><td>Not described here.</td></tr>
</table>
</div>
<h3 id="schema-controlscommand">ControlsCommand</h3>
<p>Any subset of these fields</p>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>on</code></td><td>boolean</td><td></td></tr>
<tr><td><code>mode</code></td><td><code>manual</code> | <code>auto</code> | <code>comfort</code></td><td><code>manual</code>: fixed power. <code>auto</code>: follows the weekly schedule. <code>comfort</code>: follows the room temperature.</td></tr>
<tr><td><code>power_percent</code></td><td>integer, 30 to 100</td><td></td></tr>
<tr><td><code>target_temperature</code></td><td>number, 14 to 28</td><td>°C, in whole degrees: a half degree is rounded</td></tr>
<tr><td><code>heating_times_active</code></td><td>boolean</td><td></td></tr>
<tr><td><code>setback_temperature</code></td><td>number</td><td>°C</td></tr>
<tr><td><code>frost_protection_active</code></td><td>boolean</td><td></td></tr>
<tr><td><code>frost_protection_temperature</code></td><td>number, 4 to 10</td><td>°C</td></tr>
<tr><td><code>room_temperature_offset</code></td><td>number, -4 to 4</td><td>°C</td></tr>
<tr><td><code>bake_target_temperature</code></td><td>integer, 130 to 340</td><td>°C (DOMO BACK only)</td></tr>
<tr><td><code>eco_mode</code></td><td>boolean</td><td></td></tr>
<tr><td><code>convection_fan1_active</code></td><td>boolean</td><td></td></tr>
<tr><td><code>convection_fan1_level</code></td><td>integer, 0 to 5</td><td>0 = automatic</td></tr>
<tr><td><code>convection_fan1_area</code></td><td>integer, -30 to 30</td><td></td></tr>
<tr><td><code>convection_fan2_active</code></td><td>boolean</td><td></td></tr>
<tr><td><code>convection_fan2_level</code></td><td>integer, 0 to 5</td><td></td></tr>
<tr><td><code>convection_fan2_area</code></td><td>integer, -30 to 30</td><td></td></tr>
</table>
</div>
<h3 id="schema-controlsresult">ControlsResult</h3>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>ok</code></td><td>boolean</td><td></td></tr>
<tr><td><code>on</code></td><td>boolean</td><td></td></tr>
<tr><td><code>mode</code></td><td><code>manual</code> | <code>auto</code> | <code>comfort</code></td><td><code>manual</code>: fixed power. <code>auto</code>: follows the weekly schedule. <code>comfort</code>: follows the room temperature.</td></tr>
<tr><td><code>mode_code</code></td><td>integer</td><td></td></tr>
<tr><td><code>target_temperature</code></td><td>number</td><td></td></tr>
<tr><td><code>power_percent</code></td><td>integer</td><td></td></tr>
</table>
</div>
<h3 id="schema-schedule">Schedule</h3>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>ok</code></td><td>boolean</td><td></td></tr>
<tr><td><code>active</code></td><td>boolean</td><td>Weekly schedule on / off</td></tr>
<tr><td><code>heatingTimesActive</code></td><td>integer</td><td>Same as <code>active</code>, as 0 / 1</td></tr>
<tr><td><code>setback_temperature</code></td><td>number</td><td>°C outside the scheduled slots</td></tr>
<tr><td><code>setBackTemp</code></td><td>integer</td><td>Same, in tenths of a degree</td></tr>
<tr><td><code>slots</code></td><td>object, any name → integer</td><td>Two slots per day, <code>heatTime<Day><1|2></code> with Day in Mon, Tue, Wed, Thu, Fri, Sat, Sun. On a stove with firmware 2.25 only the first slot of a day is used; the second one is always 0.</td></tr>
<tr><td><code>slots_per_day</code></td><td>integer</td><td>How many slots a day the stove takes: 2, or 1 for a stove with firmware 2.25</td></tr>
<tr><td><code>day_ranges</code></td><td>object, any name → object</td><td>Only on a stove with firmware 2.25: the daily range of each weekday (Sun, Mon, ... Sat), <code>start</code> and <code>end</code> in minutes since midnight, as the stove holds them (the same ranges as the first slot of each day in <code>slots</code>).</td></tr>
</table>
</div>
<h3 id="schema-schedulecommand">ScheduleCommand</h3>
<p><code>heating_times_active</code>, <code>setback_temperature</code>, and any of the 14 slots <code>heatTime<Day><1|2></code></p>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>heating_times_active</code></td><td>boolean</td><td></td></tr>
<tr><td><code>setback_temperature</code></td><td>number</td><td></td></tr>
<tr><td><i>any other name</i></td><td>integer</td><td>A heating slot as one number: start <code>HHMM</code> times 10000, plus end <code>HHMM</code>. <code>6000800</code> is 06:00 to 08:00, <code>17002200</code> is 17:00 to 22:00, <code>0</code> is an unused slot.</td></tr>
</table>
</div>
<h3 id="schema-mqtt">Mqtt</h3>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>enabled</code></td><td>boolean</td><td></td></tr>
<tr><td><code>host</code></td><td>string</td><td></td></tr>
<tr><td><code>port</code></td><td>integer</td><td></td></tr>
<tr><td><code>user</code></td><td>string</td><td></td></tr>
<tr><td><code>password_set</code></td><td>boolean</td><td>Whether a password is stored (it is never returned)</td></tr>
<tr><td><code>base_topic</code></td><td>string</td><td></td></tr>
<tr><td><code>discovery</code></td><td>boolean</td><td>Whether the Home Assistant discovery messages are published</td></tr>
<tr><td><code>tls</code></td><td>boolean</td><td>Whether the connection to the broker is encrypted (MQTT over TLS)</td></tr>
<tr><td><code>ca_set</code></td><td>boolean</td><td>Whether an authority certificate is stored (it is not returned)</td></tr>
<tr><td><code>tls_error</code></td><td>integer</td><td>Last error code of the TLS layer, 0 when none (diagnostics)</td></tr>
<tr><td><code>connected</code></td><td>boolean</td><td></td></tr>
<tr><td><code>status</code></td><td><code>disabled</code> | <code>connected</code> | <code>connecting</code> | <code>waiting for Wi-Fi</code> | <code>broker unreachable</code> | <code>connection lost</code> | <code>certificate not trusted</code> | <code>secure connection failed</code> | <code>refused: wrong user or password</code> | <code>refused by the broker</code></td><td></td></tr>
</table>
</div>
<h3 id="schema-mqttcommand">MqttCommand</h3>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>enabled</code></td><td>boolean</td><td></td></tr>
<tr><td><code>host</code></td><td>string</td><td>Broker address</td></tr>
<tr><td><code>port</code></td><td>integer</td><td>Default: <code>1883</code>.</td></tr>
<tr><td><code>user</code></td><td>string</td><td></td></tr>
<tr><td><code>password</code></td><td>string</td><td>Empty to erase the stored one</td></tr>
<tr><td><code>base_topic</code></td><td>string</td><td>Default: <code>openfirenet</code>.</td></tr>
<tr><td><code>discovery</code></td><td>boolean</td><td>Home Assistant MQTT discovery: the stove appears by itself in Home Assistant. Leave it off when the Open Firenet integration is used Default: <code>False</code>.</td></tr>
<tr><td><code>tls</code></td><td>boolean</td><td>Encrypted connection (MQTT over TLS, usually port 8883). The broker's certificate must be signed by a public authority, or by the one given in ca_certificate Default: <code>False</code>.</td></tr>
<tr><td><code>ca_certificate</code></td><td>string</td><td>Certificate (PEM) of your own authority, for a broker whose certificate is not signed by a public one; the name in the broker's certificate is then not checked. Empty to erase the stored one. Refused with a 400 answer when it is not a PEM certificate</td></tr>
</table>
</div>
<h3 id="schema-txgap">TxGap</h3>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>ms</code></td><td>integer</td><td></td></tr>
<tr><td><code>default</code></td><td>integer</td><td></td></tr>
<tr><td><code>min</code></td><td>integer</td><td></td></tr>
<tr><td><code>max</code></td><td>integer</td><td></td></tr>
</table>
</div>
<h3 id="schema-version">Version</h3>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>app</code></td><td>string</td><td></td></tr>
<tr><td><code>version</code></td><td>string</td><td></td></tr>
<tr><td><code>build_date</code></td><td>string</td><td></td></tr>
<tr><td><code>build_time</code></td><td>string</td><td></td></tr>
<tr><td><code>target</code></td><td>string</td><td></td></tr>
</table>
</div>
<h3 id="schema-updatestatus">UpdateStatus</h3>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>state</code> <span class="req">required</span></td><td><code>idle</code> | <code>checking</code> | <code>available</code> | <code>downloading</code> | <code>verifying</code> | <code>installing</code> | <code>error</code> | <code>restarting</code></td><td>Current lifecycle state of the update task</td></tr>
<tr><td><code>current</code> <span class="req">required</span></td><td>string</td><td>Version currently installed on the bridge (e.g. 4.3.1)</td></tr>
<tr><td><code>latest</code> <span class="req">required</span></td><td>string</td><td>Latest version found on GitHub releases, if any</td></tr>
<tr><td><code>percent</code> <span class="req">required</span></td><td>integer</td><td>Progress percentage (0 to 100) during download or flash</td></tr>
<tr><td><code>error</code> <span class="req">required</span></td><td>string</td><td>Description of the last error, if state is error</td></tr>
<tr><td><code>stove_blocks</code> <span class="req">required</span></td><td>boolean</td><td>True if the stove state prevents installation (must be strictly switched off)</td></tr>
<tr><td><code>auto_check</code> <span class="req">required</span></td><td>boolean</td><td>Whether periodic background checks are enabled</td></tr>
<tr><td><code>check_hours</code> <span class="req">required</span></td><td>integer</td><td>Interval between checks in hours (12, 24, or 168)</td></tr>
<tr><td><code>last_check</code> <span class="req">required</span></td><td>integer</td><td>Seconds elapsed since the last check that reached GitHub (-1 if none)</td></tr>
</table>
</div>
<h3 id="schema-updatecommand">UpdateCommand</h3>
<div class="table-wrap">
<table class="fields">
<tr><th>Field</th><th>Type</th><th>Description</th></tr>
<tr><td><code>action</code></td><td><code>check</code> | <code>install</code></td><td>Action to run in the background</td></tr>
<tr><td><code>auto_check</code></td><td>boolean</td><td>Enable or disable periodic checks</td></tr>
<tr><td><code>check_hours</code></td><td><code>12</code> | <code>24</code> | <code>168</code></td><td>Check interval in hours</td></tr>
</table>
</div>
</main>
<footer class="site-footer">
<div class="inner">
<p>Open Firenet is an open-source project, not affiliated with or endorsed by RIKA Innovative Ofentechnik GmbH. The protocol was reverse-engineered for interoperability only. Use at your own risk, no warranty.</p>
<p><a href="https://github.com/openfirenet">GitHub</a> · <a href="contribute.html">Contribute</a> · Questions and problems: <a href="https://github.com/openfirenet/open-firenet/issues">bridge and firmware issues</a> · <a href="https://github.com/openfirenet/open-firenet-ha/issues">Home Assistant integration issues</a></p>
</div>
</footer>
<div class="lightbox" id="lightbox" hidden><img alt=""></div>
<script>
// Navigation menus: only one open at a time, closed by a click elsewhere or by Escape.
(function () {
var groups = document.querySelectorAll('.nav-group');
function closeAll(except) { groups.forEach(function (g) { if (g !== except) g.open = false; }); }
var phone = window.matchMedia('(max-width: 760px)');
groups.forEach(function (g) { g.addEventListener('toggle', function () { if (g.open && !phone.matches) closeAll(g); }); });
document.addEventListener('click', function (e) { if (!phone.matches && !e.target.closest('.nav-group')) closeAll(null); });
document.addEventListener('keydown', function (e) { if (e.key === 'Escape') closeAll(null); });
// On a phone the whole bar folds behind a Menu button.
var toggle = document.querySelector('.nav-toggle'), nav = document.getElementById('site-nav');
toggle.addEventListener('click', function () {
var open = nav.classList.toggle('open');
toggle.setAttribute('aria-expanded', open ? 'true' : 'false');
groups.forEach(function (g) { g.open = open; }); // on a phone the groups are shown in full
});
})();
// Languages: a click on a language in the menu remembers it.
document.querySelectorAll('.nav-lang a[data-lang]').forEach(function (a) {
a.addEventListener('click', function () { try { localStorage.setItem('site-lang', a.getAttribute('data-lang')); } catch (e) {} });
});
// Screenshots open full size on click; click again or press Escape to close.
(function () {
var box = document.getElementById('lightbox'), big = box.querySelector('img');
function close() { box.hidden = true; big.removeAttribute('src'); }
document.querySelectorAll('img.shot').forEach(function (img) {
img.tabIndex = 0;
img.setAttribute('role', 'button');
function open() { big.src = img.currentSrc || img.src; big.alt = img.alt; box.hidden = false; }
img.addEventListener('click', open);
img.addEventListener('keydown', function (e) { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); open(); } });
});
box.addEventListener('click', close);
document.addEventListener('keydown', function (e) { if (e.key === 'Escape') close(); });
})();
</script>
</body>
</html>