So, I have a few irrigation scenes that can be cancelled because of the following:
a) If my Water Saver virtual Switch is ON
b) if the Wunderground weather app is reporting rain, drizzle or Tstorm
c) if it is Summer (rainy Season), as I have stored in Variable Container
Can anyone tell me if I can Log or record whether it was the Water Saver, the Weather or the Season that cancelled the scene?
I have the device reporting when it starts my EtherRain 8 controller, but if it does not trigger the device, I’d kinda like to know why.
code below:
–test to check for rain
local rain_status = luup.variable_get(“urn:upnp-micasaverde-com:serviceId:Weather1”, “ConditionGroup”, 89)
–Check Water Saver Switch
local SaverStatus = luup.variable_get(“urn:upnp-org:serviceId:VSwitch1”, “Status”, 127)
–Check to see if the Season is Summer
local CurrentSeason = luup.variable_get(“urn:upnp-org:serviceId:VContainer1”,“Variable5”, 129)
if (SaverStatus == “1”)
or CurrentSeason == “Summer”
or string.find(rain_status,“Tstorm”)
or string.find(rain_status,“drizzle”)
or string.find(rain_status,“rain”)
then
return false
else
return true
end