New Jeelink Openhab2 Binding

This looks like the binding can not connect to the LGW. I no longer use my LGW, as it repeatedly hung up after some weeks of use. So I am not sure if there is some configuration in the LGW web UI to be done to open the port.
Or does your router block access to port 81?

As long as the binding can not connect, you don’t need to worry about init commands.

I am in the process of adding support for Revolt Energy Monitors to the binding. In order to do this, I had to change code for the init commands and also made changes that might affect other sensors. It would be nice if some of you can install the new version and report back if everything still works before I create a pull request.

The updated jar is located here: https://github.com/vbier/openhab2-addons/raw/jar/bundles/org.openhab.binding.jeelink/org.openhab.binding.jeelink-2.5.0-SNAPSHOT.jar

Thanks mate.
Nothing is blocking port 81. I’ve done port scans and the port just isnt open.

I am wondering if I should be changing the proxy settings in the gateway with the advanced tool - redirecting the gateway traffic from box.weatherdirect.com to the openhab server maybe?

I am not sure what you are talking about. What has the LacrosseGateway to do with box.weatherdirect.com?

This is the gateways webserver (on port 80)
My gw is a Gw1000U

This seems to be a completely different device than the LaCrosse Gateway that is supported by this binding, which is a self-soldered solution with a custom firmware (https://wiki.fhem.de/wiki/LaCrosseGateway_V1.x).
So most likely you can’t use the Jeelink Binding to connect your GW1000U to OpenHab at all.

Hello Volker,

after my upgrade to Openhabian 2.5 stable I had to re-create the Jeelink binding and re-add the “LaCrosseGateway am USB Port”.

In the logs I saw the following error message this time. Not sure if this is critical (everything seems to still work fine after adding the Jeelink sensors thereafter), however I wanted to pass on the observation I have when adding the gateway, in case this is something related to V2.5 worth looking at:

2020-01-01 23:44:35.700 [ERROR] [ore.common.registry.AbstractRegistry] - Cannot inform the listener “org.eclipse.smarthome.core.thing.internal.ChannelItemProvider$1@12a5a4e” about the “UPDATED” event: Error creating a dimension Class instance for name ‘Percent’.

java.lang.IllegalArgumentException: Error creating a dimension Class instance for name ‘Percent’.

at org.eclipse.smarthome.core.types.util.UnitUtils.parseDimension(UnitUtils.java:89) ~[bundleFile:?]

at org.eclipse.smarthome.core.library.items.NumberItem.<init>(NumberItem.java:75) ~[bundleFile:?]

at org.eclipse.smarthome.core.library.CoreItemFactory.createItem(CoreItemFactory.java:81) ~[bundleFile:?]

at org.eclipse.smarthome.core.library.CoreItemFactory.createItem(CoreItemFactory.java:1) ~[bundleFile:?]

at org.eclipse.smarthome.core.thing.internal.ChannelItemProvider.createItemForLink(ChannelItemProvider.java:241) ~[?:?]

at org.eclipse.smarthome.core.thing.internal.ChannelItemProvider.access$2(ChannelItemProvider.java:227) ~[?:?]

at org.eclipse.smarthome.core.thing.internal.ChannelItemProvider$1.added(ChannelItemProvider.java:316) ~[?:?]

at org.eclipse.smarthome.core.thing.internal.ChannelItemProvider$1.updated(ChannelItemProvider.java:336) ~[?:?]

at org.eclipse.smarthome.core.thing.internal.ChannelItemProvider$1.updated(ChannelItemProvider.java:1) ~[?:?]

at org.eclipse.smarthome.core.common.registry.AbstractRegistry.notifyListeners(AbstractRegistry.java:366) [bundleFile:?]

at org.eclipse.smarthome.core.common.registry.AbstractRegistry.notifyListenersAboutUpdatedElement(AbstractRegistry.java:387) [bundleFile:?]

at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutUpdatedElement(ThingRegistryImpl.java:143) [bundleFile:?]

at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutUpdatedElement(ThingRegistryImpl.java:1) [bundleFile:?]

at org.eclipse.smarthome.core.common.registry.AbstractRegistry.updated(AbstractRegistry.java:291) [bundleFile:?]

at org.eclipse.smarthome.core.common.registry.AbstractRegistry.updated(AbstractRegistry.java:1) [bundleFile:?]

at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:62) [bundleFile:?]

at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListenersAboutUpdatedElement(AbstractProvider.java:87) [bundleFile:?]

at org.eclipse.smarthome.core.common.registry.AbstractManagedProvider.update(AbstractManagedProvider.java:119) [bundleFile:?]

at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl$1$1.run(ThingManagerImpl.java:261) [bundleFile:?]

at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl$1$1.run(ThingManagerImpl.java:1) [bundleFile:?]

at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_222]

at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl$1.thingUpdated(ThingManagerImpl.java:249) [bundleFile:?]

at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.updateConfiguration(BaseThingHandler.java:441) [bundleFile:?]

at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.handleConfigurationUpdate(BaseThingHandler.java:105) [bundleFile:?]

at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.updateConfiguration(ThingRegistryImpl.java:93) [bundleFile:?]

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_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.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_222]

Please excuse should this be a “false alarm”.

Thanks for your great work in keeping Jeelink running smoothly.

