API reference

Every endpoint of the bridge, with its fields, types, units and ranges. Generated from the OpenAPI description of firmware 3.6.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.

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/restartRestart the bridge
POST /api/restartRestart the bridge
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.

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.

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/restart

Restart the bridge

Any method is accepted; the web page uses POST. The stove keeps running; the link comes back in about a minute.

Answer 200 The bridge restarts

FieldTypeDescription
okboolean
rebootboolean

POST /api/restart

Restart the bridge

Answer 200 The bridge restarts

FieldTypeDescription
okboolean
rebootboolean

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.

State

FieldTypeDescription
device requiredDevice
stove requiredStove
sensors requiredSensors
controls requiredControlsState
wifi_modeSTA | APAP while the bridge is in setup mode
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
usb requiredobjectUSB link diagnostics
mqttobject
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
ota_slot_bytesintegerSize in bytes of the slot a wireless update is written to. A firmware larger than this must be installed over USB
connectedbooleanSame as version_ack

Stove

FieldTypeDescription
stateoff | standby | ignition | flame_start | heating | cleaning | burn_off | splitlog | 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
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
pellet_hoursintegerRunning hours
service_countdown_kgintegerPellets left before the next service
fan_speed_rpminteger
auger_speed_rpminteger
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

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