Home Energy Usage (Aeon HEM G2) - log usage to external device/database

Hi All,

I use an Aeon Labs G2 Home Energy Meter with a VeraLite and after initial setup issues it’s working fine reporting Watts and kWh.

I would like to log these values (kWh and Watts) to an external system every 15 seconds or so.
The reason for this short time is that I want to get somewhat real-time data for graphing etc.

I know there is the DataMine plugin, but I’d like to have this data on an external system, and as far as I read DataMine stores the data locally (or on USB stick)…

Basically the way I see it there are 2 main ways:

1. Vera sends the values to the external system
I have set up an AltEventServer according to the instructions here:
HOWTO: Event logging to database ([url=http://forum.micasaverde.com/index.php/topic,15245.msg128041.html#msg128041]http://forum.micasaverde.com/index.php/topic,15245.msg128041.html#msg128041[/url])
It shows all the events from my DSC Alarm Panel. But I haven’t figured out yet how to send the Energy Monitor data to the AltEventServer in 20 sec intervals.

2. External system polls Vera at a time interval like this:
http://192.168x.x:3480/data_request?id=variableget&DeviceNum=ID&serviceId=urn:micasaverde-com:serviceId:EnergyMetering1&Variable=Watts

I am leaning towards the first method, to have Vera push the values out. Is one or the other method better in terms of resource usage on the VeraLite?

Second, what would be a good way to set up the sending of the values every 20 seconds? (I think if I use a scene then it can only run every minute, is that correct?)

alternatively I could also use a variable watch and only send data when the variable has changed.
I saw code elsewhere on this forum that I could adapt to accomplish that, but I am not sure where that code would go.
([url=http://forum.micasaverde.com/index.php/topic,15245.msg128055/topicseen.html#msg128055]http://forum.micasaverde.com/index.php/topic,15245.msg128055/topicseen.html#msg128055[/url])

Would it go under “APPS → Develop Apps → Edit Startup Lua” ?

Or maybe there is a better way to do all this that I am not aware of (PLEG?)?

Thanks for any pointers in the right direction.
Mike

Check out the EventWatcher plugin. It will do exactly why you want to a SysLog server.

@AgileHumor

Thank you for your response. I have in the meantime set up the AltEventServer discussed in another thread and added some lua startup code to watch the power meter variables so they get logged to the event server. This has been running nicely for the past few months. My event server is a PogoPlug with Debian/Apache/PHP/MySQL installed on it.