I have a sensor that is logging values every 5 minutes. this sensor widely fluctuates during each day but it should be relatively steady day over day for the same time period, ie. the sensor reads very different at 8 in the morning and at 7 at night but it is relatively steady for 8 in the morning day over day.
I’d like to make a sensor/template that aggregates the last 7-14 days worth of data for each hour and puts out the average/mean for every hour period.
So what I want is a 7-14 day trend throughout the day as I’m trying to see if the current day is trending lower than what the previous 7 day trend was for any given hour so I can make adjustment (trigger something else) accordingly.
Context: I have a pH and ORP sensor on my pool and while I’m auto feeding chemicals to keep the pH from climbing and enough liquid chlorine to keep the ORP reading steady, the temperature/UV changes over the days and it impacts the efficacy of the chemicals therefore I would need to adjust my auto feeder to put in more or less chemicals for any given day. Additionally the liquid chlorine strength is not constant ie. some batches are stronger than others so while I may put in the same amount volumetrically (I am using a stenner pump) it may not be the same chemically.