# \[TUTORIAL\] Setting up MQTT on Homey for configuring Home Assistant for dashboard purposes

**URL:** <https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880>\
**Category:** Questions & Help\
**Created:** [March 21, 2019, 11:46am UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880 "2019-03-21T11:46:12Z")\
**Posts on this page:** 20\
**Page:** 7

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [May 9, 2020, 9:12am UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/121 "2020-05-09T09:12:01Z")

</div>

“Niet beschikbaar” sounds like there might be an issue with your MQTT broker. Is it still running?

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [May 9, 2020, 9:14am UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/122 "2020-05-09T09:14:23Z")

</div>

I use the Mosquito broker that I have running inside Home Assistant.

---

<div class="post-metadata">

**Author:** ![SVEN\_STOFFELS](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sven_stoffels/32/14438_2.png) [@SVEN\_STOFFELS](https://community.homey.app/u/SVEN_STOFFELS)\
**Post date:** [May 9, 2020, 10:01am UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/123 "2020-05-09T10:01:23Z")

</div>

Hello,

Did anywone the same problem like mine :

I can’t get my fibaro roller shutters 3 at working. Shutters 2 are working fine for me.

This is annoying because Ha is a great feature

Thanks for the help,

Sven

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [May 9, 2020, 10:01am UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/124 "2020-05-09T10:01:58Z")

</div>

Perhaps this is useful: [MQTT communication between Homey and Home Assistant, after HA has restarted](https://community.homey.app/t/mqtt-communication-between-homey-and-home-assistant-after-ha-has-restarted/26651/4)

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [May 9, 2020, 10:45am UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/125 "2020-05-09T10:45:04Z")

</div>

Thanks @robertklep

Your remark about the broker not running was the way to solving this issue; the IP address had changed after a reboot. Set the proper IP and all is working well!

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [May 11, 2020, 11:39am UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/126 "2020-05-11T11:39:57Z")

</div>

**SOLVED !**

On the Homey side I have not changed anything;

- MQTT Hub running
- MQTT Client running

In HA I have messed around a lot. The good news:

- I see all Homey devices in HA
- they show data (temp and lux and state)
- I can add them to the lovelace front.
- If I use Homey App and turn a light on, this is echoed to HA
- if I manually turn on a light, this is seen in HA

What doesn’t work:

- in HA I can’t operate a added MQTT device…

**=\> typo in the configuration.yaml**

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [May 12, 2020, 8:26am UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/127 "2020-05-12T08:26:32Z")

</div>

> [@PascalB](#):
>
> This actually makes MQTT hub on your Homey to resend device states on reboot of HA, so always up to date 👍🏻

After a reboot of HA, the devices from Homey do not come online. I have to open the MQTT Hub App and click on “broadcast”. If I manually do this “broadcast” all devices come online.

I have the following opens switched ON:

- SYSTEM STATE
- COMMANDS
- BIRTH & LAST WILL

No problem to click on a button, but I read that the last open should automatically do this 🙂

---

<div class="post-metadata">

**Author:** ![PascalB](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@PascalB](https://community.homey.app/u/PascalB)\
**Post date:** [May 12, 2020, 9:43am UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/128 "2020-05-12T09:43:29Z")

</div>

What about Home Assistant discovery…?

 ![Screenshot_20200512-114228](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/6/a6894a66bf8e8e4ddd4821ba5ad40a5d5fb511e0.jpeg)

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [May 12, 2020, 10:08am UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/129 "2020-05-12T10:08:31Z")

</div>

Thanks @PascalB  
That is switched on too!  
Devices are discovered in HA, but it needs the manual broadcast…

---

<div class="post-metadata">

**Author:** ![HarriedeGroot](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/harriedegroot/32/56160_2.png) [@HarriedeGroot](https://community.homey.app/u/HarriedeGroot)\
**Post date:** [May 12, 2020, 10:12am UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/130 "2020-05-12T10:12:19Z")

</div>

The latest version (install via CLI) retains these messages on the broker.

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [May 12, 2020, 10:28am UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/131 "2020-05-12T10:28:30Z")

</div>

> [@HarriedeGroot](#):
>
> The latest version (install via CLI) retains these messages on the broker

Great!  
I would like to try that. This one, I bet: [GitHub - harriedegroot/nl.hdg.mqtt: MQTT Hub/Gateway for Athom Homey](https://github.com/harriedegroot/nl.hdg.mqtt)

Thanks!

**UPDATE**  
Installed version 2.1.9 via CLI. After a restart of the MQTT Hub All, and a restart of HA, still no updates of the devices.

---

<div class="post-metadata">

**Author:** ![HarriedeGroot](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/harriedegroot/32/56160_2.png) [@HarriedeGroot](https://community.homey.app/u/HarriedeGroot)\
**Post date:** [May 12, 2020, 1:06pm UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/132 "2020-05-12T13:06:44Z")

</div>

Restart mqtt client and Hub (in this order).

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [May 12, 2020, 1:29pm UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/133 "2020-05-12T13:29:50Z")

</div>

> [@HarriedeGroot](#):
>
> Restart mqtt client and Hub (in this order).

Still no luck (I saw another sensor updating, but that was not connected via MQTT).  
No worries. Ik love what is working already!

Thanks @HarriedeGroot !

PS  
I do get a notification in the Homey App that the broker when offline. Perhaps this can trigger a flow with the action to do a broadcast ?

---

<div class="post-metadata">

**Author:** ![PascalB](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@PascalB](https://community.homey.app/u/PascalB)\
**Post date:** [May 12, 2020, 4:41pm UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/134 "2020-05-12T16:41:14Z")

</div>

And have you configured last will and birth messages for MQTT on Home Assistant?

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [May 12, 2020, 5:24pm UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/135 "2020-05-12T17:24:04Z")

</div>

Would you please explain how to do that…I only set that up in Homey. Should I do that somewhere in H.A. too? (so, I guess I haven’t )

---

<div class="post-metadata">

**Author:** ![PascalB](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@PascalB](https://community.homey.app/u/PascalB)\
**Post date:** [May 12, 2020, 5:35pm UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/136 "2020-05-12T17:35:20Z")

</div>

> **[MQTT Birth and Last will](https://www.home-assistant.io/docs/mqtt/birth_will/)**
>
> Instructions on how to setup MQTT birth and last will messages within Home Assistant.

I think your problem will be solved then…

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [May 12, 2020, 6:31pm UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/137 "2020-05-12T18:31:11Z")

</div>

@PascalB

**WORKING!**

Perhaps this addition should be added to the open post. I did read up, but missed this essential part.

This is the mqtt section in my configuration.yaml file:

mqtt:  
broker: “xxx.xxx.x.xxx:1883”  
username: !secret mqtt\_username  
password: !secret mqtt\_password  
discovery: true  
discovery\_prefix: homeassistant  
birth\_message:  
topic: ‘hass/status’  
payload: ‘online’  
will\_message:  
topic: ‘hass/status’  
payload: ‘offline’

---

<div class="post-metadata">

**Author:** ![Coosterl](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/coosterl/32/17773_2.png) [@Coosterl](https://community.homey.app/u/Coosterl)\
**Post date:** [May 26, 2020, 11:54am UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/138 "2020-05-26T11:54:50Z")

</div>

I have worked on this for a couple of days now, tried 3 different brokers++++  
Watched mqtt traffic with mqtt explorer, mqttlens and so on.  
But nothing seemed to work.

I figured i could make Home Assistant connect for me, and that worked.  
But same problem there, only able to watch the changes.  
But any change i tried on mqtt, only reverted back again in seconds.

With Home Assistant connected and reporting all devices correctly, i tried the restart:  
Everything works as expected suddenly 😃  
But, everything works, and nobody knows why 🤣

Anyway, thank you!!  
Kind Regards from Norway

---

<div class="post-metadata">

**Author:** ![rampage](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rampage/32/2121_2.png) [@rampage](https://community.homey.app/u/rampage)\
**Post date:** [May 26, 2020, 2:05pm UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/139 "2020-05-26T14:05:51Z")

</div>

For privacy reasons. Google really requires you to share a lot of data, and requires a always-on internet connection. That’s probably why.

---

<div class="post-metadata">

**Author:** ![Henk\_Naber](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/henk_naber/32/15975_2.png) [@Henk\_Naber](https://community.homey.app/u/Henk_Naber)\
**Post date:** [June 13, 2020, 2:54pm UTC](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880/140 "2020-06-13T14:54:08Z")

</div>

HA installed on Synology Docker. MQTT broker, client and hub on Homey.  
At first, I got all sensors from Homey in HA. It’s showed values (temperatures), but did not update (last update 40 min) and also some strange readings. eg. outside temperature 9.9 degC, while current temp is 24.5.  
Now I added the MQTT birth/last will statements to the configuration file. Rebooted HA and all ‘unavailable’ on all mqtt devices. Any idea where to look?

[Previous page](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880.md?page=6)

[Next page](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880.md?page=8)
