Skip to content

MQTT Settings

Tip: Learn more about the protocol on MQTT Essentials

Screenshot

MQTT Settings

Settings / Parameters

MQTT Configuration

Enable MQTT

Enables or disables the MQTT functionality.

Enable Home Assistant MQTT Auto Discovery

Enables or disables the Home Assistant MQTT Auto Discovery functionality.

MQTT Broker Parameter

This settings are only visible if MQTT is enabled.

Hostname

Host name or IP address of your MQTT broker. Make sure your DNS servers are set-up properly if you specify a host name.

Port

Port of your MQTT broker. Default port for unencrypted connections is 1883 and for encrypted connections 8883.

Username

Optional username to connect to your MQTT broker. Leave emtpy to perform an anonymous connection.

Password

Optional password to connect to your MQTT broker.

Base Topic

Below the base topic all the payload data is published via separate topics. An overview of all available topics can be found here.

Publish Interval

The interval at which the MQTT data is published.

Enable CleanSession flag

Enables the CleanSession3 flag for MQTT communication.

Enable Retain flag

Publish all information with retain2 flag. This has the advantage that each value is immediatly avilable if you connect to your broker and subscribe to the specific topics you will get immediatly the latest values.

Enable TLS

Enables a secure TLS connection to your MQTT broker. If using this you have to get a proper certificate (self signed will not work, is has to be signed by a CA) and the hostname entered as MQTT Hostname must match the CN in the certificate. You must also specify the CA-Root-Certificate.

CA-Root-Certificate

The root certificate of your CA if you are using a TLS connection to your broker. Should include the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- tags.

Enable TLS Certificate Login

Uses certificates to authenticate agains a MQTT broker. When enabled, the TLS Client-Certificate and the TLS Client-Key has to be supplied.

TLS Client-Certificate

Should include the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- tags.

TLS Client-Key

Should include the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- tags.

LWT Parameters

This settings are only visible if MQTT is enabled.

LWT Topic

Sets the topic of the LWT1 Message

LWT Online message

Sets the payload that will be published to the LWT Topic if the device comes online.

LWT Offline message

Sets the payload that will be set to the LWT Topic if the device becomes unavailable.

QoS (Quality of Service)

Sets the QoS of the LWT topic.

Home Assistant MQTT Auto Discovery Parameters

This settings are only visible if Enable Home Assistant MQTT Auto Discovery is enabled.

Home Assistant provides the MQTT integration and through this integration it is possible to exploit and manage the messages published by OpenDTU-OnBattery. Once this integration on home assistant is configured with the same MQTT broker, it is possible to create devices manually or through the autodiscovery function.

Prefix Topic

The base under which all Home Assistant MQTT Auto Discovery magic happens. If you haven't changed this topic in your Home Assistant installation the default homeassistant/ is the right one.

Enable Retain Flag

Publish all auto discovery information with retain2 flag. This has the advantage that Home Assistant automaticaly finds all devices on restart.

Enable Expiration

When enabled, values in Home Assistant will become "unavailable" if they don't receive an update in a given time.

Individual Panels

When enabled, the data each individual panel will be made available in Home Assistant