RainMachine releases API

neillt

Active Member
If any of you have, or are thinking about getting, a RainMachine intelligent sprinkler controller, they just released their first basic API with the latest firmware update.
 
I like the RainMachine as it's not "cloud based" other than pulling NOAA weather data direct from NOAA, the RainMachine folks are totally out of the loop.  In fact, it's one of their selling points on their web page.
 
The API is all HTTP based, so it's going to work great with HaikuHelper and the Omni... locking out sprinklers during a party, collecting usage stats, etc.
 
If you have a RainMachine, and you have the latest firmware, you can go to http://ip.of.your.rm/api4.html for a bunch of live examples.  I plan on messing with it today to see what I can do with it via HaikuHelper.....
 
Thanks for that. Sucks that I went with the Irrigation Caddy as that was what most with CQC were buying and we still don't have a driver for it yet. Good to see some OPEN competition. :)
 
Can you post some of those examples?  I don't see anywhere to look at any documentation except via the device itself... For those of us that haven't bought one yet.  I've been looking at the Rachio unit since RainMachine has 'only' 12 zones (I need 14, Rachio's second model has 16). 
 
And I'm curious, do you have any integration task in mind to use the API?  With these new controllers doing all the forecasting and adjustments on their own - what else needs to be done?
 
Some reporting might be nice, but I can't think of a scenario (without contriving some situation) that I'd need to do anything to these things...
 
Jeff
 
The main thing I am really happy about is the ability to lock out operation for a fixed amount of time (say 24 hours) irregardless of the rain situation.  Before I had to use an output from the Omni to control a relay that cut power to the common feed to the valves, which I thought was kind of kludgy because the controller still thinks it's watering, and it uses that water in its calculations for the next few cycles.  If I can tell it directly to not water, it knows it and will factor that in the next time it *does* water.
 
It's also helpful to have manual control for zones.  Say you have a pool fill zone that is 100% manual only on the RainMachine, you can send commands to open and close that valve.  Since the RM is wi-fi, it doesn't need to be hardwired to the Omni to perform functions.  Same for water features like fountains and what not.
 
Two other handy things is manually starting a program if you choose, and the ability to halt all watering.  You could trigger that from just about anything.
 
Here are the actions it shows in the API examples:
 
Authenticate to the device using its admin password
Change password (must authenticate first)
Change controller name
Retrieve daily statistics for pretty much any day it has on record
Retrieve programs currently on the device
Create and edit programs on the device
Manually start a program
Manually stop a program
Stop all watering now (E-Stop)
Get zone information
Manually start a zone
Manually stop a zone
Get and set zone properties
Get watering logs from a specified date for a specified number of days
Get current rain delay
Set rain delay
Get controller time
Set controller time
Get software update status (i.e. does it need to update)
Start software update
Reboot controller
 
neillt said:
The main thing I am really happy about is the ability to lock out operation for a fixed amount of time (say 24 hours) irregardless of the rain situation.  Before I had to use an output from the Omni to control a relay that cut power to the common feed to the valves, which I thought was kind of kludgy because the controller still thinks it's watering, and it uses that water in its calculations for the next few cycles.  If I can tell it directly to not water, it knows it and will factor that in the next time it *does* water.
 
It's also helpful to have manual control for zones.  Say you have a pool fill zone that is 100% manual only on the RainMachine, you can send commands to open and close that valve.  Since the RM is wi-fi, it doesn't need to be hardwired to the Omni to perform functions.  Same for water features like fountains and what not.
 
Two other handy things is manually starting a program if you choose, and the ability to halt all watering.  You could trigger that from just about anything.
 
Those are good examples - but doesn't their app provide that functionality already?  I know we're conditioned to want to have everything integrated - but for performing specific "sprinkler tasks" as those above, do you perceive a benefit to creating new UI pages for those functions within your system, rather than just pulling up the RainMachine app/interface?  
 
I'm asking for curiosity as I would normally demand a published API from these types of devices, but I struggled to find a use case for a self-adjusting sprinkler system that I would need to integrate / automate for other purposes.  This of course assumes the manufacturer's app / GUI already has the controls you've mentioned.  For those 'rare' occasions I'd want to manually start / stop /delay the system, I'd think pulling up their GUI would be just fine...  
 
Now, your manual pool fill zone is one example that might benefit from integration, as you could put that control with other pool-related functions.
 
Thanks for the list!  One other favor - what's the output format (JSON?), and could you post one sample input/output?  Again curious as to how easy they made it...
 
Thanks,
 
Jeff
 
Oh, I wouldn't go so far as to create GUI pages or anything.  Like I said, the main thing I wanted it for was watering lockout.  I have an "Entertain" button on one of my UPB scene controllers that sets everything up for a party.  This can now include locking out the sprinklers so there isn't an unfortunate watering incident in the middle of a BBQ or something.  The Omni sends the command to lock out irrigation for a set amount of time (like 24 hours) without me even having to worry about it.
 
The app (and the touchscreen on the device itself) handle 99% of what I need just fine.  I but I do like the ability to see what's going on, and perform control from other systems.
 
Cool.  That's a reasonable use case, and a good integration point.  Truly "using" the API for integration, not just replicating their interface...
 
neillt said:
Oh, I wouldn't go so far as to create GUI pages or anything.  Like I said, the main thing I wanted it for was watering lockout.  I have an "Entertain" button on one of my UPB scene controllers that sets everything up for a party.  This can now include locking out the sprinklers so there isn't an unfortunate watering incident in the middle of a BBQ or something.  
 
Back
Top