OpenEnergyMonitor Community

Reset emonTx counter to zero

Is it possible to reset the emonTx so that it starts its log count again from zero. I finally have my installation set up (3x emonTx, with 1x Pi Zero and 1x Emonhub all working on 3 phase supplies), which has taken a few months with readings across all three emonTxs starting at various times.

The system sends the readings to my database every 30 minutes via node-red, which adds a timestamp when inserted into the database.

The problem I have is that I would like the data to start from a set date. I can’t just delete the data in my database as when it starts the feed again it will start on 2,000kWh (current reading) which will give a giant spike on the graph for that half hour, which will take ages to even itself out.

Many thanks

That’s a “feature” of emonCMS, designed to provide a remedy for the situation where the data source (the emonTx or the emonPi itself) suffers a power failure and starts counting from zero. What happens is the last reading prior to the incoming value falling to zero (or close to) is stored and permanently added to all later readings. I think the only way you’ll get round this is to stop your database, delete the feed in question, start your database and then recreate the feed. I’m not sure whether emptying the feed of all data is adequate. It will take someone who knows more about the inner workings of emonCMS to tell you that.

If you want several input devices to all start from zero together, then I think you’ll need to power them all down (except the device/machine that emonHub is running on) first, then stop/recreate/restart all the rest, and finally start the input sources together as the last step.

1 Like