FHEM: 3. Configuration LaCrosse TX 29 IT Temperture/Humidity sensor

By | 15. September 2014

Introduction

In the previous posts, I explained my motivation and how to setup FHEM with a jeelink (v3) USB RF stick.

Here I will describe how to connect the LaCrosse TX 29 IT temperature/humidity sensors to FHEM.

Requirements

Installation

The jeelink adapter can only handle one sketch per device. This is a limitation today but might change in the future. A sketch is, non-technically speaking, a definition used to adjust the device to particular sensor vendors.

  1. Download Flash file (http://sourceforge.net/p/fhem/code/HEAD/tree/trunk/fhem/contrib/arduino/)
    cd /opt/fhem/contrib/arduino
    wget http://sourceforge.net/p/fhem/code/HEAD/tree/trunk/fhem/contrib/arduino/36_LaCrosse-LaCrosseITPlusReader.zip?format=raw -O 36_LaCrosse-LaCrosseITPlusReader.zip
  2. Unzip FLASH file
    mkdir 36_LaCrosse-LaCrosseITPlusReader
    cd mkdir 36_LaCrosse-LaCrosseITPlusReader
    unzip ../36_LaCrosse-LaCrosseITPlusReader.zip
  3. Flash (FHEM) for LaCrosse
    1. In version 5.5 of FHEM this has to be done manually.
      1. Install helper tool
        apt-get install avrdude
      2. Stop FHEM (just to ne on the save side)
        /etc/init.d/fhem stop
      3. Flash jeelink
         avrdude -p atmega328P -c arduino -P /dev/ttyUSB0 -D -U flash:w:/opt/fhem/contrib/arduino/36_LaCrosse-LaCrosseITPlusReader/HexFiles/LaCrosseITPlusReader10.hex
      4. Start FHEM
        /etc/init.d/fhem start
    2. In later versions you can do this more comfortable.
      1. In version 5.5 of FHEM this has to be done manually.
        attr myJeeLink0 hexFile /opt/fhem/contrib/arduino/36_LaCrosse-LaCrosseITPlusReader/HexFiles/LaCrosseITPlusReader10.hex
      2. Start flashing
        set myJeeLink0 flash

Register and Define Sensors

After installing you can power-up your sensor(s). Best is, to do it one-by-one to be able to identify them more easily.

When you put the batteries in the sensor, it gets a random identifier. This we use to assign information and setup data.

  1. Put in Battery
  2. Look in log for an unknown device
    tail -f log/fhem-2014-09.log

Define Temperature and Humidity Graph

  1. Define the sensor directly in the config file fhem.cfg (is is much easier)
    ######################
    # Temperature / humidity sensors
    ## Office: 3D
    define 01Thermo LaCrosse 3D
    attr 01Thermo IODev myJeeLink0
    attr 01Thermo alias Office
    attr 01Thermo event-min-interval state:60
    attr 01Thermo group Temperatures
    attr 01Thermo icon scene_office
    attr 01Thermo room Plots
    #attr 01Thermo doAverage 1
    
    define FileLog_01Thermo FileLog ./log/01Thermo-%Y.log 01Thermo:T:.*
    attr FileLog_01Thermo logtype temp4hum6:Temp/Hum,text
    
    define weblink_01Thermo SVG FileLog_01Thermo:weblink_01Thermo:CURRENT
    attr weblink_01Thermo alias Office
    attr weblink_01Thermo title "Office"
    attr weblink_01Thermo label "Temp. min.: $data{min1} °C, max: $data{max1} °C, Last: $data{currval1} °C __ Hum. min.: $data{min2} %, max: $data{max2} %, Last: $data{currval2} %"
    attr weblink_01Thermo room Plots

I had some problems, that FHEM was complaining about not finding weblink_01Thermo.gplot. To solve this, I played around a little and came up with the following solution – not nice but working:

Track Battery status

  1. Define the sensor directly in the config file fhem.cfg (is is much easier)
    # LaCrosse Battery reading
    define rg_battery readingsGroup TYPE=LaCrosse:battery
    attr rg_battery alias Batteriestatus
    attr rg_battery commands { "battery.low" => "set %DEVICE replaceBatteryForSec 60" }
    attr rg_battery valueIcon {'battery.ok' => 'batterie', 'battery.low' => 'batterie\@red'}

 

Final Words

I added about 7 sensors and everything works fine. I am not yet happy about the log, because sometimes there is no entry for much more than 1 minute.

 

 

 

 

print

Leave a Reply

Your email address will not be published. Required fields are marked *