My openHab Setup

Just for an example for those who do have a weather station close enough.

Switch vIsCloudy "Cloud Conditions" <iscloudy> (gChart)

iscloudy is a custom icon I downloaded. gChart makes this Item be persisted for charting. See Design Pattern: Group Based Persistence.

I’ll not show the Weather Items but you can find them all here: Comprehensive Wunderground using HTTP Binding Example

rule "Is it cloudy outside?"
when
        Item vWeather_Conditions changed
then
        logInfo(logName, "New weather conditions: " + vWeather_Conditions.state.toString)

        val isCloudy = transform("MAP", "weather.map", vWeather_Conditions.state.toString)
        val newState = if(isCloudy === null || isCloudy == "false") OFF else ON

        if(newState != vIsCloudy.state) logInfo(logName, "Setting isCloudy to " + newState.toString)

        vIsCloudy.postUpdate(newState)
end

weather.map has a mapping from all the conditions that Wunderground supports to true or false to indicate whether the condition indicates it is cloudy.

# Cloudy or not
Light\ Drizzle=true
Heavy\ Drizzle=true
Drizzle=true

Light\ Rain=true
Heavy\ Rain=true
Rain=true

Light\ Snow=true
Heavy\ Snow=true
Snow=true

Light\ Snow\ Grains=true
Heavy\ Snow\ Grains=true
Snow\ Grains=true

Light\ Ice\ Crystals=true
Heavy\ Ice\ Crystals=true
Ice\ Crystals=true

Light\ Ice\ Pellets=true
Heavy\ Ice\ Pellets=true
Ice\ Pellets=true

Light\ Hail=true
Heavy\ Hail=true
Hail=true

Light\ Mist=true
Heavy\ Mist=true
Mist=true

Light\ Fog=true
Heavy\ Fog=true
Fog=true

Light\ Fog\ Patches=true
Heavy\ Fog\ Patches=true
Fog\ Patches=true

Light\ Smoke=false
Heavy\ Smoke=true
Smoke=true

Light\ Volcanic\ Ash=false
Heavy\ Volcanic\ Ash=true
Volcanic\ Ash=true

Light\ Widespread\ Dust=false
Heavy\ Widespread\ Dust=true
Widespread\ Dust=true

Light\ Sand=false
Heavy\ Sand=true
Sand=true

Light\ Haze=false
Heavy\ Haze=true
Haze=false

Light\ Spray=false
Heavy\ Spray=false
Spray=false

Light\ Dust\ Whirls=false
Heavy\ Dust\ Whirls=true
Dust\ Whirls=false

Light\ Sandstorm=false
Heavy\ Sandstorm=true
Sandstorm=true

Light\ Low\ Drifting\ Snow=true
Heavy\ Low\ Drifting\ Snow=true
Low\ Drifting\ Snow= true

Light\ Low\ Drifting\ Widespread\ Dust=true
Heavy\ Low\ Drifting\ Widespread\ Dust=true
Low\ Drifting\ Widespread\ Dust=true

Light\ Low\ Drifting\ Sand=true
Heavy\ Low\ Drifting\ Sand=true
Low\ Drifting\ Sand=true

Light\ Blowing\ Snow=true
Heavy\ Blowing\ Snow=true
Blowing\ Snow=true

Light\ Blowing\ Widespread\ Dust=true
Heavy\ Blowing\ Widespread\ Dust=true
Blowing\ Widespread\ Dust=true

Light\ Blowing\ Sand=true
Heavy\ Blowing\ Sand=true
Blowing\ Sand=true

Light\ Rain\ Mist=true
Heavy\ Rain\ Mist=true
Rain\ Mist=true

Light\ Rain\ Showers=true
Heavy\ Rain\ Showers=true
Rain\ Showers=true

Light\ Snow\ Showers=true
Heavy\ Snow\ Showers=true
Snow\ Showers=true

Light\ Snow\ Blowing\ Snow\ Mist=true
Heavy\ Snow\ Blowing\ Snow\ Mist=true
Snow\ Blowing\ Snow\ Mist=true

Light\ Ice\ Pellet\ Showers=true
Heavy\ Ice\ Pellet\ Showers=true
Ice\ Pellet\ Showers=true

Light\ Hail\ Showers=true
Heavy\ Hail\ Showers=true
Hail\ Showers=true

Light\ Small\ Hail\ Showers=true
Heavy\ Small\ Hail\ Showers=true
Small\ Hail\ Showers=true

Light\ Thunderstorm=true
Heavy\ Thunderstorm=true
Thunderstorm=true

Light\ Thunderstorms\ and\ Rain=true
Heavy\ Thunderstorms\ and\ Rain=true
Thunderstorms\ and\ Rain=true

Light\ Thunderstorms\ and\ Snow=true
Heavy\ Thunderstorms\ and\ Snow=true
Thunderstorms\ and\ Snow=true

Light\ Thunderstorms\ and\ Ice\ Pellets=true
Heavy\ Thunderstorms\ and\ Ice\ Pellets=true
Thunderstorms\ and\ Ice\ Pellets=true

Light\ Thunderstorms\ with\ Hail=true
Heavy\ Thunderstorms\ with\ Hail=true
Thunderstorms\ with\ Hail=true

Light\ Thunderstorms\ with\ Small\ Hail=true
Heavy\ Thunderstorms\ with\ Small\ Hail=true
Thunderstorms\ with\ Small\ Hail=true

Light\ Freezing\ Drizzle=true
Heavy\ Freezing\ Drizzle=true
Freezing\ Drizzle=true

Light\ Freezing\ Rain=true
Heavy\ Freezing\ Rain=true
Freezing\ Rain=true

Light\ Freezing\ Fog=true
Heavy\ Freezing\ Fog=true
Freezing\ Fog=true

Patches\ of\ Fog=true
Shallow\ Fog=true
Partial\ Fog=true
Overcast=true
Clear=false
Partly\ Cloudy=true
Mostly\ Cloudy=true
Scattered\ Clouds=false
Small\ Hail=true
Squalls=true
Funnel\ Cloud=true
Unknown\ Precipitation=true
Unknown=false
2 Likes