New Jeelink Openhab2 Binding

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

Okay, my Z-Wave stick is toast. I don’t know if it was your binding scanning the USB Ports or something different.

So as a Warning until this can be confirmed: Don’t scan with this binding when you have your Z-Wave stick plugged in :slight_smile:

Maybe you should make adding the JeeLink as the Z-Wave binding does it - you can see it in


(Interessting Pictures are 17 and 18).

Thank you anyway for this great Binding, I’m off to get a new Stick. No worries about the old one :slight_smile:

Jonas

You can already add a thing for the stick manually like described in your linked tutorial. But unfortunately the discovery is triggered before you can press the add button in the paper ui, which means I would have to remove the discovery from the binding.

Apart from that I highly doubt that reading from the port will fry the stick. If I would have to try a wild guess I would say that you flashed the jeelink sketch onto the zwave stick and destroyed it that way.

Hey guys,
i have some PCA 301 based sockets. (ELV PSA301)

For the Jeelink there is a PCA301 - Sketch. Is it possible to use the sockets with this binding?

I compiled the binding cause of Gnu.io package, installed it, flashed my Jeelink with the PCA301 Sketch. In OpenHab the Discovery repeats every time with 1 discoverd Thing:

2017-01-15 14:52:42.337 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Starting discovery of JeeLink USB receivers…
2017-01-15 14:52:42.595 [INFO ] [link.handler.JeeLinkSerialConnection] - Creating serial connection for port /dev/ttyUSB0 with baud rate 57600…
2017-01-15 14:52:42.595 [INFO ] [link.handler.JeeLinkSerialConnection] - Opening serial connection to port /dev/ttyUSB0 with baud rate 57600…
2017-01-15 14:54:27.682 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Creating 1 discovered things…
2017-01-15 14:54:37.682 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Discovered things created.
2017-01-15 14:54:37.683 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Closing all open ports…
2017-01-15 14:54:37.683 [INFO ] [link.handler.JeeLinkSerialConnection] - Closing serial connection to port /dev/ttyUSB0…
2017-01-15 14:54:37.722 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopping discovery of JeeLink USB Receivers…
2017-01-15 14:54:37.722 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopped discovery of JeeLink USB Receivers.
2017-01-15 14:54:37.722 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopping discovery of JeeLink USB Receivers…
2017-01-15 14:54:37.722 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Stopped discovery of JeeLink USB Receivers.
2017-01-15 14:54:37.727 [INFO ] [nk.discovery.JeeLinkDiscoveryService] - Starting discovery of JeeLink USB receivers…
2017-01-15 14:54:37.846 [INFO ] [link.handler.JeeLinkSerialConnection] - Creating serial connection for port /dev/ttyUSB0 with baud rate 57600…
2017-01-15 14:54:37.847 [INFO ] [link.handler.JeeLinkSerialConnection] - Opening serial connection to port /dev/ttyUSB0 with baud rate 57600…

Thx.

The binding does currently not support the PCA301 sketch. As I have no PCA301 hardware it is a little bit difficult to add support for it. Can you capture some output from the stick and paste it here? It should be possible to add support for reading the sensor values, I have no idea how much effort it is to support switching the PCA301.

Do you have a thing for the stick in the inbox? Can you enable debug logging, start the discovery and paste the relevant part of the log?

Hello
I installed this great binding, too.

Now I have four items (sensors) in the PaperUI inbox.
How can I identify which Sensor has which ID?

Thank you in advance!

BR
Matthias

If you take out the Batteries the sensors will show their ID on the display (if your Sensors do have displays). If not, just add one, look at the values and search it :slight_smile:

Jonas

Hello Jonas,
thank you for your answer, but it different on my sensors.
When I exchange the battery the sensor shows me fo example 9C and after discovering the item via PaperUI it shows me ID=228
I also tried to translate into hex, but 9C (hex) is not 228 (decimal)
9C = 156

How can I calculate from the number on the display to the ID in openhab?

Thank you in advance.

BR
Matthias

I did not even know that the sensors show an ID in the display. Do they do that after you insert the battery? My understanding was that each sensor gets a new id every time a new battery is inserted.

Regardless, you can
a) take out all batteries, insert them one by one and trigger the discovery after every battery insertion
b) add all things from the inbox to openHAB, look at them in the control tab of the paper ui and compare the temperature and humidity values (if more than one matches put it outside for a few seconds)

Hello Volker,
Yes, my sensors display an ID shortly after inserting new batteries.
If somebody is interested, I figured out how the shown ID is translated into the ID visible in openhab.
Lets take my above example and translate the shown ID on the sensor from hex into binary:
9C (hex) = 1001 1100

Now comes the strange magic: :slight_smile:
If you take the order the binary number like this:
1001 1100
abcd efgh

than it is translated into this order
efab cdgh
1110 0100

Meaning, the digits on the position e and f moves to the front, every thing else stays like it is.
If you convert back this binary number into decimal you will get the ID in openhab.
1110 0100 = 228 (dec)

I checked this for all my eight sensors and the conversion was correct all the time.

Maybe it is useful for somebody. :slight_smile:

BR
Matthias

1 Like

Hi,
oh I didn’t realize there was a difference, sorry. I did not look too closly at the sensors as I just looked at the valus and then carried them into the corresponding Rooms :slight_smile:

Still getting errors with Z-Wave binding - brand new Stick seems to do _some_thing although I’m not too sure what exactly:

20:31:25.366 [ERROR] [ve.internal.protocol.ZWaveController] - Neither inclusion nor exclusion was active!
20:31:25.372 [INFO ] [marthome.event.ItemStateChangedEvent] - zwave_serial_zstick_f689b74c_serial_ack changed from 14 to 15
20:31:25.375 [INFO ] [marthome.event.ItemStateChangedEvent] - zwave_serial_zstick_f689b74c_serial_sof changed from 14 to 15

But my devices will not be found…

I did miss to plug it into another machine before to test it but now using only the stick with a openHAB+Z-Wave installation does not work anymore…

I can’t say with a 100% guarantee that your Binding killed my Zwave Sticks but the
evidence (for me at least) “is piling up” :smiley: is here anybody else using Z-Wave and the Jeelink binding so we can figure out if I’m just stupid or if there is something wrong with the binding?

Thanks,

Jonas

Did you start the discovery after you plugged in the new z-wave stick? Does the new stick behave exactly like the old one (did you get the same log messages with the old stick after it was fried)? Did you try to uninstall the Jeelink binding?

I have just googled and found people that accessed a zwave stick by invoking cat on the port (which is essentialy what the jeelink binding does) and their sticks did not quit working. I still think there must be something else.

Edit: In order to rule out any incompatibilities with the bindings, I would uninstall jeelink, z-wave and openhab-transport-serial and then reinstall z-wave.

Hi,
I didn’t start discovery with the JeeLink binding when I inserted the new Stick. The new stick behaves exactly like the old one, logs look the same. I tried the new stick on a different VM and it was the same there, the logs looked exactly like they do on the normal openHAB instance.
I tried openHAB on Windows now just to be sure :slight_smile: - did not help, I could find no device with neither the old stick nor with the new stick (nor with both Sticks active at the same time :smiley: )

Interessting bit, the log on Windows says:

Das Gerõt erkennt den Befehl nicht.

(Translates to “The devices does not understand the command”), the rest of the logs are the same.

Jonas

It would be very nice to have the pca301 included.
The existing binding (https://github.com/ribbeck/openhab-binding-pca301/blob/master/README.md) has stopped working after some time…

If you did not invoke discovery, then the jeelink binding did not even access your new stick. I am still confident that your sticks are not broken. The log messages
20:31:25.372 [INFO ] [marthome.event.ItemStateChangedEvent] - zwave_serial_zstick_f689b74c_serial_ack changed from 14 to 15 also seem to indicate that the binding still talks to the controller on the stick.

Which stick do you have? Can it send on different frequencies? Did you test it on a different physical computer or only on VMs (i.e. have you unplugged it)? Can you test it with other software than openHAB (does the vendor provide any software with the stick)?

Hi,
I tested it with 2 different VMs and one different Host (openHAB on Windows). The sticks were working before and could fine all my Z-Wave devices with several different openHAB installations. I’m using the z-wave.me http://z-wave.me/index.php?id=28 uzb stick wich was working before. I’ll try different Software tonight or tomorrow.

Jonas