degree days calculator

Requests for future functionality

Moderator: Mattk

Post Reply
kiofen
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: Fri Aug 15, 2008 9:21 am

degree days calculator

Post by kiofen »

heating degree days (or cooling) are very important to engineering and agriculture . for the seconds are basic tool . weather details are very important in agriculture and degree days is one of most used tools. i use the http://www.degreedays.net/ to take the degree days from my weather station ( need to upload them in weatherundergound first . but i think its very easy to have in from my meteohub direct. so please think about this ability in the future . thank you
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

Re: degree days calculator

Post by skyewright »

kiofen wrote:heating degree days (or cooling) are very important to engineering and agriculture . for the seconds are basic tool . weather details are very important in agriculture and degree days is one of most used tools. i use the http://www.degreedays.net/ to take the degree days from my weather station ( need to upload them in weatherundergound first . but i think its very easy to have in from my meteohub direct. so please think about this ability in the future . thank you
If you use Meteoplug with your Meteohub data, you might be interested in a chart I devised for degree days. I don't claim it to be perfect, but I found it useful for my own purposes. The chart definition is provided at the link shown below:

http://forum.meteoplug.com/viewtopic.php?f=9&t=57
kiofen
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: Fri Aug 15, 2008 9:21 am

Re: degree days calculator

Post by kiofen »

i use the linksys hardware .dont know if that counts . but i dont know nothing about code and thats the prob. the most easy that i can do is to add some code in a html page to retive the data from my plug :( and to post it in my webpage but in any case i thing its easy from the developer if the code is ready to add it. and i think there is interesting about and also opens new fields to use the meteohub
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

Re: degree days calculator

Post by skyewright »

kiofen wrote:i use the linksys hardware .dont know if that counts .
So far as I'm aware all Meteohubs can optionally upload data to the Meteoplug server.
See the "Meteoplug Server" section on the "Settings" page of your Meteohub web interface.

To use Meteoplug reporting and charting you need to subscribe (there is a free evaluation period in which you can assess the usefulness of the system to you). Nowadays I use Meteoplug charts and reports more often than I use 'native' Meteohub ones, even though the data is actually collected by a Meteohub!
User avatar
Hathor27
Expert Boarder
Expert Boarder
Posts: 126
Joined: Thu May 05, 2011 9:33 pm
Location: Switzerland
Contact:

Re: degree days calculator

Post by Hathor27 »

Hi there,

great thing with your degree days calculator :)

But: Is there no easy way to build up someting like that as virtual sensor or weatherstation-plugin?
Could anybody of the experienced users give a newcomer a lift?

Thanks in advance :wink:
Best Regards
Hathor27

------------------------------------------------------------
Image
http://untersiggenthal.meteodata.ch
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

Re: degree days calculator

Post by skyewright »

Hathor27 wrote:Hi there,
But: Is there no easy way to build up someting like that as virtual sensor or weatherstation-plugin?
It would be possible to have something that looked at the day's average temp just before midnight, calculated a degree day figure for the day, then wrote the value to a degree day "sensor". However:

a) The plug-in would need a very long Hold time for live data as it would only report once a day.

b) It would be relying on incomplete data (i.e. it runs before the end of the day & the daily average figure isn't always spot up to date anyway).

Alternatively would it be a valid & useful calculation if it ran more often and calculated, say, hourly degree day values? e.g. run once an hour and look at the last60m or hour1 data, so, say, an average temp of 14C in the last hour would contribute 0.0417 HDD15 (i.e. 1/24th of a HDD15). To report on degree days you'd use the sum of the hourly values. Would such a value make any sense? Maybe it would be more accurate than a daily version!
User avatar
Hathor27
Expert Boarder
Expert Boarder
Posts: 126
Joined: Thu May 05, 2011 9:33 pm
Location: Switzerland
Contact:

Re: degree days calculator

Post by Hathor27 »

skyewright wrote:To report on degree days you'd use the sum of the hourly values. Would such a value make any sense? Maybe it would be more accurate than a daily version!
It's winter time - so I'm back to this topic :wink:

I can build a degree number as a virtual sensor, such as a difference between the wanted indoor temperature and the actual outdoor temperature, if outdoor temperature is below 15°C. I used th0 and set t1 as

Code: Select all

awk '{if ($3<150) {printf "%d", 200-$3} else print "0"}'

That works brilliant - but how would I sum this value each hour (or each day) and log it in Meteohub? How can I build an integral of a logged value, like they can do with rain or evapotranspiration values?
Best Regards
Hathor27

------------------------------------------------------------
Image
http://untersiggenthal.meteodata.ch
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

Re: degree days calculator

Post by skyewright »

Hathor27 wrote:That works brilliant - but how would I sum this value each hour (or each day) and log it in Meteohub?
I think you'll find that "deltasum" is the graphing feature that you are looking for?
User avatar
Hathor27
Expert Boarder
Expert Boarder
Posts: 126
Joined: Thu May 05, 2011 9:33 pm
Location: Switzerland
Contact:

Re: degree days calculator

Post by Hathor27 »

skyewright wrote:I think you'll find that "deltasum" is the graphing feature that you are looking for?
Thank you skyewright. That's a good idea, but as I think it's the other way 'round.
I do not have a sum already - I only have actual values. I need somehow to build the integral (the sum) of

Code: Select all

[ mean(temperature over a certain timeslice) x timeslice ] + sum(before)
Any idea how I could build that? As virtual sensor?

How can I fetch historical data, such as mean(last hour) or mean(last day)?
Best Regards
Hathor27

------------------------------------------------------------
Image
http://untersiggenthal.meteodata.ch
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

Re: degree days calculator

Post by skyewright »

Hathor27 wrote:How can I fetch historical data, such as mean(last hour) or mean(last day)?
If you use "1 Hour" or "1 Day" buckets then the value for each bucket point will be the mean for that hour (or day).
Hathor27 wrote:How can I fetch historical data, such as mean(last hour) or mean(last day)?
For that sort of thing I use the html template system.

A plug-in can then call the template to get whatever values you have specified. In perl I use use LWP::UserAgent (I think I had to install that from CPAN myself), but I think wget could probably be used in a similar way?
User avatar
Hathor27
Expert Boarder
Expert Boarder
Posts: 126
Joined: Thu May 05, 2011 9:33 pm
Location: Switzerland
Contact:

Re: degree days calculator

Post by Hathor27 »

skyewright wrote:A plug-in can then call the template to get whatever values you have specified. In perl I use use LWP::UserAgent (I think I had to install that from CPAN myself), but I think wget could probably be used in a similar way?
Thx for your patience, skyewright - by now I got a clue:
  • I read the actual data on port 5558 (that's pretty fast),
  • add the new amount to the actual data
  • and write the sum as raw data to stdout (plug-in)
In case of performance levelling I use a php-script on an other machine doing string and data extracting and calculation. The plug-in just calls this script
Best Regards
Hathor27

------------------------------------------------------------
Image
http://untersiggenthal.meteodata.ch
Post Reply