Open danube opened 1 year ago
Do you refer to MQTT or REST?
Since interval
never changes after it got configured, its kind of a waste of resources to provide it in every round.
interval
is already available in another MQTT topic!
Indeed that seems not to be available as of now.
For various calculations, i.e. a daily throughput, one can multiply watermeter/main/json/rate
with the interval. As this interval is not provided, it needs to be hardcoded in the application. Changing the interval on the ESP results in the need to adapt the application as well. This would not be necessary if having both values provided by the ESP.
But of course you're right and if CPU load exceeds a specific limit by extend the publishing code, it may make sense to reconsider this.
Regarding MQTT, you're right, interval is available in another topic watermeter/interval
. But to perform above mentioned calculation, a subscription upon two topics instead of one is required. That may trigger your application twice, if the subscribed topics do not change at exactly the same time.
The Feature
main/changeabsolut
within themain/json
object would make it easier to create simple calculations.interval
within themain/json
object would allow to multiply it with the already availablemain/json/rate
data to also get the absolute change since last flow.