Help with "roll your own" scripting for rain forecasting and ethernet based irrigation controller (I

NeverDie said:
One way to approach it would be to use a Toro Evolution controller with one of these:
http://www.sprinklerwarehouse.com/EVO-SC-p/evo-sc.htm
which can take wireless input from up to 3 soil moisture sensors and (possibly) your wireless rain sensor also.
 
I'd say the *only* thing favoring the Toro soil moisture sensor  is its low price.  It would be infinitely better if an arduino could intercept the raw data transmitted by the wireless soil moisture sensor.  I haven't explored the feasibility of that, but with enough effort it should be possible.  So, the relevant question is: how much effort?  Without access to the raw data, I'm not sure it's worth the bother, as the out-of-the-box Toro receiver has some useability flaws that will be arduous to work around.  If the out-of-the-box receiver proves difficult to hack, then I imagine the EVO-SC receiver (above link) would be a good candidate for tapping into the raw data after it has been received.  Either way, it would to be a project, not a plug-and-play that gives instant satisfaction.
I'll take a look at that controller you linked to. It sounds like it would solve my problem for the most part. Right now I'd be happy just to trip the rain sensor detection, but I know access to the raw data from the sensors would be much useful. But do I have time to mess with that and is it really worth it? Or is tripping the rain sensor 'good enough'? Hmmm..decisions.....
 
It looks like the rain sensor I have is the previous generation? It doesn't work with the EVO-SC. I just bought the dang thing too, I wish I had realized this before I pulled the trigger.
 
It also appears the EVO-SC is only used with a Toro controller, which means it's not going to work for me. 
 
NeverDie said:
Mystery solved.  According to this (http://rayshobby.net/phpBB3/viewtopic.php?f=8&t=48), the RF chip is a zigbee chip, the Atmel AT86RF212 (http://www.atmel.com/Images/doc8168.pdf).
 
Unfortunately, according to Atmel's overview (http://www.atmel.com/devices/at86rf212.aspx?tab=overview), it includs an AES crypto engine....  I would hope the design engineers didn't use the crypto, as it would be extreme overkill, but if they did, then intercepting the RAW data would be a lot more difficult.
 
I don't have any experience with zigbee.  Anyone have any suggestions?
 
Even though the crypto makes our lives harder (trying to reverse engineer it), it would be a bad design practice to not secure the transmission. Maybe it's in the clear now, I don't know...but with something like this that has to opportunity to waste your money (false no moisture readings and continuous watering the lawn when it shouldn't be) if it were compromised, I'd feel better with the encryption.
 
The chances of that happening are slim, but all it takes is one person looking to cause mischief.
 
I've got a question.....
 
My rain sensor, Irrigation Caddy and the Toro Soil Sensor (still in the box) can all be used in a normally open or closed configuration. Right now, it's in NC(normally closed). Now, since an NC circuit is always in use (hot), piggy backing two different sensors on the same input on the controller won't work. If one sensor tripped into an open circuit mode, say the rain sensor, the controller is still going to see the circuit as complete/hot because the second sensor is still in a closed condition.
 
Well, what if I switch everything to NO (normally open)? That means there's no continuity in any of those wires until one of the sensors trips. When that sensor resets itself, the circuit is broken and it's back to normal operation. The only time there is a completed circuit is when a sensor is tripped, versus the way I have it now which is opposite and isn't going to work for multiple sensors.
 
Thoughts?
 
NeverDie said:
If you want the sensor relay to control a particular zone, you just put it in series with the wire for that zone and then set your Irrigatoin Caddy (or whatever controller you're using) to irrigate that zone every day.  When the soil moisture sensor hits 90%, it will open the relay, and the relay won't be closed until it falls to either the 50% default threshhold or whatever threshhold you specifically set.  The Toro SMS, as designed, functions like a cut-off switch.
 I don't want to wire it in series with the valve because I will lose the ability to remotely monitor the sensor state on the controller. The controller won't know that the moisture sensor has cut current to the valve. It will continue on it's merry way thinking the valve is operating, and I won't have any indication that 1 zone or all zones weren't watered. That's not what I want.
 
NeverDie said:
Understood.  That's why you're probably better off with an arduino/pi with an RTC and a bank of relays than an Irrigation Caddy.  At least then you have a log as to what transpired, and the cost is minimal to setup.  That said, if you happen to like the Irrigation Caddy for other reasons, you could leave it in.
 
Yeah, I'm trying to maximize what capabilities I have with the IC for now. At some point in the future I may do what you suggested, but for right now since I'm just getting started, I'm going to get my feet wet with the IC.
 
Update: I've got a python script running in Mint Linux that checks the current forecast and for the next 9 days via weather underground's API. You can select how many days to disable the system before/after it detects rain, and how many times a day to check the forecast. I also have a rain sensor on my roof to shut the system down if it happens to rain while the system is on. The goal is to get the soil moisture sensor in line with the rain sensor, and have the system shut down if the soil is already moist. 
 
I didn't write this code, I just modified it to do what I needed. It came from here: http://www.thirdeyevis.com/pi-page-3.php. This is a site that uses the GPIO pins in the RPi to basically do what I'm doing with the IrrigationCaddy.
 
Here is a link to his source code:http://www.thirdeyevis.com/scripts-python/rain-bypass.py
 
No, this script won't give me the current humidity conditions, but I'm hoping I can use both the rail and soil sensors to mitigate the lack of that info. I did find a java script to give you that though: https://github.com/bensteele/jirrigate
 
What i did for now, was have the rain-bypass.py script send a command via curl, to the controller if rain is detected or it's in the forecast. Once the forecast clears up, it sends a command to turn the system back on. Everything is logged to a file. Next on the list will be to send an email or SMS when the status changes. I also want to add a current timestamp to the log entries. RIght now it's based on an epoch and it's not easy to decipher.
 
Work continues....
 
@uh2 - I have an IC and I am trying to also write an optimal irrigation program.  I don't know if you are aware of this but there is a project called Opensprinkler.  This allows you to use a Raspberry Pi and some customized hardware as an irrigation controller.  The software that controls this is all openly available and some folks are working on integrating weather forecasts into python scripts. I am not allowed to post links but search for Opensprinkler Pi and weather algorithms.
 
FYI - have you figured out how to programatically change run times for zones of the IC?  I can figure out how to shut off the controller or turn it back on but not how to change run times and we will need that functionality optimize water usage.
 
zaphod said:
@uh2 - I have an IC and I am trying to also write an optimal irrigation program.  I don't know if you are aware of this but there is a project called Opensprinkler.  This allows you to use a Raspberry Pi and some customized hardware as an irrigation controller.  The software that controls this is all openly available and some folks are working on integrating weather forecasts into python scripts. I am not allowed to post links but search for Opensprinkler Pi and weather algorithms.
 
FYI - have you figured out how to programatically change run times for zones of the IC?  I can figure out how to shut off the controller or turn it back on but not how to change run times and we will need that functionality optimize water usage.
I'm aware of OpenSprinkler... I may have even mentioned it previously... But I already had the IC once I found out about it. I haven't pursued it because I'm trying to keep costs at a minimum right now until I can determine how far I want to go with this. I also haven't tried to change thr running time for a zone yet. Let me look into that thia evening.
 
I also bought my IC before I found out about Opensprinkler - the reason I mention it is that the code is publicly available and assuming that we can figure out how to change running times for zones, etc, then you should be able to reuse the Opensprinkler irrigation timing code and algorithms for other controllers, like the IC.
 
I couldn't figure it out, so I placed a ticket with their support. So far..silence.
 
Zaphod, what you describe is what I did to check the weather in 'my' python script. I say 'my' because I used someone else's code and modified it to handle the IC commands, and to email me when it decides to disable or enable the system.
 
Hi guys,
 
I wrote the Jirrigate software. It was wrote for myself out of a lack of anything suitable available already which is why it only supports the EtherRain and WeatherUnderground controller and weather feeds respectively. I have asked IrrigationCaddy about giving me some suitable API documentation and a demo device or interface I can test against to add support for this controller.
 
In general i'm happy to take any feature requests or issues you have through the appropriate channel - https://github.com/bensteele/jirrigate/issues
 
I'll push out the v1.1 soon which has a few new things like extreme weather multipliers to give your garden some extra watering if hot weather is predicted ahead, as well as a remote telnet interface to the Jirrigate console.
 
Cheers,
 
Ben
 
Back
Top