For the last few days I’ve been increasingly frustrated.
Recently I installed OH2 on a raspberry 2, installed MQTT and Z-Wave, and a few other basic things like weather and such.
After that, I tried installing the Homekit Integration addon, and it was mostly painful, and it’s been working great, even bought an apple TV.
After that, I installed OH2 on two different RPi 3’s, mostly the same setup - MQTT, Z-Wave, and weather. In both of these I also followed the online tutorial to setup HTTPS remote access with nginx. Finally I installed Homekit Integration, but unfortunately I can’t find the accessory in the Home app, in either of the raspberry’s. I see no errors, I added the IP in the configuration, I cleared pairings and allowed unauthenticated, I’ve tried everything I could find, but I see nothing in the logs besides this:
Still no luck. I have configured everything properly, and even reinstalled Homekit addon after removing all the related files. Still I can’t find openHAB on the Home app…
Is it an iOS 12 thing? Any suggestions?
It has been working me with iOS12. However the HomeKit addon is not really maintaned these days, so might be problems with it. I recommend switching to Node-RED. It is much more stable (haven’t had any problems with it yet) and supports almost all item types (not just lightbulb and outlet, thermostat). It takes a little time to implement everything, but it worth the time.
I considered the homebridge npm option. Homebridge is good but if you can get through the nodered growing pains it will give you many more options and flexibility to really build things just how you want.
The base code of homebridge and nodered are actually the same nodejs HomeKit server…
The way I look at nodered is it’s a collection of nodejs packages put together in a slick graphical interface made to work easily with each other. So you add the openhab package, homekit packages, a function between - and off you go.
I will setup a test raspberry to install openhab2 and nodered, and learn how it works.
Meanwhile, I installed homebridge on one of the two RPi’s where I previously tried to install homekit addon. I took with me to the office, and there it worked great, openhab accessory was discovered immediately. This led to me believe there was something about the networks where they were that was causing the problem (a friend’s house and a family member’s), and not the raspberry or the homekit addon.
So in the evening I went by my friend’s house, plugged the RPi to his network, and again, no luck, accessory couldn’t be found. I checked and rechecked everything, logged into the router and even disabled the firewall, but still no luck. So I connected the raspberry to a switch instead of the router, and to that same switch, a simple tp-link wifi access point, and from that switch a cable to the router.
Connected the iphone to the tp-link’s wifi, and surprise, accessory is found immediately!
So, for some reason, some routers are blocking connections or ports from the wireless to the wired interface. And the reason this didn’t happen at my house is because my RPi is indeed connected deep in the network, through two switches, and my phone must’ve been connected to one of my two access points other than the service provider’s one (which apparently are the ones causing problems).
So, to anyone experiencing problems in finding the accessory, either using homekit addon or homebridge or nodered, I would strongly suggest to first eliminate this problem making sure communication isn’t getting blocked by a router, even if the router has the firewall disabled.
First that’s cool that homebridge worked well. I might go look at that again just to see what it’s abilities are these days. I like knowing the options.
Second you’ve reminded me I have a friend who lives by me, he was trying to set up a few homekit items through node red and always had trouble with the connections. He also had multiple routers. I suspect that all homekit items need to be on the same subnet. I don’t know how to fix the problems but if you’re a network wizard you could probably figure it out. I bet your homekit woes (outside of the not great openhab) would go away once things are on the same subnet.
Perhaps I did not explain very well, sorry. In all of the networks I mentioned, everything is on the same subnet - One is my home, and the other two rpi’s are at friend’s houses. Their network is a typical home network: a service provider router (fiber optics) which is serving wifi and wired devices.
One of them, the one I mentioned earlier, has a power line adapter which he uses to connect a second wifi access point on the second floor of the house, but everything is still on 192.168.1.0/24. When I got it working was when I “bypassed” the service provider’s router, connecting the rpi and the power line adapter cable to a switch instead of the router, and then another cable from the switch to the router, just for internet access. Once I connected the iPhone to the second floor’s access point, it worked straight away. So whatever the problem is, it has to do with how the service provider’s router handles the communication between wifi and wired interfaces, even though they are using the same IP range and subnet, perhaps something is lost on the hardware layer.
In my house I have a few access points providing wifi apart from the service provider’s router, along with a few switches scattered around the house for multiple reasons. My raspberry is connected to one of those switches and not directly into the router. So the first time I added the accessory, I must’ve been connected to one of the other access points, therefore also “bypassing” the service provider’s router, which is identical to the other one that caused problems. I also have everything on the same network.
I still have to try it on my other friend’s house, but I suspect it will be exactly the same thing.
Thanks for all the help!