GoveeBTTempLogger
GoveeBTTempLogger copied to clipboard
Define ganularity of logging
Hi.
It is great that you "save" the file only every X-Seconds to moderately "use" the SD-Card. Nevertheless it would be great to have an option to summarize the values to a given timeframe and only log that specific value. I am doing this currently with an SQLite Database, but collecting a lot of data to then eg. get it down to a minute base, would be more efficient to only log what I need. e.g. 1 Minute, Average of the temperature (mayb one digit rounded), average of humidity (rounded on one digit), Battery (Min-Value) here is my SQL Import I use for filtering it to minute base:
select strftime('%Y-%m-%d %H:%M:00',timestamp) as timestamp,'$LOCATION' as location,'$ID' as id,round(AVG(temp),2) as temp,round(AVG(humidity),2) as humidity,MIN(battery) as battery from import group by strftime('%Y-%m-%d %H:%M:00',timestamp)
My choice to save every incoming announcement is based on two items.
- Arriving announcements are not predictable. In some environments I've gone half an hour without receiving an announcement and then gotten several within a second.
- It's more important to me to not lose data and to not manipulate data. Based on that I didn't want to be choosing an averaging scheme which would be important if filtering the data. By logging all the data, it can be manipulated elsewhere, and the raw data is still available in case results are not as expected. My SVG graphing routines do some level of data averaging to get to the base 5 minute average of the daily graph.