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

Unfortunately my DS218 does not support Docker - some other way how to set MQTT and Home Assistant on Synology???

Thanks in advance for support and Happy New year :slight_smile:

@HarriedeGroot I have everything set up and working as intended, but I do have two questions which maybe has more to do with HA rather than Homey, but I need to make sure nothing in this integration is conflicting with HA. Hope you have some input.

  1. I am trying to get a sensor card in HA to react to a subscribed mqtt topic that is not a part of the homey integration. For testing purposes, I have created a virtual button in Homey that publishes a value to a topic. It works well behind the scenes. According to documentation, I should enter some lines on config.yaml with the topic subscribed.

sensor:

  • platform: mqtt
    state_topic: “homey/test”

How do I turn this to an entity so that I can make a sensor card in HA that reports the value from my virtual device. The reason I’m asking here is that when I look in HA/configurations/integrations/Mqtt (in the UI) I see the homey mqtt devices as icons and the heading “MQTT: configuration.yaml”. However, I don’t see any mention of the mqtt devices from homey in the actual config.yaml file. This is probably completely normal but I’m wondering if there could be some sort of conflict. Getting a sensor card to react to a published topic should be straight forward but I don’t know where to go next.

  1. I have a Rituals perfume genie which is working in HA for the on/off topic. The “fill” value sensor is however publishing STRING values (“50-60%”). If I get the above working in question 1, do you know if I can get a HA card to show string values from a mqtt topic?

Hope I make some sort of sense. These questions are probably best asked in a HA forum but it’s worth a shot!

EDIT: scratch question #1. By the power of Sleep the device entity magically showed up this morning after HA/MQTT Broker chewed on in during the night. Very strange but oh well. I’m happy now! Question #2 still stands. Thanks!

EDIT 2: So it seems a sensor entity have no problem in displaying string values! I have no more questions but I leave my post here anyway since there could be others who are interested in the potential of Homey/HA/MQTT

Can this also be two way? That from HA i can enable certain switches in Homey?

Yes, that is exactly what you can do with this

Tried that but if I enable a device in HA it doesn’t switch in Homey?

What kind of device are you trying to control? Did you try to restart the MQTT client and MQTT hub app on Homey? Do you have autodiscovery and birth/last will messages enabled both Homey and HA?

Where do you do that, been looking for that to enable?
Thanks in advance

This actually makes MQTT hub on your Homey to resend device states on reboot of HA, so always up to date :+1:t2:

Hmmmmm…need new glasses, have been looking and looking and missed it.
Thanks :blush:

OK, I tried everything but don’t get it to work, probably something stupid from my side :crazy_face:
But I created a small video, so maybe someone can help me here?

https://dmertens.stackstorage.com/s/IWeaZQlHDgQxud4

Thanks in advance!

Do you follow the same installation steps in this guide to get devices from HA into Homey?

And are there different settings that has to be made to get it the other way around?

What solved it for me is:
1.Go to MQTT Hub
2. Set COMMUNICATION PROTOCOL to Custom
3. Enable Include class
4. Disable Include zone
5. Normalize

I think the last part is the giving the problem. I’ve noticed that the device.id gets screwed-up and is like switch.on whilst it only should be switch. Or simplified, the status of the device must not be in the device ID.

Perhaps this helps someone, I’ve just started setting it up.

2 Likes

I’m relative new MQTT so I have a basis question

I would like to see my Homey device in Node-Red using MQTT

In MQTT in node I can only see Homey status information but no devices
How can I make my Homey device visible in Node -Red

Setup

Homey running MQTT Cient, and MQTT cient/

On synolgy NAS I have installed Mosquitto.

On Raspberry Pi : Node-Red

Did you install the hub app on homey?

Hi Sven, It seems to work now

1 Like

Hi Community,
I’m sorry if my question seems redundant but I can’t seem to find (I searched the different MQTT topics) a solution that works for me. My problem is that I can not control my Homey devices from HA. Their status updates in HA when triggered from Homey, but not the other way around. I read that others had the same problem and it seems the problem disappeared magically when rebooting Homey or restarting MQTT Hub/Client. But I had no luck with that.
My setup:
Homey v4.1.0
MQTT Hub v2.1.9
MQTT Client 2.2.3
MQTT Broker (Docker on Synology): mosquitto v 1.6.9
HA (Docker on Synology) v 0.108.5

When I trigger a device from HA, I can see in MQTT explorer a set topic changing to true, but onoff state stays to False.

Anyone can point me to a possible solution?

Thanks!

Well… the magic happened here too. After going crazy for a week, reconfiguring, reinstalling, restarting etc. in all kinds of orders, suddenly now it works. The only thing that worries me, is that I absolutely don’t know why.

I should have posted my previous message earlier :wink: The magical Community-genie made my wish come true. :woman_genie:

1 Like

Great tutorial!

I managed to get it working and in HA I see all my Homey devices. Unfortunately they show no values…

This is what appears in HA:

I bet it is something small that needs to be done, but I am stuck.

Can any kind soul please help?

Thanks!

You’re looking at the entity editor, which isn’t the place where entity values are shown. For that, you need to open the Overview page.

Thanks @robertklep

I added some devices to the main screen, but still no data is shown: