You can define a topic for every Homey in MQTT Hub settings. This will publish the Homey devices in sub topics below the Homie topic.
If you have the same device name in both Homeys including capability name, the first device will be added to HA with its normalized name. The second device will get the same entity name with “01” as suffix.
You only have to know/check/test which entity is from which Homey
Thank you Ronny!
Hello everyone. Thanks for this tutorial. I was a little intimidated to run it at first but ended up getting 25 devices and entities integrated into HA through MQTT.
I am specifically trying to get the virtual outlets I built in Homey into HA. They have all integrated but I’ve noticed a few things that I’m hoping someone can assist with.
The devices were renamed/duplicate themselves. For example, I have an outlet called ‘Blue Light Alert’ in Homey that I also have in HomeKit thru HomeKitty… When it integrated into HA, it’s now named switch.blue_light_alert_blue_light_alert_turned_on.
About an hour after I migrated using MQTT, there was a toggle control available for it which I was able to use to set the status of the outlet/switch.
The next day, the toggle is gone and it shows:
I have tried to Broadcast again from the MQTT Hub in Homey, restart the hub, etc. to no avail.
Below are my settings for MQTT Hub:
Logs
MQTT Client
Does anyone see anything as to why it would (1) duplicate the device name in MQTT in HA, (2) add ‘turned on’ to the device name and (3) not allow me to control from MQTT?
I’m trying to share virtual devices between Homey, HA, and HomeKit and have hit a roadblock each method I’ve tried. I’ve also tried using the Home Assistant Matter Hub, and can share Virtual devices I create in HA with HomeKit, but when I try to add to Homey, it doesn’t recognize the bridge.
Any insights are appreciated!
Nice to hear you managed to throw it together.
Yeah this phenomenon occurs after HA update 2023.8
You’d be able to prevent this behaviour with this setting:
But you can rename the HA devices & entities, as long as they are unique (you’ll be notified if an entity already exists).
This is somewhat the equivalent of Homey’s onoff capability. A switching plug switch is called switch.name_turned_on
. I always remove that part afterwards, switch.name
When a device becomes unavailable, initiate a MQTT Hub broadcast.
This mainly happens after a Homey or an HA restart.
I described a few flows in post # 1 to automate this, just a hint.
No clue why it won’t help in your case.
I can’t see any deviations in the settings atm;
You can temporary set the log level to [Debug] (don’t forget to disable it when done). Maybe this reveals something.
- Is MQTT Client still up & running?
- Any WiFi issues?
- Fancy network stuff what might interfere?(piHole for instance)
- Did you reload/restart HA MQTT integration and MQTT Broker?
- Do you use Homey MQTT Broker or HA broker add-on?
They should have log options as well for you to check for warnings & errors
No clue, sorry.
@robertklep might know a bit more about the Matter (im)possibilities here.
Thanks so much for the thoughtful reply, Peter. Going to check into your suggestions shortly.
My guess would be that since Homey only supports certified Matter devices, it may also only support certified Matter hubs.
That makes sense. I did a bunch of restarting and the switches were restored in MQTT. Keeping fingers crossed, thank you both!
Is it possible to add virtual button on home assistant, and add it as a device in homey? I treid adding input bootlean, but can`t add it as a device on homey.
You’d create an ‘input_button’ instead.
That you can add as ‘Button’ to Homey.
When you want a virtual switch, you’d use ‘input_boolean’.
I added input_button to homeassistant.
When adding new home assistant device on homey, it does not show up for some reason
I use the home assistant official app, not the community. That seems to be the problem why I couldnt add it Thanks!
Ooh my… Well, immediately switch to the HA community app then
Heya everyone! I hope your week went well!
So, a few weeks ago, I tried to incorporate Home Assistant into my Smart Home. I have a fairly simple setup, which at the time consisted of Home Kit and Google Home (I have since added a single Alexa speaker). My time with HA did not go well, to put it politely… I later found out about Homey and gave that a try. Now THAT went well! I love Homey! But I still have my Home Assistant Green just sitting there, taunting me!
I have heard that HA and Homey can get along, and I would like to give that a try - I want to use Homey as the main smart hub, controlling pretty much everything it can. My wife & I use HomeKit to directly control things - Homey Flows handle the automation. My son uses Google Home. Alexa is there just for those things she is good at. I want to add HA, at this point mostly to get devices into Homey that I might not be able to get otherwise - I am sure over time HA will become more and more prominent… but for now Homey is king!
Anyway, one of the tips I got regarding my previous failure was that I also have an Aqara M3 hub, and my Aqara devices are connected to that. With my HA Green, I got the Zigby dongle. I was told this was part of my problem - I had two Zigby controllers in the same network. But the strange thing is, my M3 hub is connected to Homey and things are pretty good! Was I misinformed? Would I be ok with setting up HA again and hooking up the Zigby dongle to it?
I ask because I keep seeing (even in this tutorial) that I will need MQTT to do this. But if I can’t have Zigby on my HA…
I am hoping one of you fine people can give me some assistance
If you only want to import HA devices into Homey, you only need the HA community app.
Mqtt is needed to export Homey devices to HA.
About Zigbee:
If you have 2 Zigbee meshs (Homey and HA), you have to select Zigbee channels nlt overlapping the other and your Wifi.
But you can also add all Zigbee devices to Homey.
My setup is similar to your use case. Homey is the master (collecting all devices and doing all automations with AdvancedFlow) and HA just serves additional devices.
Thank you VERY much for your reply! I have what are hopefully some simple follow ups - I don’t have a lot of experience doing this, about a month, really, but I do learn quickly! But I don’t want to screw up my setup if I can avoid it - when I tried adding HA last time everything went bad, and the only feedback I got was that my Zigbee situation was to blame.
Currently, I have Homey (obviously), and the Aqara M3 hub - which both do Zigbee. I have done NO Zigbee configuration at this point (don’t even know how). They both seem to be working correctly. When I add HA, how do I ensure that my Zigbee channels are not overlapping?
I guess maybe I just need to understand this: if I change nothing, and just go ahead and setup HA right now - would I need to change a zigbee setting on either homey or HA? As you said, I only want to be able to import HA devices into Homey. So I understand I need MQTT. I plan on using mosquitto for that. Can I just install it and call it good? Will I then be able to import HA devices into Homey? Or will I still need to mess with a zigbee setting somewhere?
I don’t want to mess my setup up. But would you recommend I just set up HA, install Mosquitto (without worrying about any Zigbee settings at the moment) and see how it goes?
Nope, you’ll only need the H.A. Community app for Homey with that scenario
(MQTT is used to publish Homey devices TO H.A.)
If zigbee runs fine, don’t change anything. But when you start using an additional zigbee controller, make sure it uses a different channel than the existing ones.
For which controller you change the channel, it’s irrelevant. I’d suggest to change channels on the yet unused, or the least crowded controller (not all devices find the changed channel and have to be re-paired (not remove and pair! Just pair them again).
Useful Zigbee vs wifi channel info:
This is not related to adding HA to Homey.
When you eventually start adding zigbee devices to HA, it starts to send 2.4GHz signals, and only then you should set/check the appropriate channel, compared to the other zigbee controllers’ channels.
Sir, you are a genuine hero! Thank you very much!
Can’t wait to get back home and set my HA Green up again!
Ok, about to get started. I downloaded the community app already. Do I need to install/do anything on the HA side? Or will HA just start talking to Homey?