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

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

1 Like

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

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

Perhaps this is useful: MQTT communication between Homey and Home Assistant, after HA has restarted

1 Like

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!

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

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 :slight_smile:

What about Home Assistant discovery…?

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

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

1 Like

Great!
I would like to try that. This one, I bet: GitHub - harriedegroot/nl.hdg.mqtt: MQTT Hub/Gateway for Athom Homey

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.

Restart mqtt client and Hub (in this order).

1 Like

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 ?

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

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 )

I think your problem will be solved then…

1 Like

@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’

1 Like

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 :smiley:
But, everything works, and nobody knows why :rofl:

Anyway, thank you!!
Kind Regards from Norway

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

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?