Is it possible to have condition like "If weather is cloudy then offset -30 minutes else offset 0 minutes"


#41

ah, man :sunny: . Does WU publish a list of all possible conditions?
I said “clear” because I checked the value yesterday when the weather here was sunny (and clear), it returned “clear” not ‘sunny’… But who knows what value they may throw in there.


#42

Ta da. You can use a regular expression as the second argument to the matches function. If not sure what a regular expression is, this example is easy enough to follow for this simple case… just be careful if you’re matching anything with “special characters” :slight_smile:

matches('it is cloudy', '/cloudy|rain|overcast/')

#43

I did some more digging on this…

Within the Smartthings App, you can download ‘AccuWeather Connect’ that shows up as a ‘Thing’ and device in webCoRE. I noticed there’s an attribute called ‘cloudCover’ that updates itself.

I think what is trying to be accomplished here is that if there’s ‘X’ cloudcover, turn on the lights. I mean if you’re in Hawaii, it could be raining and sunny out.

Doing a quick google search, it describes cloud cover that better helped me decide what percent to use: http://www.theweatherprediction.com/habyhints/189/

I liked the initial idea when I read this thread, however there were too many obstacles I found (like others have mentioned) and found this as a possible alternate solution in case anyone is interested.


#44

That’s good information. I installed AccuWeather Connect and it works good… Pretty easy to evaluate cloudCover, it gives me a 0-100 scale. I was able to access the current value using [AccuWeather : cloudCover]

Thanks!


#45

Not in England :beers: :rainbow:


#46

You got that right!!!


#47

I have the oh so pleasure of going to the wonderful world of Bracknell a couple times a year for work … Somehow the sun was always out “for a couple days” the week before I arrive … but never while there LOL


#48

This is the most complete list I have been able to gather up when querying WUnderground.

weather.conditions.current_observation.weather

Current Condition Phrases

Some conditions can be Light, Heavy or normal, which has no classifier. For example, Light Drizzle, Heavy Drizzle, and Drizzle are all possible conditions.

[Light/Heavy] Drizzle
[Light/Heavy] Rain
[Light/Heavy] Snow
[Light/Heavy] Snow Grains
[Light/Heavy] Ice Crystals
[Light/Heavy] Ice Pellets
[Light/Heavy] Hail
[Light/Heavy] Mist
[Light/Heavy] Fog
[Light/Heavy] Fog Patches
[Light/Heavy] Smoke
[Light/Heavy] Volcanic Ash
[Light/Heavy] Widespread Dust
[Light/Heavy] Sand
[Light/Heavy] Haze
[Light/Heavy] Spray
[Light/Heavy] Dust Whirls
[Light/Heavy] Sandstorm
[Light/Heavy] Low Drifting Snow
[Light/Heavy] Low Drifting Widespread Dust
[Light/Heavy] Low Drifting Sand
[Light/Heavy] Blowing Snow
[Light/Heavy] Blowing Widespread Dust
[Light/Heavy] Blowing Sand
[Light/Heavy] Rain Mist
[Light/Heavy] Rain Showers
[Light/Heavy] Snow Showers
[Light/Heavy] Snow Blowing Snow Mist
[Light/Heavy] Ice Pellet Showers
[Light/Heavy] Hail Showers
[Light/Heavy] Small Hail Showers
[Light/Heavy] Thunderstorm
[Light/Heavy] Thunderstorms and Rain
[Light/Heavy] Thunderstorms and Snow
[Light/Heavy] Thunderstorms and Ice Pellets
[Light/Heavy] Thunderstorms with Hail
[Light/Heavy] Thunderstorms with Small Hail
[Light/Heavy] Freezing Drizzle
[Light/Heavy] Freezing Rain
[Light/Heavy] Freezing Fog
Patches of Fog
Shallow Fog
Partial Fog
Overcast
Clear
Partly Cloudy
Mostly Cloudy
Scattered Clouds
Small Hail
Squalls
Funnel Cloud
Unknown Precipitation
Unknown

Using the weather feature
#49

Don’t know if it helps at all, but I’ve got this going on using the weather device in ST. It’s been a while since I added that so I don’t quite remember.


#50

@allrak - can you share your cloud coverage piston? I have the Accuweather Smartapp installed but can’t get my piston to fire.


#51

Mine runs on a timer every 10 minutes:
temp

It writes to a fuel stream, as well as a global variable which is used in a few other pistons.

…and it draws a tile:
d0448b14ecacb1005aea30078f06ece6452d2955

Using this code:
temp

(The 71 in the hover text is WUndergrounds Cloud Coverage… Often quite different, but usually more accurate for my location)


#52

Here is a visual comparison of Cloud Coverage when comparing
WUnderground (blue) and AccuWeather (red)

The code I used for WUnderground is actually a forecast for this hour:
temp
(but you can see it changes almost every ten minutes)


#53

Gimme a few days. On vaca be home soon.


#54

Here’s one that uses cloud cover to turn on my deck lighting. You can ignore the “test” variable in the piston.