Need urgent API help for a beginner!


#1

Hello,

My use case is I have a wildfire approaching my home in 2 - 3 days. I have a Rachio setup and controllable via the app. I have 8 sprinkler valve controllers up and working. I need to write a script that will cycle continuously through the 8 zones and run them for 2 mins then repeat the cycle. I have some basic API questions as I get stated:

  1. How do I find the unique zone IDs for each of zones? Seems like all the API calls need an auth token which I have plus the Device/Zone IDs

  2. Does anyone have example of doing these API calls via PowerShell? Or another way on Windows?

  3. Does anyonehave some simple examples of anything like this?

Thx!!!


#2

@ziembd

Well that’s certainly an interesting use case.

IFTTT might be easier to set this up. Maybe create a schedule and have a recipe using Google calendar that runs it every N minutes?

Hope everything turns out OK.

Documentation:
https://support.rachio.com/hc/en-us/articles/115010541968-What-s-an-IFTTT-Recipe-

Sample Recipes:

:cheers:


#3

Thx, IFTT doesn’t let me get granular enough and I’d also need to set up hundreds of calendar events. With the API I just need to know how to determine my Zone IDs then write a script to loop through them.


#4

Hi David, hope all will turn out well.

You can get your zone information here via API described here: https://rachio.readme.io/docs/deviceid
Than you can feed unique zone ID(s) into start command here: https://rachio.readme.io/docs/zonestart
Or you can do all of the zones at the same time here: https://rachio.readme.io/docs/publiczonestart_multiple

Fingers crossed your network connectivity (internet) will not go down because these will only allow you to schedule up to one cycle at a time.

Look for “example usage” which starts with “curl”. curl is a program allowing network interaction and can be downloaded for windows here: https://curl.haxx.se/download.html which will allow you to use api via cli / powershell / batch file.

Examples are actual curl commands which can be used as is (just with your info instead of examples) within the command line.

Good luck,
Gene


#5

Thanks Gene, Where I am stuck is where do I find my devices unique ID? All the examples require that as a starting point. I don’t see such an ID in the app or on the device itself. Do you know where to find that? THx


#6

Ah, sorry.

You will need your API key which you can obtain via http://app.rach.io
You can find your person ID here: https://rachio.readme.io/docs/publicpersoninfo

It will return a JSON encoded string with id containing your personal identifier associated with the account from which you got your API key.

Finally you can get id(s) of every device on your account here: https://rachio.readme.io/docs/publicpersonid
It will return a JSON encoded data stream which you can plugin here for easier understanding: https://jsonblob.com/
Here is an example: https://jsonblob.com/ac2b3470-88ff-11e7-8b46-77758b4168e9

Gene


#7

Perfect thanks! Now I am rolling.