User Tools

Site Tools


chumbycurrentcosthowto

This is an old revision of the document!


Alternative way of using Chumby monitoring energy usage.

Before getting a Chumby/Flukso owner and MySmartGrid participator i was monitoring my power with CurrentCost. http://umweltsuende.wordpress.com/2010/04/03/currentcost/. CurrentCost Envi is a low cost energy monitor from UK. You can order them easily via ebay or amazon.

CurrentCost Envi seems a little bit more inaccurate than Flukso, but you can read the 3 power channels individually. I like it an i don´t want to trash it because i have a flukso now. My setup is running extremely well and stable for months. :)

Since i`m spending some thoughts on how to monitor power without a home-server, internet connection or wifi, i wanted to give chumby a try to replace the role of my home server for monitoring.

What can i tell?

Success ! It`s not too hard to do that.

The hardest part is to get missing binaries like stty and rrdtool for ARM9. Since i don`t have yet a cross-compile environment for ARM9 i searched some time to find appropriate coreutils and rrdtool packages providing binaries which run on chumby. I had success at http://downloads.buffalo.nas-central.org/

How to proceed ?

Just plugged in my currentcost usb cable into the chumby and….. surprise - it`s immediately being recognised without any further action ! Chumby comes with pl2303 kernel driver for the usb2serial bridge of the currentcost cable.

After that, set appropriate serial line speed with stty -F /dev/ttyUSB0 speed 57600 (stty comes with coreutils package) and then tested with “cat /dev/ttyUSB0” and immediately saw the currentcost XML output….

Great!

Now use your favourite perl script for reading data from /dev/ttyUSB0 and put that into rrdtool. There are many ways to do that and that`s already documented several times on the web. If you want some help please leave me a note (devzero AT web.de)

I won`t recommend storing the rrd and graphs on the internal chumby flash but on tmpfs instead, as the flash may wear out too quickly when constantly written onto, but you may backup the rrd on a daily basis on the internal flash or external usb stick hooked up via usb-hub (as the Chumby only has one usb port)

But how to show the rrdtool graphs on the chumby ? I can´t program Adobe Flash… :(

Here comes the trick: Chumby comes with busybox httpd - you just start another instance on another port with another homedir:

httpd -p 8080 -h /tmp/mydir

Then go to mychumby and add one of those “show me a picture from an url” widgets to your channel point the url to http://localhost:8080/path/to/image. You may add multiple instances of the same widget to show hourly, daily, monthly, yearly graphs.

You need to scale the rrdtool graphs appropriately so they look nicely on the chumby (320x240px) - a little bit trial and error to find the correct size as the older rrdtool from nas-central.org has no support for ”–full-size-mode” which would make life easier…..

So, that`s just some quick info because gonium asked for it. Maybe i`m adding stuff/details later on…. (I`m awful in writing docs and i have to admit that i hate it) :D

Roland

chumbycurrentcosthowto.1280266551.txt.gz · Last modified: 2012/10/30 10:36 (external edit)