Unable to configure homekit

  • Platform information: Rasberry Pi 3

I seem to be unable to configure Homekit on OpenHab v2.5.3
When I look on my iPhone Homekit is always searching but not finding any result

What I’ve done so far:

  • Updated OH to the latest version
  • Updated all packages
  • Uninstalled/reinstalled + reboot

Anyone has any idea?

Here’s what appeared in the log:

> 2020-03-24 15:39:01.467 [INFO ] [me.storage.json.internal.JsonStorage] - Json storage file at '/var/lib/openhab2/jsondb/backup/1585045008884--homekit.json' is used (backup 1).
> 
> 2020-03-24 15:39:01.486 [ERROR] [org.openhab.io.homekit              ] - bundle org.openhab.io.homekit:2.5.3 (274)[org.openhab.io.homekit.internal.HomekitImpl(291)] : The modified method has thrown an exception
> 
> java.lang.RuntimeException: HomekitHttpServer can only be started once
> 
> 	at io.github.hapjava.impl.http.impl.HomekitHttpServer.start(HomekitHttpServer.java:34) ~[?:?]
> 
> 	at io.github.hapjava.HomekitRoot.start(HomekitRoot.java:112) ~[?:?]
> 
> 	at org.openhab.io.homekit.internal.HomekitImpl.startBridge(HomekitImpl.java:120) ~[?:?]
> 
> 	at org.openhab.io.homekit.internal.HomekitImpl.modified(HomekitImpl.java:97) ~[?:?]
> 
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222]
> 
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_222]
> 
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222]
> 
> 	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222]
> 
> 	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) ~[bundleFile:?]
> 
> 	at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) ~[bundleFile:?]
> 
> 	at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664) ~[bundleFile:?]
> 
> 	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510) [bundleFile:?]
> 
> 	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317) [bundleFile:?]
> 
> 	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307) [bundleFile:?]
> 
> 	at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeModifiedMethod(SingleComponentManager.java:836) [bundleFile:?]
> 
> 	at org.apache.felix.scr.impl.manager.SingleComponentManager.modify(SingleComponentManager.java:791) [bundleFile:?]
> 
> 	at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:709) [bundleFile:?]
> 
> 	at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:673) [bundleFile:?]
> 
> 	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:435) [bundleFile:?]
> 
> 	at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:316) [bundleFile:?]
> 
> 	at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$2.configurationEvent(RegionConfigurationSupport.java:118) [bundleFile:?]
> 
> 	at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1709) [bundleFile:?]
> 
> 	at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1651) [bundleFile:?]
> 
> 	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138) [bundleFile:?]
> 
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105) [bundleFile:?]
> 
> 	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

In my Things file I added a line:

Dimmer FF_Office_Light “Licht Bureau [%d %%]” (FF_Office, gLight) [“Lighting”] {channel=“knx:device:bridge:Dimming2:LichtBureau”, autoupdate=“true” }

Homekit.cfg
org.openhab.homekit:port=9123

org.openhab.homekit:pin=031-45-123

org.openhab.homekit:useFahrenheitTemperature=false

org.openhab.homekit:thermostatCoolMode=CoolOn

org.openhab.homekit:thermostatHeatMode=HeatOn

org.openhab.homekit:thermostatAutoMode=Auto

org.openhab.homekit:thermostatOffMode=Off

org.openhab.homekit:networkInterface=192.168.133.30

Does the binding version use a cfg file? Most version 2.x binding do not and the configuration is done via PaperUI.

EDIT: Just checked the doc’s and this binding does use the cfg file.

Have you stopped OH, cleaned the cache then restarted a few times? For me it takes 1 reboot and 2, sometimes 3 restarts for OH to start working correctly. Just make sure to give OH time to fully restart between restarts.

Well that is what’s confusing for me.

I’ve created the CFG file but I also see the same info in Paper UI.
I will try clearing the cache, that I didn’t do yet

The doc’s could be wrong, :thinking: if so it will not be the first time. :upside_down_face:

Try cleaning the cache and see what happens. If that does not work then remove the cfg file, uninstall the binding, restart OH and reinstall the binding. Use PaperUI to configure everything and if it works you can edit the doc’s via link at bottom of page.

please check this thread Connection to HomeKit don't work
it looks like similar issue. the solution there was to add at least one homekit item to items configuration. basically the line you mentioned as “Things” configuration should go to items configuration.

homekit does not care about things configuration, only about items configuration.