[SOLVED] Homekit integration breaking openhab setup

I am currently running OpenHab2 on a Raspberry pi 3 B+. I am new to Openhab and this is my first setup (Still just playing around practicing and testing).

I have run into the issue, that when I integrate homekit with my items by butting the [ “Switchable” ] or [ “Lighting” ] tag, my whole setup breaks. Everything turns off and nothing works.

My current item file looks like this:

Switch FAN “Raspberry Pi Fan” { gpio=“pin:4”}
Switch channel1 "Channel1 {gpio=“pin4 activelow:yes initialValue:high”}

Switch LAMP “Lamp” { gpio=“pin:17” }
Switch channel1 “Channel 1” { gpio=“pin:17 activelow:yes initialValue:low” }

The issue happens when I for instance add

Switch FAN “Raspberry Pi Fan” { gpio=“pin:4”} [“Switchable”]
Switch channel1 "Channel1 {gpio=“pin4 activelow:yes initialValue:high”}

or

Switch LAMP “Lamp” { gpio=“pin:17” } [“Lighting”]
Switch channel1 “Channel 1” { gpio=“pin:17 activelow:yes initialValue:low” }

As you can see it’s still very simple and I am only just playing around with the gpio pins at the moment, trying to get a small working setup testing different methods.
Does any of you know what causes this issue or how to fix it?

Tags such as [“Lighting”] are used to interact with the light device via a natural voice command if implemented in the addon binding. Per the doc’s, this should be ignored by OH if not implemented, so I’m not sure why this would break your setup.

Do you have anything in the logs that indicate the issue with these items?

Edit: Have you tried a tag with spacing like [ “Lighting” ] opposed to [“Lighting”]? The doc’s for Homekit show this as supported.

Well I actually just realized that the tag must come before the gpio tag. However, I still can’t connect my Homekit app to it. It can’t find any Homekit accessories when I use the code. I tried yesterday with a test and it worked. But now I can’t find any items with my Homekit

Just looking at the documentation, complex accessories require a tag on a Group indicating the accessory type, as well as tags on the items it composes.

Also, HomeKit allows only a single pairing to be established with the bridge. This pairing is normally shared across devices via iCloud. If you need to establish a new pairing, you’ll need to clear the existing pairings. To do this, you can issue the command smarthome:homekit clearPairings from the Karaf console.

Try clearing your existing pairings and use groups when tagging.

1 Like

Sorry I ask stupid. Where and how do I access the OSGi console?

Try from the Karaf console.
From the terminal like this $openhab-cli console

Well the command is not working in the openhab console

Did you mean the Karaf console?
I was a bit confused about karaf console when I first started using OH but here’s a pic to show the difference…

Screenshot%20at%202018-09-30%2008-08-50

1 Like

Ah thank you that helped however I can’t access it. I just get timed out-

[15:14:17] openhabian@openHABianPi : ~ $ openhab-cli console

Logging in as openhab

Session has timed out waiting for authentication after 120000 ms.

[15:16:26] openhabian@openHABianPi : ~ $

Did you enter the correct password? If you haven’t changed it the default is habopen.

I never asked for password

Did you install OH via the openhabian image or other?

Via the openhabian image

From the terminal $sudo openhabian-config
and use the tools to fix permissions, not sure exactly the location (maybe number 37)so you may have to look thru a few.

It’s apply improvements and fix permissions, number 14

1 Like

Ahh it works great! Only issue is that my password is not working? What is the regular password for openhab again? Not openhabian?

For the Karaf console use habopen.
You can also change the Karaf password using the openhabian tools, system setting>change password

Alright so I managed to reset the homekit pairings however my openhab server is no longer running and I can’t start it… The pi is running and I can ssh into it but I can’t start the openhab server

Have you tried $ sudo service openhab2 start

Yes, when I view the CPU use via the top command I can see that openhab keeps starting and then crashing.

EDIT: Fixed it

Alright it all working now! Thank you so so much with your help and for your patience. I am new to openhab and raspberry pi (have done a bit of linuxing before) so most of this is new to me.
Again thank you so much!

1 Like