[TUTORIAL][PRO] How to integrate Home Assistant with Homey Pro and v.v

This is going to be a bit of a long post, but I have an issue and I really have no clue what to try next. Any hints would be really welcome.

My Setup

  • I have a Homey Pro running the Apps MQTT Hub and MQTT Client.
  • I have Mosquitto running on Podman as the MQTT Broker.
  • I have Home Assistant OS running in Proxmox.

My Target
I want to expose devices like shades and lights which I have configured in Homey to HA so that I can use the with the Voice integration from HA. I have no interest in exposing devices from HA to Homey.

My Issue
Basically everything works, HA discovers the devices and I can control most of them. However, there are some for which the commands don’t make it through from HA to Homey.

It’s always the same devices which fail, but it’s not a specific kind of device which fails work. Both my Kitchen Light and my Bedroom Light are Shelly Dimmers, the Kitchen Light always works, the bedroom light fails.

The status changes from Homey to HA always works. If I toggle the Light in Homey, the correct status is always correctly reflected in HA. The issue is only when controlling a light within HA.

I am currently assuming that the issue is within MQTT Hub for the following reasons:

  1. When I open the MQTT Hub Settings on Homey and I go to the devices, I can fix devices which are not working by simply disabling them in the list and then enabling them again. Then the commands from HA to Homey immediately start working. Just that, nothing else needed, no restart no re-broadcast.
  2. As soon as I restart MQTT Hub, the issue is back again for the same devices.
  3. In the MQTT Hub Logs, I can see the MQTT messages coming in, also when the light is then not actually getting controlled. it seems like the dispatcher is simply not handling the incoming messages.

MQTT Hub Logs when it works:

MQTT Hub Logs when it does not work:

I am clueless on what to do next, I tried reconfiguring everything including removing all devices from home and completely re-installing the plugins on Homey

After some further hints, here are the Mosquitto Logs. Doe these say that the connection in between Homey and Mosquitto is unstable? 10.1.1.6 is HA, 10.1.1.9 is Homey.

 1746980635: New client connected from 10.1.1.135:52823 as 7vOJ9ukClfOpl7aUl4dVKe (p2, c1, k60).
 1746982975: Client 7vOJ9ukClfOpl7aUl4dVKe disconnected.
 1746982975: New connection from 10.1.1.135:39815 on port 1883.
 1746982975: New client connected from 10.1.1.135:39815 as 4d1oIeVIFqAkzVecFnNlj2 (p2, c1, k60).
 1746985075: New connection from 10.1.1.135:34917 on port 1883.
 1746985075: New client connected from 10.1.1.135:34917 as 3T57ldqJBJh7lHP1UZcJGt (p2, c1, k60).
 1746985075: Client 3T57ldqJBJh7lHP1UZcJGt disconnected.
 1746985075: Client 4d1oIeVIFqAkzVecFnNlj2 disconnected.
 1746985075: New connection from 10.1.1.135:47801 on port 1883.
 1746985075: New client connected from 10.1.1.135:47801 as 0ppBhTh1htYqwT5Y6qKeM9 (p2, c1, k60).
 1746985081: Client 0ppBhTh1htYqwT5Y6qKeM9 disconnected.
 1746985081: New connection from 10.1.1.135:47845 on port 1883.
 1746985081: New client connected from 10.1.1.135:47845 as 1Kk3mRW0SHbvZsIy75pnJ5 (p2, c1, k60).
 1746985731: Client 1Kk3mRW0SHbvZsIy75pnJ5 closed its connection.
 1746985784: New connection from 10.1.1.135:47141 on port 1883.
 1746985784: New client connected from 10.1.1.135:47141 as 5MoNONN7ryt2DCkgibBsbm (p2, c1, k60).
 1746988266: Client 5MoNONN7ryt2DCkgibBsbm closed its connection.
 1746988319: New connection from 10.1.1.135:33369 on port 1883.
 1746988319: New client connected from 10.1.1.135:33369 as 6f9U4lmD1H0qKzNvRzfAeb (p2, c1, k60).
 1746990277: mosquitto version 2.0.20 terminating
 1746990325: mosquitto version 2.0.20 starting
 1746990325: Config loaded from /mosquitto/config/mosquitto.conf.
 1746990325: Opening ipv4 listen socket on port 1883.
 1746990325: Opening ipv6 listen socket on port 1883.
 1746990325: mosquitto version 2.0.20 running
 1746990325: New connection from 10.1.1.9:56292 on port 1883.
 1746990325: New client connected from 10.1.1.9:56292 as homey_22c18dc0 (p2, c1, k60).
 1746990328: New connection from 10.1.1.9:54442 on port 1883.
 1746990328: New client connected from 10.1.1.9:54442 as Homey_edf6ee (p2, c1, k60).
 1746990330: New connection from 10.89.1.1:34452 on port 1883.
 1746990330: New client connected from 10.89.1.1:34452 as mqttjs_cb1cf406 (p2, c1, k60).
 1746990342: New connection from 10.1.1.135:51793 on port 1883.
 1746990342: New client connected from 10.1.1.135:51793 as 3uJNvwDL4169WOzuHGd8k5 (p2, c1, k60).
 1746991007: mosquitto version 2.0.20 terminating
 1746991054: mosquitto version 2.0.20 starting
 1746991054: Config loaded from /mosquitto/config/mosquitto.conf.
 1746991054: Opening ipv4 listen socket on port 1883.
 1746991054: Opening ipv6 listen socket on port 1883.
 1746991054: mosquitto version 2.0.20 running
 1746991055: New connection from 10.1.1.9:34734 on port 1883.
 1746991055: New client connected from 10.1.1.9:34734 as homey_22c18dc0 (p2, c1, k60).
 1746991057: New connection from 10.1.1.9:34740 on port 1883.
 1746991057: New client connected from 10.1.1.9:34740 as Homey_edf6ee (p2, c1, k60).
 1746991059: New connection from 10.89.1.1:45474 on port 1883.
 1746991059: New client connected from 10.89.1.1:45474 as mqttjs_bf65d5de (p2, c1, k60).
 1746991074: New connection from 10.1.1.135:52821 on port 1883.
 1746991074: New client connected from 10.1.1.135:52821 as 3La3mEi5fQEjE8ooq3qSZ1 (p2, c1, k60).
 1747031917: Client 3La3mEi5fQEjE8ooq3qSZ1 closed its connection.
 1747031944: New connection from 10.1.1.135:47899 on port 1883.
 1747031944: New client connected from 10.1.1.135:47899 as 5ymzk3wQOpC4QtdoYeaLh6 (p2, c1, k60).