MQTT
The adapter already sends status infos via MQTT (even without a token), see here for details.
micro-ebusd extends these infos by the messages seen on the bus and sends them below the configured MQTT topic, similar to ebusd but with a condensed format, see below.
eBUS messages
eBUS messages seen by micro-ebusd that have an identified message definition are decoded to JSON and then sent to a dedicated topic suffix below the configured MQTT topic:
- “circuit/name”
with “circuit” being replaced by the circuit name and “name” with the message name. The payload is a JSON object according to the message definition, i.e. the key being the field name and the value the corresponding value. In addition to the fields, the payload may also contain the following:- “$qq”: the sender address as number (e.g. for broadcast messages)
- “$zz”: the receiver address as number (only when the message definition leaves it open)
Here is an example of such a message:
{"temp":7.062500,"sensor":"ok"}
eBUS Requests
micro-ebusd allows executing requests to the bus as well. It listens to the following topic suffixes below the configured MQTT topic:
- “circuit/name/get” for initiating an active read
if a message with that name in the specified circuit exists and is marked as actively readable, a read will be issued to eBUS and the decoded message sent asynchronously on success (see above). - “circuit/name/set” for initiating an active write
if a message with that name in the specified circuit exists and is marked as actively writable, the payload will be taken as input to building the message data and a write will be issued to eBUS and the decoded message sent asynchronously back via MQTT on success (see above). The input payload has the same format as the output, i.e. JSON object as described above (in contrast to ebusd which only accepts string data). - “circuit/name/list” for getting a matching message list
this can be used without circuit and/or name prefix for getting all messages, or with circuit name for limiting to a certain circuit only, as well as with circuit and message name for matching messages only. Matching messages are then sent in response back to MQTT with the topic “circuit/name/found” where “any” is used for circuit and/or name in case of wildcard(s) and the payload is a JSON object with the following fields:- “circuit”: the requested match on the circuit name
- “name”: the requested match on the massage name
- “messages”: the list of found messages as array, each with:
- “circuit”: circuit name
- “name”: message name
- “write”: true for write message, false for read
- “passive”: true for passive message, false for active
Global status
In addition to the eBUS message and request topics, micro-ebusd also adds the following global status infos:
- “error”: in case of host or bus errors with JSON object as payload having a source and an error field
- “scan”: “OK”, “running”, or “finished” scan status
Home Assistant
See Home Assistant discovery for details.