Homey MQTT Not syncing all devices to Home Assistant (Dashboard Purpose)

Hi, I’m using Homey as main controller in my home, which works perfectly fine, except that it lacks a good dashboard functionality. Therefore I bought a Raspberry Pi and installed HA on it, so I could make my own lovelace dashboard.

But now I’ve a weird problem; I’m missing 4 or 5 devices as entity in HA. MQTT on HA does detect 44 devices and 156 entities, so it looks like there’s nothing wrong on the homey part. I’ve installed MQTT Explorer on my laptop to check if everything is being broadcasted, which is the case (see screenshot).

Screenshot of MQTT Explorer / Part of configuration.yaml / Snippet of Lovelace (can only post 1 photo):

I’ve tried multiple variations of typing the entity-name, with/without spaces/capitals etc, but I think as long as it isn’t showing up in the entity list, non of this will work…

It’s a socket-switch of the brand ‘KlikAanKlikUit’, type ACD-300, which is also dimmable. But the problem also occurs with other devices.

And a second, more general, question: If I restart HA, so configuration changes take effect, I have to manually tell Homey to broadcast again, before any status/sensor will show up on the dashboard of HA. Is it possible to change this behaviour?

Yes. Tell Homey to broadcast the discovery messages as retained messages.

Ok and how do I do so? These are the settings I can play with. Thanks in advance!

Ok, from this settings screen you can’t do it.

A workaround might be to copy the discovery messages from mqtt explorer and publish them yourself with the retain flag set.

And over here? This is the MQTT Client app on Homey, the previous screenshot was the MQTT Hub

Your workaround sounds too complex for me, that’s the reason I’ve a Homey instead of HA as main controller :wink: Setting-up a proper dashboard is hard enough for my skills :sweat_smile:

EDIT: I’ve found this topic; https://community.athom.com/t/mqtt-communication-between-homey-and-home-assistant-after-ha-has-restarted/26651, which refers to https://www.home-assistant.io/docs/mqtt/birth_will/, but I already have these commands (birth/last-will) in my configuration.yaml, so what’s going wrong?

That could be a solution too. Worth to try.

Ok I will. And do you have an idea of which direction I should look for my primary problem (the missing devices/entities) ?

Another option is to install the latest master via CLI. That version already retains the messages.

Another way is to dumb Homey, and go the straight HA way, I did that and never seen back.
I also did what you are doing, and had the same issue with birth/will messages, now my Homey is parked a dark place, not in use and I have a Zigbee network that works.

Did you solved the problem and got the missing entities to show up in HA? I have a similair problem and as it seems to be my dimmer switches that is not showing up in HA, but in MQTT explorer.

You could setup your dimmer switches in yaml.

1 Like

Yes/no, I didn’t found a solution to get the missing entities to show up automaticly, but I did manage to add the desired entities manually by adding the following code to configuration.YAML. This is for a dimable wallsocket switch, a simple on/off switch doesn’t need the brightness_ topics.

  - platform: mqtt
    unique_id: 5e565d81087d6c0cd7a83031acd300
    name: "Vensterlamp"
    brightness_state_topic: "homie/homey/vensterlamp/dim"
    brightness_command_topic: "homie/homey/vensterlamp/dim/set"
    state_topic: "homie/homey/vensterlamp/onoff"
    command_topic: "homie/homey/vensterlamp/onoff/set"
    payload_on: "true"
    payload_off: "false"
    optimistic: false
    brightness_scale: 100
    qos: 0

Thanks. I’m gonna try that out. Doesn’t feel complicated :slight_smile:

Thanks for the link to the instructions. Very helpful explinations for the variables @bvdnl wrote in his reply. :+1: