So here is what I did:
I modified the plugin (Attached) to report on Rain Sensor Status from OpenSprinkler. It reports as “Rain” or “NoRain”.
I have a program defined on the Sprinkler to run every other day for my various zones. If the OpenSprinkler is set to “Auto” then this program runs.
Every day at 4am, I run the following Luup code in a scene:
[code]–Run at 4am
–Check Rain Sensor and Check Forecasted Precipitation
–If Rain Sensor set to Rain then disable sprinklers
–If Forecasted Precip > 1 then disable the sprinklers
–Else Enable Sprinkler
if luup.variable_get(“urn:fowler-cc:serviceId:OpenSprinkler1”, “RainSensorStatus”, 187) == “Rain” then
–Rain sensed; disable the sprinkler
luup.call_action(“urn:fowler-cc:serviceId:OpenSprinkler1”,“SetModeTarget”,{NewModeTarget=“Off”},187)
luup.call_action(“urn:richardgreen:serviceId:VeraAlert1”, “SendAlert”, {Message = “Irrigation Stopped due to rain detected by outdoor sensor”, Recipients = “Insert Email Address”}, 85)
elseif luup.variable_get(“urn:upnp-org:serviceId:VRainSensor”,“ForecastedPrecip”, 180) > “1” then
luup.call_action(“urn:fowler-cc:serviceId:OpenSprinkler1”,“SetModeTarget”,{NewModeTarget=“Off”},187)
luup.call_action(“urn:richardgreen:serviceId:VeraAlert1”, “SendAlert”, {Message = “Irrigation Stopped due to forecasted rain”, Recipients = “Insert Email Address”}, 85)
else luup.call_action(“urn:fowler-cc:serviceId:OpenSprinkler1”,“SetModeTarget”,{NewModeTarget=“Auto”},187)
luup.call_action(“urn:richardgreen:serviceId:VeraAlert1”, “SendAlert”, {Message = “Irrigation Enabled by Vera”, Recipients = “Insert Email Address”}, 85)
end[/code]
This Script uses the Virtual Rain Sensor for rain forecase and Vera Alert (to send me email logs) and of course the wired sensor on my Sprinkler system.
Separately, I have a PLEG that turns the sprinkler off If I have a zone run longer than 17 minutes (i.e. if I turn it on manually and forget to turn it off).
The only problem I have is this line: elseif luup.variable_get(“urn:upnp-org:serviceId:VRainSensor”,“ForecastedPrecip”, 180) > “1” then
It works if I have it set to “1” but not “.25” which is what I’d like…