[OBSOLETE] RainMachine

Hmm. I just verified mine is still working, so I think the code is still ok. Maybe try copying/pasting the Device Handler and SmartApp and then uninstall/reinstall?

A bit more logging info could be helpful as well. If it’s hitting an error somewhere, we’ll need to somehow figure out at which point in the process it’s blowing up.

Trying to add this integration, got the code pulling in from Github (also tried just copying and pasting, following the directions exactly). Once I try to add the SmartApp it says “Unable to connect to Rainmachine. Check your local IP and try again.”

I’m able to browse to the web config page at 192.168.1.218:8080 and everything works fine. The RainMachine Android app also works fine at that address and port. So I use 192.168.1.218 as the IP address and 8080 as the port, right?

This is a brand new RainMachine HD-12 running firmware version 4.0.750, Hardware revision 3, API 4.2.0, if that helps.

Try using port 18080. It looks like RainMachine is changing to port 8080 for HTTPS and 18080 for HTTP, at least for newer devices.

http://wikipage.rainmachine.com/index.php?title=API:v4.0

1 Like

What @cjwarnock said: Try port 18080. While you’re able to hit port 8080 on your browser, I’m pretty sure that’s SSL only, meaning if you check your browser URL, you’ll see it noted that it’s a secure connection. The SmartThings hub can’t handle secure connections for local integrations like this, so you need to be able to connect on a plain ole unencrypted HTTP port, and that should be 18080 for the new fancy RainMachines.

That works, thanks. I had read that but it sounded like it was just for the mini or something. Anyway, thanks again.

First of all, thank you for writing this. I am using a Rainmachine Touch HD-12 but I can’t get the app to login. I am using my external DNS name with port 18080 forwarding to port 18080 and I can pull that up in a browser and see the RainMacine Rest API page no problem, yet the app still says can’t login. Any ideas?

Here’s your problem right here. Use your local IP address. The hub connects to it on your network directly, not from the external cloud over the Internet.

That’s the thing, I was trying local IP but that would never work, and in the thread everyone kept saying they were having success using the public DNS name/IP, so thus my comment. That said, I haven’t tried doing local IP with that particular port yet. Ok, that works. So you must use port 18080 with the Touch HD-12 apparently.

Thanks!

So what does this app do? Is it just for push notifications? Or will it allow me to turn on/off zones, programs, etc? Every time I launch the app it just asks for settings again.

Ohhh ok the smart app added things representing the rainmachine program and zones. Cool! Sorry, still new to how all this works :slight_smile: Awesome man!

Glad you got it working. Originally, the app did use external IP, so that’s probably what you were seeing with older comments. A couple months ago, I rewrote it to work via local IP, but as you discovered, it does matter which port you use, which varies depending on the model. Enjoy!

Hey dude, I just wanted to say thanks again for the awesome work you did on that app! It just saved me a ridiculous amount of time. I have a Windows Phone and thus no app for the RainMachine itself from the vendor. But, since I have SmartThings and your smartapp, I was able to turn on and off zones on the fly repeatedly when the builder sent over the sprinkler guy to fix all the sprinklers in the front yard. Saved me lots of time running into the garage over and over. Glad I got it all up and running before he came by. (Just to explain, my house burned down a couple of years ago and we just got moved back in after the rebuild and they were fixing all the sprinklers in the front yard after all the construction vehicles driving over them, etc.)

1 Like

That’s great to hear - glad it’s helped you out (and glad you got your house back)! I didn’t even think about how useful this would be for Windows phones. Very cool. Definitely credit to copy-ninja for the original version of the app.

Yes this is immensely helpful for Windows Phone users, so thank you very much!

1 Like

I pushed out a small update to the Rainmachine device type which adds the “switch” capability. This opens up control to things like Alexa and the SmartTiles dashboard.

I don’t actually trust RainMachine to handle watering multiple times a day to keep soil moist for new grass seed, so it’s nice to be able to quickly initiate a program with a single click or voice command. As a side note, you can also be that dad in the Alexa commercial who turns on the sprinklers via voice command and soaks the kid, so there’s that.

3 Likes

HD 12 user here, also had to use the 18080 port as on the mini. So happy to find that info on the port in the thread, before I went looking for help I had typed my PW about 30 times trying to log in, tried port 8080, and even changed the PW on the HD12 to be absolutely sure I was using the right one. :slight_smile:

Just starting to set up the app, but wanted to thank you very much for making this available. If you have a paypal I’d love to buy you a beer.

Dang - happy too soon! I’m getting “Error saving page” when I try select and save programs or zones on the Programs/Zones page in setup (after logging in successfully).

I just setup github integration for your device handler and smartapp a half hour ago, so I should have current code.

@Danabw - can you open up the live logging and see what error you’re getting when the setup is trying to finish? We’ll get it figured out.

Thanks for the quick reply, appreciate it.

Log below, just grabbed section from log-in starting w/successful log into rain machine. This is the only line that I see w/an Error tag:

c5f7447fd601
9e2c8683-0ab1-490a-8d93-7fe884b3c006 8:51:54 AM: error physicalgraph.scheduling.CronExpressionException: Invalid cron expression found ‘37 0/60 * * * ?’ @ line 714

Log:

Pastebin: http://pastebin.com/JZMjEKDm

I just pushed out a small update to the SmartApp code. Could you update to that and try again?

Thanks, I’ll do that now.

Updated from your github. Checked and reconfirmed I have the 12/13 version, shows local and repository versions are the same in my Smartapps tab in the IDE.

Still getting an error, looks like the same one:

Current:

4195a3b3-707b-4a96-bb2a-4f9c085c3cc7 12:01:35 PM: error physicalgraph.scheduling.CronExpressionException: Invalid cron expression found ‘37 0/60 * * * ?’ @ line 714

Previous:

c5f7447fd601
9e2c8683-0ab1-490a-8d93-7fe884b3c006 8:51:54 AM: error physicalgraph.scheduling.CronExpressionException: Invalid cron expression found ‘37 0/60 * * * ?’ @ line 714