Weatherdata

From bab-tec.de wiki

Jump to: navigation, search

Contents

Yahoo Weather (Firmware 3.1.0 and later)

weather.yahooapis.com/forecastrss?u=c&w=[WOEID]

The unique WOEID can be generated at http://woeid.rosselliot.co.nz.

Regular expression:

 <yweather:condition.*temp="(.*)"*/>

Flags: Multiline, Ungreedy

Temperature Output 1: EIS 5 / ASCII - Floating Point

Wunderground.com (Firmware 3.1.0 and later)

The town or post code can be entered on the start page: http://www.wunderground.com. When committing the input, a page with the current weather data opens. On the right side next to the title, there is an RSS icon. Simply right-click on this icon and select 'Copy URL' from the context menu:

rss.wunderground.com/auto/rss_full/global/stations/[Station-ID].xml?units=metric

Regular Expression:

 <title>Current Conditions : (.*)C, .*</title>

Flags: Multiline

Temperature Output 1: EIS 5 / ASCII - Floating Point

openweathermap.org

Find URL

First select the weather station on http://openweathermap.org.

Select Station

Then select and copy the city-id.

Copy City ID

This city id must be placed into the following url. This url can be opend with the internet browser. URL: api.openweathermap.org/data/2.5/weather?id=[CITY-ID]

Test Weather Station

If there is an 'Internal Server Error' the selected weather station does not serve the neccessary data and you will have to select a different one.

Configure HTTP Request

Now create a HTTP Request job with the following parameters:

HTTP Request Configuration Top
HTTP Request Configuration Bottom

This is the regular expression for the temperature and humidity of the weatherdata:

 "temp":(.*?),.*?"humidity":(.*?),

Flags: none

Temperature Output 1: EIS 5 / ASCII - Floating Point

Humidity Output 2: EIS 6 / ASCII - Unsigned long decimal

Calculation: Kelvin to Celsius

The temperatures are given in kelvin. In order to calculate it into Celsius the "offset" function of the visualisation element is used: (Offset = -273.15)

Calculating Celsius

Or it is done with the help of the math-job, if the value is needed not only for the visualisation:

Calculating Celsius

Test in the visualisation

Using the visualisation you can now test the jobs and display all values using the group addresses entered in the job configuration:

Visualisation Test

In order to get the timestamp of the request the triggering telegram of the http-request is linked to the "telegramtime" element of the visualisation. This is always showing you the last timestamp of the corresponding group address.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox