Page 1 of 1

High/Low daily temperature range

Posted: Wed 26 Aug 2015 1:36 am
by Alan
Hello,
On my web page I have successfully exhibited the end point values of the current day's temperature range (example, 10.3°C to 12.8°C). That was easy enough to do by simply returning the min and max temps of the current day.

However, I would like to be able to do the same with both the yearly and all time daily High/low temperature ranges. Unfortunately, I have been unsuccessful in all my attempts and have reached the end of my tether.

So I am hoping that somebody has already found an answer to this and is willing to help out.

Any help is greatly appreciated.

Thanks in advance, Alan

Re: High/Low daily temperature range

Posted: Wed 26 Aug 2015 7:13 am
by steve
The web tags are for the all-time values are <#HighDailyTempRange> and <#LowDailyTempRange>

If by 'yearly', you mean this year's, the web tags are <#YearHighDailyTempRange> and <#YearLowDailyTempRange>

If you mean that you want to display each year's high and low, Cumulus doesn't supply that figure directly, so you would have to devise some method of saving or extracting the values, e.g. by using an SQL database, or by reading a copy of dayfile.txt. Is that what you're trying to do?

Re: High/Low daily temperature range

Posted: Thu 27 Aug 2015 2:02 pm
by Alan
Thank you for your response.
In my original post I used the term 'yearly' because that is what is used in web tags list in wiki. But in reality of course I am referring to 'this year' as indeed is the wiki list.
So, I will try again and attempt to be more communicative.
In essence, all that I am seeking is a little bit more information as an addition to the returned value of High/Low Daily Temp Range for both 'this year' and 'all time'.
In other words, what I am trying to display is the upper and lower temperature readings that constitute the 'temperature range' for each of the following:
<#YearHighDailyTempRange> High Daily Temp Range ... (in here following on from the actual returned temp range and separate from, would be, as an example, '10.3°C to 12.8°C')
< #YearLowDailyTempRange> Low Daily Temp Range
<#LowDailyTempRange> All time low daily temperature range
<#HighDailyTempRange> All time High daily temperature range
As I said in the original post, achieving these upper and lower readings for the current day is very simple. However, for 'this year' and 'all time' is an entirely different matter.
I do hope that I have expressed myself in a clearer fashion this time round. Please bare with me on this one.
Alan

Re: High/Low daily temperature range

Posted: Thu 27 Aug 2015 2:29 pm
by steve
Right, I understand. Unfortunately, Cumulus does not separately store the two temperatures which constitute the high and low ranges (but I can now see that would be a useful addition), so you would need a mechanism for looking up the high and low values for the date in question, either by looking in dayfile.txt or (better) in a database containing the dayfile.txt values - but this is presumably not helpful to you as you already know this.

There is information in the wiki about putting dayfile.txt into a database, so this may be of some use to you. I can't really help any more than that, sorry. I'm about to go off for a few days, but hopefully someone else will be able to offer some useful help.