Got myself one of these a while back.
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!
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
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...
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.
RogueProeliator wrote:...You never wrote a plugin, right? Just using scripts still?
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.
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.
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!
#!/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
I wrote:...I suspect this skeleton script could be expanded to also get information from the RainMachine...
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.
Users browsing this forum: No registered users and 3 guests