Skip to content

Home Assistant MQTT Client

The “Home Assistant MQTT Client” export module enables a bidirectional connection to a Home Assistant server. The automatic integration of all devices via MQTT Discovery is supported.

The connection is realized via an MQTT broker. This must be configured separately.

The export connection can be created and the parameters configured in the IoT Export area of the web configuration or the BSC Remote.

Parameter Default value Possible values Description
User Available user accounts The user account to be used when accessing the data. It is thus possible to restrict the export of devices or access to commands.
Connection Mode Socket • Socket
• Websocket
Selection whether a TCP or Web Socket connection is used.
Broker IP or DNS name of the broker without protocol or port.
Example: test.mosquitto.org
The broker to which the connection should be established.
Port 1883 1-65535 The port to use when establishing a connection.
Auth User User name for authentication at the broker.
Auth Password Password for authentication at the broker
SSL Off • On
• Trust all
• Off
Option whether an encrypted connection should be established. With the option "Trust all" it is possible to trust all certificates.
SSL Server CRT In SSL mode, the server certificate is used to validate the connection to the broker.
SSL Client CRT In SSL mode, the client certificate is used to validate the client.
SSL Client Key In SSL mode, the private client key is used to authenticate to the broker.
SSL Client Key Password In SSL mode this password is used to unlock the client key.
HTTPS Hostname Verification On • On
• Off
In SSL mode, the hostname used is explicitly checked in the broker's certificate.
QoS 0 • 0
• 1
• 2
The QoS value determines how messages are delivered. The higher the QoS value, the greater the latency of message delivery.

QoS 0 means that the messages are sent without confirmation of receipt. A classic "fire & forget".

QoS 1, on the other hand, sends the message until a confirmation of receipt is received by the broker. The client can be sure that the broker has received the message. It is possible that a message is sent or delivered multiple times.

QoS 2 uses a double confirmation to ensure that a message is delivered only once. For this purpose, the broker confirms receipt to the client, and the client in turn confirms receipt of the confirmation to the broker. Thus client and broker both know that the message was delivered correctly and only once.

By using event IDs and timestamps in the message containers used by this implementation, it is possible to deal with duplicate messages and thus avoid the high latencies of QoS 2 and implement similar security with QoS 1. In principle, QoS 0 can also be used in environments with stable connections.
Retain Messages On • On
• Off
Specifies whether the last messages for a topic should be cached on the broker. Other clients will then receive these messages directly after their login. This way the last known state can be effectively cached on the broker.
Timeout (s) 90 • 0
• 10
• 15
• 30
• 60
• 90
• 120
• 150
• 180
• 300
• 600
• 1200
• 1800
• 3600
Time in seconds which is waited to establish a successful connection. Otherwise this is interpreted as an error.

The value 0 deactivates the timeout, it will be waited until the connection could be established successfully.
Keep Alive Interval (s) 60 • 0
• 10
• 15
• 30
• 60
• 90
• 120
• 150
• 180
• 300
• 600
• 1200
• 1800
• 3600
Maximum time in seconds that may elapse before a data packet must be sent. If there is no regular data traffic within this time, a ping is automatically sent.

The value 0 deactivates this monitoring.
Max Inflight 10000 • 1
• ….
• 65000
In QoS modes 1 and 2, this value determines the maximum number of messages that can be sent without an acknowledgement of receipt being received. This value may have to be increased in very large operating environments.
Parameter Default value Possible values Description
Discovery Prefix homeassistant Discovery Topic, which is also configured in Home Assistant.