Thanks for the information. I have also upgraded to 2.5.0 and did not have any problems. So it does not seem to be a general problem. Anybody else having problems with the jeelink binding after upgrading to 2.5?

Hi Volker,

many thanks for the binding. I have a question regarding LaCrosse Gateway. I use some of them with a directly connected Temp/Hum Sensor. These sensors are not visible within the binding and can not configured manually. So I think this option is not supported by the binding until now. Is it possible to add the support for this setup?

Many thanks in advanced
Christian

Adding support is possible as long as the LGW writes the values of the connected sensors to the serial/TCP port as it does for the other sensors. Set debug level trace using the openhab console and post a relevant part of rthe openhab logv containing ouput for the directly connected sensors. I can then add support when I find the time.

Hi Volker,

currently I use two LGWs with the ‘Internal sensors ID’ 71 and 75 which can be configured manually within LGW setup. Here are the traces for both:

22:08:46.155 [TRACE] [.connection.AbstractJeeLinkConnection] - Read line from port 10.10.16.71:82: OK WS 71 4 4 203 53 255 255 255 255 255 255 255 255 0 3 219 255 255 255 255 255 255 255 255 255

22:08:48.318 [TRACE] [.connection.AbstractJeeLinkConnection] - Read line from port 10.10.16.75:82: OK WS 75 4 4 195 61 255 255 255 255 255 255 255 255 0 255 255 255 255 255 255 255 255 255 255 255

Hopefully that helps.

Many thanks
Christian

Now i only need to find a description of the format of the internal sensors. I will have to check the LGW source code and keep you posted on the progress.

I’m not sure it helps, but the format is a WS 1600 … FHEM Wiki

Thanks for the pointer to the docs, that helped.

I am wondering why the LGW reports values for two different connected sensors. Reading the LGE docs, it states:

Wenn ein BME280 vorhanden ist, wird dieser verwendet und sonst nichts, da man dann bereits Temperatur, Feuchte und Druck hat.

Your first sensor (id71) has temperature, humidity and pressure, so should be a BME280. According to the docs, all other sensors should be ignored. Your second sensor (id75) has temperature and humidity, so should be a DHT22, correct? I would like to understand what is happening so the binding supports everything correctly.

You are right. In my setup the 71 has a BME280 connected, the 75 a DHT22. So far documented, a BMP180 or LM75 sensors also possible, but I think with the BME280 the max. supported values available.

Many thanks for the fast replies and support.

You can try this jar file, which should support internal LGW sensors. If it works I can create a pull request to have it officially added. Remove the currently installed add-on and copy the jar to the add-ons directory.

https://github.com/vbier/openhab2-addons/raw/jar/bundles/org.openhab.binding.jeelink/org.openhab.binding.jeelink-2.5.3-SNAPSHOT.jar

Many thanks Volker … works as expected :grinning:

22:28:43.257 [DEBUG] [nk.internal.lacrosse.LgwSensorHandler] - updating states for thing lgw75 (75): sensorId=75: temp=22.2, hum=62
22:28:43.291 [INFO ] [smarthome.event.ItemStateChangedEvent] - Temp_lgw_id75 changed from NULL to 22.2 °C
22:28:43.300 [INFO ] [smarthome.event.ItemStateChangedEvent] - Hum_lgw_id75 changed from NULL to 62 %
22:28:44.201 [DEBUG] [nk.internal.lacrosse.LgwSensorHandler] - updating states for thing lgw71 (71): sensorId=71: temp=23.2, hum=56, pressure=1010
22:28:44.236 [INFO ] [smarthome.event.ItemStateChangedEvent] - Temp_lgw_id71 changed from NULL to 23.2 °C
22:28:44.253 [INFO ] [smarthome.event.ItemStateChangedEvent] - Hum_lgw_id71 changed from NULL to 56 %
22:28:44.262 [INFO ] [smarthome.event.ItemStateChangedEvent] - Pres_lgw_id71 changed from NULL to 1010 hPa

Only to bring up the pressure value to PaperUI should not work so far, I will check my config tomorrow.

Many thanks again for the really great support to add it so quickly.

Hi Volker, it works fine for my since 10 or 12 days. So i’m happy with the changes … many thanks again.

Would it available in the official release some day?

I have created a pull request: https://github.com/openhab/openhab-addons/pull/7153. I have to make some changed to get it merged. After that it will take one or two days for it to show up in the official distribution.

After updating from 2.4.x to 2.5.3 jeelink doesn’t work anymore.
This is my bridge configuration:

Thing jeelink:jeelinkTcp:lacrosse "Jeelink lacrosse" @ "home" [ ipAddress="192.168.3.1", port=5002, sketchName="LaCrosseITPlusReader", initCommands="0a v" ]

I can telnet to the server and the jeelink stick sends data but the binding throws errors:

2020-03-25 09:58:22.133 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkTcp:lacrosse' changed from OFFLINE to OFFLINE (COMMUNICATION_ERROR): Socket closed
2020-03-25 09:58:32.101 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkTcp:lacrosse' changed from OFFLINE (COMMUNICATION_ERROR): Socket closed to ONLINE
2020-03-25 09:58:32.480 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkTcp:lacrosse' changed from ONLINE to OFFLINE
2020-03-25 09:58:32.509 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkTcp:lacrosse' changed from OFFLINE to OFFLINE (COMMUNICATION_ERROR): Socket closed

I tried to reinstall or restart the binding but that did not help.