Homekit Setup

I have installed the home kit binding via Paper UI, but now I am trying to edit the homekit.cfg file, and I cannot find where it should go. I installed via apt-get, which from what I gather can make a difference in directory structure. I don’t appear to have a ‘conf’ folder anywhere on my system.

I don’t believe there is a configuration file for Homekit. You should be able to set it up in the Paper UI under Configuration > Services > MISC.

As far as the conf folder, with OH1 the configuration folder was located at /etc/openhab. I’m not sure if the directory structure is different with OH2 as I haven’t used the apt package.

1 Like

Ah, thank you. I edited the PIN code there, it DOES show up in my Home app on my iPhone, but when I try to pair it, it is unsuccessful, saying “Home couldn’t connect to this accessory”

Any ideas?

First, do you have your items that you want to control tagged appropriately? e.g. [ “Lighting” ]

I would also try restarting OH. I’ve noticed that some settings seem to be finiky and require me to restart before changes will be picked up.

1 Like

Reading into this, I think I did not have it set up correctly. First off, I needed to install home bridge (I’ve done that). Now I need to tag my items correctly. I will work on this for a while, and report back progress to help anyone else trying to get this stuff set up.

A few links that are helpful:

The Github page for the addon

The Github page for Homebridge

Also, as previously mentioned, I found the configuration stuff under the Paper UI and NOT in a folder. This seems to be a confusing element of OH2-some things are in config files, and some are accessible through the web UI.

Ok, so I’ve got Homebridge up and running, and I can actually see it in my Home app on iOS. I’m attaching a screenshot of what I see on my device.

I do not, however, see any light switches (there should be one, which is a zwave switch that works from the classic UI).

My demo.items file looks like this:
Switch PorchLight "Porch Light" <light> {channel="zwave:device:13d8934b:node3:switch_binary"} [ "Lighting" ]

And here is the iOS screenshot:

Try moving the tag before your channel declaration. I seem to remember reading that it can be picky about where the tag is placed.
Is your switch working otherwise? In other words, from your sitemap?

Switch PorchLight "Porch Light" <light> [ "Lighting" ] {channel="zwave:device:13d8934b:node3:switch_binary"}

yes, it is.

well, technically the zwave binding got stuck on initializing since my last post. its been kinda finicky, but i think thats a separate issue to solve…

thanks for the help.

Tried changing up the item file, but no luck. I’m not even sure how the switch is supposed to show up in the Home app (it’s Apple’s official app included with iOS 10 beta).

As I’ve added more devices, they have just showed up in the app.

You might try adding just a simple virtual switch and see if it is found.
Something like:

Switch testSwitch "My Switch" ["Lighting"]

Getting it to show up in the app is the first hurdle, after that you could add it to your sitemap and see if it is triggered by homekit.

One more thing that might be worth a try… remove the spaces between your bracket and your quotation marks. I have no spaces in my tags, although I can’t recall if I ever tried with them.

to be clear, where EXACTLY did you place the above code? I was going to place it in /etc/openhab2/items/demo.items file, where my other items are.

to be clear, where EXACTLY did you place the above code? I was going to place it in /etc/openhab2/items/demo.items file, where my other items are.

Which didn’t work, btw.

It is just a switch that isn’t linked to an actual device so you can put it wherever you want, in your current .items file, or create a “test.items” file to keep things separate.

If you add it to your sitemap, if it shows up in the Home app, you should be able to see it toggle in your sitemap when you activate it via Homekit. Obviously it won’t do anything, but it will give you visual feedback as to whether Homekit is talking to OH successfully.

Switch item=testSwitch label="My Switch"

You aren’t trying to use both the Homekit IO addon, and Homebridge are you? These are two separate methods for linking Homekit to OH.

You aren’t trying to use both the Homekit IO addon, and Homebridge are you? These are two separate methods for linking Homekit to OH.

Why yes, I was…just the HomeKit IO add-on wasn’t working. I thought it was meant to interface with Homebridge. So, there’s part of my problem.

You said you got your switches working. Can you either A) walk me through exactly how that worked, or B) point me to a resource? It’s proving very difficult to find a clear guide for me, and I think more people than I would benefit from a start-to-finish writeup.

Ahh. Homebridge is an external program that acts as a… “bridge” between Homekit and OH. The Homekit IO addon is an “official” addon that does basically the same thing.

I bet if you stop Homebridge, things may start to come together. I would restart OH also after stopping Homebridge just for good measure.

Most of what I did has already been covered. You seem to have the addon configured correctly in the paper UI - Configuration > Services > MISC.

Other than that it’s just a matter of adding the appropriate tags to your items for them to be exposed by the addon.
A sample item from my config.

Switch outlet1 "Lamp" (lights,lamp,bedroom) ["Lighting"] {mqtt=">[broker:/ol1/gpio/15:command:ON:1],>[broker:/ol1/gpio/15:command:OFF:0],<[broker:/ol1/state:state:default"}

Sitemap:

Switch item=outlet1 label="Lamp"

Ok, so this is how I have the add-on configured in PaperUI. But there is nothing showing up in the Home app on iPhone.

You may need to remove your Home from the app and readd it. It’s possible that it was binding to Homebridge rather than the addon.
I assume that 10.0.1.47 is the local IP of your OH machine? Other than that and the pin, there’s not much else that’s necessary to get it running.

seems there is a problem with homekit in OH 2. i have the same problem.
i can see the accessory but i cannot connect. tried everything.

anyone has solved?

Since the item I wanted to control still has a 1.9x version, I am using the workaround to asign the homekit extension to a virtual switch and then use the change of this switch in a rule to actually switch the physical item.

This is working somehow.

When restarting my machine I cannot connect to home kit anymore and I have to reinstall the home kit bridge again on my iPhone. Then it is working for a while until it stops again.

I am not following this further because Siri is really not working well using German language. So the whole exercise turn out to be rather meaningless.

Maybe I will try again using Amazon Echo.