Jeelink stops receiving readings

With version OH 2.2 the error is very common.

After the update to OH 2.3 stable a few months ago, the error occurs much less frequently. But he always comes back every few weeks …

I could now reproduce the problem with my newly soldered LGW. I have fixed the reconnect and made the timeout configurable. Here is a jar that fixes the problems for me:

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

It would be nice if somebody can report if this fixes the problem for him as well, so I can create a pull request.

I am restructuring many things in my setup, so it is not running long between reboots. I did notice once, though, that it was stopped, meaning the previous restart funcitonality probably didn’t work. I searched the logs, but didn’t find anything, but I didn’t investigate any further.

Hi @vbier ,

Just installed your version. Will keep you updated, if everything works.

Thanks,
Jonas

Hi @vbier

I installed the new version a few days ago and the restart worked:

2018-11-21 07:06:58.714 [DEBUG] [sse.LaCrosseTemperatureSensorHandler] - updating states for thing Jeelink gelb (gelb): temp=14.4 (14.399997), humidity=65, batteryNew=false, batteryLow=false
2018-11-21 07:07:00.475 [DEBUG] [sse.LaCrosseTemperatureSensorHandler] - updating states for thing Jeelink blau (blau): temp=20.2 (20.205011), humidity=50, batteryNew=false, batteryLow=false
2018-11-21 07:16:22.475 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Monitoring job for port /dev/ttyUSB0 detected missing readings. Triggering reconnect...
2018-11-21 07:16:22.479 [DEBUG] [l.connection.JeeLinkSerialConnection] - Closing serial connection to port /dev/ttyUSB0...
2018-11-21 07:16:22.509 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Connection to port /dev/ttyUSB0 closed.
2018-11-21 07:16:22.534 [DEBUG] [l.connection.JeeLinkSerialConnection] - Opening serial connection to port /dev/ttyUSB0 with baud rate 57600...
2018-11-21 07:16:22.554 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Connection to port /dev/ttyUSB0 opened.
2018-11-21 07:16:22.563 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Init commands scheduled in 10 seconds.
2018-11-21 07:16:22.571 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Monitoring job started.
2018-11-21 07:16:25.400 [DEBUG] [ding.jeelink.internal.JeeLinkHandler] - Sending init commands for port /dev/ttyUSB0: 0a v
2018-11-21 07:16:25.405 [DEBUG] [connection.AbstractJeeLinkConnection] - Writing to device on port /dev/ttyUSB0: [0a v] 
2018-11-21 07:16:50.758 [DEBUG] [sse.LaCrosseTemperatureSensorHandler] - updating states for thing Jeelink rot (rot): temp=-2.1 (-2.1000032), humidity=85, batteryNew=false, batteryLow=false
2018-11-21 07:16:52.402 [DEBUG] [sse.LaCrosseTemperatureSensorHandler] - updating states for thing Jeelink grün (gruen): temp=16.1 (16.10001), humidity=61, batteryNew=false, batteryLow=false

I have now submitted a pull request to get the changes merged into openHAB code:

Just for info: I have lots of problems when my LGW is connected to my Rasperry, but it seems to work just fine when connected to my PC.

Pull request has been merged, the changes are available in openHAB 2.4.

Hi all,

i want to usw a jeelink clone with a tx29 Sensor. But i found nothing.

I have flash the board, too.
I write “ls -l /dev/serial/by-id” and geht : total 0 lrwxrwxrwx 1 root root feb 9 20:00 usb-ftdi_ft232 USB UART …ttyusb0

So i think i need ttyusb0 and that openhabian found the jeelink clone.
I build the thing with the init command “2m 30t 0a v” and the port ttyusb0.

In paper ui i USS the auto search to build the jeelink binding. But i found nothing.

My log

2019-02-09 19:46:51.051 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui

==> /var/log/openhab2/events.log <==

2019-02-09 20:00:28.499 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from OFFLINE (COMMUNICATION_ERROR): Port not found: /dev/ttyUSB0 to ONLINE

2019-02-09 20:06:49.915 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from ONLINE to OFFLINE

2019-02-09 20:06:49.930 [me.event.ThingUpdatedEvent] - Thing 'jeelink:jeelinkUsb:50c41285' has been updated.

