MQTT

Publishing the readings to a broker of your own and choosing between the five message formats.

The MQTT section publishes the same readings to any broker. It is mainly for those who use platforms other than Home Assistant, such as openHAB, Node-RED, Domoticz or ThingsBoard, or who prefer to feed Home Assistant itself through a broker.

As with the native integration, the data goes straight from the phone to your broker.

  1. Enter the broker

    Fill in Broker Address and Port. If the broker requires authentication, fill in User and Password as well.

    Turn Use TLS (SSL) on when the broker is exposed outside your network. Use WebSocket and Base Path serve brokers behind a proxy.

    The address, port, connection options and credentials are stored only on this phone. On another phone with the same account, fill them in again.

  2. Choose the protocol version

    The MQTT 3.1.1 and MQTT 5.0 buttons select the version. When in doubt, choose 3.1.1, which is the more widely compatible.

  3. Choose the format

    MQTT format sets the shape of the topics and the format of each message. There are five options:

    • Home Assistant Discovery: with automatic discovery, the entities are created on their own, with name, unit and icon.
    • Homie 4.0: follows the Homie convention.
    • Simple topics: one value per topic, with no extra structure. The easiest to consume from a script.
    • Unified JSON: everything in a single message, on the topic you set.
    • ThingsBoard: the ThingsBoard telemetry format.

    Some formats have settings of their own, such as JSON payload (value + timestamp) on simple topics and Include timestamp on ThingsBoard.

  4. Set the topic prefix

    Topic Prefix is the root of everything the app publishes. Set the value at the start and avoid changing it later, because the change leaves the old topics orphaned on the broker.

  5. Test before leaving

    Tap Test Connection. The test confirms the address, the port, TLS and the credentials before you turn transmission on.

  6. Turn transmission on and save

    Turn Enable transmission on, set the Transmission interval and save with the floating button.


← All guidesIn the FAQ: Home Assistant and MQTT →