KM200: Binding fails to connect to gateway

Hi everybody,
some days ago my KM200 binding suddenly stopped worked stating it couldn’t connect to the gateway, although nothing had changed in my setup - at least as far as I know. My Setup is:

  • Raspberry Pi
  • Raspbian Linux - no Openhabian
  • Openhab 2.5.7 (installed via repo)
  • KM200 Binding 2.5.7 (installed via repo)
  • KM100 Gateway with current firmware
  • Java Version:
    openjdk version “1.8.0_152”
    OpenJDK Runtime Environment (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 1.8.0_152-b76)
    OpenJDK Client VM (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 25.152-b76, mixed mode, Evaluation)

If I reinstall the KM200 binding, it finds the KM100 Gateway via mDNS, tries to connect only to fail with (quote) “‘km200:kmdevice:920420322’ changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR): No communication possible with gateway”. I have the following log entries:

2020-08-24 21:25:43.247 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘km200:kmdevice:920420322’ to inbox.
2020-08-24 21:26:00.297 [DEBUG] [g.km200.internal.KM200HandlerFactory] - It’s a gataway: km200:kmdevice
2020-08-24 21:26:00.301 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler KM200GatewayHandler tried updating the thing status although the handler was already disposed.
2020-08-24 21:26:00.331 [hingStatusInfoChangedEvent] - ‘km200:kmdevice:920420322’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_CONFIGURATION_PENDING)

I then add the private key in Paper UI and the log continues with:

2020-08-24 21:26:44.439 [DEBUG] [g.km200.internal.KM200HandlerFactory] - It’s a gataway: km200:kmdevice
2020-08-24 21:26:44.442 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler KM200GatewayHandler tried updating the thing status although the handler was already disposed.
2020-08-24 21:26:44.482 [INFO ] [internal.handler.KM200GatewayHandler] - Update KM50/100/200 gateway configuration, it takes a minute…
2020-08-24 21:26:44.485 [DEBUG] [internal.handler.KM200GatewayHandler] - Set read delay to: 100 seconds.
2020-08-24 21:26:44.487 [DEBUG] [internal.handler.KM200GatewayHandler] - Set refresh interval to: 30 seconds.
2020-08-24 21:26:44.488 [DEBUG] [internal.handler.KM200GatewayHandler] - Set max. number of repeats to: 10 seconds.
2020-08-24 21:26:44.492 [DEBUG] [hab.binding.km200.internal.KM200Comm] - Starting receive connection…
2020-08-24 21:26:49.487 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing ‘km200:kmdevice:920420322’ takes more than 5000ms.
2020-08-24 21:26:49.506 [DEBUG] [hab.binding.km200.internal.KM200Comm] - Call to 192.168.99.82 /gateway/DateTime timed out
2020-08-24 21:26:49.494 [ERROR] [st.core.internal.thing.ThingResource] - Exception during HTTP PUT request for update config at ‘things/km200:kmdevice:920420322/config’
java.lang.IllegalStateException: Handler should not be null here
at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl.initializeHandler(ThingManagerImpl.java:647) ~[?:?]
at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl.access$13(ThingManagerImpl.java:623) ~[?:?]
at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl$1.configurationUpdated(ThingManagerImpl.java:290) ~[?:?]
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.handleConfigurationUpdate(BaseThingHandler.java:111) ~[?:?]
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.updateConfiguration(ThingRegistryImpl.java:93) ~[?:?]
at org.eclipse.smarthome.io.rest.core.internal.thing.ThingResource.updateConfiguration(ThingResource.java:438) [bundleFile:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_152]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_152]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_152]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_152]
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [bundleFile:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [bundleFile:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [bundleFile:?]
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [bundleFile:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [bundleFile:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [bundleFile:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [bundleFile:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [bundleFile:?]
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [bundleFile:?]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [bundleFile:?]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [bundleFile:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [bundleFile:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [bundleFile:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [bundleFile:?]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [bundleFile:?]
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [bundleFile:?]
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [bundleFile:?]
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) [bundleFile:?]
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) [bundleFile:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) [bundleFile:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) [bundleFile:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) [bundleFile:?]
at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76) [bundleFile:?]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852)[bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:544) [bundleFile:9.4.20.v20190813]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [bundleFile:?]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:536) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1307) [bundleFile:9.4.20.v20190813]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) [bundleFile:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [bundleFile:9.4.20.v20190813]
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [bundleFile:?]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.Server.handle(Server.java:494) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) [bundleFile:9.4.20.v20190813]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]
2020-08-24 21:26:49.540 [DEBUG] [b.binding.km200.internal.KM200Device] - Communication to /gateway/DateTime is not possible!

Can someone please tell me what happened here? Kind regards,
Kai

Did you restart (power on / off) the gateway ?
From my experience I´d guess that the gateway itself has crashed.
Thomas

1 Like

Thomas, based on your question I restarted my heating, as its KM100 Gateway is integrated. And restarting my heating did the trick. The KM200 binding correctly discoveres the gateway and its corresponding things, the all show up in my Inbox. OMG, my heating reminds me of my computer :laughing:

Thanks for the hint, have a nice day!