OH2.1 HomeKit loses connection to iOS device

I’m setting up a new OH2 installation, and I installed the HomeKit integration. I am able to import my Lighting devices into HomeKit running on my iPhone, but if the iPhone disconnects from the network (I can reproduce this by turning off WiFi and turning it back on), when I re-run HomeKit it shows me that all of my devices are giving a “No Response”. Sometimes it seems to re-connect to the HomeKit service in OpenHAB after quite a while, but other times it never successfully reconnects and the only solution I’ve found is to clear the pairing in OH2, delete the bridge in HomeKit on the iOS device, and then start the whole configuration process over again. Ugh.

On the Configure HomeKit Integration window in OH2 I wasn’t sure what it’s looking for in the Network Interface field. I’ve tried leaving it blank, making it the IP address of my OH2 server machine (an iMac), and putting in an otherwise-unused address on my network. None of these different settings seems to make a difference in the HomeKit disconnect problem I’m seeing, but I would like to know what I’m supposed put into this field anyway.

I’ve seen a few other posts with reports of disconnect problems that seem similar to mine, but it isn’t clear that others are experiencing exactly the same problem. Needless to say, if my iOS devices can’t connect to my OH2 HomeKit server nearly instantaneously, the HomeKit integration isn’t very useful. Any ideas of things I can try to correct this, or is it a known problem with the 2.1 code?

I too have occasional disconnects…

I’ve got a little more info on this issue (which will, hopefully, help in debugging the problem). I’ve even tried setting up one of my iPads as a home hub, but it hasn’t seemed to help keep things “connected”. I’m noticing that the HomeKit link seems to come and go at seemingly random times. One minute the iOS Home app will show me the status of my lights, and the next it will show Updating or No Response.

When I set the log trace level to INFO I started seeing some potentially useful things. When I’m in the Home app on my iPhone and the HomeKit link is down, if I tap the Home or Rooms icon at the bottom of the screen (which I assume makes it try to refresh the list), I immediately see the following lines in the log file:

19:59:55.110 [INFO ] [.hap.impl.http.impl.AccessoryHandler] - New homekit connection from /192.168.1.90:54578
19:59:55.111 [INFO ] [ap.impl.http.HomekitClientConnection] - 200 /pair-verify
19:59:55.130 [INFO ] [ap.impl.http.HomekitClientConnection] - 200 /pair-verify
19:59:55.149 [INFO ] [ap.impl.http.HomekitClientConnection] - 200 /accessories

If the connection fails, the Home app on the iPhone displays No Response for all of my devices and the next log entry will be:

20:01:10.727 [INFO ] [.hap.impl.http.impl.AccessoryHandler] - Terminated homekit connection from /192.168.1.90:54578

If the connection succeeds, I’ll get a whole bunch of log entries similar to:

20:05:09.913 [INFO ] [impl.connections.SubscriptionManager] - Added subscription to class com.beowulfe.hap.impl.characteristics.common.PowerStateCharacteristic for 1685298455
20:05:09.913 [INFO ] [impl.connections.SubscriptionManager] - Added subscription to class com.beowulfe.hap.impl.characteristics.lightbulb.BrightnessCharacteristic for 1685298455
20:05:09.913 [INFO ] [ap.impl.http.HomekitClientConnection] - 204 /characteristics
20:05:09.918 [INFO ] [impl.connections.SubscriptionManager] - Added subscription to class com.beowulfe.hap.impl.characteristics.common.PowerStateCharacteristic for 1685298455
20:05:09.918 [INFO ] [impl.connections.SubscriptionManager] - Added subscription to class com.beowulfe.hap.impl.characteristics.lightbulb.BrightnessCharacteristic for 1685298455
20:05:09.918 [INFO ] [ap.impl.http.HomekitClientConnection] - 204 /characteristics
20:06:27.696 [INFO ] [impl.connections.SubscriptionManager] - Removed subscription to class com.beowulfe.hap.impl.characteristics.common.PowerStateCharacteristic for 1685298455
20:06:27.696 [INFO ] [impl.connections.SubscriptionManager] - Removed subscription to class com.beowulfe.hap.impl.characteristics.lightbulb.BrightnessCharacteristic for 1685298455
20:06:27.696 [INFO ] [ap.impl.http.HomekitClientConnection] - 204 /characteristics
20:06:28.798 [INFO ] [impl.connections.SubscriptionManager] - Removed subscription to class com.beowulfe.hap.impl.characteristics.common.PowerStateCharacteristic for 1685298455
20:06:28.798 [INFO ] [impl.connections.SubscriptionManager] - Removed subscription to class com.beowulfe.hap.impl.characteristics.lightbulb.BrightnessCharacteristic for 1685298455
20:06:28.798 [INFO ] [ap.impl.http.HomekitClientConnection] - 204 /characteristics
20:06:28.869 [INFO ] [impl.connections.SubscriptionManager] - Removed subscription to class com.beowulfe.hap.impl.characteristics.common.PowerStateCharacteristic for 1685298455
20:06:28.870 [INFO ] [impl.connections.SubscriptionManager] - Removed subscription to class com.beowulfe.hap.impl.characteristics.lightbulb.BrightnessCharacteristic for 1685298455
20:06:28.870 [INFO ] [ap.impl.http.HomekitClientConnection] - 204 /characteristics

