X-Git-Url: https://git.cweiske.de/usb-wde1-tools.git/blobdiff_plain/4aa3b01f83207dd91c7ece7da3f0e7af7dccabe3..e6c166f53f76da3d5700bad559c1f7efabd21baf:/munin/README diff --git a/munin/README b/munin/README index ab784cc..a2b5c15 100644 --- a/munin/README +++ b/munin/README @@ -13,15 +13,13 @@ Setup ----- 0. Checkout the munin plugin code: $ cd /usr/local/src - $ git clone ssh://git.cweiske.de/~/git/usb-wde1-tools.git + $ git clone git://git.cweiske.de/usb-wde1-tools.git $ cd usb-wde1-tools 1. 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 - or - $ ./dummy-data-generator.php |./munin/log-single-line.sh test.log The most easy way is to run $ cd munin && nohup ./usb-wde1-log-last.sh & @@ -54,3 +52,34 @@ Setup - should display the current values from the log file 5. You are done - enjoy. + + + +Debugging & Development +----------------------- +The dummy data generator is a small php script that generates log lines +as they would come from the usb-wde1 usb port: +$ ./dummy-data-generator.php |./munin/log-single-line.sh test.log + +Local (non-installed) plugin setup: +$ cd munin +$ ln -s usb-wde1_ usb-wde1_temperature +$ ln -s usb-wde1_ usb-wde1_humidity +$ cd .. + + +Running the munin plugin for development purposes is also relatively easy +since you can pass the environment configuration variables +from the munin configuration on the command line: +$ logfile=test.log sensors="0 1 7" ./munin/usb-wde1_temperature + + +Permission errors +................. + + cu: open (/dev/ttyUSB0): Permission denied + cu: /dev/ttyUSB0: Line in use + +Only way that I found to fix this was change ownership of `/dev/ttyUSB0` to uucp:: + + $ chown uucp /dev/ttyUSB0