how to get power data from Engine into RRDtool or Cacti?

Post any 3rd party software here.
Post Reply
WayneW
Posts: 66
Joined: Fri Jun 04, 2010 11:04 pm
Location: Florida, USA

how to get power data from Engine into RRDtool or Cacti?

Post by WayneW » Fri Jul 02, 2010 1:58 pm

Does anybody have info, advice or code to share on getting data from the ECM Engine into RRDtool or Cacti? The ECM dashboard is nice, but I would like some more flexibility in graphing and the ability to mix power usage and temperature on a single graph.
~Wayne in Florida
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: how to get power data from Engine into RRDtool or Cacti?

Post by ben » Wed Aug 18, 2010 9:38 am

Hey Wayne,

Marc MERLIN was able to get his ECM-1240s working with Cacti. He has a python script to collect data and information on how he got it working with Cacti here: http://marc.merlins.org/linux/cacti/.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
WayneW
Posts: 66
Joined: Fri Jun 04, 2010 11:04 pm
Location: Florida, USA

Re: how to get power data from Engine into RRDtool or Cacti?

Post by WayneW » Thu Aug 26, 2010 6:56 pm

I am still trying to digest all Marc's goodness, but it appears that Marc is reading the ECMs directly, rather than getting a feed from EngineG? Is it possible and/or there a risk to running Marc's stuff and EngineG at the same time? I am specifically worried about the MUX cable and too much traffic causing collisions.
~Wayne in Florida
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: how to get power data from Engine into RRDtool or Cacti?

Post by ben » Mon Sep 20, 2010 6:30 pm

Hey Wayne,

Forgot about this post, sorry. If you go into the EngineG software, under Forward Data click Home Automation Plugin. Click the Custom tab and enter 127.0.0.1 and an unused port. Set the python script to listen on your selected port and it should work.


Ben
Ben
Brultech Research Inc.
E: ben(at)brultech.com
alton
Posts: 1
Joined: Sat Oct 13, 2012 1:38 am

Re: how to get power data from Engine into RRDtool or Cacti?

Post by alton » Sat Oct 13, 2012 2:03 am

Nice post. I like it. Thanks for sharing these information. Keep it up. :lol: :P
mwall
Posts: 140
Joined: Wed Dec 07, 2011 6:25 pm

Re: how to get power data from Engine into RRDtool or Cacti?

Post by mwall » Sat Oct 13, 2012 7:07 am

Not sure if posting to an old thread is the best place for this, but here goes anyway...

I have added rrdtool support to btmon.py. btmon.py is the successor to ecmread.py, with support for mysql, sqlite, and numerous hosted services. I run one instance of btmon.py to collect data from the brultech devices (GEM, ECM-1240, ECM-1220) and save to a local database, then other instances to upload/process to various sites. The instance that does the collection can collect from the brultech devices directly, or it can collect from EngineG. The collection instance can poll the devices, or wait for real-time data from the devices.

A beta release is available now (13 oct 2012). Still sorting out what the default values should be and some of the RRA specs, but for now the default settings result in one file per channel with the following:

4 days of 30 second samples
60 days of 5 minute averages
365 days of 30 minute averages
730 days of 1 hour averages

For a single GEM with 48 channels, 4 pulse counters, and 8 one-wire sensors, this is a total of about 162M for 2 years of data.

The overhead of btmon.py is low enough to run on plug computers and routers. With a buffer size of 600 packets, maximum memory usage with a GEM is about 50M VSZ, 36M RSS. 80% of that is due to buffer size - so depending on sampling rates, upload rates, and network robustness you could easily drop the buffer size by 50% or more.

http://lancet.mit.edu/mwall/projects/power
crsherman
Posts: 4
Joined: Sun Jun 26, 2011 5:51 pm

Re: how to get power data from Engine into RRDtool or Cacti?

Post by crsherman » Sat Oct 13, 2012 8:45 am

mwall,

Is there a guide for setting up the btmon.py or is it similar to the ecmread guide?

I have been trying to setup your beta version on a win 7 machine/ brultech with etherbee?

BTW, thanks for the hard work. Looks great.
mwall
Posts: 140
Joined: Wed Dec 07, 2011 6:25 pm

Re: how to get power data from Engine into RRDtool or Cacti?

Post by mwall » Sat Oct 13, 2012 6:48 pm

btmon.py is mostly a drop-in replacement for ecmread.py, so the guide is the same. since btmon can poll devices there are actually more configuration options than listed in the ecmread guide.

the simplest way to invoke it is:

Code: Select all

btmon.py --serial --serialport COM1 --print
or

Code: Select all

btmon.py --ip --ip-mode client --ip-host X.X.X.X --print
to see all of the options do

Code: Select all

btmon.py --help
a few of the configuration parameters are slightly different than those of ecmread. for example, since btmon supports both mysql and sqlite for data in and data out, the parameter for specifying the database name are msql_database and sqlite_database instead of db_database.

btmon will automatically create the database - with ecmread you had to create it yourself.

the db schema in btmon is more future-proof than that used in ecmread. btmon saves counter values, from which watts and watt-hours can be derived. ecmread saved only watts, or a bit more with the extended schema.

please let me know how btmon works or does not work for you - start a new thread and we can sort out any problems. in particular, please check the values reported by btmon. i'm still seeing occasional discrepancies in the gem output, mostly related to the polarity. ecm-1240 output seems to be quite solid.

i expect a few more changes to the rrd parameters, and perhaps a minor adjustment to the db schemas before btmon comes out of beta.

m
Post Reply