Skip to content

Commit a03edbc

Browse files
committed
Add birth and will message
1 parent 9e7ee63 commit a03edbc

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

source/_components/mqtt.markdown

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ mqtt:
2929
password: PASSWORD
3030
certificate: /home/paulus/dev/addtrustexternalcaroot.crt
3131
protocol: 3.1
32+
birth_message:
33+
topic: 'hass/status'
34+
payload: 'online'
35+
qos: 1
36+
retain: true
37+
will_message:
38+
topic: 'hass/status'
39+
payload: 'offline'
40+
qos: 1
41+
retain: true
3242
```
3343
3444
Configuration variables:
@@ -43,6 +53,16 @@ Configuration variables:
4353
- **client_key** (*Optional*): Client key (example: `/home/user/owntracks/cookie.key`)
4454
- **client_cert** (*Optional*): Client certificate (example: `/home/user/owntracks/cookie.crt`)
4555
- **protocol** (*Optional*): Protocol to use: 3.1 or 3.1.1. By default it connects with 3.1.1 and falls back to 3.1 if server does not support 3.1.
56+
- **birth_message** (*Optional*):
57+
- **topic** (*Required*): The MQTT topic to publish the message.
58+
- **payload** (*Required*): The message content.
59+
- **qos** (*Optional*): The maximum QoS level of the topic. Default is 0.
60+
- **retain** (*Optional*): If the published message should have the retain flag on or not. Defaults to `True`.
61+
- **will_message** (*Optional*):
62+
- **topic** (*Required*): The MQTT topic to publish the message.
63+
- **payload** (*Required*): The message content.
64+
- **qos** (*Optional*): The maximum QoS level of the topic. Default is 0.
65+
- **retain** (*Optional*): If the published message should have the retain flag on or not. Defaults to `True`.
4666

4767
## {% linkable_title Picking a broker %}
4868

0 commit comments

Comments
 (0)