I have a number of events that behave differently on days that it's raining and after some recent changes, I'm trying to get this funtionality back again.
I'd been previously using WeatherPLUG with HS1.7. WeatherPLUG updates virtual devices with lots of weather info including the amount of rain that has fallen "Rain Today". This made it simple to use in scripts.
Example:
Dim Rain
Rain = hs.DeviceValue("w25")
if Rain =0 then
hs.writelog "Weather","No rain today"
elseif Rain >0 then
hs.writelog "Weather","RAINING TODAY"
end if
I'm moving over to HS2 and have switched from WeatherPLUG to the WeatherXLM plug-in for weather info. I've done this for two reasons... the WeatherPLUG plug-in is experiencing some issues with HS2 when pulling data from stations that aren't 100% reliable. The area where I live only has a single station (which is unreliable) with the nearest backup around 25mi away. The local station doesn't provide any "rain" info either, so I was pulling this from the station 25mi away and it was often not very accurate because of the distance.
WeatherXML provides nice looking info on the Web Interface, but with all the additional icons and text, it's difficult to use this info in scripts (ie. is it warmer than 75 degrees outside?, is it raining?).
I was able to modify the weathercom_xml.txt script that came with the plug-in to populate a second set of hidden virtual devices that only contain the raw data. This seems to work well as I now have a virtual device that contains only "57" for the temp instead of "Santa Barbara, CA 57 F Which feels like 57 F click thermometer icon to go to weather.com" with the icon.
THANKS IF YOU'RE STILL WITH ME!
Back to "is it raining". WeatherXLM pulls data from weather.com which in my case seems to provide much better real-time feedback to rain conditions than I could get using WeatherPLUG. However, it provides it in the "condition" field which can be many things such as:
I know lots of others are using this plug-in, has anyone else already tackled this?
Any advice on how to create a more elegant script to check for rain would be greatly appreciated...
Cheers,
Paul
I'd been previously using WeatherPLUG with HS1.7. WeatherPLUG updates virtual devices with lots of weather info including the amount of rain that has fallen "Rain Today". This made it simple to use in scripts.
Example:
Dim Rain
Rain = hs.DeviceValue("w25")
if Rain =0 then
hs.writelog "Weather","No rain today"
elseif Rain >0 then
hs.writelog "Weather","RAINING TODAY"
end if
I'm moving over to HS2 and have switched from WeatherPLUG to the WeatherXLM plug-in for weather info. I've done this for two reasons... the WeatherPLUG plug-in is experiencing some issues with HS2 when pulling data from stations that aren't 100% reliable. The area where I live only has a single station (which is unreliable) with the nearest backup around 25mi away. The local station doesn't provide any "rain" info either, so I was pulling this from the station 25mi away and it was often not very accurate because of the distance.
WeatherXML provides nice looking info on the Web Interface, but with all the additional icons and text, it's difficult to use this info in scripts (ie. is it warmer than 75 degrees outside?, is it raining?).
I was able to modify the weathercom_xml.txt script that came with the plug-in to populate a second set of hidden virtual devices that only contain the raw data. This seems to work well as I now have a virtual device that contains only "57" for the temp instead of "Santa Barbara, CA 57 F Which feels like 57 F click thermometer icon to go to weather.com" with the icon.
THANKS IF YOU'RE STILL WITH ME!
Back to "is it raining". WeatherXLM pulls data from weather.com which in my case seems to provide much better real-time feedback to rain conditions than I could get using WeatherPLUG. However, it provides it in the "condition" field which can be many things such as:
- Sunny
- Fair
- Cloudy
- Mostly Cloudy
- Rain
- Light Rain
- Heavy Rain
- Rain and Windy
I know lots of others are using this plug-in, has anyone else already tackled this?
Any advice on how to create a more elegant script to check for rain would be greatly appreciated...
Cheers,
Paul
Comment