2019-02-09 20:06:49.937 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from OFFLINE to ONLINE

2019-02-09 20:06:50.035 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from ONLINE to OFFLINE

2019-02-09 20:06:50.048 [me.event.ThingUpdatedEvent] - Thing 'jeelink:jeelinkUsb:50c41285' has been updated.

2019-02-09 20:09:30.620 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from ONLINE to OFFLINE

2019-02-09 20:09:30.625 [me.event.ThingUpdatedEvent] - Thing 'jeelink:jeelinkUsb:50c41285' has been updated.

2019-02-09 20:09:30.633 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from OFFLINE to ONLINE

2019-02-09 20:12:21.613 [vent.ItemStateChangedEvent] - ArbeitszimmerDG_Temperature changed from 18.5 °C to 18.0 °C

2019-02-09 20:12:21.636 [vent.ItemStateChangedEvent] - ArbeitszimmerDG_ActualTemp changed from 18.5 °C to 18.0 °C

2019-02-09 20:19:30.649 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from ONLINE to OFFLINE

2019-02-09 20:19:30.664 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from OFFLINE to ONLINE

2019-02-09 20:29:30.741 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from ONLINE to OFFLINE

2019-02-09 20:29:30.753 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from OFFLINE to ONLINE

2019-02-09 20:39:30.785 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from ONLINE to OFFLINE

2019-02-09 20:39:30.794 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from OFFLINE to ONLINE

2019-02-09 20:49:30.864 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from ONLINE to OFFLINE

2019-02-09 20:49:30.873 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from OFFLINE to ONLINE

2019-02-09 20:59:30.913 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from ONLINE to OFFLINE

2019-02-09 20:59:30.922 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from OFFLINE to ONLINE

2019-02-09 21:09:30.929 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from ONLINE to OFFLINE

2019-02-09 21:09:30.940 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:50c41285' changed from OFFLINE to ONLINE

On top i get a communications error, but i found usb0? Whats wrong?

What is the device supposed to do with this init command?

m: toggle mode
bits:  1= 17.241 kbps, 2= 9.579 kbps, 4= 8.842 kbps
3m ist 17.241 kbps (TX29) und 9.579 kbps (TX35)

As I read this, you device toggles between 9.579 and 9.579 kbps every 30 seconds.
According to the documentation your sensors have

TX29-IT 17.241 kbps

So i would change the init command to “0a v” and try again. This might as well fix the connection problems in case the stick closes the connection on invalid init commands.

@vbier thanks, now it works fine.

Do you have an example for the Lacrosse Temperature sensor?
I want create the things with an own file.
But i need the correctly variables and i found not a full example in the binding description.

I updated to 2.4 and after some smaller configuration issues the system was running stable for month.
In the last week I need to restart the RPI twice, because the items went offline again and again.

The log shows, that the restart worked, but all items went offline again about 1 second after restart.

Any ideas?

The check for a broken connection and the check if values have been received for a single sensor run independently from each other. So it is possible that one job reconnects and sets the sensors online, then a short time later the second job makes things offline if it has not received values.

But they should then come online as soon as the next values has been received.

Hello again,

I am using openHAB 2.5.8-1 Release Build with a relatively fresh openHABian installtion.

Every few days the Bridge-Thing goes offline with this message:

2020-10-20 07:14:40.466 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:95ac3a34' changed from ONLINE to OFFLINE

2020-10-20 07:14:40.511 [hingStatusInfoChangedEvent] - 'jeelink:jeelinkUsb:95ac3a34' changed from OFFLINE to OFFLINE (COMMUNICATION_ERROR): Port in use: /dev/ttyUSB0

What can I do? Restarting the bundle works and gets the thing online again. But this is quite troublesome.

I have also seen this after upgrading openHAB for a while. I am not sure what fixed it, but i have used a different USB port, have replaced my server in the meantime and also did another upgrade. It has been working as expected for several weeks now.

Have you changed anything HW related? New power plug, moved the raspberry to a different location with poor reception?

I changed the SD card. That was the reason for the fresh installation. The rest is exactly the same.

Since upgrading to Openhab 3 my jeelink is failing again.
The bridge is still online but the sensors go offline because no values are received anymore.

My jeelink is connected via TCP and was working fine for months. Unplugging, plugging in and restarting ser2net fixes the issue.