[OBSOLETE] RainMachine

This is maintained by @brbeaird.

5 Likes

Awesome and great start! I just tested it and here are my suggestions/questions/issues:

  1. I was able to use my public DNS record instead of IP address, so you might want to rename that field to IP Address/Host Name.
  2. I was able to pull in all my zones and programs, but when I go to turn a zone or program on I get “Connection Failed”. I assume by tapping on the “InActive” button it should activate it? Even though my water is shut off for the winter, my controller is up and running and should still try and run the zone. I did it manually via RainMachine and it worked.
  3. Is there anyway to change the icons to include zone names? Right now I have 8 icons that look identical and hard to tell which one is what. I know this is a big limitation of SmartThings, but not sure there is a work around?

Happy to do more testing with you.

I think I see where the problem might lie with the “Connection Failed”. The RainMachine requires the forwarding port to be 443 or 18843 (and there is no customization allowed, see http://rainmachine.com/support/Manual-RainMachine.pdf). . The only way I can get it working with Port 80 is to forward from Port 80 -> 443 in my FIOS router. This works with my browser as I type in my https://domainname:80 and my RainMachine portal comes up and the native app works. However, this configuration causes your SmartApp to not connect properly. The only way your smartapp will discover the zones and programs is to use Port 80 -> 80 all the way, which then causes the RainMachine to not work properly from browser or native app. This most likely explains why I am getting a “Connection Failed” when I try to turn on zone or program.

I’m having the same problem. The problem for me is that port 80 is used for my camera system and 443 forward using the same DDNS record. This looks like some very interesting stuff as I have been waiting for some integration on this for a long time. The most interesting thing I would like to know how long the sprinklers ran , that is not captured anywhere and there is no history apart from looking at my water consumption bill. The Rainmachine has this data as can be seen on its main screen but its not exposed and cannot be passed to something like Smartthings like “Watering front yard” , “Finished watering front yard” " Total time - X , water consumed Y" and some rollup on this data. Any other alternatives or is this only a port 80 forward or any other port will do ?

Thank you for this , and merry christmas . The device has been out for ages but no integration in this space.

I tested mine by port forwarding 80 to 18080, works for me.

Does it have to be an 80 portforward ?

Unfortunately, yes. I get certificate errors when I try to use either 443 or 18443. That is the problem. SmartThings platform is sandboxed and at this moment, they don’t allow workaround on certificate errors.

I’ve updated to display IP Address/Host Name per suggestion
also allowed changing of icons, so you can change them in the preference.

The portforwards do not help with the cert errors as you will get them even if you portforward from 80 to 443. But I see the point , I need to setup separate portforwards as I’m using the port 80 internally already. Thanks for your suggestions.

I am really confused. I left my initial firewall rule that forwards port 80 to 443. This rule allows me to use the native RainMachine app and web app. I then put in another firewall rule that forwards port 80 to 18080. This allows me to add the devices to SmartThings but I still get “Connection Failed” when I try to activate a zone.

How do you change the port of RainMachine to use something other than 443 or 18443?

I think you did everything right. The problem isn’t on your side but it’s the device-type. I should’ve tested it further before releasing this. Somehow the IDE isn’t consistent with the app on the phone. I hope someone will help me with this.

Managed to fix the bug. I’ve added a couple of other functionality like defining running time for each zone and stopping all zones. Let me know if there’s any other bugs.

Thanks. I tried it over port 80 (which forwards to 443) and I still get connection failed messages. What firewall ports are needed to make this work? Can you send us a screenshot of your firewall rule?

Are you guys using a rain sensor? If so which one? If not, is the data it uses to turn off or low time to run your sprinklers from the forecast data it gets from the internet?

You can find the details here in the GitHub wiki https://github.com/copy-ninja/SmartThings_RainMachine/wiki

Awesome! This is what I needed. It works. I will play around with it later to see some use cases I can think of. One issue I noticed which wasn’t an issue before is for my programs they are being imported into SmartThings as Null, where as before they showed up “Daily Watering”.

I’m not using any rain sensor. RainMachine is smart enough to use the forecasted data to reduce water usage or to turn it off. I don’t think the device itself works with rain sensor.

However, you can use SmartThings water sensor as a rain sensor

Fixed the issue! Let me know if there’s any other bugs. I’ll submit this for publication if everything else is working fine!

Thanks! What is the polling interval? I notice if a zone is activated from the Rain Machine, the status isn’t updated in Smartthings unless you poll it manually or use a polling smartapp. It doesn’t seem the polling interval is working.