emonTH pulse counting

Hi guys,

I am just about to purchase emonTH with optical sensor - I want to hook it up to my power meter to get power consumption readings.
However the issue is that I am after (near) real-time reading so I want to get those readings pretty much every 1-2 seconds.
Any ideas about what a battery life might be with such schedule?

Thank you

Hi Alex,

Welcome to the forum!

Do you need to use batteries? Any chance you can supply external power to it? The default emonTH sketch reports every 60s, that is a significant increase.

In general, if you are going to use EmonCMS, then I think the max rate is 5s IIRC for the timeseries data.

It also depends on how much energy you are using. You will only get a flash every x Watts of power, if that flash is every 10s, there is little point trying to read it every 1-2s.

There is a Pulse Interfacer for emonhub that you could install onto a PiZero. That reports at a specified rate or every flash (if gap to next flash is greater than rate).

Hi Gwil,
unfortunately I have to use batteries, otherwise, if I could get AC power to my meter box - I would be using jusr ESP or RPi with their WiFi abilities and a two-cents photoresistor.
In fact I did that before (for my old house) and it was working beautifully, but in this house I can’t really get AC so have to use some form of batteries.

I looked at emonTH mainly because, since it uses RF rather than WiFi and being sspecially designed and crafter by someone who is much more smart in that than myself, I though it could be more power-efficient and even with 1-2 seconds polling rate it could give me at least a month battery run-time.

Now I am thinking may be I can use some small/cheap Pb rechargeable batteries like an old car battery with voltage regulator to power up emonTH over its battery box?

I was thinking about sending data to my mqtt to be processed by my own internal components (HomeAssistant, Grafana etc). But even 5 seconds would be alright I guess.

True, but I want to read the sensor as fast as I can to make sure I don’t miss a blink, unless I use interrupts.

Could you please point me to the right direction?
I did not find anything in this shop that would be called “emonhub”.

And I assume even in that case power issue would still remain since even RPiZero not super power efficient.

It is a software item for a Pi, but as you say you do not have power at the meter it will not help you.

Check the software of the emonTH. I’m reasonably sure - not certain though - that it can handle pulses even when it’s reporting every minute - it stores the pulse count and reports what it’s seen over the last however long it’s been.

@glyn.hudson should be able to confirm this straight off, whereas I’d need to look very carefully at the software and then try it.

1 Like

No need to change the sleep time, the default firmware on the emonTx supports interrupt pulse counting. It will wake up automatically via a hardware interrupt when a pulse is detected, a pulse will never be missed. See:

1 Like

OP wants ‘near real time’ reporting so ideally a message sent on receipt of a pulse or at a minimum rate.

Pulse counting does not really provide realtime data, unless your using kW’s of power the pulses will be quite infrequent. Certainly there would be no problem reducing the sleep delay to get pulse updates more frequently. The emonTH battery life is 2yrs+ with 60s sleep, so I imagine you could reduce to about 15s update and still get about 6 months of battery life.

Personally I would install a power outlet by the fuse board then use a CT based solution. Socket outlets are cheap, if you’re not confident to do this yourself it should take an electrician less than 1hr so about £40-£50. Well worth it long term IMO.

Yes we’ve already said that. Hence ‘near’ real time.

thank you very much guys for all your input.
I think the best and most reliable/efficient way is to take DC cable to the meter box.
However once it is done, then a $3 ESP with a photodiode would do the trick :slight_smile:

Cheers.