Rachio Irrigation Rain Delay

Posted on
Sat Aug 06, 2016 7:48 am
Bollar offline
Posts: 528
Joined: Aug 11, 2013

Rachio Irrigation Rain Delay

This isn't plug-and-play (you will need to establish a Rachio API key and discover your device's Device & Person ID), but here's a script that adds a one-day rain delay to the Rachio irrigation controller. I have this set as an Action Group that is called by a trigger when my weather station reports 1/4 inch of rainfall.

Sorry for using "requests" but I found it much easier than using the modules that come with Indigo.

Code: Select all
import requests

key = 'Bearer ' + (indigo.variables['rachioAPIKey'].value)
deviceID = (indigo.variables['rachioAPIDeviceID'].value)
personID = (indigo.variables['rachioAPIPersonID'].value)

post_url = 'https://api.rach.io/1/public/device/rain_delay'

head = {
'Content-Type' : 'application/json',
'Authorization' : key
}

payload = {
'id' : deviceID,
'duration' : 86400
}

r = requests.put(post_url, json=payload, headers=head)

if str(r.status_code) == '204':
   indigo.server.log('Rachio Rain Delay Successful')
   indigo.variable.updateValue('rachioRainDelayNotification', value=str('true'))


Here's the complete Rachio API: https://rachio.readme.io/v1.0/docs

Insteon / Z-Wave / Bryant Evolution Connex /Tesla / Roomba / Elk M1 / SiteSage / Enphase Enlighten / NOAA Alerts

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests