-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home Assistant setup
Practical walkthrough for MQTT telemetry and MQTT Discovery. Command topic reference remains in the README.
- Gateway flashed and
/statusshows live spa data (Getting started). - An MQTT broker reachable from both the ESP32 and Home Assistant (often the Mosquitto add-on on the same HA host).
-
config.hbroker settings:MQTT_SERVER,MQTT_PORT, and credentials if required.
On Wi‑Fi connect, firmware sets hostname and MQTT client id to:
spa- + last 12 hex digits of the Wi‑Fi MAC (example: spa-a1b2c3d4e5f6).
MQTT topics use:
Spa/<gatewayName>/…
Examples:
-
Spa/spa-a1b2c3d4e5f6/status/…(telemetry — see repo for full tree) -
Spa/spa-a1b2c3d4e5f6/cmd/…(commands) -
Spa/spa-a1b2c3d4e5f6/node/state(availability)
Find your exact name on /state, serial log, or GET /api/version (hostname field).
- Install/configure the MQTT integration pointing at the same broker as the ESP32.
- After the gateway connects, open Settings → Devices & services → MQTT and look for device Balboa Spa.
Discovery publishes retained configs under:
homeassistant/<platform>/<object_id>/config
Default prefix is homeassistant/. Override in config.h:
#define MQTT_DISCOVERY_PREFIX "homeassistant"To disable discovery entirely:
#define MQTT_HA_DISCOVERY 0Discovery uses a static unit_of_measurement (default °F). If your tub reports °C, add to config.h (see config-example.h):
#define MQTT_HA_TEMP_UNIT "\xC2\xB0" "C"Rebuild and flash after changing config.h.
| Phase | Typical entities |
|---|---|
| Right after MQTT connect | Core temps, climate (spa_controls), many status sensors, availability |
| After spa config / information frames | Equipment switches (lights, blower, mister), pump switch or select per speed, extra enum sensors |
If pumps/lights are missing, wait for the spa to finish its config exchange, refresh MQTT devices, or check /status on the gateway web UI.
Not discovered: spa_time (panel clock) — intentionally omitted to avoid noisy history.
Device link: Discovery sets configuration_url to http://<gatewayName>.local/status. If mDNS fails, open the gateway by IP instead.
Replace spa-a1b2c3d4e5f6 with your gateway name.
Developer tools → Actions → MQTT publish:
| Field | Value |
|---|---|
| Topic | Spa/spa-a1b2c3d4e5f6/cmd/setTemp |
| Payload |
102 (°F example) or 39.5 (°C example) |
YAML automation snippet:
action: mqtt.publish
data:
topic: Spa/spa-a1b2c3d4e5f6/cmd/setTemp
payload: "102"Check result JSON on Spa/<gateway>/cmd/result (accepted, reason).
Non-pump buttons accept on, off, or toggle:
Topic: Spa/<gateway>/cmd/button/<code>
Payload: toggle
Pump buttons use Off, Low, High (single-speed pumps: Off / Low only). Button codes match your spa config — use /status or MQTT status topics to identify equipment.
Full v1 command list: README — MQTT command topics.
| Issue | Fix |
|---|---|
| No MQTT device | Same broker as ESP; gateway online; check Spa/<gateway>/node/state
|
| Wrong temperature unit | Set MQTT_HA_TEMP_UNIT and reflash |
| Missing pumps/lights | Wait for config frames; verify /status shows equipment |
| Link from HA device page 404 | mDNS — use IP or fix local DNS |
More symptoms: Troubleshooting FAQ.