Skip to main content

Managing Devices

Add a device

  1. DevicesAdd device.
  2. Fill in the fields:
FieldDescription
NameDisplay name (e.g. Living room light)
RoomAssociated room
TypeLighting, AC, Security, …
Relay number1–16 on the ESP32 board
ESP32 Board NameMQTT board name (e.g. sala)

ESP32 Board Name appears when a relay number is set. Use lowercase letters, numbers, and _ only.

MQTT topics

With esp32_name = sala and relay_number = 3:

smarthome/sala/relay/3 → ON / OFF

Without esp32_name (legacy):

smarthome/relay/3

Toggle a device

  • From the table: power button ⚡
  • API: PATCH /api/v1/devices/{id}/toggle
  • Status: online = on, offline = off

Energy monitoring

In the device form:

  • Energy monitoring — enable tracking
  • Watt rating — approximate load (e.g. 60W LED)
  • Monthly budget (kWh) — alert when budget is exceeded

ESP32 badge

The board name appears as a badge next to the device name when multiple ESP32 units are in use.

Troubleshooting

IssueCheck
Toggle does nothingesp32_name + MQTT broker reachability
State not updatingPusher keys in server .env
422 ValidationESP32 name must be lowercase a-z, 0-9, _, -