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:
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.
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 ?
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?
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?
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!
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.