Any experience with RainMachine integration?

Posted on
Tue Jan 28, 2014 1:05 am
oratzes offline
User avatar
Posts: 43
Joined: Jan 16, 2014
Location: San Diego, CA

Any experience with RainMachine integration?

Got myself one of these a while back.

Body_conserve_the_Water.png
Body_conserve_the_Water.png (101.69 KiB) Viewed 2138 times


http://www.rainmachine.com/index.html

Have been looking at integrating it into the HA system of the house.

Alternatives others have used instead with good success?

Thank you!

Indigo 6.0.9, Mac Mini Server 2010 Core 2 Duo 2.66 GHz 4GB RAM, OSX 10.9.1, INSTEON PowerLinc 2413U, > 100 INSTEON - primarily dual band dimmers and keypads, ISY994iZ, Pentair Intellitouch, Autelis Pool Control, Sharp Aquos LED TV, Pioneer SC-75, ...

Posted on
Tue Jan 28, 2014 1:07 pm
Bollar offline
Posts: 516
Joined: Aug 11, 2013

Re: Any experience with RainMachine integration?

I love the screen!

I decided to get OpenSprinkler and see how that goes. Its http interface is simple and I think I know enough to control it via Indigo. It'll arrive at the end of the week and I'll know for sure.

Insteon / Z-Wave / Bryant Evolution Connex /Tesla / Roomba / Elk M1 / SiteSage / Enphase Enlighten / NOAA Alerts

Posted on
Tue Jan 28, 2014 9:28 pm
oratzes offline
User avatar
Posts: 43
Joined: Jan 16, 2014
Location: San Diego, CA

Re: Any experience with RainMachine integration?

Installed the first of three units today. Moving all of our lawn sprinklers onto it. Great setup. Does a lot out of the box, especially all location specific weather data handling. UI on the controller is great and simple, not so much on the smart phone but good enough.

I took a look under the covers: Tested a few of the API calls in Chrome. All are RESTful/JSON over https

