Continuing my migration from OH1, where I had Homebridge running very well, I wanted to see if I can quickly and easily get the OH2 Homekit add-on working. I can’t. First of all, documentation says that Karaf command smarthome:homekit listAccessories should list my Homekit-exposed items. Unfortunately, it looks like it does not work:
openhab> smarthome:homekit listAccessories
Unknown command 'listAccessories'
Usage: smarthome:homekit clearPairings - removes all pairings with HomeKit clients
Usage: smarthome:homekit allowUnauthenticated <boolean> - enables or disables unauthenticated access to facilitate debugging
I am on OH 2.5.4. Has that command been removed?
Secondly, I can get OpenHAB to appear in the iOS Home app, but iOS shows it as an “Unsupported accessory”. It does not show as a bridge. And none of the items that I have added the {homekit=} metadata to have appeared in the Home app.
Lastly, I was confused how to install the Homekit integration. I did it by creating the homekit.cfg, which had no effect at first. Then I added a line misc=homekit to addons.cfg, which caused the Homekit to install—but perhaps that was the wrong way to do it? What next?
I think the command is not yet available on 2.5.4 (look at the top right corner, you need to select „2.5“ for the release version). If you select „latest“, you‘ll get the documentation for snapshot versions.
2.5.5 will be available shortly, maybe try again then.
Thank you, @J-N-K. Is there a 2.5.5 snapshot available? I assumed the “latest” documentation, which shows by default anyway, applied to what has been released. This is very confusing!
PS. Documentation does not say “2.5.5” it just says “2.5”, which, according to semver, includes 2.5.anything.
Yes, that’s a known issue with the documentation. I would prefer to auto-select the last release. However, I never understood how the documentation is generated and therefore don’t know how to fix that.
How did you install? On Linux.machines you need to switch the packet repository. New snapshots are available daily.
I am running FreeBSD. I installed from the package repo pkg install openhab2. It defaults to the released tree, 2.5.4 in my case. However, I already had to update zwave to a newer snapshot, so if you could let me know where the jars for Homekit are I could try that. Unless, that is, I need more than that jar. Thanks!
Thanks @J-N-K. I have never used a “kar”, only jars. I would normally put the jar in the addons directory. Where do I put the kar? Or do I need to do something else with it, first?
The .kar is just a zip archive. You can rename it to .zip and use it like any other archive. It contains all jars of the addons, so just pick the homekit addon jar from that archive and use it
Great, I can see all the jars now. Do you think I need anything else from it in addition to the new Homekit addon to make sure the Homekit addon works? If I understand things, the openhab-core is frozen, so no need to worry about that, but I am not sure if the Homekit addon has dependencies on anything else that may need to come out of 2.5.5.
@J-N-K, many thanks for your help. I am happy to report that the binding started working for me, as soon as I have dropped the entire 2.5.5 snapshot .kar file into addons and having cleared the caches. I suspect it wasn’t just the missing karaf command, but also the new metadata syntax that wasn’t working in 2.5.4—I have not used tags, since the documentation states they are a “legacy” approach, which is a funny thing to call something about a version that is not even available generally yet.
In any case, many thanks. Now I have to figure out why the new binding is not picking up any of the names I have given to my items in the .items file. Instead, it is showing them as:
Is there additional syntax that the add-on requires?
Many thanks and sorry for all the questions. Coming from OH1 is hard. However, thanks to you, I have made a small step today that perhaps will become a giant step next weekend.
PS. I am also unsure why Home app is treating those dimmers as switches—I thought it would be cleverer about it. Do I need to be more explicit in the metadata?
this usually means that the status of the item is not initialised yet, e.g. after OH restart. it can be ignore it. at some point you will use the Switch and the state will get set.