I use an USB-WDE1 from ELV receiver to collect temperature and humidity data from thermometers distributed all around the house. To make use of them, I created a Munin plugin that simply reports the temperature and humidity to munin, which in turn draws nice graphs.
The munin plugin supports up to 8 sensors, allows to configure custom sensor names (i.e. "Kitchen" or "Basement") and global warning and critical settings as well as per-sensor warning/critical settings.
The source code can be found in the git repository. Getting it is as easy as running
$ git clone git://git.cweiske.de/usb-wde1-tools.git
The code repository contains installation instructions in munin/README, but here they are again:
- Checkout the munin plugin code:
$ cd /usr/local/src $ git clone git://git.cweiske.de/usb-wde1-tools.git $ cd usb-wde1-tools
A process needs to watch the USB interface and log the last line with temperature data into a log file. You can do that manually with
$ socat /dev/ttyUSB0,b9600 STDOUT |./munin/log-single-line.sh test.log
If you get errors like
FullBuff->Reset ELV USB-WDE1 v1.2 WRONG VAL WRONG CMD
then run the following command:
$ stty < /dev/ttyUSB0 9600 -brkint -opost -onlcr -echo
The most easy way is to run the logging process is doing
$ cd munin && nohup ./usb-wde1-log-last.sh &
once. It backgrounds the logging process and logs into /tmp/usb-wde1-last. This process needs to be started whenever the machine is rebooted.
Link the munin plugin:
$ cd /etc/munin/plugins $ ln -s /usr/local/src/usb-wde1-tools/munin/usb-wde1_ usb-wde1_temperature $ ln -s /usr/local/src/usb-wde1-tools/munin/usb-wde1_ usb-wde1_humidity
Configure the plugins. Edit /etc/munin/plugin-conf.d/munin-node and add the following lines:
[usb-wde1_*] env.logfile /tmp/usb-wde1-last env.host_name House env.sensors 0 1 7 env.sensor0 Living room env.sensor1 Kitchen env.sensor7 Outside [usb-wde1_temperature] env.sensor1_warning 30
$ munin-run usb-wde1_temperature autoconf
- should echo "yes"
$ munin-run usb-wde1_temperature config
- should display the plugin configuration with all environment variables set
$ munin-run usb-wde1_temperature $ munin-run usb-wde1_humidity
- should display the current values from the log file
You are done - enjoy.