Jeelink support for lacrosse

I have a jeelink-clone (arduino+RFM12B) to collect sensor data from around the house. Mostly thermometers / hygrometers. Another protocol on the same frquency is EC3000 for an energy-counter.
Is somebody haveing them, too? So we could investigate how to get those data into home assistant.

An update:
There are some projects that use an esp8266-rmf-mqtt client. I think this is a very good step to get a solution as we can use mqtt-sensors within home assistant.
Now its to find out how that could work.

Any news regarding Jeelink support? I’m about to move from FHEM to HA but would like to use my 868 MHz temperature sensors together with HA. Any idea how to do that?

Hi community,

exactly the same for me.
Using a Jeelink (clone) USB-stick.

I come frome FHEM and would like to migrate my setup to homeassistant completly. Homeassistant works fine for me, but i have no idea how to integrate my 868 MHz temperature sensors.

Any idea how to do that?

same here, moving from FHEM to HA and I’d like to join the discussion about using the Jeelink Stick to geht the LaCrosse Values.

Hi all,

just pushed an early version of the lacrosse component to github…

https://github.com/hthiery/homeassistant

you also need the python-lacrosse module that is also available on github

https://github.com/hthiery/python-lacrosse

Any feedback or contribution is welcome

I will give this a try, but I’m not sure how to find out the sensor id of the jeelink devices? Is there any log, where i can see the detected sensors?

I’ve installed python-lacrosse and defined a sensor for tests, seems something went wrong installing the python-lacrosse

 File "/home/pi/.homeassistant/custom_components/sensor/lacrosse.py", line 5, in <module>
    import pylacrosse
ImportError: No module named 'pylacrosse'


2017-10-16 11:10:34 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.sensor.lacrosse. Make sure all dependencies are installed
  File "/home/pi/.homeassistant/custom_components/sensor/lacrosse.py", line 5, in <module>
    import pylacrosse
  File "/usr/local/lib/python3.4/dist-packages/pylacrosse-7e3450e-py2.7.egg/pylacrosse/__init__.py", line 18, in <module>
    from .lacrosse import LaCrosse
  File "/usr/local/lib/python3.4/dist-packages/pylacrosse-7e3450e-py2.7.egg/pylacrosse/lacrosse.py", line 20, in <module>
2017-10-16 11:10:34 ERROR (MainThread) [homeassistant.loader] Unable to find component sensor.lacrosse

Hi,

i added the pylacrosse lib to pypi … so you should be able to install with pip:

pip install pylacrosse

to get some infos how to figure out the sensor ids check https://github.com/hthiery/python-lacrosse


Heiko

discovering the devices using the cli tool is working right now…

pi@homeberry:~$ pylacrosse -d /dev/ttyUSB0 scan
id=36 t=18.800000 h=106 nbat=0 name=unknown
id=58 t=18.700000 h=64 nbat=0 name=unknown
id=57 t=12.000000 h=106 nbat=0 name=unknown
id=22 t=19.600000 h=106 nbat=0 name=unknown
id=36 t=18.800000 h=106 nbat=0 name=unknown
id=61 t=19.300000 h=106 nbat=0 name=unknown
id=17 t=20.900000 h=106 nbat=0 name=unknown
id=58 t=18.700000 h=64 nbat=0 name=unknown
id=57 t=12.000000 h=106 nbat=0 name=unknown
id=22 t=19.600000 h=106 nbat=0 name=unknown
id=36 t=18.800000 h=106 nbat=0 name=unknown
id=61 t=19.300000 h=106 nbat=0 name=unknown
id=20 t=23.800000 h=106 nbat=1 name=unknown
id=58 t=18.700000 h=64 nbat=0 name=unknown
id=22 t=19.600000 h=106 nbat=0 name=unknown
id=36 t=18.800000 h=106 nbat=0 name=unknown
id=61 t=19.300000 h=106 nbat=0 name=unknown
id=58 t=18.700000 h=64 nbat=0 name=unknown
id=22 t=19.600000 h=106 nbat=0 name=unknown

