Skip to content

Weather Underground Binding ​

This binding uses the Weather Underground service for providing weather information for any location worldwide.

The Weather Underground API is provided by The Weather Underground, LLC (WUL) free of charge, but there is a daily limit and a per-minute rate limit to the number of requests that can be made to the API for free (until 2018/12/31). WUL will monitor your daily usage of the API to determine if you have exceeded the free-use threshold by using an API key. You may exceed this threshold only if you are or become a fee-paying subscriber. By using this binding, you confirm that you agree with the Weather Underground API terms and conditions of use.

To use this binding, you first need to register and get your API key .

Supported Things ​

There are exactly two supported Thing types. The first one is the Bridge Thing, which represents the connection to the Weather Underground service through the API key. It has the ID bridge. The second one is the Weather Thing, which represents the weather information for an observed location. It has the ID weather. Each weather Thing uses a bridge Thing; it cannot be set online if no bridge Thing is defined.

Discovery ​

If a system location is set, "Local Weather" will be automatically discovered for this location.

If the system location is changed, the background discovery updates the configuration of "Local Weather" automatically.

If a bridge is correctly configured, the discovered Thing will automatically go online.

Binding Configuration ​

The binding has no configuration options; all configuration is done at the Thing and Channel levels.

Thing Configuration ​

The bridge only has one configuration parameter:

ParameterDescription
apikeyAPI key to access the Weather Underground service. Mandatory.

The Thing has a few configuration parameters:

ParameterDescription
locationLocation to be considered by the Weather Underground service. Mandatory.
languageLanguage to be used by the Weather Underground service. Optional, the default is to use the language from the system locale.
refreshRefresh interval in minutes. Optional, the default value is 30 minutes and the minimum value is 5 minutes.

For the location parameter, different syntaxes are possible:

SyntaxExample
US state/cityCA/San_Francisco
US zipcode60290
latitude,longitude37.8,-122.4
airport codeKJFK
PWS idpws:KCASANFR70

It can happen that the service is not able to determine the station to use, for example when you select as the location a city in which several stations are registered. In this case, the Thing configuration will fail because the service will not return the data expected by the binding. The best solution in this case is to use latitude and longitude; the service will automatically select a station based on this position.

For the language parameter, Weather Underground uses a special set of language codes that are different from the ISO 639-1 standard. For example, for German use DL, or for Swedish use SW. See the Weather Underground language support documentation for a detailed list.

Channels ​

The weather information that is retrieved is available as these channels:

