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.
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.
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.
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.