API reference

Every endpoint of the bridge, with its fields, types, units and ranges. Generated from the OpenAPI description of firmware 5.0.0.

Local REST API of the Open Firenet bridge, the ESP32-S3 that replaces the RIKA Firenet stick. It is served on your network at http://open-firenet.local (or the bridge's IP address), without key or account.

Units are natural ones: temperatures in °C, power in percent, readable mode names.

Field names. 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 tempRoomTarget for target_temperature, or the plain-text form onOff=1; heatingPower=70;), and GET /api/controls also returns the settings under the stove's own names and units (onOff, tempRoomTarget in tenths of a degree...). New code should not rely on them.

Who can call it. Programs on your network (Home Assistant, scripts, curl) 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 .local name, or a domain you added in the Bridge tab, section Access (/api/access). The 403 is JSON: refused tells which check refused (host or origin) and ip gives the address that always works.

Before the stove is linked. Until the stove has answered, version_ack is false, the stove model and firmware version are null, and the other values are defaults, not measurements.

Endpoints

EndpointPurpose
GET /api/stateEverything at once
GET /api/controlsCurrent settings
POST /api/controlsChange settings
GET /api/scheduleWeekly heating schedule
POST /api/scheduleChange the weekly heating schedule
GET /api/mqttMQTT settings and connection status
POST /api/mqttChange the MQTT settings
GET /api/versionFirmware version of the bridge
GET /api/scanWi-Fi networks seen by the bridge
POST /api/wifiSet the Wi-Fi network, then restart
POST /api/forgetErase the saved settings, then restart in setup mode
GET /api/accessDomains under which the bridge accepts to answer
POST /api/accessSet the added domains
GET /api/displayScreens of the bridge's small display
POST /api/displayChoose the board of the display, and order its screens
GET /api/wifi_power_savingWhether Wi-Fi power saving is on
POST /api/wifi_power_savingSwitch Wi-Fi power saving on or off
GET /api/log_sizeSize of the history of the exchanges with the stove
POST /api/log_sizeChoose the size of the history
POST /api/restartRestart the bridge
GET /api/updateFirmware update status
POST /api/updateTrigger an update check, installation, or change auto-check settings
GET /api/txgapDelay between frames sent to the stove
POST /api/txgapChange the delay between frames sent to the stove
GET /logLog of the exchanges with the stove

Stove

Read the stove and change its settings

GET /api/state

Everything at once

Bridge, stove, sensors, settings and link diagnostics. This is what the web page and the Home Assistant integration poll.

Answer 200 Current state

Fields: see State.

GET /api/controls

Current settings

Answer 200 The settings, under the recommended names (the stove's own names and units are returned too)

Fields: see Controls.

POST /api/controls

Change settings

Send only the fields to change; the others keep their value. Ignored while the stove is not linked. On stove firmware 2.28 only on, mode, power_percent and target_temperature are applied.

Request body application/json

Fields: see ControlsCommand.

21 °C in comfort mode:

{"target_temperature": 21, "mode": "comfort"}

Switch on at 80 % power:

{"on": true, "power_percent": 80}

Answer 200 The base settings sent to the stove

Fields: see ControlsResult.

Answer 503 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.

FieldTypeDescription
okboolean
errorstove_not_ready
messagestring

GET /api/schedule

Weekly heating schedule

Answer 200 The 14 time slots and the setback temperature

Fields: see Schedule.

POST /api/schedule

Change the weekly heating schedule

Same handling as POST /api/controls; send the slots to change under their names.

Request body application/json

Fields: see ScheduleCommand.

Example:

{"heating_times_active": true, "setback_temperature": 16, "heatTimeMon1": 6000800, "heatTimeMon2": 17002200}

Answer 200 The base settings sent to the stove

Fields: see ControlsResult.

Answer 503 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.

FieldTypeDescription
okboolean
errorstove_not_ready
messagestring

Bridge

Settings and maintenance of the bridge itself

GET /api/mqtt

MQTT settings and connection status

Answer 200 The settings (the password is never returned) and the status

Fields: see Mqtt.

POST /api/mqtt

Change the MQTT settings

A field left out keeps its value. The client restarts with the new settings; the status follows at the next GET.

Request body application/json

Fields: see MqttCommand.

Answer 200 The saved settings

Fields: see Mqtt.

GET /api/version

Firmware version of the bridge

Answer 200 Version and build date

Fields: see Version.

GET /api/scan

Wi-Fi networks seen by the bridge

The first call starts a scan and answers 202; call again a few seconds later for the list.

Answer 200 Networks found (2.4 GHz), each name once

A list of:

FieldTypeDescription
ssid requiredstring
rssi requiredintegerSignal strength in dBm

Answer 202 Scan in progress

FieldTypeDescription
statusscanning

POST /api/wifi

Set the Wi-Fi network, then restart

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.

Request body application/x-www-form-urlencoded

FieldTypeDescription
ssid requiredstring
passstringEmpty for an open network

Answer 200 Saved; the bridge restarts

text/html

Answer 400 Missing network name

text/html

POST /api/forget

Erase the saved settings, then restart in setup mode

Erases the Wi-Fi network, the MQTT settings and the frame delay. The bridge then creates the Open-Firenet-Setup network.

Answer 200 Erased; the bridge restarts

FieldTypeDescription
okboolean

GET /api/access

Domains under which the bridge accepts to answer

Besides its IP address and open-firenet.local, see "Who can call it" above.

Answer 200 The added domains

Fields: see Access.

POST /api/access

Set the added domains

Request body application/json

FieldTypeDescription
extra_hostsstringOne domain per line (commas and spaces also separate them); an empty text removes them all. An entry needs at least one dot inside (example.org, not org), and also covers the names under it. At most 8 entries of 63 characters; entries that do not fit these rules are dropped.

Answer 200 The domains as saved

Fields: see Access.

GET /api/display

Screens of the bridge's small display

The small display of boards that have one: which board the owner says it is (board, default none), and, while it runs, which screens it shows, in which order, and for how long each.

Answer 200 The setting

Fields: see Display.

POST /api/display

Choose the board of the display, and order its screens

Saved and kept after a restart. screens and seconds apply at once: the screens listed come first, in that order; those left out follow in their previous order. board applies at the next restart. Any field may be left out.

Request body application/json

FieldTypeDescription
boardnone | tdongle | tdongle_off | pocket_dongle | pocket_dongle_off
secondsinteger, 2 to 30Seconds each screen stays
brightnessinteger, 5 to 100
dimboolean
dim_afterinteger, 30 to 3600
dim_levelinteger, 0 to 50
rotatebooleanRotate the screen by 180 degrees
languageen | fr | it | de | esLanguage of the texts on the screen
screenslist of object

Answer 200 The setting as saved

Fields: see Display.

Answer 400 Unknown board, unknown or repeated screen id, or seconds out of range

GET /api/wifi_power_saving

Whether Wi-Fi power saving is on

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.

Answer 200 The setting

Fields: see WifiPowerSaving.

POST /api/wifi_power_saving

Switch Wi-Fi power saving on or off

Saved, and applied at once without a restart.

Request body application/json

FieldTypeDescription
enabledboolean

Answer 200 The setting as saved

Fields: see WifiPowerSaving.

GET /api/log_size

Size of the history of the exchanges with the stove

The bridge keeps the latest messages exchanged with the stove (/api/log, diagnostic file). 16 kB by default; 32 kB keeps twice as much history and uses 16 kB more memory.

Answer 200 The setting

Fields: see LogSize.

POST /api/log_size

Choose the size of the history

Saved; applied at the next restart (restart_needed tells).

Request body application/json

FieldTypeDescription
kb16 | 32

Answer 200 The setting as saved

Fields: see LogSize.

Answer 400 kb is neither 16 nor 32

POST /api/restart

Restart the bridge

The stove keeps running; the link comes back in about a minute.

Answer 200 The bridge restarts

FieldTypeDescription
okboolean
rebootboolean

GET /api/update

Firmware update status

Returns the current self-update state, installed and available versions, progress, and settings.

Answer 200 Update status

Fields: see UpdateStatus.

POST /api/update

Trigger an update check, installation, or change auto-check settings

Send {"action": "check"} to check GitHub releases, {"action": "install"} to download and flash the available release (only permitted when the stove is off), or {"auto_check": true, "check_hours": 24} to configure periodic checks.

Request body application/json

Fields: see UpdateCommand.

Answer 200 Settings updated (when auto_check was sent)

Fields: see UpdateStatus.

Answer 202 Action accepted and running in the background

FieldTypeDescription
okboolean

Answer 400 Invalid request payload

FieldTypeDescription
okboolean
errorstring

Answer 409 Busy, nothing to install, or the stove is not off

FieldTypeDescription
okboolean
errorstring

Diagnostics

GET /api/txgap

Delay between frames sent to the stove

Answer 200 Current delay and its bounds

Fields: see TxGap.

POST /api/txgap

Change the delay between frames sent to the stove

Diagnostic setting, kept after a restart. Too low, the stove may only process one frame out of two.

Request body application/json

FieldTypeDescription
ms requiredinteger, 50 to 600Delay in milliseconds

Answer 200 The delay now in use

Fields: see TxGap.

GET /log

Log of the exchanges with the stove

Plain text, one line per frame: [uptime in ms][rx|tx] content. Identical consecutive lines are merged (xN). The Wi-Fi password is masked. Kept in memory only (about the last 32 kB).

Answer 200 The log

text/plain

Objects

The objects exchanged with the bridge, referred to above.

Display

FieldTypeDescription
availablebooleanTrue while the display is running (decided at boot by board); the screens below can then be set
boardnone | tdongle | tdongle_off | pocket_dongle | pocket_dongle_offThe board the owner says has a screen: none (default), tdongle (LilyGO T-Dongle-S3, screen running), pocket_dongle (ESP32-S3 Pocket Dongle, screen running), or their _off variant (screen switched off). Stored; applies at the next restart
boardslist of stringBoards this firmware can drive
restart_neededbooleanTrue when board differs from what is running now
secondsinteger, 2 to 30
brightnessinteger, 5 to 100Backlight, in percent
dimbooleanLower the backlight after a while without a press of BOOT or an alert
dim_afterinteger, 30 to 3600Seconds without activity before dimming
dim_levelinteger, 0 to 50Backlight while dimmed, percent (0 = off)
rotatebooleanThe screen is rotated by 180 degrees
language | en | fr | it | de | esLanguage of the texts on the screen; empty until one is chosen (English is shown meanwhile)
screenslist of objectEvery screen once, in the order they are shown

WifiPowerSaving

FieldTypeDescription
okboolean
enabledboolean

LogSize

FieldTypeDescription
okboolean
kbintegerThe stored choice, in kB
running_kbintegerThe size in use since the last restart, in kB
optionslist of integer
restart_neededbooleanThe stored choice is not the one in use

Access

FieldTypeDescription
okboolean
extra_hostslist of stringDomains added by the owner
max_extra_hostsinteger
hoststringName this request was addressed to

Health

How the bridge itself is doing. The counters live in memory and restart from zero at each boot. Also published over MQTT under <base>/health/<name>, except stove_last_frame_seconds.

FieldTypeDescription
restart_reasonpower_on | brownout | crash | watchdog | reset_button | usb | user | wifi_change | update | stove_silent | stove_lost | software | unknownCause of the last restart: power_on (the stove powered the bridge), brownout (supply voltage too low), crash, watchdog (the program froze), reset_button, usb (reset over USB), user (restart asked through the page or the API), wifi_change, update (wireless update), stove_silent (nothing received from the stove for 60 seconds), stove_lost (the stove had acknowledged the bridge, then refused it for 5 minutes), software (another restart asked by the firmware)
min_free_heapintegerLowest free memory since boot, in bytes
elf_sha256stringFirst characters of the SHA-256 of the running firmware (not published over MQTT)
crashobjectThe 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: elf_sha256 is the firmware that crashed. The addresses can be turned into function names with the ELF file of that release.
chip_temperaturenumber or nullTemperature of the chip in °C
wifi_disconnectsintegerWi-Fi connections lost since boot
stove_last_frame_secondsinteger or nullSeconds since the last byte received from the stove; null when nothing was ever received
stove_detectionsintegerTimes the stove accepted the bridge since boot (1 on a stable link)
stove_link_lossesintegerTimes the stove dropped an established link since boot
stove_rx_dropped_bytesintegerBytes sent by the stove that the bridge had no room to receive since boot (0 on a healthy bridge)
mqtt_disconnectsintegerConnections to the broker lost since boot

State

FieldTypeDescription
device requiredDevice
stove requiredStove
sensors requiredSensors
controls requiredControlsState
wifi_modeSTA | APAP while the bridge is in setup mode
wifi_power_savingbooleanWhether Wi-Fi power saving is on, see /api/wifi_power_saving
ipstring
wifi_connectedboolean
uptime_secondsinteger
write_enabledbooleanAlways true
version_ack requiredbooleanWhether the stove accepted the bridge (the link is up)
version_frameV3 | V28 | V1 | ?Protocol variant the stove answered: V3 (firmware 2.29), V28 (2.28), V1 (2.26 / 2.27)
generationinteger
schedule_slots_per_dayintegerHow many heating time slots a day the stove takes: 2, or 1 for a stove with firmware 2.25
usb requiredobjectUSB link diagnostics
mqttobject
healthHealth
frames_inintegerFrames received from the stove since boot
frames_outintegerFrames sent to the stove since boot
revisioninteger
state_labelstring
raw_sensors requiredobject, any name → integerEvery 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.
statusobject, any name → stringStatus record exchanged with the stove (the Wi-Fi password is masked)
sensors_poslist of integerThe sensor records by position (diagnostics)
controls_poslist of integerThe control records by position (diagnostics)

Device

The bridge

FieldTypeDescription
namestring
versionstringFirmware version of the bridge
app_versionstringSame as version
firmware_versionstringSame as version
ipstring
macstring
wifi_ssidstring
wifi_rssiintegerWi-Fi signal in dBm
uptime_secondsinteger
free_heapintegerFree memory in bytes
firmware_variantstringFirmware variant: standard or psram
hardware_psrambooleanTrue when the board has physical PSRAM detected via silicon eFuses
hardware_psram_sizeintegerPhysical PSRAM size in bytes detected via silicon eFuses (0 when none)
psram_build_supportedbooleanTrue 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
psram_sizeintegerTotal PSRAM size in bytes (0 when absent or disabled)
free_psramintegerFree PSRAM memory in bytes (0 when absent or disabled)
ota_slot_bytesintegerSize in bytes of the slot a wireless update is written to. A firmware larger than this must be installed over USB
ota_password_setbooleanA password is asked for wireless updates. It is set or removed over USB with the installer, never over the network
connectedbooleanSame as version_ack

Stove

FieldTypeDescription
stateoff | standby | ignition | flame_start | heating | cleaning | burn_off | splitlog | splitlog_check | splitlog_refuel | splitlog_no_refuel | unknown
state_codeinteger
state_labelstring
sub_stateinteger
is_burningboolean
has_errorboolean
error_codeinteger0 when there is no error
error_subinteger
warning_codeinteger0 when there is no warning
modelinteger or nullRIKA model number, null until the stove has sent it
model_namestring or nullFor example DOMO; null until the stove has sent it
brandRIKA | ANIMO or nullMake the stove is set to (sensor fabNumber: 1 = RIKA, 2 = ANIMO); null until the stove has sent its model
mainboard_versionstring or nullStove firmware, for example 2.29; null until the stove has sent it
firmware_buildstring or null

Sensors

FieldTypeDescription
room_temperaturenumber or null°C; null when no RIKA room sensor is connected
room_sensor_connectedboolean
combustion_temperaturenumber°C
board_temperaturenumber°C
pellets_total_kginteger or nullnull until the stove has sent it (after a restart of the bridge)
pellet_hoursinteger or nullRunning hours with pellets; null until the stove has sent it
log_runtimeinteger or nullRunning 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)
log_runtime_hoursinteger or nulllog_runtime in whole hours
service_countdown_kginteger or nullPellets left before the next service; null until the stove has sent it
fan_speed_rpminteger
auger_speed_rpminteger
power_actual_percentintegerPower the stove really runs at. In comfort mode the stove sets it itself, whatever power_percent says. 0 when it is not heating.
air_flaps_percentnumber or null
air_flaps_target_percentnumber or null

ControlsState

The current settings

FieldTypeDescription
onboolean
modemanual | auto | comfortmanual: fixed power. auto: follows the weekly schedule. comfort: follows the room temperature.
mode_codeinteger0 = manual, 1 = auto, 2 = comfort
target_temperaturenumber°C
power_percentinteger
heating_times_activebooleanWeekly schedule on / off
setback_temperaturenumber°C outside the scheduled slots
convection_fan1_activeboolean
convection_fan1_levelinteger0 = automatic, 1 to 5
convection_fan1_areaintegerTrim in percent, -30 to +30
convection_fan2_activeboolean
convection_fan2_levelinteger
convection_fan2_areainteger
frost_protection_activeboolean
frost_protection_temperaturenumber°C
bake_target_temperatureinteger°C (DOMO BACK only)
room_temperature_offsetnumberRoom sensor calibration in °C
eco_modeboolean
eco_mode_possiblebooleanWhether the stove allows eco mode right now

Controls

The current settings. The stove's own names (onOff, tempRoomTarget...) are returned as well and are not described here.

FieldTypeDescription
onboolean
modemanual | auto | comfortmanual: fixed power. auto: follows the weekly schedule. comfort: follows the room temperature.
mode_codeinteger
target_temperaturenumber
power_percentinteger
heating_times_activeboolean
setback_temperaturenumber
frost_protection_activeboolean
frost_protection_temperaturenumber
bake_target_temperatureinteger
room_temperature_offsetnumber
eco_modeboolean
other fieldsNot described here.

ControlsCommand

Any subset of these fields

FieldTypeDescription
onboolean
modemanual | auto | comfortmanual: fixed power. auto: follows the weekly schedule. comfort: follows the room temperature.
power_percentinteger, 30 to 100
target_temperaturenumber, 14 to 28°C, in whole degrees: a half degree is rounded
heating_times_activeboolean
setback_temperaturenumber°C
frost_protection_activeboolean
frost_protection_temperaturenumber, 4 to 10°C
room_temperature_offsetnumber, -4 to 4°C
bake_target_temperatureinteger, 130 to 340°C (DOMO BACK only)
eco_modeboolean
convection_fan1_activeboolean
convection_fan1_levelinteger, 0 to 50 = automatic
convection_fan1_areainteger, -30 to 30
convection_fan2_activeboolean
convection_fan2_levelinteger, 0 to 5
convection_fan2_areainteger, -30 to 30

ControlsResult

FieldTypeDescription
okboolean
onboolean
modemanual | auto | comfortmanual: fixed power. auto: follows the weekly schedule. comfort: follows the room temperature.
mode_codeinteger
target_temperaturenumber
power_percentinteger

Schedule

FieldTypeDescription
okboolean
activebooleanWeekly schedule on / off
heatingTimesActiveintegerSame as active, as 0 / 1
setback_temperaturenumber°C outside the scheduled slots
setBackTempintegerSame, in tenths of a degree
slotsobject, any name → integerTwo slots per day, heatTime<Day><1|2> 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.
slots_per_dayintegerHow many slots a day the stove takes: 2, or 1 for a stove with firmware 2.25
day_rangesobject, any name → objectOnly on a stove with firmware 2.25: the daily range of each weekday (Sun, Mon, ... Sat), start and end in minutes since midnight, as the stove holds them (the same ranges as the first slot of each day in slots).

