The new rain day count is an awesome addition to the platform...I had been using a work around using meteoplug, a text file, and a php script to get the data needed. Anyhow, I was wondering if there is a way to implement the count function to get information related to other fields like temperature (using the same workaround to get the temp info now)
For instance, count the number of days that the monthly max temperature exceeded a certain temperature:
All sensors hold data for average value, min value and max value in all time buckets (min, hour, day, month, year). To represent the day counter without blowing up the complete data format for all sensors I use the min value field which is not used in context of cumul sensors like rain totals. Using this previously unused data field has the plus that is does work for templates and for charts, exports, etc. This trick does not work for traditional scalar data like temperature, where min/max/avg values do have a meaning and are already used.
Furthermore, a user defined criteria like temp > 70°F can only been applied on request when reading data from the database. This contradicts the overall design of the data processing which does not run through all the hours and days when asking for a value of the year but relies on precomputed aggregation. This is needed to cope with processing limitations and storage speed limitations. You don't have a PC that can run brute force through all the data and computes in large extend when data being retrieved.