…but during the HASS startup there was the following error in the log file, that i can’t explain.

Exception in thread Thread-14:
Traceback (most recent call last):
  File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.4/threading.py", line 868, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.4/dist-packages/pylacrosse/lacrosse.py", line 87, in _refresh
    cb[0](sensor, cb[1])
TypeError: _callback_lacrosse() takes 2 positional arguments but 3 were given

ok … i just updated the repo with the custom component yesterday. please update your custom component … i hope this now works

yes seems to work, sensor was created in HASS but with state unknown.

Is there any way to log the input coming from the pylacrosse script in the custom components?

image

currently there is no way to do this … are you sure you have the right id configured in your hass config?

normally it take up to 30 seconds until the value is first shown.

seems, that the error is still there, but the sensor was added to HASS.

Exception in thread Thread-14:
Traceback (most recent call last):
File “/usr/lib/python3.4/threading.py”, line 920, in _bootstrap_inner
self.run()
File “/usr/lib/python3.4/threading.py”, line 868, in run
self._target(*self._args, **self._kwargs)
File “/usr/local/lib/python3.4/dist-packages/pylacrosse/lacrosse.py”, line 87, in _refresh
cb[0](sensor, cb[1])
TypeError: _callback_lacrosse() takes 2 positional arguments but 3 were given

can you verify you have installed the right pylacrosse package. it should be version 0.2.7

pi@homeberry:~/.homeassistant$ sudo pip show pylacrosse
Name: pylacrosse
Version: 0.2.7
Summary: LaCrosse sensor library
Home-page: http://github.com/hthiery/python-lacrosse
Author: Heiko Thiery
Author-email: [email protected]
License: LGPLv2+
Location: /usr/local/lib/python3.4/dist-packages
Requires: pyserial

Don’t know what I’ve done now :smiley: just cloned the git repo again and overwrite the existing files… here we go :rofl:

image

have to figure out which id belongs to which sensor, but it’s working for all of them:

image

and extended sensor with humidity:

image

image

nice to see that it is now working … by the way there is also a battery sensor that you can configure with type=battery …

Thats nice, so I’m going to add a group for all devices running on battery to see the overall status.

Hi hthiery,

i just tried to get the pylacrosse reader running with my jeelink clone. Unfortunatly I gt the following error mesages:

pi# pylacrosse -v -d /dev/ttyUSB2 scan
Traceback (most recent call last):
File “/usr/local/bin/pylacrosse”, line 9, in
load_entry_point(‘pylacrosse==0.2.7’, ‘console_scripts’, ‘pylacrosse’)()
File “/usr/local/lib/python2.7/dist-packages/pylacrosse/cli_tool.py”, line 84, in main
lacrosse.open()
File “/usr/local/lib/python2.7/dist-packages/pylacrosse/lacrosse.py”, line 46, in open
self._serial.open()
File “/usr/lib/python2.7/dist-packages/serial/serialposix.py”, line 282, in open
self._reconfigurePort()
File “/usr/lib/python2.7/dist-packages/serial/serialposix.py”, line 417, in _reconfigurePort
set_special_baudrate(self, custom_baud)
File “/usr/lib/python2.7/dist-packages/serial/serialposix.py”, line 47, in set_special_baudrate
FCNTL.ioctl(port.fd, TERMIOS.TIOCGSERIAL, buf)
IOError: [Errno 25] Inappropriate ioctl for device
root@raspberrypi:/home/pi# ^C

The intersting thing ist hat the jeelink clone installs two serial ports via udev /dev/ttyAMA0 and /dev/ttyUSB0

On one I get the error messag ont the other serial port nothing. If I connect the jeelink clone to my windows pc I can see all data on serial port monitor.

With my original jeelink it works with pylacrosse reader and serial port monitor.

Regards Sascha

You are awesome.

Today i updated my HA installation to 0.58 and checked the LaCrosse integration.

Works great.

Thank you very much. I like the HA community :ok_hand:t2: