Smart Weather Triggering Piston Help


#1

Does anyone use the smart Weather device to trigger events in webCoRE? I’m wondering how I can use weather conditions as rules so for example if it’s sunny it’s close blinds, rain might send me a notification if my windows are open, etc. the issue I’m having is often times I see some options for devices that I’m not sure which one to choose and then if there’s no list of preset values for that option I’ve got no idea what I can use as the value.

For starters I’d like to create a simple rule for when the weather changes to rain. There’s the option of water which has preset values of dry and wet, but then there’s the option of weather which has no preset values so I’ve tried typing in rain, but not sure if rain is an accepted value.

As a side note, what does the pentagon mean in front of the options for things such as status?


#2

You should just use the built in weather underground integration.

https://wiki.webcore.co/Weather

The symbol by an attribute tells you those are custom attributes specified in the device handler… not regular attributes like switch, motion, Presence, button etc.


#3

Note that webCoRE does not subscribe to weather events, so you need to set a timer to check periodically.

Example:

every 5 minutes
IF
contains($weather.conditions.current_observation.weather , “rain”) IS true
THEN
do stuff for rain time :umbrella:
ELSE
do stuff for not raining time :sunny:


#4

So does that mean I can go into device handler code and find out what values are available for that attribute? Or is that just wishful thinking?


#5

Not really that simple from the DTH… especially one that is pulling data from external sources.

Best way to check the current value of an attribute is to open a new IF statement, choose ‘variable’ instead of ‘physical device’ and then type the following:

([device name : attribute name])

The expression will be evaluated in real time and you will see the current attribute value displayed.

device name and attribute name are case sensitive btw

examples:

([Weather Station : water])

([Weather Station : weather])


#6

@Robin once again you’ve proven to be invaluable! I’d never thought of using that to find those values and that’ll help me quite a bit in the future. Thanks!