Improved command line tool for creating accumulating kWh feeds from existing power feeds

I have improved the power_to_kwh command line tool that creates accumulating kWh feeds from existing power feeds so that it now has a small wizard that guides you through the process of selecting the existing power feed, option to change the emoncms install location and create a new kwh feed or overwrite an existing one.

The steps for using the tool on an emonpi or emonbase is:

1) SSH into the emonpi/emonbase

ssh pi@PI-IP-ADDRESS (default password: raspberry)

2) Set the pi in write mode and download the usefulscripts repository:

rpi-rw
git clone http://github.com/emoncms/usefulscripts.git

3) Run the power_to_kwh processor wizard:

sudo php usefulscripts/process/power_to_kwh.php

The following is an example output of running the script

------------------------------------------------------
Power to kWh feed processor
------------------------------------------------------

Is your setup a standard emonpi or emonbase? (Y/N): y

Please enter feedid of the power feed you wish to use to generate the accumulating kWh feed: 1
Power feed selected: solar Engine: PHPFINA

Would you like to create a new feed or overwrite an existing feed? enter 1 for new, 2 for overwrite: 1

Power to kWh processor feed 1 -> feed 2
Output interval: 10s
Would you like to modify the kwh feed interval to be longer than the interval above?
This will reduce disk space use
:60
............................................................Recalculated in 130s

 

octagon's picture

Re: Improved command line tool for creating accumulating kWh feeds from existing power feeds

Trystan thanks for the update .  I have an issue that the readline doesn't exist so I get :

php power_to_kwh.php
------------------------------------------------------
Power to kWh feed processor
------------------------------------------------------

PHP Fatal error:  Call to undefined function readline() in /var/www/emoncms/usefulscripts/process/power_to_kwh.php on line 12

Help!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.