question

astrastudio avatar image
astrastudio asked

Limit MQTT update rate?

Since some updates ago, the MQTT message rate for the EM540 values changed drastically. The rate is almost 10 values/second. And because the EM540 has quite some readings, the message rate is approximately 100 values/second. That really generates some load at the other side of the MQTT broker and the connected home assistant, which tries to read those numerous updates.

So is there a way to only let the Cerbo send the current value of every topic every second or so?

cerbo gxMQTT
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

1 Answer
astrastudio avatar image
astrastudio answered ·

I just found N/cerbo-serial/grid/30/RefreshTime which defaults to 100 (msec)
I tried to set W/cerbo-serial/grid/30/RefreshTime to 1000 via MQTT publish on that topic, but it doesn't change the RefreshTime and has no effect on the update rate.

I digged a bit depper into the source code and found out that this value is readonly and static based on what meter is used.

Any other idea on how to limit the MQTT update rate?

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.