emonTx Transmit Interval & electricity calculations

I've currently got an emonTx and a Nanode RF base (running the multinode sketch), transmitting to emoncms.org, which has been in service for several years.

I'm slowly getting round to implementing some of my home automation ideas and now have another Nanode RF recieving all RFM12B transmissions and spitting them to serial, which is then read and pushed into MQTT topics (and then there are some subscribers to push that data into Redis, MySQL etc).

What I want to do next, is have a subscriber to MQTT, which collects data since the last transmission, and periodically sends it up to emoncms.org - like the multinode_bulksend sketch does, as with 28 room nodes transmitting every 60s + emonTx every 5s, the current base will be making constant HTTP requests to emoncms.org.

Will only sending to emoncms.org every 20s, 30s or even 60s affect my electricity data much?

Why was 5s chosen for the emonTx?

If it's getting transmitted up to emoncms.org less often, I can increase the interval on the emonTx too, to extend battery life and ensure it's not hogging the 868mhz frequency so much!

Incidentally, is there a simple explanation anywhere of how emonTx is calculating the kWh and kWh/d counters from the incoming emonTx data? - i'd like to be able to calculate the same locally from the mqtt topic.

Thanks!

Ian

PS: So many feed times in emoncms.org now - any pointers on what to read to catch up on what the different types are? - and any good reads / recommendations on data storage of sensor data on mass?

 

TrystanLea's picture

Re: emonTx Transmit Interval & electricity calculations

Hello Ian, to answer your last question first, I've made a start on documentation that tries to explain in a fair bit of detail the difference between the different engines and their development history linked from the forum post here: http://openenergymonitor.org/emon/node/5319 (also linked from building blocks now)

If you can move the kwh calculation to your emontx that would certainly mean you could post less often without loosing accuracy on your accumulated and daily kwh figures. Its good to do this anyway.

Here are the three lines used in the emontx example here to do this: https://github.com/openenergymonitor/emonTxFirmware/blob/master/emonTxV3...

joules_CT1 += tx_data.realPower_CT1 * time_interval;
tx_data.wh_CT1 += joules_CT1 / 3600;
joules_CT1 = joules_CT1 % 3600;

If tx_data.wh_CT1 is a long and joules_CT1 is an integer joules_CT1 / 3600 whill be the equivalent of doing floor(joules_CT1 / 3600) and joules_CT1 % 3600 gives the remainder.

ichilton's picture

Re: emonTx Transmit Interval & electricity calculations

That's excellent - thanks Trystan!

Ian

 

Comment viewing options

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