New Jeelink Openhab2 Binding

2017-01-20 23:31:03.146 [TRACE] [link.handler.JeeLinkSerialConnection] - Read line from port COM8: OK 22 188 129 0 209 209 102 0 174 89 187 0 1 123 102 0 0 10 117 2 0
2017-01-20 23:31:13.020 [TRACE] [link.handler.JeeLinkSerialConnection] - Read line from port COM8: OK 22 188 129 0 209 209 112 0 174 89 187 0 1 123 102 0 0 10 117 2 0
2017-01-20 23:31:23.100 [TRACE] [link.handler.JeeLinkSerialConnection] - Read line from port COM8: OK 22 188 129 0 209 209 122 0 174 89 187 0 1 123 102 0 0 10 117 2 0
2017-01-20 23:31:28.074 [TRACE] [link.handler.JeeLinkSerialConnection] - Read line from port COM8: OK 22 188 129 0 209 209 127 0 174 89 187 0 1 123 102 0 0 10 117 2 1
2017-01-20 23:31:42.998 [TRACE] [link.handler.JeeLinkSerialConnection] - Read line from port COM8: OK 22 188 129 0 209 209 142 0 174 89 187 0 1 123 102 0 0 10 117 2 1
2017-01-20 23:32:23.072 [TRACE] [link.handler.JeeLinkSerialConnection] - Read line from port COM8: OK 22 188 129 0 209 209 182 0 174 89 187 0 1 123 102 0 0 10 117 2 1
2017-01-20 23:32:32.971 [TRACE] [link.handler.JeeLinkSerialConnection] - Read line from port COM8: OK 22 188 129 0 209 209 192 0 174 89 187 0 1 123 102 0 0 10 117 2 0
2017-01-20 23:33:13.146 [TRACE] [link.handler.JeeLinkSerialConnection] - Read line from port COM8: OK 22 188 129 0 209 209 232 0 174 89 189 0 1 123 102 0 0 10 117 2 0
2017-01-20 23:33:16.479 [TRACE] [link.handler.JeeLinkSerialConnection] - Read line from port COM8: OK 22 176 167 0 206 87 213 0 206 87 213 0 1 193 160 0 37 7 233 3 0
2017-01-20 23:33:43.138 [TRACE] [link.handler.JeeLinkSerialConnection] - Read line from port COM8: OK 22 188 129 0 209 210 6 0 174 89 191 0 1 123 102 0 0 10 117 2 1
2017-01-20 23:33:47.963 [TRACE] [link.handler.JeeLinkSerialConnection] - Read line from port COM8: OK 22 188 129 0 209 210 11 0 174 89 191 0 1 123 102 0 0 10 117 2 0
2017-01-20 23:33:58.093 [TRACE] [link.handler.JeeLinkSerialConnection] - Read line from port COM8: OK 22 188 129 0 209 210 21 0 174 89 191 0 1 123 102 0 0 10 117 2 0

for ec3k

I have just pushed a new version of the binding which should fix the problems with the ec3k sensors. Please test and report back.

Did anyone get a Trendline sensor to work?
I have an MA 10100 but it does not want to show up. The Jeelink seems to work properly but unfortunately I have no other sensor at the moment to verify.

Openhab2 version 2.0.0-SNAPSHOT Build #743 (from last night)
Jeeling binding: 181 | Active | 80 | 2.0.0.201701141032 | JeeLink Binding

Below the traces from two back2back scans for a JeeLink thing. (Output usually differs every 2nd scan, therefore done two.)

TRACE from scan:

12:12:46.385 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopping discovery of JeeLink USB Receivers...
12:12:46.386 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopped discovery of JeeLink USB Receivers.
12:12:46.388 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Starting discovery of JeeLink USB receivers...
12:12:46.389 [DEBUG] [nk.discovery.JeeLinkDiscoveryService] - Iterating ports...
12:12:46.419 [DEBUG] [nk.discovery.JeeLinkDiscoveryService] - Scanning port /dev/ttyS1...
12:12:46.420 [INFO ] [link.handler.JeeLinkSerialConnection] - Creating serial connection for port /dev/ttyS1 with baud rate 57600...
12:12:46.421 [INFO ] [link.handler.JeeLinkSerialConnection] - Opening serial connection to port /dev/ttyS1 with baud rate 57600...
12:12:46.429 [DEBUG] [nk.discovery.JeeLinkDiscoveryService] - Scanning port /dev/ttyS2...
12:12:46.430 [INFO ] [link.handler.JeeLinkSerialConnection] - Creating serial connection for port /dev/ttyS2 with baud rate 57600...
12:12:46.432 [INFO ] [link.handler.JeeLinkSerialConnection] - Opening serial connection to port /dev/ttyS2 with baud rate 57600...
12:12:46.439 [DEBUG] [nk.discovery.JeeLinkDiscoveryService] - Scanning port /dev/ttyUSB0...
12:12:46.441 [INFO ] [link.handler.JeeLinkSerialConnection] - Creating serial connection for port /dev/ttyUSB0 with baud rate 57600...
12:12:46.442 [INFO ] [link.handler.JeeLinkSerialConnection] - Opening serial connection to port /dev/ttyUSB0 with baud rate 57600...
12:12:46.456 [DEBUG] [nk.discovery.JeeLinkDiscoveryService] - Scanning port /dev/ttyS3...
12:12:46.457 [INFO ] [link.handler.JeeLinkSerialConnection] - Creating serial connection for port /dev/ttyS3 with baud rate 57600...
12:12:46.458 [INFO ] [link.handler.JeeLinkSerialConnection] - Opening serial connection to port /dev/ttyS3 with baud rate 57600...
12:12:46.466 [DEBUG] [nk.discovery.JeeLinkDiscoveryService] - Scanning port /dev/ttyS4...
12:12:46.468 [INFO ] [link.handler.JeeLinkSerialConnection] - Creating serial connection for port /dev/ttyS4 with baud rate 57600...
12:12:46.469 [INFO ] [link.handler.JeeLinkSerialConnection] - Opening serial connection to port /dev/ttyS4 with baud rate 57600...
12:12:46.477 [DEBUG] [nk.discovery.JeeLinkDiscoveryService] - Trying for a maximum of 5 seconds to read the sketch name from the ports...
12:12:51.480 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Creating 0 discovered things...
12:12:51.482 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Discovered things created.
12:12:51.484 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Closing all open ports...
12:12:51.486 [INFO ] [link.handler.JeeLinkSerialConnection] - Closing serial connection to port /dev/ttyS1...
12:12:51.534 [INFO ] [link.handler.JeeLinkSerialConnection] - Closing serial connection to port /dev/ttyS2...
12:12:51.543 [INFO ] [link.handler.JeeLinkSerialConnection] - Closing serial connection to port /dev/ttyUSB0...
12:12:51.602 [INFO ] [link.handler.JeeLinkSerialConnection] - Closing serial connection to port /dev/ttyS3...
12:12:51.671 [INFO ] [link.handler.JeeLinkSerialConnection] - Closing serial connection to port /dev/ttyS4...
12:13:16.388 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopping discovery of JeeLink USB Receivers...
12:13:16.391 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopped discovery of JeeLink USB Receivers.
12:15:06.696 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopping discovery of JeeLink USB Receivers...
12:15:06.744 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopped discovery of JeeLink USB Receivers.
12:15:06.746 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Starting discovery of JeeLink USB receivers...
12:15:06.748 [DEBUG] [nk.discovery.JeeLinkDiscoveryService] - Iterating ports...
12:15:06.773 [DEBUG] [nk.discovery.JeeLinkDiscoveryService] - Scanning port /dev/ttyS1...
12:15:06.775 [INFO ] [link.handler.JeeLinkSerialConnection] - Creating serial connection for port /dev/ttyS1 with baud rate 57600...
12:15:06.775 [INFO ] [link.handler.JeeLinkSerialConnection] - Opening serial connection to port /dev/ttyS1 with baud rate 57600...
12:15:06.789 [DEBUG] [nk.discovery.JeeLinkDiscoveryService] - Scanning port /dev/ttyS2...
12:15:06.791 [INFO ] [link.handler.JeeLinkSerialConnection] - Creating serial connection for port /dev/ttyS2 with baud rate 57600...
12:15:06.793 [INFO ] [link.handler.JeeLinkSerialConnection] - Opening serial connection to port /dev/ttyS2 with baud rate 57600...
12:15:06.800 [DEBUG] [nk.discovery.JeeLinkDiscoveryService] - Scanning port /dev/ttyUSB0...
12:15:06.803 [INFO ] [link.handler.JeeLinkSerialConnection] - Creating serial connection for port /dev/ttyUSB0 with baud rate 57600...
12:15:06.805 [INFO ] [link.handler.JeeLinkSerialConnection] - Opening serial connection to port /dev/ttyUSB0 with baud rate 57600...
12:15:06.820 [DEBUG] [nk.discovery.JeeLinkDiscoveryService] - Scanning port /dev/ttyS3...
12:15:06.821 [INFO ] [link.handler.JeeLinkSerialConnection] - Creating serial connection for port /dev/ttyS3 with baud rate 57600...
12:15:06.822 [INFO ] [link.handler.JeeLinkSerialConnection] - Opening serial connection to port /dev/ttyS3 with baud rate 57600...
12:15:06.837 [DEBUG] [nk.discovery.JeeLinkDiscoveryService] - Scanning port /dev/ttyS4...
12:15:06.839 [INFO ] [link.handler.JeeLinkSerialConnection] - Creating serial connection for port /dev/ttyS4 with baud rate 57600...
12:15:06.840 [INFO ] [link.handler.JeeLinkSerialConnection] - Opening serial connection to port /dev/ttyS4 with baud rate 57600...
12:15:06.847 [DEBUG] [nk.discovery.JeeLinkDiscoveryService] - Trying for a maximum of 5 seconds to read the sketch name from the ports...
12:15:09.518 [TRACE] [link.handler.JeeLinkSerialConnection] - Read line from port /dev/ttyUSB0: [LaCrosseITPlusReader.10.1q (RFM69 f:868300 r:17241)]
12:15:09.521 [TRACE] [link.handler.JeeLinkSerialConnection] - Read line from port /dev/ttyUSB0:
12:15:09.541 [TRACE] [link.handler.JeeLinkSerialConnection] - Read line from port /dev/ttyUSB0: der.10.1q (RFM69 f:868300 r:17241)]
12:15:11.849 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Creating 0 discovered things...
12:15:11.851 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Discovered things created.
12:15:11.907 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Closing all open ports...
12:15:11.909 [INFO ] [link.handler.JeeLinkSerialConnection] - Closing serial connection to port /dev/ttyS1...
12:15:11.993 [INFO ] [link.handler.JeeLinkSerialConnection] - Closing serial connection to port /dev/ttyS2...
12:15:12.004 [INFO ] [link.handler.JeeLinkSerialConnection] - Closing serial connection to port /dev/ttyUSB0...
12:15:12.070 [INFO ] [link.handler.JeeLinkSerialConnection] - Closing serial connection to port /dev/ttyS3...
12:15:12.142 [INFO ] [link.handler.JeeLinkSerialConnection] - Closing serial connection to port /dev/ttyS4...
12:15:36.747 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopping discovery of JeeLink USB Receivers...
12:15:36.748 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopped discovery of JeeLink USB Receivers.

