Hi, I'm struggling to find a suitable node to calculate the average daily temperature coming from one single external sensor. This value has to be stored in influxdb each day at midnight together with home energy consumptions.
I tried both "Aggregator" and "Average", but for different reasons they are not suitable:
- Aggregator outputs its value only after the time span that in my case should be "daily (see configuration) , but I would like to have it in pseudo-real time so the user can see how it fluctuates along the day. Basically you see at 00:01 of a new day the average temperature of the day before and its value remains static until midnight! At least for me it's useless.
- Average: it works only with multiple sources with different topic, but I have one sensor only with one fixed topic. It looks buggy too, it works only with the first messages and then it displays the same value permanently no matter which new topics with different values you inject.
Is there a node that performs the average value coming from one single source (single topic) and displays it "in near real time" from its output and can be programmatically reset at 00:00?
Or should I calculate it with a function node? In this case can somebody provide a working example node?
Many thanks in advance