LacrosseGateway(TCP) init command not working

I have a LacrosseGateway connected via TCP. It is recognized and online, but as soon as I enter ANY “Init commands” it will start misbehaving, e.g. “0a”
The status switches back and forth from “Online” to “OFFLINE - COMMUNICATION_ERROR”
The LacrosseGateway log shows:

DataPort: #81 Client connected, IP=192.168.178.31 Port=57266
DataPort: #81 Client disconnected
etc.

The “events.log” shows:

2020-02-28 22:41:19.427 [hingStatusInfoChangedEvent] - ‘jeelink:ec3k:777E’ changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
2020-02-28 22:41:19.428 [hingStatusInfoChangedEvent] - ‘jeelink:lacrosse:8’ changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
2020-02-28 22:41:19.428 [hingStatusInfoChangedEvent] - ‘jeelink:ec3k:7931’ changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
2020-02-28 22:41:20.579 [hingStatusInfoChangedEvent] - ‘jeelink:lgwTcp:aca9a4d2’ changed from ONLINE to OFFLINE
2020-02-28 22:41:20.579 [hingStatusInfoChangedEvent] - ‘jeelink:lgwTcp:aca9a4d2’ changed from OFFLINE to OFFLINE (COMMUNICATION_ERROR): Socket closed
2020-02-28 22:41:20.580 [hingStatusInfoChangedEvent] - ‘jeelink:ec3k:777E’ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2020-02-28 22:41:20.580 [hingStatusInfoChangedEvent] - ‘jeelink:lacrosse:8’ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2020-02-28 22:41:20.580 [hingStatusInfoChangedEvent] - ‘jeelink:ec3k:7931’ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

Any help is appreciated!

Can you turn on Trace logging using the openhab console and post the relevant part of openhab.log, please?

thanks for the reply. Sorry, I am not so firm with OpenHab. Is this the relevant part:

21:23:46.864 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 established. Reconnect cancelled.
21:23:46.865 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Init commands scheduled in 10 seconds.
21:23:46.865 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Monitoring job started.
21:23:46.875 [TRACE] [.connection.AbstractJeeLinkConnection] - Read line from port 192.168.178.40:81:
21:23:48.005 [TRACE] [.connection.AbstractJeeLinkConnection] - Read line from port 192.168.178.40:81: OK 9 8 1 4 59 106
21:23:48.006 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Sending init commands for port 192.168.178.40:81: 0a
21:23:48.006 [DEBUG] [.connection.AbstractJeeLinkConnection] - Writing to device on port 192.168.178.40:81: [0a]
21:23:48.006 [TRACE] [e.LaCrosseTemperatureReadingConverter] - Creating reading from: OK 9 8 1 4 59 106
21:23:48.007 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Closing TCP connection to port 192.168.178.40:81…
21:23:48.007 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Shutting down reader for TCP port 192.168.178.40:81…
21:23:48.007 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 closed.
21:23:48.007 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 aborted (Socket closed). Reconnect scheduled.
21:23:48.007 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Reader for TCP port 192.168.178.40:81 finished…
21:23:58.007 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Opening TCP connection to host 192.168.178.40 port 81…
21:23:58.008 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Creating TCP socket to 192.168.178.40:81…
21:23:58.020 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - TCP socket created.
21:23:58.020 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 opened.
21:23:58.020 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Reader for TCP port 192.168.178.40:81 starting…
21:23:58.020 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 established. Reconnect cancelled.
21:23:58.021 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Init commands scheduled in 10 seconds.
21:23:58.021 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Monitoring job started.
21:23:58.031 [TRACE] [.connection.AbstractJeeLinkConnection] - Read line from port 192.168.178.40:81:
21:23:59.162 [TRACE] [.connection.AbstractJeeLinkConnection] - Read line from port 192.168.178.40:81: OK VALUES LGW 1416620 UpTimeSeconds=84769,UpTimeText=0Tg. 23Std. 32Min. 49Sek. ,WIFI=FRITZ!Box 7590 BE,MacAddress=A0:20:A6:15:9D:AC,ReceivedFrames=18373,FramesPerMinute=15,RSSI=-70,FreeHeap=27608,Version=1.35,LD.Min=0.49,LD.Avg=0.52,LD.Max=15.08,OLED=none
21:23:59.175 [TRACE] [.connection.AbstractJeeLinkConnection] - Read line from port 192.168.178.40:81: OK 9 8 1 4 59 106
21:23:59.175 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Sending init commands for port 192.168.178.40:81: 0a
21:23:59.175 [DEBUG] [.connection.AbstractJeeLinkConnection] - Writing to device on port 192.168.178.40:81: [0a]
21:23:59.176 [TRACE] [e.LaCrosseTemperatureReadingConverter] - Creating reading from: OK 9 8 1 4 59 106
21:23:59.176 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Closing TCP connection to port 192.168.178.40:81…
21:23:59.176 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Shutting down reader for TCP port 192.168.178.40:81…
21:23:59.176 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 closed.
21:23:59.177 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 aborted (Socket closed). Reconnect scheduled.
21:23:59.177 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Reader for TCP port 192.168.178.40:81 finished…
21:24:09.177 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Opening TCP connection to host 192.168.178.40 port 81…
21:24:09.178 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Creating TCP socket to 192.168.178.40:81…
21:24:09.188 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - TCP socket created.
21:24:09.188 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 opened.
21:24:09.188 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Reader for TCP port 192.168.178.40:81 starting…
21:24:09.189 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 established. Reconnect cancelled.
21:24:09.190 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Init commands scheduled in 10 seconds.
21:24:09.190 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Monitoring job started.
21:24:09.199 [TRACE] [.connection.AbstractJeeLinkConnection] - Read line from port 192.168.178.40:81:
21:24:10.329 [TRACE] [.connection.AbstractJeeLinkConnection] - Read line from port 192.168.178.40:81: OK 22 119 126 3 222 240 0 1 214 15 229 0 5 137 114 0 111 0 117 1 0
21:24:10.329 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Sending init commands for port 192.168.178.40:81: 0a
21:24:10.330 [DEBUG] [.connection.AbstractJeeLinkConnection] - Writing to device on port 192.168.178.40:81: [0a]
21:24:10.330 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Closing TCP connection to port 192.168.178.40:81…
21:24:10.331 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Shutting down reader for TCP port 192.168.178.40:81…
21:24:10.331 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 closed.
21:24:10.332 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 aborted (Socket closed). Reconnect scheduled.
21:24:10.332 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Reader for TCP port 192.168.178.40:81 finished…
21:24:20.332 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Opening TCP connection to host 192.168.178.40 port 81…
21:24:20.332 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Creating TCP socket to 192.168.178.40:81…
21:24:20.338 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - TCP socket created.

Please let me know if this is ok or whether you need any other logs

Thanks again!

Thanks, that was what I wanted to see. From looking at the code, there should be an error message in the thing in paper ui. Please navigate to Configuration->Things and then open you LGW thing. During the time between connection attempts, the status should show a COMMUNICATION_ERROR and an error message. Please post the message.

thanks for the quick reply. The COMMUNICATION_ERROR message is:
Status: OFFLINE - COMMUNICATION_ERROR Socket closed

That’s weird, as it means that the LGW has closed the connection. Is there anything in the gateway log? Does this also happen if you use other init commands or does it only happen with “0a”?

Edit: I just saw your initial post shows the gateway log, so there seems to be nothing in it.
What happens if you enter the command 0a in the LGW web interface?

Thanks again for all your support and sorry for not replying any sooner.

It is really weird indeed. This happens with all init command, e.g. 20000#1r
If I send the commands via the LGW web interface there is no problem: the LGW accepts them and configures itself according to the sent commands.

I have re-installed OpenHab and only installed your addon. Now I am additionally getting the following error:
OFFLINE - COMMUNICATION_ERROR propagate: Connection on port 192.168.178.40:81 did not provide an init stream for writing init commands

The Log shows:

16:20:44.546 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Init commands scheduled in 20 seconds.
16:20:44.546 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Monitoring job started.
16:20:47.079 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - TCP connection to port 192.168.178.40:81 is already open!
16:20:47.474 [TRACE] [.connection.AbstractJeeLinkConnection] - Read line from port 192.168.178.40:81: OK 22 119 126 3 222 240 0 1 215 213 42 0 5 141 95 1 67 3 59 1 0
16:20:47.475 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Sending init commands for port 192.168.178.40:81: 0a
16:20:47.475 [DEBUG] [.connection.AbstractJeeLinkConnection] - Writing to device on port 192.168.178.40:81: [0a]
16:20:47.476 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Closing TCP connection to port 192.168.178.40:81…
16:20:47.477 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Shutting down reader for TCP port 192.168.178.40:81…
16:20:47.477 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 closed.
16:20:47.478 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 aborted (Socket closed). Reconnect scheduled.
16:20:47.478 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘jeelink:lgwTcp:e220e931’ changed from ONLINE to OFFLINE
16:20:47.478 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Reader for TCP port 192.168.178.40:81 finished…
16:20:47.478 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘jeelink:lgwTcp:e220e931’ changed from OFFLINE to OFFLINE (COMMUNICATION_ERROR): Socket closed
16:20:49.503 [TRACE] [.connection.AbstractJeeLinkConnection] - Read line from port 192.168.178.40:81: OK 22 121 49 3 222 240 0 1 2 139 21 0 3 104 96 0 0 38 209 1 0
16:20:49.504 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Sending init commands for port 192.168.178.40:81: 0a
16:20:49.505 [DEBUG] [.connection.AbstractJeeLinkConnection] - Writing to device on port 192.168.178.40:81: [0a]
16:20:49.505 [DEBUG] [.connection.AbstractJeeLinkConnection] - Error writing to output stream!
java.io.IOException: Connection on port 192.168.178.40:81 did not provide an init stream for writing init commands
at org.openhab.binding.jeelink.internal.connection.AbstractJeeLinkConnection.sendCommands(AbstractJeeLinkConnection.java:89) [bundleFile:?]
at org.openhab.binding.jeelink.internal.JeeLinkHandler.intializeConnection(JeeLinkHandler.java:241) [bundleFile:?]
at org.openhab.binding.jeelink.internal.JeeLinkHandler.handleInput(JeeLinkHandler.java:193) [bundleFile:?]
at org.openhab.binding.jeelink.internal.connection.AbstractJeeLinkConnection.propagateLine(AbstractJeeLinkConnection.java:75) [bundleFile:?]
at org.openhab.binding.jeelink.internal.connection.JeeLinkTcpConnection$Reader.run(JeeLinkTcpConnection.java:128) [bundleFile:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_241]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_241]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_241]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_241]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_241]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_241]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241]
16:20:49.506 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 aborted (propagate: Connection on port 192.168.178.40:81 did not provide an init stream for writing init commands). Reconnect scheduled.
16:20:49.506 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘jeelink:lgwTcp:e220e931’ changed from OFFLINE (COMMUNICATION_ERROR): Socket closed to OFFLINE (COMMUNICATION_ERROR): propagate: Connection on port 192.168.178.40:81 did not provide an init stream for writing init commands
16:20:52.176 [TRACE] [.connection.AbstractJeeLinkConnection] - Read line from port 192.168.178.40:81: OK 22 119 126 3 222 240 0 1 215 213 47 0 5 141 95 1 64 3 59 1 0
16:20:52.177 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Sending init commands for port 192.168.178.40:81: 0a
16:20:52.177 [DEBUG] [.connection.AbstractJeeLinkConnection] - Writing to device on port 192.168.178.40:81: [0a]
16:20:52.178 [DEBUG] [.connection.AbstractJeeLinkConnection] - Error writing to output stream!
java.io.IOException: Connection on port 192.168.178.40:81 did not provide an init stream for writing init commands
at org.openhab.binding.jeelink.internal.connection.AbstractJeeLinkConnection.sendCommands(AbstractJeeLinkConnection.java:89) [bundleFile:?]
at org.openhab.binding.jeelink.internal.JeeLinkHandler.intializeConnection(JeeLinkHandler.java:241) [bundleFile:?]
at org.openhab.binding.jeelink.internal.JeeLinkHandler.handleInput(JeeLinkHandler.java:193) [bundleFile:?]
at org.openhab.binding.jeelink.internal.connection.AbstractJeeLinkConnection.propagateLine(AbstractJeeLinkConnection.java:75) [bundleFile:?]
at org.openhab.binding.jeelink.internal.connection.JeeLinkTcpConnection$Reader.run(JeeLinkTcpConnection.java:128) [bundleFile:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_241]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_241]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_241]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_241]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_241]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_241]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241]
16:20:52.178 [DEBUG] [nding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 aborted (propagate: Connection on port 192.168.178.40:81 did not provide an init stream for writing init commands). Reconnect scheduled.
16:20:52.539 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Opening TCP connection to host 192.168.178.40 port 81…
16:20:52.540 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - Creating TCP socket to 192.168.178.40:81…
16:20:52.547 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - TCP socket created.

Is this more helpful in analysing the problem ?

One thing I forgot to mention:
I am running OpenHab on a QNAP NAS. Maybe the NAS is blocking the input stream ?

Thanks again!

Which version of openHAB have you installed? At the beginning there is the message

16:20:47.079 [DEBUG] [ernal.connection.JeeLinkTcpConnection] - TCP connection to port 192.168.178.40:81 is already open!

I have never seen this (and it should not be there). I am wondering if openHAB changed the way how the binding API is invoked? Can you please restart openHAB and post everything from the start until you get the exception?

hmm, sorry. I have re-installed OpenHab (again) and now I can’t reproduce the message anymore.
The installed version is the current stable one: 2.5.2

Here is the log when starting up:

2020-03-06 18:06:35.301 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Stopped Paper UI
2020-03-06 18:06:35.308 [INFO ] [ebuilder.internal.HomeBuilderServlet] - Stopped Home Builder
2020-03-06 18:06:35.313 [INFO ] [panel.internal.HABPanelDashboardTile] - Stopped HABPanel
2020-03-06 18:06:35.322 [INFO ] [basic.internal.servlet.WebAppServlet] - Stopped Basic UI
2020-03-06 18:06:35.337 [INFO ] [.dashboard.internal.DashboardService] - Stopped Dashboard
2020-03-06 18:07:21.685 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2020-03-06 18:07:22.046 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.178.31:58288
2020-03-06 18:07:22.047 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.178.31:58243
2020-03-06 18:07:22.198 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2020-03-06 18:07:22.228 [INFO ] [ebuilder.internal.HomeBuilderServlet] - Started Home Builder at /homebuilder
2020-03-06 18:07:22.257 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2020-03-06 18:07:22.288 [DEBUG] [elink.internal.JeeLinkHandlerFactory] - creating JeeLinkHandler for thing e948f107…
2020-03-06 18:07:22.290 [DEBUG] [elink.internal.JeeLinkHandlerFactory] - registering sensor discovery service…
2020-03-06 18:07:22.324 [DEBUG] [rnal.connection.JeeLinkTcpConnection] - Opening TCP connection to host 192.168.178.40 port 81…
2020-03-06 18:07:22.325 [DEBUG] [rnal.connection.JeeLinkTcpConnection] - Creating TCP socket to 192.168.178.40:81…
2020-03-06 18:07:22.330 [DEBUG] [rnal.connection.JeeLinkTcpConnection] - TCP socket created.
2020-03-06 18:07:22.342 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 opened.
2020-03-06 18:07:22.343 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Init commands scheduled in 20 seconds.
2020-03-06 18:07:22.344 [DEBUG] [rnal.connection.JeeLinkTcpConnection] - Reader for TCP port 192.168.178.40:81 starting…
2020-03-06 18:07:22.349 [TRACE] [connection.AbstractJeeLinkConnection] - Read line from port 192.168.178.40:81:
2020-03-06 18:07:22.349 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Monitoring job started.
2020-03-06 18:07:23.471 [TRACE] [connection.AbstractJeeLinkConnection] - Read line from port 192.168.178.40:81: OK 9 8 1 4 43 106
2020-03-06 18:07:23.471 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Sending init commands for port 192.168.178.40:81: 0a
2020-03-06 18:07:23.472 [DEBUG] [connection.AbstractJeeLinkConnection] - Writing to device on port 192.168.178.40:81: [0a]
2020-03-06 18:07:23.473 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Registering converter for sensor type 9: org.openhab.binding.jeelink.internal.lacrosse.LaCrosseTemperatureReadingConverter@2524f66f
2020-03-06 18:07:23.473 [TRACE] [.LaCrosseTemperatureReadingConverter] - Creating reading from: OK 9 8 1 4 43 106
2020-03-06 18:07:23.474 [DEBUG] [rnal.connection.JeeLinkTcpConnection] - Closing TCP connection to port 192.168.178.40:81…
2020-03-06 18:07:23.474 [DEBUG] [rnal.connection.JeeLinkTcpConnection] - Shutting down reader for TCP port 192.168.178.40:81…
2020-03-06 18:07:23.474 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 closed.
2020-03-06 18:07:23.475 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 aborted (Socket closed). Reconnect scheduled.
2020-03-06 18:07:23.476 [DEBUG] [rnal.connection.JeeLinkTcpConnection] - Reader for TCP port 192.168.178.40:81 finished…
2020-03-06 18:07:33.476 [DEBUG] [rnal.connection.JeeLinkTcpConnection] - Opening TCP connection to host 192.168.178.40 port 81…
2020-03-06 18:07:33.476 [DEBUG] [rnal.connection.JeeLinkTcpConnection] - Creating TCP socket to 192.168.178.40:81…
2020-03-06 18:07:33.484 [DEBUG] [rnal.connection.JeeLinkTcpConnection] - TCP socket created.
2020-03-06 18:07:33.485 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 opened.
2020-03-06 18:07:33.485 [DEBUG] [rnal.connection.JeeLinkTcpConnection] - Reader for TCP port 192.168.178.40:81 starting…
2020-03-06 18:07:33.485 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 established. Reconnect cancelled.
2020-03-06 18:07:33.486 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Init commands scheduled in 20 seconds.
2020-03-06 18:07:33.487 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Monitoring job started.
2020-03-06 18:07:33.490 [TRACE] [connection.AbstractJeeLinkConnection] - Read line from port 192.168.178.40:81:
2020-03-06 18:07:34.624 [TRACE] [connection.AbstractJeeLinkConnection] - Read line from port 192.168.178.40:81: OK 9 8 1 4 43 106
2020-03-06 18:07:34.625 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Sending init commands for port 192.168.178.40:81: 0a
2020-03-06 18:07:34.626 [DEBUG] [connection.AbstractJeeLinkConnection] - Writing to device on port 192.168.178.40:81: [0a]
2020-03-06 18:07:34.627 [TRACE] [.LaCrosseTemperatureReadingConverter] - Creating reading from: OK 9 8 1 4 43 106
2020-03-06 18:07:34.628 [DEBUG] [rnal.connection.JeeLinkTcpConnection] - Closing TCP connection to port 192.168.178.40:81…
2020-03-06 18:07:34.628 [DEBUG] [rnal.connection.JeeLinkTcpConnection] - Shutting down reader for TCP port 192.168.178.40:81…
2020-03-06 18:07:34.628 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 closed.
2020-03-06 18:07:34.629 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Connection to port 192.168.178.40:81 aborted (Socket closed). Reconnect scheduled.
2020-03-06 18:07:34.629 [DEBUG] [rnal.connection.JeeLinkTcpConnection] - Reader for TCP port 192.168.178.40:81 finished…

So this pretty much looks like your first log again.

I have made some changes recently to the way the init commands are sent that were merged yesterday. You can update the binding in a few days and see if that helps (but I would not expect that this will make a difference).

Can you open a connection to your LGW using telnet? You should see the output in the console. When you enter 0a into the telnet session and press Return, you should see the received command in the LGW log. Does this also terminate the connection?

thanks a lot for the info. I’ll try the new binding.

I’ve connected via Telnet and sent the following command “20000#1r v”:

OK 9 8 1 4 70 106
OK 9 8 1 4 70 106
OK 9 8 1 4 70 106
OK 9 8 1 4 70 106
OK 9 8 1 4 70 106
OK 9 8 1 4 70 106
OK 9 8 1 4 70 106
OK 9 8 1 4 70 106
OK 9 8 1 4 70 106
OK 9 8 1 4 70 106
OK 9 8 1 4 70 106
OK 9 8 1 4 70 106
OK 9 8 1 4 70 106
OK 9 8 1 4 70 106
OK 9 8 1 4 70 106
OK 9 8 1 4 70 106
OK 9 8 1 4 70 106
20000#1r v

[LaCrosseITPlusReader.Gateway.1.35 (1=RFM69 f:868300 r:20000) {IP=192.168.178.40}]
OK 22 119 126 3 222 240 0 1 216 48 158 0 5 142 31 1 155 2 246 1 0
OK 22 121 49 3 222 240 0 1 2 196 60 0 3 104 97 0 0 38 209 1 0
OK 22 119 126 3 222 240 0 1 216 48 163 0 5 142 32 1 147 2 246 1 0
OK 22 121 49 3 222 240 0 1 2 196 60 0 3 104 97 0 0 38 209 1 0
OK 22 119 126 3 222 240 0 1 216 48 168 0 5 142 32 1 148 2 246 1 0
OK 22 121 49 3 222 240 0 1 2 196 62 0 3 104 97 0 0 38 209 1 0
OK 22 119 126 3 222 240 0 1 216 48 173 0 5 142 32 1 168 2 246 1 0
OK 22 121 49 3 222 240 0 1 2 196 62 0 3 104 97 0 0 38 209 1 0
OK 22 119 126 3 222 240 0 1 216 48 178 0 5 142 32 1 175 2 246 1 0
OK 22 121 49 3 222 240 0 1 2 196 62 0 3 104 97 0 0 38 209 1 0
OK 22 119 126 3 222 240 0 1 216 48 183 0 5 142 32 1 159 2 246 1 0

This seems to work ok. The connection did not terminate.
The LGW Debug Log shows this entry:

17:49:31: DataPort: #5081 received '20000#1r v ’

So it seems to work just as if it was send via the LGW web interface.
[Edit]: I’ve changed the port from 81 to 5081 for testing purposes

Is this an ARM NAS? The serial library used by OpenHAB is not pure java, but has native parts. Perhaps the ARM implementation has a problem?

No, it’s an Intel-based NAS, X86_64

I am out of ideas. I am pretty sure other people use the binding with LGWs and most likely also use init commands. I have also tested it with my LGW and did not have any problems.

Try to update the binding, and if that does not work, you can add a rule on system start that calls telnet to the LGW and writes the init command. Maybe that works.

yes, I am also baffled by this.
I was wondering whether the firmware version (1.35) is causing the problem. Or can it be related to the KVP setting ? I’ve tried Invterval = 10 and off, but both are not working.

I’v installed FHEM and there it works normally:

14:33:12: DataPort: #81 Client disconnected
14:33:12: DataPort: #81 Client connected, IP=192.168.178.31 Port=46870
14:33:12: DataPort: #81 received '0a ’
14:33:12: DataPort: #81 received '20000#1r v ’
14:33:14: DataPort: #81 received 'v ’

Anyway thanks a lot for all your help and support. I appreciate it.
I will try the new binding and if that doesn’t help I’ll try the Telnet workaround.

I will let you know if there is any success.
Thanks again!

@chaoshome, all you did was upgrading openhab and the binding stopped working?

@olluz, are you also using 2.5.3?

Yes, I followed the upgrade instructions in the release note and upgraded via openhabian-config. (My system is openhabian on a raspberrypi.) After the upgrade the binding stopped working.

My jeelink is connected to an openwrt router with ser2net.

yes, I’ve tested 2.5.2 and 2.5.3. The behaviour is the same.

I have just updated my system to 2.5.3 and do now also have the problem. I will look into it as soon as I have some more time.

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

It should fix your problem.