ScheduleCommand

heating_times_active, setback_temperature, and any of the 14 slots heatTime<Day><1|2>

FieldTypeDescription
heating_times_activeboolean
setback_temperaturenumber
any other nameintegerA heating slot as one number: start HHMM times 10000, plus end HHMM. 6000800 is 06:00 to 08:00, 17002200 is 17:00 to 22:00, 0 is an unused slot.

Mqtt

FieldTypeDescription
enabledboolean
hoststring
portinteger
userstring
password_setbooleanWhether a password is stored (it is never returned)
base_topicstring
discoverybooleanWhether the Home Assistant discovery messages are published
tlsbooleanWhether the connection to the broker is encrypted (MQTT over TLS)
ca_setbooleanWhether an authority certificate is stored (it is not returned)
tls_errorintegerLast error code of the TLS layer, 0 when none (diagnostics)
connectedboolean
statusdisabled | connected | connecting | waiting for Wi-Fi | broker unreachable | connection lost | certificate not trusted | secure connection failed | refused: wrong user or password | refused by the broker

MqttCommand

FieldTypeDescription
enabledboolean
hoststringBroker address
portintegerDefault: 1883.
userstring
passwordstringEmpty to erase the stored one
base_topicstringDefault: openfirenet.
discoverybooleanHome Assistant MQTT discovery: the stove appears by itself in Home Assistant. Leave it off when the Open Firenet integration is used Default: False.
tlsbooleanEncrypted 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: False.
ca_certificatestringCertificate (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

TxGap

FieldTypeDescription
msinteger
defaultinteger
mininteger
maxinteger

Version

FieldTypeDescription
appstring
versionstring
build_datestring
build_timestring
targetstring

UpdateStatus

FieldTypeDescription
state requiredidle | checking | available | downloading | verifying | installing | error | restartingCurrent lifecycle state of the update task
current requiredstringVersion currently installed on the bridge (e.g. 4.3.1)
latest requiredstringLatest version found on GitHub releases, if any
percent requiredintegerProgress percentage (0 to 100) during download or flash
error requiredstringDescription of the last error, if state is error
stove_blocks requiredbooleanTrue if the stove state prevents installation (must be strictly switched off)
auto_check requiredbooleanWhether periodic background checks are enabled
check_hours requiredintegerInterval between checks in hours (12, 24, or 168)
last_check requiredintegerSeconds elapsed since the last check that reached GitHub (-1 if none)

UpdateCommand

FieldTypeDescription
actioncheck | installAction to run in the background
auto_checkbooleanEnable or disable periodic checks
check_hours12 | 24 | 168Check interval in hours