HomeKit Integration - Pairing Problems

Thank You! shall be done via paper ui or someother way?

PaperUI is fine.
alternative from karaf with “uninstall <binding_id>” and install "

Hello,

I’ve also tried to integrate Homekit with OpenHab… unfortunetely with the same result. I’ve tried all the solutions explained without success.
My configuration :

  • Raspberry Ppi 3 B+
  • Openhab 2.5.9
  • iOS 14.2

Logs :

2020-12-08 22:13:46.983 [TRACE] [a.server.impl.pairing.PairingManager] - Starting pair for openHAB
2020-12-08 22:13:47.501 [TRACE] [er.impl.http.HomekitClientConnection] - 200 /pair-setup
2020-12-08 22:13:47.506 [TRACE] [server.impl.http.impl.LoggingHandler] - WRITE PooledUnsafeDirectByteBuf(ridx: 0, widx: 512, cap: 512) [/192.168.68.101:50259]:
485454502F312E3120323030204F4B0D0A436F6E74656E742D747970653A206170706C69636174696F6E2F70616972696E672B746C76380D0A436F6E74656E742D4C656E6774683A203430380D0A436F6E6E656374696F6E3A206B6565702D616C6976650D0A0D0A060102020F192277A5E974706EE2B7FE35534CB403FFC1AFBC0252F3295F11DC7F9E85687F1A1C059466A28051C3CD4B45FC3719FFFFA536960373F26BD0989491D2A8EED56EE35D099B3D94B6AEDB3D59859BDCDCFB76D14071028E7C86AED29C11077BF66020290392C42BA8B6EC5E3BDF29003006BAD64F1C3841C082A7C4453E75FC6688114BD56B026D2BFA360D4D5323EB57893D07017C25FAE8E3D991201106E588AD44034BF38BDD6B2D08B43A51474D04A249D7597E71E08BCC57B533C4943A43440839D55A9222DE70FD693261B1F2DC67C8698A9308E66EC1111439D18AA2FC6F3772511C90AE7115E2B59473A65AA2697F6581B2AE10ABFCC0741A06516D91897DE03BCD68B499AF350DED6DE0264A03819AFE2E809958658DE11A2F5B7E6CF0B0E6ED8B37CB4AA123A2F2CFD5F56CB71B0016BD1798A09E59E597726E98E3A015FEB2756E5F029D5694FB69A18C6E185A639240EEF2206A49AB15C23EAF5F25A105C635A6D843BBD1CCF2B691A9B4CF15DD4F830B93EC473D4882AB9CD23F32310E20F04C95AC5F1DBAFC1A605545C437EA

2020-12-08 22:13:47.570 [TRACE] [rver.impl.http.impl.AccessoryHandler] - Terminated HomeKit connection from /192.168.68.101:50259

Did you find solutions in the meantime ?

Thx

first question to @Filippo_BLL: Filippo, have you managed to get you homekit working?

in general, homekit app is very tricky. it can stop the pairing to a number of reasons without telling what is wrong.

my recommendation would be

  • start with one simple items, e.g. switch
  • delete home from home app before pairing. it is also good idea to reboot the iphone.
  • restart openhab
  • try to pair

Hi all, unfortunately no… the behaviour remained what I described above…tried with only one single switch, worked for a while and then stopped… o was not able to understand the reason…any update from you?any improvement is planned with new openHAB 3?

i still was not able to reproduce the issue myself but we have several reports including this thread. So, issue is there, but happening kind of random. some reports that binding re-install hepled, some reports the PIN changes helped. so, still no idea what is the root cause(s).

for OH3 planned:

  • clean up. so, we will drop support of “tags/label”. only meta data {homekit=} will be supported
  • improve logging so that it helps to troubleshoot such cases as yours
  • support for linked accessories, e.g. one could add “battery services” to any accessory or add “Fan” to “Heater”
  • maybe we get pairing using QR code

so, im afraid, nothing of that will solve your issue directly. maybe improved logging will help to understand it.

So I experienced a similar problem with OH3, and I tried everything as mentioned for hours. Finally, it turned out that a simple reboot of the iPhone was the fix which worked for me.

1 Like

I have the same problem of many others (Filippo seems the latest), in your log you don’t see because it appears at debug level:
2020-12-30 02:31:22.377 [TRACE] [rver.impl.http.impl.AccessoryHandler] - Terminated HomeKit connection from /192.168.1.34:60531
2020-12-30 03:03:25.191 [DEBUG] [.server.impl.http.impl.BinaryHandler] - Exception in binary handler
java.io.IOException: Connection timed out

After that I have to go to PaperUI , configuration :-> services :-IO.
Here I set network interface to something , clic save, then I clean it, save once again and then Homekit is running again.
The crash seems due to some Iphone/Ipad disconnection from the wifi network.
Unfortunately this is very bad as it may works for one day and then stops.
Using latest 2.9 homekit bundle on 2.x OH.
Andrea

@Andrea_Viscovich thank for troubleshooting and good hint. probably i should take a look on the connection timeout handling in BinaryHandler

If you wan’t you can use me to make some troubleshooting, nothing is worse than coming home and homekit not running (I have my gate/door opening)

I had the same problem one year ago until now. My Solution:

sudo nano /etc/sysconfig/network-scripts/ifcfg-ens192 

add

IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="no"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="eui64"
IPV6_PRIVACY="no

sudo nano /etc/sysctl.conf
and add :

net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
sudo nano /etc/sysconfig/network

And add

NETWORKING_IPV6=yes

sudo systemctl disable firewalld

Then
Reinstall homekit addons
Change the port to 51826 and the pin to 031-45-154
Put de Ip adress of yout openhab machine


Then throught the console

ssh -p 8101 openhab@localhost
openhab:homekit clearPairings
log:set TRACE io.github.hapjava

Reboot Openhab machine

Now you can go to home ios app and pair your openhab device