HAP-python icon indicating copy to clipboard operation
HAP-python copied to clipboard

Problems running multiple HA HomeKit instances

Open scottyphillips opened this issue 7 years ago • 6 comments

Good morning devs!

Since my poor RPi 1 model B was getting crushed, I moved most of my Home Assistant to a seperate platform (old core 2 duo running Ubuntu and HASSIO). I kept parts of HA on the RPi for GPIO sensors etc. That means I am now running two HomeKit bridges at the same time. The only issue is that one one of the bridges ever seems to want to work at the same time. I have tried giving them unique names, tried combinations of safe mode, reset them numerous times, tried the fixes mentioned in #176, nothing has seemed to help. Is there anything else that I could try?

Edit, I've managed to get them both online (not really sure how other then to reboot my phone again). However, not convinced that they are going to remain stable, i'll update this ticket once they fall over. This issue might be related to #176, but my setup was originally working fine after I applied the beta hap_server.py file as per #176

scottyphillips avatar Dec 29 '18 21:12 scottyphillips

it might be related to some sort of bonjour/mDNS issue because for one HomeKit bridge instance only my iPhone is connecting, the Apple TV and my computer seem to refuse to connect.

Looks like a possible root cause of the issue is a duplicate mDNS hostname being presented? Tried to identify how that hostname is being applied (zeroconf?) but so far haven't worked it out. At the moment, i have gone back to using just my RPi as my only HomeKit device since that was stable for the most part

avahi-browse -alr
= enp5s0 IPv4 Home Assistant Bridge                         _hap._tcp            local
   hostname = [homeassistant.local]
   address = [192.168.1.2]
   port = [51827]
   txt = ["sh=HXGXEw==" "sf=0" "ci=2" "ff=0" "s#=1" "c#=2" "id=FF:E2:F4:32:E7:7B" "pv=1.0" "md=Home Assistant Bridge"]
= docker0 IPv4 HASSIO Main Bridge                            _hap._tcp            local
   hostname = [homeassistant.local]
   address = [192.168.1.18]
   port = [51827]
   txt = ["sh=FcUIQQ==" "sf=0" "ci=2" "ff=0" "s#=1" "c#=2" "id=7C:27:DA:3D:94:49" "pv=1.0" "md=HASSIO Main Bridge"]

scottyphillips avatar Dec 29 '18 21:12 scottyphillips

I regularly run two instances of HAP in the same network, so it's definitely possible. When you say:

my iPhone is connecting, the Apple TV and my computer seem to refuse to connect.

Do you mean that your phone pairs with the accessory and after that the TV/comp do not see the device?

ikalchev avatar Jan 04 '19 19:01 ikalchev

Yes, so my iPhone managed to connect to both HAP instances for a brief period of time, but then neither my computer, not my ATV were able to connect to either. I will try to recreate the setup today and send you some logs + screenshots. Thanks so much for spending time looking after this module. This HAP module is hands down my favourite part of Home Assistant.

scottyphillips avatar Jan 04 '19 22:01 scottyphillips

Are the ATV and mac part of the same apple account? Once someone pairs with an accessory, the other devices of that someone get info about the accessory (keys, etc) through apple. So if your devices are from a different account you won’t be able to see them unless you share them

ikalchev avatar Jan 05 '19 07:01 ikalchev

any update? I think to have same issue.. now for me HomeKit and HA is useless :(

stich86 avatar Jan 09 '19 10:01 stich86

Sorry for the delay. Will look at this as well as soon as I find some time.

ikalchev avatar Jan 16 '19 17:01 ikalchev