[OBSOLETE] RainMachine

Great !!!

I’ll gladly test anything as I live in Florida and my system runs most days even now.

Thank you for your work !

Quick update - progress is slow but steady. Did some more testing today and have the refresh functionality working for the most part. Still tracking down occasional bugs. This stuff is tedious, but I’m getting closer!

2 Likes

Thanks for the update and work !!!

Couple things:

I’m very close to having a version to beta test. Have been running it the last couple days and it seems to be working well and refreshing regularly. Main thing I’ll need is for some of you to verify the install process works with everything doing the local LAN calls.

Still working through code to do the start/stop commands. For some reason the calls fail on my unit. I’m not sure if it ever worked, maybe because I have version 1. There’s obviously some way to do it because I can start/stop from the Rainmachine app on my phone. It must be doing something different than the documented API. I may try and reverse engineer it with packet sniffing. Worst case, I’ll just take my best shot at the code and have some of you tell me if it worked on yours.

Lastly, my Rainmachine did get an update in December, which added the watering stats! This is cool because I could potentially add something like on each zone device showing the last 7 days along with actual watering times. Still figuring out what all could be done with that.

More to come soon!

2 Likes

@brbeaird very excited to hear of your progress. Can’t wait to see the end results. I will be one of the ones trying to put it through its paces :grinning:

Ready to test !!!
Thank you once again !

I’ve been slammed with other stuff, but I’m planning on getting back to this as soon as I can. My own watering season is about to start soon, so I definitely have self-interest in getting it up! Good news is that I figured out all of the start/stop commands, partially through the existing app code and partially through reverse-engineering the calls by watching the javascript code in the Rainmachine web UI. Hopefully will have something workable sometime next week.

Your the “man” !

Thank you again !

You know what I really would like. Push notifications. Simple. Let me know that me sprinklers are running, when they turn off, how long they ran for etc.

The app for rainmach home is not intuitive and presents data in an odd format to my liking.

If this was posted already please just link to the thread as I search through 180 comments.

Thanks!

Did you ever get this to work? My ip is dynamic so the method will not work

That’s a great idea. I’m pretty sure I could make this happen.

Yes. I’ve been working on a new version of the code that works via local LAN calls so you can use your local LAN IP. Hoping I’ll have it stable enough to share sometime in the next week.

That’s awesome. The RM is good but it really needs some third party options ala IFTTT to be fully useful

Alright, I’m super close on this guys. I’ve got most of the commands working and (lightly) tested. Have just a few final bugs to try and smooth out, but this thing is almost ready, and it’s pretty sweet. Expect a public version very soon!

Hey everyone! The day is finally here! I have a new LAN-connected version of this app ready for testing!

A few notes about what has changed from the original version:

  1. Network traffic between your Rainmachine controller and ST hub now happens over your local LAN. This means you just put in your local Rainmachine IP during the setup process (No more port forwarding!!)
  2. You can now receive push notifications when zones finish watering. This is a new option in the setup process.
  3. The Zone/Program tiles in the ST mobile app are a bit more interactive in showing you what’s happening (they should change to a ‘pending’ state as soon as you click to turn a zone on or off).
  4. There is a new “Last Refreshed” field on the zone/program tile. This is a quick indicator letting you know if there is ever any issue with the scheduled refresh job.
     

Now, several notes on installing and testing this:

  1. I suggest completely uninstalling the current version before doing anything else.
  2. Grab the SmartApp and SmartDevice code from the link below to my github repo
  3. I updated the repo structure so you can use the ST github integration if you’d like to easily keep your version updated to my latest version. You can just point your apps/devices to use the brbeaird/SmartThings_RainMachine/master endpoint.
  4. In the install screen, put in your LOCAL Rainmachine IP (example: 192.168.1.40).
  5. I have not put in any checks against user error. I know in the original version it would do a check to make sure no programs were already running before trying to start a new one. I may add this later if it becomes a problem.
  6. I know the code is still pretty messy, but it’s good enough to test.
  7. The app can be buggy when it comes to refreshes. They occasionally come back with no data but do typically work on the next try. If not, it points to a bigger problem you should be able to see in the logs.
  8. This was a significant rewrite. The whole structure of the integration and handling of responses has changed. Because of that, there are almost certainly other bugs I haven’t found. Let me know of those bugs as you find them. It’s helpful if you can capture the logs in the SmartThings API.
  9. Once we get this tested well enough, I’ll see if copy-ninja would be nice enough to update the original links on this thread.

Here’s the link to the code. Enjoy!

3 Likes

Installed - no issues

Seems to be working as advertised.

Is the anyway to combine multiple Zones on one page rather than a tile for each zone. Have "twelve zones"and three different “Programs”. That’s a lot of “individual” Things on the Things page.

Thanks for the hard work.

The notifications on zones runtime is a great addition

Yeah it does create a lot of Things. The advantage of each one being its own device is it gives you maximum flexibility to work them in using the typical SmartThings rules if you wanted to. I tried to see if I could programmatically add them to an “Irrigation” room, but I don’t think that’s possible yet. Even if it was, it still lists them all on the general “Things” list.

It’s probably possible to write the app in such a way to put them all in one device, but that’s a huge change from how the code works now. I like the idea, though, so I might give it a try one day. In theory, it’s just a different device type that has placeholders for all the potential zones put together, and I would just update those attributes rather than separate devices. Could be a cleaner option to have for people who don’t care about using the zones in other SmartThings rules.

Hi, thank you for this! I’m having some issues with the Mini-8 model of RainMachine. The SmartApp says that it had an issue with my internal IP. When I use a web browser, I can get to the SSL site via https://192.168.0.248:8080 but the app thinks it can’t.

EDIT:
I also tried with the port but to no avail. See the log below:

12:48:34 PM: debug Unable to connect
12:48:34 PM: debug Done waiting.Current login response: null
12:48:24 PM: info Calling out to 192.168.0.248:8080/api/4/auth/login
12:48:24 PM: debug Logging in…waiting…Current login response: null
12:40:57 PM: debug Unable to connect
12:40:57 PM: debug Done waiting.Current login response: null
12:40:47 PM: info Calling out to 192.168.0.248/api/4/auth/login
12:40:47 PM: debug Logging in…waiting…Current login response: null
12:40:30 PM: debug Unable to connect
12:40:30 PM: debug Done waiting.Current login response: null
12:40:20 PM: info Calling out to 192.168.0.248/api/4/auth/login
12:40:20 PM: debug Logging in…waiting…Current login response: null

Hmm…did you just put in 192.168.0.248 as the IP? My code has port 80 hard-coded (as in, you don’t need to put in any port in the setup). For one thing, SmartThings can’t handle SSL connections like this, so the better test would be to hit http://192.168.0.248 from your browser.

@brbeaird thanks for the quick response. The Mini-8 model never served out of the standard HTTP port 80. It was always 8080 when opening their app, their Android/iPad app the address shows as 192.168.0.248:8080 — then you click into that and all works well. My guess is either I need to do my own port proxy or RainMachine didn’t treat the Mini-8 as nice as the larger models.

And yes you’re correct, I’m aware of the lacking SSL in ST and was wondering how in the world are you making that work, hence the attempt :slight_smile:

Ah, ok. So does the Mini-8 not do non-SSL at all? I can certainly add the port option back in to the options. As long as it’s port 8080 with HTTP, we can still make that work.