Code: Select all
Request URL:https://lawn.rainmachine.xxxx/ui.cgi?_dc=1390965942569&action=zonesave&zid=2&from=zoneedit
Request Method:POST
Status Code:200 OK
Request Headersview source
Accept:*/*
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Content-Length:111
Content-Type:application/json
Cookie:login=remembered; sessid=1390965216; token=R0&+GNNBMIMCHGAPCAMIMCHNEICANCFKELBM
Host:lawn.rainmachine.xxxx
Origin:https://lawn.rainmachine.xxxx
Referer:https://lawn.rainmachine.xxxx/app.html
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.102 Safari/537.36
X-Requested-With:XMLHttpRequest
Query String Parametersview sourceview URL encoded
_dc:1390965942569
action:zonesave
zid:2
from:zoneedit
Request Payloadview source
{name:Front Lawn - Entry to Master Bedroom, id:2, state:Idle, counter:60, status:null, message:null}
counter: 60
id: 2
message: null
name: "Front Lawn - Entry to Master Bedroom"
state: "Idle"
status: null
Response Headersview source
Content-type:application/json
Date:Wed, 29 Jan 2014 03:25:42 GMT
Server:lighttpd/1.4.31
Transfer-Encoding:chunked


But since they are promising a public API within the next 4 weeks, I am just going to wait for that. Should be simple to wrap into a plugin. (If you know how to write plugins that is... ;-) might be a good learning project)

Indigo 6.0.9, Mac Mini Server 2010 Core 2 Duo 2.66 GHz 4GB RAM, OSX 10.9.1, INSTEON PowerLinc 2413U, > 100 INSTEON - primarily dual band dimmers and keypads, ISY994iZ, Pentair Intellitouch, Autelis Pool Control, Sharp Aquos LED TV, Pioneer SC-75, ...

Posted on
Mon Feb 03, 2014 12:37 am
oratzes offline
User avatar
Posts: 43
Joined: Jan 16, 2014
Location: San Diego, CA

Re: Any experience with RainMachine integration?

FYI - Have been running the RainMachine for a while now. Like it a lot. Simple to use, very quick to setup.

Installing 2 more this week to cover all the zones of the yard.

Indigo 6.0.9, Mac Mini Server 2010 Core 2 Duo 2.66 GHz 4GB RAM, OSX 10.9.1, INSTEON PowerLinc 2413U, > 100 INSTEON - primarily dual band dimmers and keypads, ISY994iZ, Pentair Intellitouch, Autelis Pool Control, Sharp Aquos LED TV, Pioneer SC-75, ...

Posted on
Mon May 15, 2017 2:01 am
berkinet offline
User avatar
Posts: 3133
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Any experience with RainMachine integration?

This thread has been quiet for a long time... So, here's some news.

I now have two rainmachine touch hd-16s ($10 less on amazon) installed (in different locations) and have learned a lot about this product. These controllers replaced two netAquas. The netAqua was a promising product that never realized it's potential and the company finally went belly up last year. I kept on using it until one simply stopped responding and I decided enough was enough, and I didn't want to support two different irrigation platforms. Compared to the netAqua, the rainmachine is minuscule. The only advantage I can see for the netAqua platform was the, essentially, unlimited number of zones. The rainmachine is limited to 16. Though, you can install multiple controllers and they say they will provide a means for linking programs between machines in the future. In my case, replacing the netAqua came down to two choices: rainmachine or Rachio. I went with the rainmachine for two reasons: local display an control capability and local network management (I.e. cloud not required).

With the rain machines installed I had three tasks I wanted to perform:
  1. Add a physical Ethernet interface
  2. Add some local control via Indigo
  3. Configure the weather services
While not officially supported, adding the physical interface can be done. Though, it is still a work in progress, it is working. The rainmachine comes with two USB ports. One is used for the Wi-Fi adapter and the other is free. I plugged in an Apple USB Ethernet adapter and then, via ssh access to the rainmachine, was able to configure it. Unfortunately, I cannot disable the Wi-Fi without losing all network access and dhcp does not work (yet) on the Ethernet port. But, I have assigned a static IP and it does work.

Adding Indigo local control was fairly simple. I did it all with a shell script which used curl to invoke RESTful API calls to the rainmachine. Since the whole point of this product is to automatically manage my irrigation needs, in spite of Jay's work on the Rachio, I was not really looking for a plugin based solution. Rather, I just wanted a simple control page to let me wander around the property and manually start and stop zones, mostly for maintenance purposes. For other control purposes the rainmachine app or their web interface (both local and via their redirector) works just fine.
IMG_2072.PNG
Control page screenshot
IMG_2072.PNG (246.04 KiB) Viewed 1408 times

Finally, weather services. I was surprised at the number of choices, including Underground PWSs. So, in my US location, where I have a Davis weather station, I was able to use that directly since it is shared as a PWS. If you provide more than one weather source (which I did) the rainmachine will basically average them, but give priority to a PWS if you want it to. So, you can use a local Netatmo rain gauge to act as a sanity check against a weather service's reports.

I'd be happy to share my work, just PM me. But, one caveat. This is not "plugin easy." You will need to know how to access the terminal, use shell commands and (for Ethernet support) use vi.

Posted on
Tue Jun 05, 2018 10:54 am
RogueProeliator online
User avatar
Posts: 2089
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Any experience with RainMachine integration?

Really old thread, but the last I see on the topic -- just curious if you are still using RainMachine, @berkinet? My last EZFlora died (including spares I had gotten from someone on the forum who generously donated them after they were through with them) and I am thinking I will go with RainMachine as a replacement...

Adam

Posted on
Tue Jun 05, 2018 11:44 am
berkinet offline
User avatar
Posts: 3133
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Any experience with RainMachine integration?

RogueProeliator wrote:
...just curious if you are still using RainMachine, @berkinet? My last EZFlora died (including spares I had gotten from someone on the forum who generously donated them after they were through with them) and I am thinking I will go with RainMachine as a replacement...

I am still quite happy with the RainMachine. I have had no problems and when I have needed support, which hasn't been often, it was always quick and helpful. My only real complaint was support for wired ethernet (I am not a fan of wireless). They have now, finally, officially added support for an RJ-45 adapter. It isn't perfect, you still need to have the Wi-Fi adapter plugged in. But, it works.

The only complaint I have heard from others is the RainMachine accommodates adjustments in water delivery by modifying the run time for the program. On the other hand, the Rachio supposedly varies the frequency of the program. But, a given program always runs for the same length of time. For my needs, that was an un-issue. But, I have heard in some cases it could be important... probably to serious gardeners. On the other hand, as I noted below, the RainMachine can be accessed locally, although cloud access is possible. Finally, since the RainMachine runs on Android, you can get shell access and actually hack at it.

Posted on
Tue Jun 05, 2018 3:10 pm
RogueProeliator online
User avatar
Posts: 2089
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Any experience with RainMachine integration?

The only complaint I have heard from others is the RainMachine accommodates adjustments in water delivery by modifying the run time for the program. On the other hand, the Rachio supposedly varies the frequency of the program. But, a given program always runs for the same length of time.

Thanks for the update... honestly, I haven't found a single automated scheduler/system that can work with our weather here when they get data from the weather service. The difference in rain can easily be 1" just a mile or two away and I don't exaggerate when I say we have ~20% chance of rain every single day during the summer. I can play with the adjustment method and see how it performs and, worst case, turn off the auto schedule and use Indigo and the local access.

You never wrote a plugin, right? Just using scripts still?

Posted on
Tue Jun 05, 2018 5:00 pm
berkinet offline
User avatar
Posts: 3133
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Any experience with RainMachine integration?

RogueProeliator wrote:
...You never wrote a plugin, right? Just using scripts still?

Right. I’m just using the scripts.... which, I’d be happy to share. FYI, it is really a single script, with several unix links to it. I use arg 0 to determine the function and then pass args for zone and duration.

Posted on
Thu Jun 07, 2018 6:22 am
Korey offline
User avatar
Posts: 512
Joined: Jun 04, 2008
Location: Henderson, NV

Re: Any experience with RainMachine integration?

berkinet wrote:
RogueProeliator wrote:
...You never wrote a plugin, right? Just using scripts still?

Right. I’m just using the scripts.... which, I’d be happy to share. FYI, it is really a single script, with several unix links to it. I use arg 0 to determine the function and then pass args for zone and duration.


The RainMachine looks like a great replacement for my "left for dead' Irrigation Caddy that has not had any updates in years. :( I was considering the Rachio, but love the fact that you can talk directly to the RainMachine and not have to bounce to the cloud.

I would love a copy of the script, I think I will order the RainMachine and install it later this month when I am home. Thanks!

--
Korey

Posted on
Thu Jun 07, 2018 6:32 am
johnpolasek offline
Posts: 822
Joined: Aug 05, 2011
Location: Aggieland, Texas

Re: Any experience with RainMachine integration?

RogueProeliator wrote:
honestly, I haven't found a single automated scheduler/system that can work with our weather here when they get data from the weather service. The difference in rain can easily be 1" just a mile or two away and I don't exaggerate when I say we have ~20% chance of rain every single day during the summer. I can play with the adjustment method and see how it performs and, worst case, turn off the auto schedule and use Indigo and the local access.


IF one of the "weather Service" source options is Weather Underground, the Ambient Observer station https://www.amazon.com/dp/B01HH4WZXG/ref=sspa_dk_detail_4?psc=1&pd_rd_i=B01HH4WZXG&pf_rd_m=ATVPDKIKX0DER&pf_rd_p=1713835751726239774&pf_rd_r=GTSRC5EGJ07CJSD93R8G&pd_rd_wg=7VaXR&pf_rd_s=desktop-dp-sims&pf_rd_t=40701&pd_rd_w=485QB&pf_rd_i=desktop-dp-sims&pd_rd_r=5a370a79-6a4e-11e8-84e3-253469dfe0a3 is about $120, and allows you to get your EXACT weather info... as long as you aren't stuck with a satellite uplink that drops it's connection when the rain gets heaviest..

Posted on
Thu Jun 07, 2018 10:20 am
berkinet offline
User avatar
Posts: 3133
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Any experience with RainMachine integration?

Korey wrote:
...I would love a copy of the script, I think I will order the RainMachine and install it later this month when I am home. Thanks!

Script, etc. are described below. I also had a separate PM on this subject. But, since it may be of interest to others, I will answer it here. The script has limited control functionality and no reporting capabilities. The script currently implements 4 functions:
  • Turn a single zone on for s user controllable length of time
  • Start a specific program cycle
  • Abort all active zones
  • Restart the RainMachine
In addition, the script has place holders for the following functions:
  • Global Disable
  • Global Enable
  • Global Percent modify

To use this just create a UNIX text file named zone-on (I placed it in /Library/Application Support/Perceptive Automation/Indigo 7/Scripts/MyShellScripts/water/)
make the file executable
    chmod 755 zone-on
create hard links to the file for any additional fun actions you wish. For example, to add the abort-all command, do
    ln zone-on abort-all

The available commands are listed in the script. The linked name must match a command name exactly.

Now, to use this from Indigo create an Action Group that invokes Run Shell Script and enter the full path to the appropriate command you wish to execute. For example, to turn on zone 1 for 20 minutes:
    /Library/Application\ Support/Perceptive\ Automation/Indigo\ 7/Scripts/MyShellScripts/water/zone-on 1 20/list]
    And, to stop zone 1 (or any/all zone(s) for that matter:
      /Library/Application\ Support/Perceptive\ Automation/Indigo\ 7/Scripts/MyShellScripts/water/abort-all
    To give me some flexibility, I created a variable to contain the run time and one command for each zone. For example:
      /Library/Application\ Support/Perceptive\ Automation/Indigo\ 7/Scripts/MyShellScripts/water/zone-on 1 %%v:1377440321%%

I also added logic to note when watering was taking place so I could not start two zones at once. But, that is not necessary. I suspect this skeleton script could be expanded to also get information from the RainMachine. But, I wasn't really interested in that. If there is interest, I can look into that.
Code: Select all
#!/bin/ksh

DEBUG=false
if $DEBUG; then set -x; fi

CMD=`basename "$0"`
ADDR=192.168.5.45
PWD=imyy4u
DUR=000

TOKEN=`curl --include \
   --insecure \
   -s \
   --request POST \
   --header "Content-Type: application/json" \
   --data-binary "{ \"pwd\": \"${PWD}\", \"remember\": 1 }" } https://${ADDR}:8080/api/4/auth/login`
TOKEN2=`echo $TOKEN|cut -d\" -f4`

case "$CMD" in
   abort-all)
      if $DEBUG; then echo received abort-all; fi
      curl --include \
           --insecure \
           --request POST \
           --data-binary "{ \"time\": ${DUR} }" \
      https://${ADDR}:8080/api/4/watering/stopall?access_token=$TOKEN2
      ;;
   cycle-start)
      # $1 = cycle
      if $DEBUG; then echo received cycle-start; fi
      PRG=$1
      curl --include \
           --insecure \
           --request POST \
           --data-binary "{ \"time\": ${DUR} }" \
           https://${ADDR}:8080/api/4/program/${PRG}/start?access_token=$TOKEN2
      echo -n "program ${PRG}:"
      ;;
   global-disable)
      if $DEBUG; then echo received global-disable; fi
      # Not yet implemented. Not sure if this is even suported in the API
      ;;
   global-enable)
      if $DEBUG; then echo received global-enable; fi
      # Not yet implemented. Not sure if this is even suported in the API
      ;;
   pct-mod)
      # $1 = global percentage
      if $DEBUG; then echo received pct-mod; fi
      ;;
   restart)
      if $DEBUG; then echo received restart; fi
      curl --include \
           --insecure \
           --request POST \
           --data-binary "{ \"time\": ${DUR} }" \
      https://${ADDR}:8080/api/4/machine/reboot?access_token=$TOKEN2
      ;;
   zone-on)
      # $1 = zone, $2 = duration
      if $DEBUG; then echo received zone-on; fi
      ZN=$1
      let DUR=$2*60
      curl --include \
           --insecure \
           --request POST \
           --data-binary "{ \"time\": ${DUR} }" \
           https://${ADDR}:8080/api/4/zone/${ZN}/start?access_token=$TOKEN2
      echo -n "zone ${ZN}:"
      ;;
   *)   echo invalid operation selected: $CMD
      ;;
esac

exit  0

Posted on
Fri Jun 08, 2018 3:18 am
berkinet offline
User avatar
Posts: 3133
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Any experience with RainMachine integration?

I wrote:
...I suspect this skeleton script could be expanded to also get information from the RainMachine...

For those that may be interested. I looked at the API again last night (it had been a while since the last time I looked at it). It is possible to get information from the RainMachine about the current settings and past usage data. AND, these functions can be fairly easily added to the script (I tested a couple today). However, the functions all return their data in JSON format and the script does not deal with that. So, if you want data from the RainMachine, you would need to either add some additional functionality to the script or, as I did this morning, save the JSON data in a variable ( and then deal with it in some other process)

If you are interested, take a look at the API to see what is available. In particular, look at the sections on Watering and Daily Stats.

Posted on
Fri Jun 08, 2018 5:08 am
johnpolasek offline
Posts: 822
Joined: Aug 05, 2011
Location: Aggieland, Texas

Re: Any experience with RainMachine integration?

berkinet wrote:
I wrote:
...I suspect this skeleton script could be expanded to also get information from the RainMachine...

For those that may be interested. I looked at the API again last night (it had been a while since the last time I looked at it). It is possible to get information from the RainMachine about the current settings and past usage data. AND, these functions can be fairly easily added to the script (I tested a couple today). However, the functions all return their data in JSON format and the script does not deal with that. So, if you want data from the RainMachine, you would need to either add some additional functionality to the script or, as I did this morning, save the JSON data in a variable ( and then deal with it in some other process)

If you are interested, take a look at the API to see what is available. In particular, look at the sections on Watering and Daily Stats.


Hmmmm, I'won't be back to mom's where I have access to the machine for a month or so, but when I get there, I'll have to see if Dave's GhostXML plugin https://forums.indigodomo.com/viewforum.php?f=249 would be able to pull the data out of the variable and/or be able to poll the Rain Machine directly the way it does my Sitesage power monitor...

Posted on
Fri Jun 08, 2018 8:40 am
RogueProeliator online
User avatar
Posts: 2089
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Any experience with RainMachine integration?

I am about 95% sure I will write a plugin for this as soon as I get it setup -- it arrives today. Thanks for the API link and the scripts, that should help tremendously.

Adam

Who is online

Users browsing this forum: No registered users and 1 guest