I have yet to figure out why it sometimes connects successfully while other times it stays disconnected. But the fact that the OH2 HomeKit link acknowledges the new connection request right away tells me that my physical network link doesn’t seem to be the problem. It’s almost as if sometimes the link negotiation process stalls mid-sequence, and then eventually times out.

I’ve also seen a disconnect message in the log file after my iPhone has been off for a little while (a few minutes), and then when I unlock it, the HomeKit app re-connects very quickly to the server. Here’s an example sequence of this happening:

20:17:22.428 [INFO ] [.hap.impl.http.impl.AccessoryHandler] - Terminated homekit connection from /192.168.1.90:54690
20:18:06.510 [INFO ] [ap.impl.http.HomekitClientConnection] - 200 /characteristics?id=183751298.10,183751298.9,247571669.10,247571669.9,1125051647.9,1125051647.10,36645076.9,36645076.10,891774373.10,891774373.9,5500656.9,280100330.9,280100330.10,117756218.9,117756218.10,896355494.10,896355494.9,1662463535.9,117530009.9,117530009.10,1659045902.10,1659045902.9,1702941054.9,1702941054.10,999778663.10,999778663.9,2013044578.10,2013044578.9,2061805904.10,2061805904.9,690705271.9,690705271.10,809059407.9,809059407.10,927776530.10,927776530.9,1374127740.9,1374127740.10,753704402.10,753704402.9,1157554802.10,1157554802.9,403848538.9,403848538.10,765723868.10,765723868.9,1931417234.10,1931417234.9,96385445.9,603443012.9,603443012.10,1946425445.10,1946425445.9,1952200541.9,1952200541.10,1117897826.9,1117897826.10,359566536.10,359566536.9,192402170.10,192402170.9,1295845952.9,2016838719.9,1731638545.9,1150721944.9,1150721944.10,1878070027.9,122766250.9,1505729782.10,1505729782.9,557669077.10,557669077.9,1899160741.10,1899160741.9,1760259673.10,1760259673.9,2029302749.9,2029302749.10,1010274897.9,1010274897.10
20:18:06.793 [INFO ] [impl.connections.SubscriptionManager] - Added subscription to class com.beowulfe.hap.impl.characteristics.common.PowerStateCharacteristic for 1132304223
20:18:06.793 [INFO ] [impl.connections.SubscriptionManager] - Added subscription to class com.beowulfe.hap.impl.characteristics.lightbulb.BrightnessCharacteristic for 1132304223
20:18:06.793 [INFO ] [ap.impl.http.HomekitClientConnection] - 204 /characteristics
20:18:06.797 [INFO ] [impl.connections.SubscriptionManager] - Added subscription to class com.beowulfe.hap.impl.characteristics.common.PowerStateCharacteristic for 1132304223
20:18:06.797 [INFO ] [ap.impl.http.HomekitClientConnection] - 204 /characteristics
1 Like

Hi Wendell,

I have exactly the same problem. I’m running OpenHAB 2.2.0

If the iPhone is disconnected from the wifi the OpenHAB server the reconnect process seems to be stuck a couple of secondes (20 ish). Sometimes the re-connects are very fast.

This behavior is also present if i use Siri. Siri will say something like the lights are not responding. When i ask Siri again the commands will reach OpenHAB.

Thanks - that is a much more precise description of what happens, and for me an accurate one!

Pieter,

It’s discouraging to hear that the problem still exists in OH 2.2.0. Is there a way to see if this is something that the developers are looking into? It’s obviously not an isolated problem with my setup.

Hi!

Can someone tell me how to manually add UPB or some other things for omnilink 2.4 to the .things file?

The controller is added and works fine as shown in the example:

Bridge omnilink:controller:home [ ipAddress=“192.168.1.10”, key1=“00:11:22:33:0A:0B:0C:0D”, key2=“00:11:22:33:1A:1B:1C:1D” ] {
area 1 [ number=“1”]
zone 1 [ number=“1” ]
}

Or so:
--------------------------------->
Bridge omnilink:controller:home [ipAddress=“192.168.1.100”, port=4369, key1=“1st half of OmniPro key”, key2=“2nd half of OmniPro key”]

Thing upb Light_L1_Kitchen_Ceiling “Kitchen Ceiling” @ “Kitchen” [number=1]
Thing upb Light_L1_Kitchen_Counter “Kitchen Counter” @ “Kitchen” [number=2]

<--------------------------------------

But all the things that I add according to this examples appear in Paper UI as “UPB Unit UNINITIALIZED - HANDLER_INITIALIZING_ERROR” or “Omni Area UNINITIALIZED - HANDLER_INITIALIZING_ERROR”

Thanks!