Thanks,
Martin

Can you add the jeelink manually?

I have no idea why the discovery does not work, it reads the sketch name from the port and should then log a message stating that the sketch name has been read. This is the precondition that needs to be met in order for a Jeelink Thing to be put in the inbox.
I copied the text from your log file and tried to reproduce the behaviour, but could not.

i replaced the version in the root/addons folder but no change…
when i delete the binding from the folder its loaded too?
is there any cache of bindings?

Sorry, I probably was not clear enough: At this point, the Jeelink itself was already added as a thing. That’s why it is not added again. It just does not see the Trendline sensor at all.

Maybe I miss something obvious like a pairing command I have to send?

PS: To check the JeeLink, I set some initCommands, which it seems to accept and also created a dummy Sensor, which it tries to poll nicely. So it looks to me the JeeLink works fine. All done via the PaperUI where it shows up as a thing which is online. I also put a fresh Battery into the Sensor and it should work, as it is recogniced by the Trendline Gateway.

I just noticed a mistake in my posts: The sensor is a Technoline (not Trendline).

The jeelink does not get any readings from the sensor. Have you tried to place the sensor next to the stick in order to rule out reception problems?

It looks like the sensor might not be supported at all. This is the list of sensors supported by the LaCrosse sketch:
https://wiki.fhem.de/wiki/JeeLink#Unterst.C3.BCtzte_Sensoren_und_Aktoren_incl._Wetterstation_WS_1600

Connect to the karaf console and issue

bundle:list

Find the jeelink binding and check the version. It should have todays date in it.

If it is the updated version, run the discovery with TRACE enabled and post the log again (but start from the beginning of the discovery up to its end).

its still 2.0.0.201701141032 even when i delete the binding from addons folder
there must be a cache or something… strange thing.

The sensor is right next to the stick.
I could not figure out what is the Lacrosse equivalent for the Technoline MA 10100 but I also do not think it is on the list. (It looks like the TX-16, but supposedly uses 868,30 MHz)

It seems others got it to work with Jeelink and FHEM, so I will play around with it a little more.

I will continue to play around with it. Also tomorrow night I can get my hands on a different Technoline sensor, which looks similar to some of the supported Lacrosse sensors.

Unterstützung für den Sensoren muss im Sketch vorhanden sein, ansonsten kann das jeelink binding ihn nicht auslesen. Frage doch mal hier nach:

i did a bundle:uninstall ID and a restart of openhab and now the ec3k sockets are detected, thanks man!

Danke, werde ich machen.

Plugged my Jeelink meanwhile into my Windows notebook and connected via Arduino Builder.
When I take the battery out shortly from my sensor, I sometimes manage to get something from the sensor after some time. Looks like this:

Serial port COM3 opened at baudrate of 57600kps

[LaCrosseITPlusReader.10.1q (RFM69 f:868300 r:17241)]
OK 9 52 129 2 169 106

And then nothing. Definitely an odd behaving sensor. I keep you posted in case I figure something out, but most likely I just have to go for a different sensor.

Is your jeelink self build or buyed?

Bought from The JeeLabs Shop - JeeLink (v3c)

Hi,

I tried to search my Jeelink Lacrosse device which I am using with FHEM successfully to read several temperature devices. I used the precompiled jar from https://github.com/vbier/openhab2-addons/blob/complete/addons/binding/org.openhab.binding.jeelink/org.openhab.binding.jeelink-2.0.0-SNAPSHOT.jar , places it in the addons directory, executed the steps mentioned in your wiki page, but when I open the paperui to serch for thins in the Jeelink binding, the whole OpenHUB crashes. Last entry of the log is:

2017-01-25 19:36:53.022 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopping discovery of JeeLink USB Receivers... 2017-01-25 19:36:53.030 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopped discovery of JeeLink USB Receivers. 2017-01-25 19:36:53.045 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Starting discovery of JeeLink USB receivers... 2017-01-25 19:36:53.723 [INFO ] [link.handler.JeeLinkSerialConnection] - Creating serial connection for port /dev/ttyUSB0 with baud rate 57600... 2017-01-25 19:36:53.731 [INFO ] [link.handler.JeeLinkSerialConnection] - Opening serial connection to port /dev/ttyUSB0 with baud rate 57600...

Nothing unusual in dmesg or other message logs. Am I doing something wrong?

What version of openHAP are you using, the shortly released 2.0.0? Is the jeelink connected to /dev/ttyUSB0, or is this some other device? If it is the jeelink, can you enable TRACE loggin, start the discovery again and paste the relevant part of the log?
If it is not the jeelink that is connected to /dev/ttyUSB0, can you unplug the device and restart the discovery? After you have discovered your devices you can plug it back in. If this works then I probably better disable discovery of the stick.

I am using the new 2.0.0 from deb repository. Jeelink ist connected to /dev/ttyUSB0.

New log is:
2017-01-26 07:57:04.867 [DEBUG] [nternal.DiscoveryServiceRegistryImpl] - Triggering scan for thing types ‘[jeelink:lacrosse, jeelink:ec3k, jeelink:jeelink]’ on ‘JeeLinkDiscoveryService’…
2017-01-26 07:57:04.875 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopping discovery of JeeLink USB Receivers…
2017-01-26 07:57:04.881 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopped discovery of JeeLink USB Receivers.
2017-01-26 07:57:04.903 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Starting discovery of JeeLink USB receivers…
2017-01-26 07:57:04.910 [DEBUG] [nk.discovery.JeeLinkDiscoveryService] - Iterating ports…
2017-01-26 07:57:05.589 [DEBUG] [nk.discovery.JeeLinkDiscoveryService] - Scanning port /dev/ttyUSB0…
2017-01-26 07:57:05.655 [INFO ] [link.handler.JeeLinkSerialConnection] - Creating serial connection for port /dev/ttyUSB0 with baud rate 57600…
2017-01-26 07:57:05.662 [INFO ] [link.handler.JeeLinkSerialConnection] - Opening serial connection to port /dev/ttyUSB0 with baud rate 57600…

Which version of the serial plugin should be used? I only find a 1.9 version in the addons.

I am a little bit at a loss here, as the new log does not provide any additional information. It looks like either opening the device crashes openHAB, or reading from the device itself (before the string that has been read is logged).

Do you still have FHEM running and accessing the device (or some other process)?
Have you added the openhab user to the dialout group (or the group that owns the device /dev/ttyUSB0)? Can you read from the device as openhab user from the commandline (by using cat /dev/ttyUSB0)? This should normally run until you press Crl-C and show at least the sketch name.

Please try to start openHAB on the comandline (I never did this, but there is a start.sh script supposed to be in the openHAB directory somewhere). Maybe this shows the vm crash dump in the console.