NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

2 Replies

  • This sounds interesting, may look into this myself.... I recently set up some monitoring on the ReadyNAS which uses RRDTool - so I know that part can be installed easy enough. Perl script could be used to represent or retain the data. Would be interested in any more info on this thread, likewise I'll update it if I get it set up.
  • I can confirm this does work.... this sounded interesting as I already had a standalone electricity monitor and always wanted to be able to analyse the stats better. The Current Cost unit sounded ideal, plus, having the ReadyNAS doing something useful and showing me realtime stats/graphs of current usage seemed like a good little project.

    So.... basically, for anyone who's happy to google the bits and tinker with scripts, follow the excellent page at - www.linuxuk.org/2008/12/currentcost-and-ubuntu....

    1. install lsusb - apt-get install usbutils

    2. you will need the usbserial driver before the modprobe command will work - you can download this from one of the ReadyNAS pages, I cant remember but if you google it its easy to find. Install the driver, seem to think you also needed the PL2303 driver too.

    3. there is a link to scripts which is a good starting point to develop whatever you want, it mentions changing the baud to 9600 - I found I needed to set it to 57600 for it to work. I also found that I needed to tweak the regex line within the script for it to pick up the watts and temp properly.

    NOTE: The Device::Serial module needed by the perl script was a bit of a pain to install...using Apt-get to install the libdevice-serialport-perl module didnt work as it was unthreaded and Perl wouldnt work with it - I think that was what was going on anyway. I eventually used cpan to get the module, then build it manually and needed to set the compiler from cc to gcc to make it. that was the nastiest bit for me as I felt it was a bit of a bodge, I was suprised it works as it uses a different compiler to the main perl installation - it may come back to bite me but it seems to work !

    4. I already had rrdtool on my machine, I had created a directory for all the currentcost stuff under home and created the rrd database there as per the webpage instructions. altered the script to do a "rrdtool update" to save the values in the db.

    5. I created a little bash script to run a few rrdtool graphs - 15mins, 60mins and 24 hours worth of data. I set this up in crontab to run every 15 mins and post the graphs to a webpage hosted on the readynas www share.

    6. I created a little php script to extract the last 10-20 readings from the db and display them on a simple webpage. Its a bit sad I know but I can now switch something on and view the page on my smartphone anywhere in the house and see what the wattage jumps to, so I spent an hour or so switching stuff on and off to see what uses what !!

    NOTE: I had problems getting the data out of the rrd db, "rrdtool fetch" which I still want to go back to - in the meantime I am writing the stats to a flatfile which the php reads - ideally I just want to read it from the rrd database.

    All of the above is a bit vague but if you need any details on what I did I would be happy to go into more detail, I'm pretty much a beginner with Linux and managed to find what I needed by googling and reading the odd manual. Some of it was a bit bodged and there may be better ways of doing this but I was mainly trying to prove I could get it working and have a quick webpage up and running - until I can tweak it all to work a bit more cleanly. I'm not sure how much workload this puts on the ReadyNAS but the memory and cpu didnt seem to be adversly affected.

    I hope some other enthusiasts try this out, I would be interested in any other installations and what you achieve with this.

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More