New Jeelink Openhab2 Binding

Thanks for posting this. I have added the configuration as an example to the README.

As the pull request is in the works, you can grab an up-to-date version of the binding here:

https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.jeelink/2.2.0-SNAPSHOT/org.openhab.binding.jeelink-2.2.0-SNAPSHOT.jar

The binding now has version 2.2 and it contains a few changes requested by Kai Kreuzer. One breaking change is that there now is a dedicated thing type for network connected sticks. This makes it necessary to adapt the port configuration. Please have a look at the updated README.

@magcode , as the pull request has been merged, I have now created a new branch for making the consumption unit configurable: https://github.com/vbier/openhab2-addons/tree/ec3kUnit
As I have no ec3k sensors, can you please test if this works as expected?

Hmm, the blue led is still flashing, although I added the init command “0a v”. Even a restart of the binding did not help.The version of my binding is 2.2.0.201708201100.

Any ideas?

Confirmed!

I just checked, its the same with my stick. I will look into it as soon as I have the time.

I have create a pull request containing the fix for the not working init commands:

The updated jar can be downloaded here:
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.jeelink/2.2.0-SNAPSHOT/org.openhab.binding.jeelink-2.2.0-SNAPSHOT.jar

@tailor, @oliver, this fixes the problem for me. Can somebody please confirm?

Confirmed! Works like a charm now. Thanks for fixing the bug!

@vbier Also confirmed, thank you very much!

Will do. But will need some time.

From time to time (after aout 10 days) the binding item’s values do not change anymore. I have two temperature/humidity sensors. for both of them them temperature and humidity doesn’t change anymore. There are item updatesevery minute, but always the same value is set.

Obviously the values sent by the sensors are not propagated correctly.

This is the trace-log:
21:02:29.484 [DEBUG] [sse.LaCrosseTemperatureSensorHandler] - updating states for thing Außenbereich (4): temp=13.9 (13.899861), humidity=89, batteryNew=false, batteryLow=false

These are the old values. The display of the sensor shows different values.

Restarting the binding resolves the problem… but it occurs again and again after a couple of days.

Is this trace or debug level output? In trace level, there should be some lines like

Read line from port x: xx xx xx xx

as long as the binding is getting data from the serial connection. If you do not see these anymore, then most likely the connection to the stick has failed. Are there any exceptions in the log? Are the stick and sensors still shown as ONLINE? Do you have any status changes for the stick in your event log? These should show an error message when there was an exception reading from the serial port.

From looking at the code I could see that the refactoring I did for the pull request review introduced a bug that leads to cyclic propagation of the last value. I will fix this as soon as I have the time.

Yes, trace has been enabled and that was the only log entry.It looks like the JeeLink was offline, but I could not find any log entry.

The only error I could find was:
2017-09-25 00:00:01.219 [ERROR] [thome.binding.astro.internal.job.Job] - Queue full
java.lang.IllegalStateException: Queue full
at java.util.AbstractQueue.add(AbstractQueue.java:98)[:1.8.0_131]
at org.eclipse.smarthome.binding.astro.handler.AstroThingHandler.addJobToQueue(AstroThingHandler.java:314)[177:org.eclipse.smarthome.binding.astro:0.9.0.b5]
at org.eclipse.smarthome.binding.astro.internal.job.Job.schedule(Job.java:58)[177:org.eclipse.smarthome.binding.astro:0.9.0.b5]
at org.eclipse.smarthome.binding.astro.internal.job.Job.scheduleSunPhase(Job.java:156)[177:org.eclipse.smarthome.binding.astro:0.9.0.b5]
at org.eclipse.smarthome.binding.astro.internal.job.DailyJobSun.run(DailyJobSun.java:90)[177:org.eclipse.smarthome.binding.astro:0.9.0.b5]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_131]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_131]

What about my other questions? Can you grep the event log please:

grep jeelink:jeel /var/log/openhab2/events.log

Sorry for answering that late. The problem occurred again and it looks like the senosers went offline while the Jeelink remains online. This is the corresponding entry in the events.log file:

2017-09-30 15:17:03.819 [hingStatusInfoChangedEvent] - 'jeelink:lacrosse:13' changed from ONLINE to OFFLINE
2017-09-30 15:17:07.818 [hingStatusInfoChangedEvent] - 'jeelink:lacrosse:4' changed from ONLINE to OFFLINE

No problem. I have no access to my PC for a while. I will look into this next week.

Hi Volker, I deployed your snapshot 2.2.0 jar to my openhab2 and confirmed, it was installed and active via bundle:list.

232 | Active   |  80 | 2.2.0.201710102019     | JeeLink Binding

But I’m unable to configure the thing for usb device, only name and location is available. Your older version 2.1 works well, but seems not to be your last 2.1 version. Same problem with version 2.2.

beba8a7286234621ecb1be6c9596b8c  /tmp/org.openhab.binding.jeelink-2.1.0-SNAPSHOT.jar - is working

72fefe629da3a005bf8c374c0321b600  org.openhab.binding.jeelink-2.1.0-SNAPSHOT.jar - is NOT working

Debug log for jeelink binding:

2017-10-12 09:22:16.642 [DEBUG] [org.openhab.binding.jeelink         ] -     BundleEvent UNINSTALLED - org.openhab.binding.jeelink

2017-10-12 09:22:28.685 [DEBUG] [org.openhab.binding.jeelink         ] -     BundleEvent INSTALLED - org.openhab.binding.jeelink

2017-10-12 09:22:28.701 [DEBUG] [org.openhab.binding.jeelink         ] -    BundleEvent RESOLVED - org.openhab.binding.jeelink

2017-10-12 09:22:28.703 [DEBUG] [org.openhab.binding.jeelink         ] -   BundleEvent STARTING - org.openhab.binding.jeelink

2017-10-12 09:22:28.731 [DEBUG] [org.openhab.binding.jeelink         ] -     ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=binding.jeelink, component.id=233, service.id=369, service.bundleid=234, service.scope=bundle} - org.openhab.binding.jeelink

2017-10-12 09:22:28.750 [DEBUG] [org.openhab.binding.jeelink         ] -     BundleEvent STARTED - org.openhab.binding.jeelink

image

There is no need to install jars any more, the jeelink binding can now be installed via paper ui or addons.cfg in the same way as other official bindings. For the official version some things have changed and the thing for the usb stick has to be removed and newly created. Your screenshot shows jeelink:jeelink as thing type which no longer exists. It is now jeelink:jeelinkUsb for sticks directly connected to an usb port.

Hi Volker, I am on apt-repo2 stable release and that way up2date. But there is no jeelink binding. Is it not available on stable tree?

If you don’t find it, then maybe it is only available in the unstable repo (that is the one I am using). Then use the jar.