Here is an example to evaluate Heating Degree Days (HDD) and Cooling Degree Days (CDD) using weather information base on the specific site.
Degree days are evaluates as the difference between the daily temperature mean and 65°F (18 °C). If the temperature mean is above 65°F, we subtract 65 from the mean and the result is Cooling Degree Days. If the temperature mean is below 65°F, we subtract the mean from 65 and the result is Heating Degree Days. , The daily temperature mean is calculated dividing by two the sum of high temperature and low temperature.
Firstly, the user will set the desired location using the Weather app, following this guide.
Then the user has to set into the DB Builder the weatherReference tag on the site to which the equip that will be the target of the logic belongs.
In the suggested refs he will find the locations previously set up in the Weather app.
Download the below program file and upload it into your project
Open the program into the Logic Builder, set the correct "programOn" and binding the variables based on your specific project. The logic looks like the image below:
N.B.
HDD and CDD in this example have been evaluated based on the today max temperature and today min temperature. The user can change this input replacing the blocks about weatherInfo into the logic.
Reference for HDD and CDD into the logic example is °F. If the user has temperatures given in °C, he has just to replace the value 65 in the "cmpG