Cannot connect to OpenHab from Apple home app

Hello community. I want to connect from Apple home app (via homekit) to Raspberry PI, where OpenHub server run. I have installed HomeKit binding and do all steps described in link below:

In window “Network Interface” (page in PaperUI - Configure HomeKit Integration) I type Raspberry IP. Then I connect iphone to network where Raspberry is, start Apple home app and can’t find openhab server. What wrong I do ?

IPhone and Raspberry PI are located in same network (I check it by ping tool)

do you have this line the openHab log (should appear the start)
2020-07-03 15:10:54.321 [INFO ] [er.impl.jmdns.JmdnsHomekitAdvertiser] - Registering _hap._tcp.local. on port 9124

when this line is there than home app should already see openhab in the list of accessories.
another check is to execute this command from terminal / ssh on raspberry pi
sudo netstat -an | grep 9124
you should get at least one result

There is next record in openhab.log file:

[ERROR] [ ] - bundle (284)[] : Error during instantiation of the implementation object

java.lang.reflect.InvocationTargetException: null

I have no result when execute command:
sudo netstat -an | grep 9124

i think it could be related to that one

id of the to-be-update bundle is missing.
so, find ID with command

list | grep -i homekit

and use this ID for update command, e.g.
update 521 https://...

alternativly, deinstall homekit binding (via paper UI)
and use install instead of update, i.e.


Thank you for your answers. One more question. When I want to execute command (in karaf console) for instance: list | grep -i homekit and others, I type them end press Enter, but after this i see no result of command executing (just next line where I can type command again). Is that internal bug of karaf console or bug with my Raspberry PI ?

if list | grep -i homekit does not return any result then homekit binding is not installed. just use the install command

same result…

But now I do it with Windows Openhab server (because today I don’t have access to Raspberry PI)

try without grep. just
and check whether you find Homekit binding.
it looks like it has id 285

list - it works. In list I see bundle with ID 285 with version that corresponds to installed version of HomeKit. Thank you for your help.

But the reason of result absence after executing command list | grep -i homekit still remains unknown. What do you think about it ? Is that bug of karaf console ?

to be honest, i dont know how karaf exactly works. but “grep” is a linux command and does not exist on windows. so, if karaf use native “grep” then it will probably not find it on windows… but im just guessing.
so, do you see openhab in home app on iphone now?

I don’t have such possibility now. I hope that on monday I check this system (Raspberry PI Openhab server + Apple home app) and then I will report about result.

I had updated HomeKit to v2.5.7 and still no result. Maybe there is a problem with Apple Home app. I see a lot of video tutorials about it. I noticed that after clicking Add accesory there is automatic scan for new devices, but in my case there is no such scan, instead of this camera is activated for QR code searching. Maybe I do something wrong with Apple Home APP. What do you thing about it ?

yes, you cannot scan openHAB.

  1. select “I dont have a Code or Cannot Scan”

2. Now you should see OpenHAB on the list of accessories

3. select “Add Anyway”

  1. Enter the PIN. you can see it (and change it if you want) in paper UI.
    default one is 031-45-154

  2. it takes few seconds and afterwards you should see accessories you tagged in items as homekit accessory.

Thank you. Now it works.

One more thing. It seems to me I know the reason why command didn’t execute in karaf console. In file runtime.cfg line = must be uncommented (it is not good for security but it can be a reason).

1 Like