Channel Group IDChannel IDItem TypeDescription
CurrentlocationStringWeather observation location
CurrentstationIdStringWeather station identifier
CurrentobservationTimeDateTimeObservation date and time
CurrentconditionsStringWeather conditions
CurrenttemperatureNumber:TemperatureTemperature
CurrentrelativeHumidityNumber:DimensionlessRelative humidity
CurrentwindDirectionStringWind direction (cardinal)
CurrentwindDirectionDegreesNumber:AngleWind direction as an angle
CurrentwindSpeedNumber:SpeedWind speed
CurrentwindGustNumber:SpeedWind gust
CurrentpressureNumber:PressurePressure
CurrentpressureTrendStringPressure trend ("up", "stable" or "down")
CurrentdewPointNumber:TemperatureDew Point temperature
CurrentheatIndexNumber:TemperatureHeat Index
CurrentwindChillNumber:TemperatureWind chill temperature
CurrentfeelingTemperatureNumber:TemperatureFeeling temperature
CurrentvisibilityNumber:LengthVisibility
CurrentsolarRadiationNumber:IntensitySolar radiation
CurrentUVIndexNumberUV index
CurrentprecipitationDayNumber:LengthRain fall during the day
CurrentprecipitationHourNumber:LengthRain fall during the last hour
CurrenticonImageIcon representing the weather current conditions
CurrenticonKeyStringKey used in the icon URL
forecastToday forecastTomorrow forecastDay2 ... forecastDay9forecastTimeDateTimeForecast date and time
forecastToday forecastTomorrow forecastDay2 ... forecastDay9conditionsStringWeather forecast conditions
forecastToday forecastTomorrow forecastDay2 ... forecastDay9minTemperatureNumber:TemperatureMinimum temperature
forecastToday forecastTomorrow forecastDay2 ... forecastDay9maxTemperatureNumber:TemperatureMaximum temperature
forecastToday forecastTomorrow forecastDay2 ... forecastDay9relativeHumidityNumber:DimensionlessRelative humidity
forecastToday forecastTomorrow forecastDay2 ... forecastDay9probaPrecipitationNumber:DimensionlessProbability of precipitation
forecastToday forecastTomorrow forecastDay2 ... forecastDay9precipitationDayNumber:LengthRainfall
forecastToday forecastTomorrow forecastDay2 ... forecastDay9snowNumber:LengthSnowfall
forecastToday forecastTomorrow forecastDay2 ... forecastDay9maxWindDirectionStringMaximum wind direction
forecastToday forecastTomorrow forecastDay2 ... forecastDay9maxWindDirectionDegreesNumber:AngleMaximum wind direction as an angle
forecastToday forecastTomorrow forecastDay2 ... forecastDay9maxWindSpeedNumber:SpeedMaximum wind speed
forecastToday forecastTomorrow forecastDay2 ... forecastDay9averageWindDirectionStringAverage wind direction
forecastToday forecastTomorrow forecastDay2 ... forecastDay9averageWindDirectionDegreesNumber:AngleAverage wind direction as an angle
forecastToday forecastTomorrow forecastDay2 ... forecastDay9averageWindSpeedNumber:SpeedAverage wind speed
forecastToday forecastTomorrow forecastDay2 ... forecastDay9iconImageIcon representing the weather forecast conditions
forecastToday forecastTomorrow forecastDay2 ... forecastDay9iconKeyStringKey used in the icon URL

Full Example ​

demo.things:

dsl
Bridge weatherunderground:bridge:api "API" [ apikey="XXXXXXXXXXXX" ] {
        Thing weather paris "Météo Paris" [ location="France/Paris", language="FR", refresh=15 ]
}

demo.items:

dsl
String Conditions "Conditions [%s]" {channel="weatherunderground:weather:api:paris:current#conditions"}
Image Icon "Icon" {channel="weatherunderground:weather:api:paris:current#icon"}
String IconKey "Icon key [%s]" {channel="weatherunderground:weather:api:paris:current#iconKey"}
DateTime ObservationTime "Observation time [%1$tH:%1$tM]" <clock>  {channel="weatherunderground:weather:api:paris:current#observationTime"}
String ObservationLocation "Location [%s]" {channel="weatherunderground:weather:api:paris:current#location"}
String Station "Station [%s]" {channel="weatherunderground:weather:api:paris:current#stationId"}

Number:Temperature Temperature "Current temperature [%.1f %unit%]" <temperature> {channel="weatherunderground:weather:api:paris:current#temperature"}
Number:Temperature FeelTemp "Feeling temperature [%.1f %unit%]" <temperature>  {channel="weatherunderground:weather:api:paris:current#feelingTemperature"}

Number:Dimensionless Humidity "Humidity [%d %%]" <humidity> {channel="weatherunderground:weather:api:paris:current#relativeHumidity"}
Number:Pressure Pressure "Pressure [%.0f %unit%]" {channel="weatherunderground:weather:api:paris:current#pressure"}
String PressureTrend "Pressure trend [%s]" {channel="weatherunderground:weather:api:paris:current#pressureTrend"}

Number:Length RainD "Rain [%.1f &unit%]" <rain> {channel="weatherunderground:weather:api:paris:current#precipitationDay"}
Number:Length RainH "Rain [%.1f %unit%/h]" <rain> {channel="weatherunderground:weather:api:paris:current#precipitationHour"}

String WindDirection "Wind direction [%s]" <wind> {channel="weatherunderground:weather:api:paris:current#windDirection"}
Number:Angle WindDirection2 "Wind direction [%.0f %unit%]" <wind>  {channel="weatherunderground:weather:api:paris:current#windDirectionDegrees"}
Number:Speed WindSpeed "Wind speed [%.1f %unit%]" <wind> {channel="weatherunderground:weather:api:paris:current#windSpeed"}
Number:Speed WindGust "Wind gust [%.1f %unit%]" <wind> {channel="weatherunderground:weather:api:paris:current#windGust"}

Number:Temperature DewPoint "Dew Point [%.1f %unit%]" <temperature>  {channel="weatherunderground:weather:api:paris:current#dewPoint"}
Number:Temperature HeatIndex "Heat Index [%.1f %unit%]" <temperature>  {channel="weatherunderground:weather:api:paris:current#heatIndex"}
Number:Temperature WindChill "Wind Chill [%.1f %unit%]" <temperature>  {channel="weatherunderground:weather:api:paris:current#windChill"}
Number:Length Visibility "Visibility [%.1f %unit%]" {channel="weatherunderground:weather:api:paris:current#visibility"}
Number:Intensity SolarRadiation "Solar Radiation [%.2f %unit%]"  {channel="weatherunderground:weather:api:paris:current#solarRadiation"}
Number UV "UV Index [%.1f]" {channel="weatherunderground:weather:api:paris:current#UVIndex"}

DateTime ForecastTime "Forecast time [%1$tH:%1$tM]" <clock>  {channel="weatherunderground:weather:api:paris:forecastToday#forecastTime"}
String ForecastCondition "Forecast conditions [%s]"  {channel="weatherunderground:weather:api:paris:forecastToday#conditions"}
Image ForecastIcon "Forecast icon"  {channel="weatherunderground:weather:api:paris:forecastToday#icon"}
String ForecastIconKey "Forecast icon key [%s]"  {channel="weatherunderground:weather:api:paris:forecastToday#iconKey"}
Number:Temperature ForecastTempMin "Forecast min temp [%.1f %unit%]" <temperature>  {channel="weatherunderground:weather:api:paris:forecastToday#minTemperature"}
Number:Temperature ForecastTempMax "Forecast max temp [%.1f %unit%]" <temperature>  {channel="weatherunderground:weather:api:paris:forecastToday#maxTemperature"}
Number:Dimensionless ForecastHumidity "Forecast Humidity [%d %unit%]" <humidity>  {channel="weatherunderground:weather:api:paris:forecastToday#relativeHumidity"}
Number:Dimensionless ForecastProbaPrecip "Proba precip [%d %unit%]" <rain>  {channel="weatherunderground:weather:api:paris:forecastToday#probaPrecipitation"}
Number:Length ForecastRain "Rain [%.1f %unit%]" <rain> {channel="weatherunderground:weather:api:paris:forecastToday#precipitationDay"}
Number:Length ForecastSnow "Snow [%.2f %unit%]" <rain> {channel="weatherunderground:weather:api:paris:forecastToday#snow"}
String ForecastMaxWindDirection "Max wind direction [%s]" <wind>  {channel="weatherunderground:weather:api:paris:forecastToday#maxWindDirection"}
Number:Angle ForecastMaxWindDirection2 "Max wind direction [%.0f %unit%]" <wind>  {channel="weatherunderground:weather:api:paris:forecastToday#maxWindDirectionDegrees"}
Number:Speed ForecastMaxWindSpeed "Max wind speed [%.1f %unit%]" <wind>  {channel="weatherunderground:weather:api:paris:forecastToday#maxWindSpeed"}
String ForecastAvgWindDirection "Avg wind direction [%s]" <wind>  {channel="weatherunderground:weather:api:paris:forecastToday#averageWindDirection"}
Number:Angle ForecastAvgWindDirection2 "Avg wind direction [%.0f %unit%]" <wind>  {channel="weatherunderground:weather:api:paris:forecastToday#averageWindDirectionDegrees"}
Number:Speed ForecastAvgWindSpeed "Avg wind speed [%.1f %unit%]" <wind>  {channel="weatherunderground:weather:api:paris:forecastToday#averageWindSpeed"}