Skip to content

6.4 MQTT

Roland Jax edited this page Sep 26, 2026 · 1 revision

6.4 MQTT

Machine channel: the adapter pushes values, errors, and liveness.

Configuration (Configuration page, section MQTT)

  • MQTT Enabled (mqttEnabled) — master switch.
  • MQTT Server (mqttServer) — broker host/IP.
  • MQTT User / Password (mqttUser, mqttPass) — credentials; password never shown back, empty keeps the stored one.
  • Root Topic (rootTopic) — custom root; empty defaults to ebus/<unique-id>/.

Topics

Root defaults to ebus/<unique-id>/ (unique id derived from the device MAC); a custom root gets a trailing / added automatically.

Published (QoS 0, not retained unless noted):

  • values/<name> — decoded value per command field, name lowercased.
  • errors — evaluated bus errors.
  • response — answers to request/set commands.
  • state — slim telemetry every 10 s (uptime, version, heap, bus health).
  • <root>available — retained online on connect; broker last-will offline on unexpected disconnect.

Subscribed:

  • <root>request — JSON commands: {"id":"read",…}, {"id":"write",…}, {"id":"restart"}.
  • <root>set/# — direct write: topic suffix is the command key, payload is the value.

Behavior notes

  • Connect gating: value messages (Data/Update/Error) are only queued while connected — like Home Assistant hooks, silently skipped otherwise. They refresh on the next poll cycle, so nothing is lost beyond seconds of staleness. This keeps publish_failed clean across reconnects.
  • Read forces a poll: a read request resets the command timer, so the value is physically re-polled before publishing — answers are never served from cache alone.
  • Writes need a command with a non-empty write_cmd (6.2).

Clone this wiki locally