New Jeelink Openhab2 Binding

The binding uses the openhab-transport-serial feature to access and query the serial ports. During discovery, it queries all serial ports and tries to read from them. In your case, the binding does not find any ports at all. I had this during testing when the port was in use by another application. Do you have FHEM still running or some other software reading from the serial port? What happens when you add and configure the jeelink manually?

I never installed FHEM on this image. It’s the openhabian Image.
The only thing I can image in this context is I installed the “RFXCOM USB Transceiver” binding which I uninstalled a few days ago.
But I just checked in the PaperUI under “Configuration”->“Things”: Here I see the “RFXCOM USB Transceiver” with status “removing”.
Is this ok or shouldn’t there a status like “uninstalled” or even no entry (because it is uninstalled)?

Regards
Andreas

This looks like it might be the cause of problem (see this openHAB bug report). Please try to get rid of the RFXCOM binding completely in case you do not use it anymore. You can use the openHAB console to find out if the bundle really is deinstalled.

Now I see the different sensor data (temp, humdidity etc).

How can I display them

a) in plain numbers
b) in a diagramm?

Thx and best regards
Andreas

You need to create Items for the channels (see the README for examples), and can add these to sitemaps (but this depends on the UI you have chosen). In order to do charting you need to set up a persistence service. openHAB documentation should get you started.

Edit: If you take the time to scan through this thread, you will find the relevant parts of my config.

Where can I find the latest jar file of the jeelink binding - the above mentioned link
https://github.com/vbier/openhab2-addons/blob/jeelink/addons/binding/org.openhab.binding.jeelink/org.openhab.binding.jeelink-2.0.0-SNAPSHOT.jar doesn`t seem to work anymore?

Thanks and best regards
André

The jar currently is not available. I reset the branch yesterday for squashing commits for the pull request and have not added the jar file again as all this took longer than I thought.

I can add the jar to another branch in the afternoon, in the meantime you have to clone and build yourself.

Edit: I have added the jar file. See the first post for the URL.

Thank you very much! After some tries my JeeLink adapter is now working with openHAB2. One question: Is there any possibility to set init strings for the adapter via OpenHAB, like in FHEM? Since I have Technotrend devices with 9.579 kbps, I have to first initialize the adapter with the init string “0a 1r v”. Currently I do it with

echo 0a > /dev/USBjeelink
echo 1r > /dev/USBjeelink
echo v > /dev/USBjeelink

but I think it would be nicer to do that in openHAB.

EDIT: After some testing it seems, that I have to resend the "echo"s everytime I restart openHAB

I have just uploaded an updated version that allows to configure init commands in the paper ui thing configuration of the jeelink. These are then send to the stick as soon as it is ready. I have tested it with “0a v” and this effectively disabled the LED.

Tested it immediately - it works great! Thank you very much.

I made today a fresh install with the newest snapshot of openHAB 2 and copied the precompiled jar file to /usr/share/openhab2/addons after doing the feature:install openhab-transport-serial on the console. Unfortunately I get an exception in den openhab.log:

2016-12-29 15:32:15.678 [ERROR] [org.openhab.binding.jeelink         ] - FrameworkEvent ERROR - org.openhab.binding.jeelink
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.jeelink [180]
  Unresolved requirement: Require-Bundle: org.openhab.io.transport.serial

        at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
~

According to Github there were changes yesterday regarding the io.transport.serial: https://github.com/openhab/openhab-core/commit/99b64815c9c9cf018a1d869ce21696512720310a

Is this the reason why the precompiled jar doesn`t work anymore?

EDIT: So I recompiled it by adding gnu.io and removing the dependency to the obsolete io.transport.serial and it seems to work.

I have once again updated the jar. I adapted it to the changes done in openHAB core (see this pull request) and added a german translation.

Edit: maybe somebody can tell me if the translation works for him. I did it according to Eclipse Smarthome documentation, but see no difference in my installation. I am not sure whether this is a problem with my locale settings, or if the translation in the paper UI simply does not work, as other bindings with german translations are also shown in english.

Same here. The translation of the descriptions for all bindings doesn’t change for me also, when setting the user interface language within “Preferences” to “German” - it still remains english.

Hi,
I got my Jeelink today and from the logs it seems to work:

14:58:28.283 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopping discovery of JeeLink USB Receivers

14:58:28.286 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopped discovery of JeeLink USB Receivers.
14:58:28.290 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Starting discovery of JeeLink USB receivers

14:58:28.494 [INFO ] [link.handler.JeeLinkSerialConnection] - Creating serial connection for port /dev/ttyUSB0 with baud rate 57600

14:58:28.495 [INFO ] [link.handler.JeeLinkSerialConnection] - Opening serial connection to port /dev/ttyUSB0 with baud rate 57600

14:58:28.526 [INFO ] [link.handler.JeeLinkSerialConnection] - Creating serial connection for port /dev/ttyACM0 with baud rate 57600

14:58:28.527 [INFO ] [link.handler.JeeLinkSerialConnection] - Opening serial connection to port /dev/ttyACM0 with baud rate 57600

15:00:28.981 [INFO ] [persistence.jdbc.internal.JdbcMapper] - JDBC::openConnection: Driver is available::Yank setupDataSource
15:00:39.871 [INFO ] [persistence.jdbc.internal.JdbcMapper] - JDBC::openConnection: Driver is available::Yank setupDataSource
15:01:53.649 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Creating 2 discovered things

15:02:13.651 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Discovered things created.
15:02:13.651 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Closing all open ports


But the two things don’t sho up. After that the log repeats itseld, always taking appx. 2 minutes to find the two things.
The JeeLink is port /dev/ttyUSB0; /dev/ttyACM0 is a z-wave dongle.

Any advice? Version is latest snapshot from today.

Thanks in advance,
Jonas

Have you flashed a sketch?
The binding reads from the ports and only creates items for the stick if could read the sketch name from the stick, which should produce another log message containing the sketch name.

Otherwise enable debug logging and start the discovery again.

Thanks.

root@bravo# avrdude -c arduino -p atmega328p -P /dev/ttyUSB0 -U flash:w:JeeLink_LaCrosse.hex

Flashed the new sketch, now the sensors can be added. Thank you!

Jonas

1 Like

I have once again updated the jar. The new version has improved logging during discovery and discovery should work noticeably faster. No need to upgrade for existing users.

Hi,
do you plan to integrate the addon into the base openHAB distro?
Also - does someone use this Binding together with the zwave binding? My Zwave stopped working and refuses to start again :confused:

Jonas

I have created a pull request to get the binding into openHAB on December 7th: https://github.com/openhab/openhab2-addons/pull/1541. This seems to take a while as there is a rather long list of open pull requests that has to be reviewed.

It could be that the jeelink binding interferes with the zwave binding when the discovery is running, as it then opens all
ports and tries to read from them. If the zwave binding does not like that, it should be fixed by a restart of openHAB, because after the restart the jeelink binding should not access the zwave port any more.

Have you tried to restart openHAB after you had the discovery running? Are any messages in the log?

Hi,
I restarted not only HAB but also the whole server and used different Ports for the ZWave controller. This is why I’m not sure if I broke it myself or if it came from the binding (or the stick broke in that timeframe). I wanted to test this with a different machine but did not have time for that until today.

Regards,
Jonas