I just wonder if I need to shut off the scheduled by Rachio and just let Indigo control everything.
If you are happy with the Indigo scheduling systems, then that is what I would do. It will give you a lot more flexibility than the native Rachio app.
Set up some schedules in the Rachio app (zones, durations, etc), name them, but it doesn't matter what days you set them to. Then disable them in the app, so the Rachio box itself won't trigger them.
Now use Indigo, and the device action "run Rachio schedule" to run whichever schedule you want to use.
As I mentioned, here is the script I have been using to check against actual measured rainfall. I made a few tweaks to it tonight, so hopefully I haven't broken anything before posting it here. It tested fine after the changes.
The script compares rainfall from the last two days against a threshold variable in Indigo, and sets a skip variable to true or false. You can then make that skip variable a conditional on your Indigo sprinkler schedule.
Because I run my sprinklers in the early morning hours, if my "2 day" rain total only used yesterday and today, when calculated right before the irrigation run, it would really only be yesterday and a few early morning hours of today. For that reason, when the script is run between midnight and 5:01, it includes the day-before-yesterday in the two day total that is checked.
- Code: Select all
import datetime
rntody=indigo.devices[100065036].states["precip_today"] # sets rntody to State "precip_today" of "Wunderground Weather"
indigo.variable.updateValue(98247578, value=str(rntody)) #updates indigo variable todayRain
rnyest=indigo.variables[60524158].value # pulls the yestRain variable from indigo
rndbyest=indigo.variables[95874222].value # pulls the dbyestRain variable from indigo
####################
## if run b/w midnight and 5:01 AM, use day before yesterday in 2 day totals (along with today and yesterday)
## otherwise, only use today and yesterday in totals
####################
now = datetime.datetime.now()
time_1 = now.replace(hour=0, minute=0, second=0, microsecond=0)
time_2 = now.replace(hour=5, minute=1, second=0, microsecond=0)
if time_1 <= now <= time_2:
twdyrn=rntody+float(rnyest)+float(rndbyest) #adds day before yesterday, yesterdays and todays (early AM) rain
else:
twdyrn=rntody+float(rnyest) #adds yesterdays and todays rain
indigo.variable.updateValue(153828207, value=str(twdyrn)) # updates twoDayRain indigo variable
###############
### check two day rain against skip threshold
### update auto skip variable
###############
skpThresh=indigo.variables[24355217].value # "SprinkSkipThreshold"
if twdyrn>float(skpThresh):
indigo.variable.updateValue(65447061, value="true") # updates indigo skipSprinkleAuto variable to true
else:
indigo.variable.updateValue(65427061, value="false") # otherwise updates indigo skipSprinkleAuto variable to false
#############
## Updates an icon variable tied to a control page image
#############
iconpercent=twdyrn/float(skpThresh)
if 0.0<iconpercent<=0.34:
indigo.variable.updateValue(121644854, value="quarter") # updates indigo rainGaugeIcon variable to quarter
if 0.35<=iconpercent<=0.69:
indigo.variable.updateValue(12654854, value="half") # updates indigo rainGaugeIcon variable to half
if 0.70<=iconpercent<=0.99:
indigo.variable.updateValue(12164854, value="threequarter") # updates indigo rainGaugeIcon variable to threequarter
if 1.00<=iconpercent<=1.25:
indigo.variable.updateValue(16544854, value="over") # updates indigo rainGaugeIcon variable to over
if iconpercent>=1.26:
indigo.variable.updateValue(12144854, value="wayover") # updates indigo rainGaugeIcon variable to wayover
if twdyrn==0.0:
indigo.variable.updateValue(12144854, value="empty") # updates indigo rainGaugeIcon variable to empty
##################
### Updates a variable that shows rain chance if no rain recorded for today yet
##################
if rntody==0.0:
percentchance=int(indigo.devices[10035036].states["forePop1"]) # State "forePop1" of "Wunderground Weather"
indigo.variable.updateValue(17987895, value="("+str(percentchance)+"% chance)") # updates indigo percentChanceif0 to chance of rain today
else:
indigo.variable.updateValue(17995895, value=rntody+" in") # updates indigo percentChanceif0 to actual rain if measured rain today
There's likely more in there than you want, but I think it's documented well enough to strip out the unwanted parts. Most of the bottom part is to update some variables which are used in control page displays of the irrigation system.
To use it, you'll need to set up some variables in indigo for todayRain,YesterdayRain, and dayBeforeYesterdayRain, a skip threshold, and a boolean skip variable. You will need a WU device that reports daily rain. Of course if you use those control page display parts, you'll need those variables too (a rain gauge one, and a percentRainChance one).
In addition to running this script (either on a schedule or triggered on a change in daily rain), you need an action run just before midnight every day that replaces dayBeforeYesterday with Yesterday, and Yesterday with Today (use "set variable to variable" action).
I also have a button that allows the manual skipping of a scheduled watering, or can cancel a skip that otherwise would happen, but there is some fairly complex logic (about 8 conditional triggers) that govern that button, so unless you had a desire to implement that, I'll refrain from typing all of those out right now!
Here is the CP with it running, including the rain gauge icon...