MQTT Hub/Gateway

Hi Sharkys,

regarding your second questions I experienced the same if I have modified the code in the advanced setting (Advanced Topics) after I created the MQTT Device.
So try to create it with the right syntax, capabilities etc… and don´t touch the topic code. Having that in mind I was able to use have the labels shown in device.

1 Like

I have another issue.
I want to trigger a flow when a capability of a MqTT device is smaller than a give number
e.g. If a sensor humidity is less than 15 % than… (humidity is shown in the MQTT Device and available in flows) but the flow is never triggered

Anybody have an idea what I have to change?
Thanks

I’d try when ability changed and variable is then 15…

image
in this picture I wanted to work with string messages, so I used track ability.

Feature request: as of Home Assistant 2021.12 they finally introduced the button entity. That means HA can now make a distinction between switches (on/off) and buttons (click). Until now, Homey virtual buttons that are broadcasted with MQTT are discovered as switches by HA. Is it possible to broadcast Homey switches as switches to HA and buttons as buttons?

1 Like

I’m using mqtt to feed my grafana dashboard from multiple devices. I also want to add a couple of homey devices via mqtt. I’ve installed the mqtt app and I’m using mosquitto as external broker. If I read the instruction I see:

“use the MQTT broker app from Homey the app sotre or configure an external broker”. I’m missing a probably quite obvious part, where do I set the external broker address in the app? Apparently I’m completely missing it.

in the MQTT client

Do use your own mosquito broker and not the internal / Homey App. This is because the internal one doesn’t support retention of payloads.

It is quite complicated to configure message exchange between your mosquitto and internal MQTT client, which you will eventually need - it’s better to connect your homey client to external mosqitto and live with just one broker.

Question, i’ve setup the connection between Home assistant and Homey. i can toggel devices and get all readings of temprature sensors. i’ve put al sensors in the respective areas and am trying to make use of the new area card Area Card - Home Assistant the lights and switches are displayed, but the temprature isnt (there are multiple temprature readings in the specific area). anybody has an clue or hint?

Since a while, I am having difficulties with MQTT in combination with Home Assistant (for dashboard purposes).

At some point HA seems to loose connection with Homey. Devices freeze in HA, cannot be switched on/off (the switch then automatically returns to it’s previous state without any change in Homey) and changes in Homey don’t come through to HA.

Only thing that helps is turning off all devices in MQTT Hub, broadcasting, switching all devices back on and broadcast again.
Previously I used the MQTT broker on my Synology NAS, but have switched now to the MQTT broker as app on my Homey: same problem.

Anyone any idea how to solve this?
I have made and send in a diagnostic report, if @HarriedeGroot would be so kind to help as well…

I’ve seen this behaviour only after restart of HA. Could be also after Homey restart (not sure about this).
In this case I have to send all devices again with a broadcast.

Seems a great tip, thx!
A Watchtower script automatically updates my Docker containers and therefor the HA container too. HA did get an update today and with manually restarting the HA container I can reproduce the error now. Triggering a new broadcast doesn’t help in that case, restarting the MQTT Hub app does.

For now I have set a mailnotification when HA is restarted (i.e. after updating) to see if that really is the problem. If so I can have HA trigger restarting the MQTT Hub in Homey.

That will eliminate the symptom, but will not eliminate the problem itself. Anyone know a solution how to make sure HA is reconnecting correctly to Homey (via MQTT) after a restart?

@Henk_Renting

Are you using the Homey internal MQTT Broker, the HA addon broker or an external broker ?

I have the same behaviour when using an external MQTT Broker (in Docker on my Synology NAS) and using the Homey MQTT broker app

OK - The Homey internal broker doesn’t support payload retention so you get this behavior of requiring a new broadcast. Your ‘external’ one I assume does so that should have fixed it.

But as said, my external Broker on my Synology NAS gives the same errors. That’s what started the problems and changing to the Homey MQTT Broker app did not solve it…
Or am I misunderstanding you?

I use the so called Birth and Last Will functionality.
So when Homey or HA comes (back) online, this gets noticed and then a broadcast is started.

Homey:

.
HA (I changed the topic to homeassistant/status)

Not sure if this flow is needed:

I have the same behaviour, fixed it with a workaround: created a virtual button in Homey which will restart MQTT Client app and MQTT Hub app (in this order). This is the flow: Gedeelde Flow | Homey

The virtual button is available in HA, created an automation to trigger this 1 minute after every HA restart. This will work, because sending commands from HA to Homey is working, only the feedback is missing.

At the moment the button is unfortunately displayed as a switch in HA, made a feature request to fix this :wink:

You mean you can operate devices from HA then? In my case I cannot operate them too. So a switch Homey wouldn’t be effective. I’d rather use a webhook for triggering the flow in Homey.
Unfortunately cannot find an option to send a webhook from HA.

I can operate from HA to Homey, however status is not broadcast from Homey to HA. Have been experimenting with birth and last will, not working for me