Homebridge in OH1 never give up… maybe in OH2 too. seems to be compatible… However … if you installed node.js by NPM try to uninstall and re-install by apt-get.
I’m trying to pair my iPhone with the openHAB2 Homekit service and not having any luck. After I enter the PIN in the Home app, the pairing screen spins and never completes. I’ve included my item definition and relevant log excerpts. One thing I noticed is that the accessory is being displayed in the Home app as “openHAB (3)” although it’s being advertised as “openHAB”. I don’t know if that’s a problem or not. I see “openHAB (3)” in the HTTP request from iOS, but the 200 HTTP response seems to indicate successful stage one of the pairing process.
I’m not an OpenHAB power-user (so I don’t unterstard TRACE level logs for example ) however I suspect this may be bug-related.
I have OH2 since few weeks (migrated from 1.x but only a few accessories connected for now) and HomeKit worked almost perfectly (had some issues with RGB LED Strip and Siri control but it might be my fault so never mind). Yesterday I’ve updated my setup (offline OH2 on RPi 3) by using “sudo apt-get update && sudo apt-get dist-upgrade”.
Since then Homekit stopped working. Firstly, my iOS devices started to show “non responding” message. Rebooting etc. made no effect. So I removed all my configuration of Home.app to unpair and pair again. I cleared parings using karaf console and now it shows OpenHAB while discovering devices but I can’t connect to it.
That said, I don’t remember doing anything else than just updating OH to SNAPSHOT of 18th December, so I think it may be just a bug. Hopefully it will be fixed.
PS I remember that when I paired my devices to OH2 at first, it also showed some number in the brackets after “OpenHAB”, so I think it is not related with the problem.
EDIT: Here is the last exception logged.
java.lang.NullPointerException
at com.beowulfe.hap.characteristics.FloatCharacteristic.getValue(FloatCharacteristic.java:72)[203:org.openhab.io.homekit:2.0.0.201612180944]
at com.beowulfe.hap.characteristics.BaseCharacteristic.makeBuilder(BaseCharacteristic.java:71)[203:org.openhab.io.homekit:2.0.0.201612180944]
at com.beowulfe.hap.characteristics.FloatCharacteristic.makeBuilder(FloatCharacteristic.java:48)[203:org.openhab.io.homekit:2.0.0.201612180944]
at com.beowulfe.hap.characteristics.BaseCharacteristic.toJson(BaseCharacteristic.java:61)[203:org.openhab.io.homekit:2.0.0.201612180944]
at com.beowulfe.hap.impl.json.AccessoryController.toJson(AccessoryController.java:73)[203:org.openhab.io.homekit:2.0.0.201612180944]
at com.beowulfe.hap.impl.json.AccessoryController.listing(AccessoryController.java:39)[203:org.openhab.io.homekit:2.0.0.201612180944]
at com.beowulfe.hap.impl.connections.HttpSession.handleAuthenticatedRequest(HttpSession.java:70)[203:org.openhab.io.homekit:2.0.0.201612180944]
at com.beowulfe.hap.impl.connections.ConnectionImpl.doHandleRequest(ConnectionImpl.java:51)[203:org.openhab.io.homekit:2.0.0.201612180944]
at com.beowulfe.hap.impl.connections.ConnectionImpl.handleRequest(ConnectionImpl.java:46)[203:org.openhab.io.homekit:2.0.0.201612180944]
at com.beowulfe.hap.impl.http.impl.AccessoryHandler.channelRead0(AccessoryHandler.java:47)[203:org.openhab.io.homekit:2.0.0.201612180944]
at com.beowulfe.hap.impl.http.impl.AccessoryHandler.channelRead0(AccessoryHandler.java:15)[203:org.openhab.io.homekit:2.0.0.201612180944]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)[203:org.openhab.io.homekit:2.0.0.201612180944]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)[203:org.openhab.io.homekit:2.0.0.201612180944]
at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:32)[203:org.openhab.io.homekit:2.0.0.201612180944]
at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:299)[203:org.openhab.io.homekit:2.0.0.201612180944]
at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:36)[203:org.openhab.io.homekit:2.0.0.201612180944]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)[203:org.openhab.io.homekit:2.0.0.201612180944]
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)[203:org.openhab.io.homekit:2.0.0.201612180944]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]
Thanks for the response. I haven’t seen that specific exception, but I also wonder if it’s related to recent openHAB2 changes or a change in the latest iOS firmware version.
I have just fixed my setup. It turned out to be related with my items (Astro binding stopped working after update as well) and after I had reorganized my items and things (this post was a hint: Testing HomeKit add-on on OpenHAB 2 ), Homekit started working. In the meantime I have updated OH2 to the most recent SNAPSHOT as well.
That being said, unfortunately I still have no idea how to solve your issue for sure but maybe our issues had something in common.
I’m glad it’s working for you. My items configuration is extremely simple since I’m just evaluating OH2 before migrating from OH1, I’ll try it again this weekend. If it still doesn’t work I’ll move on to other tasks, I was hoping @beowulfe might have some feedback.
@steve1 - there were no log lines after that pairing response, before the termination log line? (It’s okay that you trimmed the response, just want to make sure there were no other lines prefixed a date).
If so, that’s an odd place for it to fail. It would be unrelated to your item setup. Did you change the default pin?
@beowulfe. Thanks for the reply. I just tried it again and the pairing succeeded. I’m not sure what’s different. I did uninstall and reinstall the OH2 HomeKit service, but no version upgrades, etc. In any case, it seems to be working well now. Thanks again.
I have used homekit and OH quite successfully, also with Siri commands.
But when I get back home from being away from home, the connection between OH2 and homekit is lost. Happens almost every day. If I go into Paper UI and open the configuration of Homekit and just click save, that usually makes the connection ok again. Anyone else have had this experience?
And second, I have added more homekit tags in my items file ([“Lighting”]) but they do not appear in iOS app. What more is needed to add additional items in iOS app would you say?
Hello,
My setup can include any items that i added from default.items file, but i can’t figure out items created by oh2 bindings, AKA inbox items. How do i do that?
i have the same issue. A workaround is to define the inbox detected item again in the .items file. That works for me but is a hack while investigating how to add the require (“Lighting”) tags etc via the GUI.
Re-Adding items OH1 way made the items controllable from homekit. But this is a shortcoming that has to be sorted out. A simple field on the paper UI should do the trick.
Does anyone have a working config for the release version of OpenHAB 2.0 ? My phone sees the openHAB accessory but nothing happens when trying to add it after entering the PIN
I don’t see any log entries from the homekit addon when the phone tries to connect, but while loading openHAB it does output about 30 repeated lines like these:
2017-01-27 20:32:25.986 [INFO ] [com.beowulfe.hap.HomekitRoot ] - Added accessory null
2017-01-27 20:32:26.006 [INFO ] [pl.http.impl.NettyHomekitHttpService] - Resetting connections
I thought it would just ignore items that didn’t have the correct tags assigned, it almost seems like something gets stuck trying to parse my item configs? Should I see any output from HomeKit about the items that have the Switchable tag assigned while starting up?