Higher update frequency, how?

First, I’d like to point out that I’m not using standard EmonPi, but an off the shelf Pi hat with CT clamps and voltage sensor. This hat has a microcontroller that is programmed to sample every 2 seconds. The hat is then picked up by EmonCMS using a custom configuration in the EmonHub configs.
(I’m not sure if I’m allowed to post config links to possibly competing product)

Despite setting 2 seconds sampling time, EmonCMS Inputs shows the numbers update roughly every 30 seconds. This is echoed across MQTT and Home Assistant data.

How do I make the update frequency much faster?

The reason behind this desire is so my MQTT and Home Assistant automations can better react to clouds or other changes in solar generation.

1 Like

I have custom EmonHub configs, and custom devices sending data to EmonCMS. My data rate is coming in at around 1 to 10 seconds. I am fairly certain that the rate is determined by the devices sending data. The holdup could be within the micro-controller hat programming.

Thank you for confirming, that’s what I thought because I can’t see anywhere in EmonHub to configure update frequency. I tried experimenting with sendinterval doesn’t seem to do anything. I’m not using emonCMS.org, but looks like it is sending to localhost.

I seems to get update every 5 seconds from the Pi hat in EmonHub logs.

But for some unknown reason I can’t work out, it only sends this to EmonCMS inputs every 5-6 buffers or ~30 seconds.

Any help would be greatly appreciated.

How to get every single update seen in EmonHub logs into Inputs screen and thus MQTT?

I also need this… can’t find it anywhere

A little more info.
How are you sending it to EmonCMS? Via a HTTP call?


Like this? So the HAT is on the same Pi running EmonCMS?
The HTTP call above is submitting several readings, each of the blocks inside the [ ] square brackets is separate reading, with its own timestamp at the beginning of the block.

The data is sent EmonHUB on the same Pi. The HAT is on the same PI running EmonCMS, data is gathered by EmonHUB. The log file posted is EmonHUB log.

I think it’s a EmonHUB question, how do I make it send on every sample? I tried tweaking sendInterval, but doesn’t seem to affect anything.

It looks like we have made a mixup in the naming of the interval setting, the emonhub conf examples all have ‘sendinterval’ whilst the actual internal setting is just ‘interval’. I will update the config examples to have the correct setting.

I have updated the config examples to the correct setting name: fix reference to sendinterval, rename to interval · openenergymonitor/[email protected] · GitHub

Brilliant. Thank you!

Changed from sendinterval to interval fixed it. Now I’m getting update every 2 buffers, 10 seconds.

2 Likes