[OBSOLETE] Smart Sprinkler System

I’ve noticed that, once in a long while, the arduino locks up and needs to be power cycled before it returns to working order. This has only happened twice to me, but it renders the who controller inoperable…which means no water. Would it be possible to put in a power cycle command to run on some variable to avoid this?

@d8adrvn Thank you for the explanation of “Sending”.

Sorry about the wrong screen cap. Here is the device:


As you can see, I set “3” for each of my prospective zones (not sure why Zone 7 isn’t zero).

I’m not with the device now but I’ll double-check the DIP and let you know.

The Arduino IDE is a bit foreign to me but I’ll play with it. At least, I should be able to turn on isDebugEnabled. Thanks for the tips.

I spoke above about the heat from the 12v p/s. Do you think that might have hurt it? I’ve changed to testing it now with USB/5v.

All Good!

I received a new Arduino Uno today and went step-by-step to make sure I would know when and where it failed (if it did, but It didn’t). For somebody, like me, not familiar with the Arduino, I would suggest doing this just to make certain each step works.

  • Plugged naked Arduino into computer USB port (no other power)
  • Identified Com port (had Device Manager open to monitor connection progress)
  • Opened the Arduino example BLINK sketch, compiled it
  • Uploaded it to the Arduino to observe the blink
  • Powered down
  • Attached ThingShield & Relays
  • Powered up to verify BLINK was still working
  • Pasted Irrigation Controller 2.54, compiled, uploaded it (note error below)

I had previously followed the instructions for pairing the Shield (remember, this was a re-installation) so that was intact, along with the SmartApp. It all checked out, first-time every-time.

I did have a moment of panic when the upload gave errors:

Sketch uses 13,252 bytes (41%) of program storage space. Maximum is 32,256 bytes.
Global variables use 1,275 bytes (62%) of dynamic memory, leaving 773 bytes for local variables. Maximum is 2,048 bytes.

avrdude: stk500_paged_load(): (a) protocol error, expect=0x14, resp=0x50
avrdude: stk500_cmd(): programmer is out of sync
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

I thought I was back to Square One, but I ignored it and it’s working. Do I have anything I need to fix?

EDIT: One issue I hit was configuring the Virtual Zones. In the section “Take Your Controller to the Next Level:”, correct me if I’m wrong, but I don’t see the instructions to configure the new Virtual Zones. I had Virtual Switches, but they didn’t do anything. I figured out that I had to go to the new app on my phone and link the Virtual Switches to the Arduino zones. maybe that should be intuitive, but I think further instructons-for-dummies after #13 would help.

@d8adrvn @Matt_Nichols Now that I’ve got it installed, I’ve come across a couple of use issues.

What triggers the “minimum day interval” parameter? Does manually starting a zone start the interval clock? More likely, how about another instance of the SmartApp (i.e. if one instance runs daily to power a soaker, will that prevent a bi-weekly schedule from ever starting)? [My specific error occurred this morning when a schedule didn’t start. Interval was at 2 days. I had performed a test run the night before, in the same app instance, of a couple of minutes per zone - my guess is that triggered the interval and prevented this morning from going.]

I have a BloomSky PWS connected to WeatherUnderground. If you’re familiar with it, it has a rain sensor that only says “it’s raining”. I don’t believe it measures rainfall. It is hyperlocal, so the data - if meaningful - would be more relevant than the zip code data. Would you advise utilizing the zip code or the PWS?

So far this is great and your instructions for assembly and code installation were very thorough. Thank you!

Another question about rain. I’ve looked at the code - though groovy is really foreign to me - to get an idea where you source the rain data. I’m trying to calibrate the rain threshold, so I want to watch the data for awhile.

Ideally, I’d like to use an app to pull the data and report to me each night. But I’d be happy with just going to a web page and seeing the same data that corresponds to your getWeatherFeature (yesterday/conditions/forecast). Is that possible? Thank you.

@Cal7,

Glad to hear you have the system working. Here are some answers to your questions:
RE: Interval watering feature
The SmartApp checks the interval each day when it is scheduled to run. If the interval has not been met, it will decrement the counter. Each installed instance of a SmartApp has its own interval counter.

RE: Use of your own weather station.
My understanding of underground is that they will provide an extrapolated rainfall for your weather station, if it does not have its own rainfall gauge. I would suggest you try it out and watch your log file to see if rainfall amounts are provided by our getWeatherFeature call after selecting your PWS. Also, I believe the following link will provide you the same data as a our getWeatherFeature.

Great! Thanks. I’m already reaping the benefits - this installation saved me from going out in the monsoon to manually override my old controller that was set to run.

That link gives me all that I need. Plus, I see that the device main tile gives a “Rain Delay” status automatically.

So what is the cause of the system only working if I manually turn on zone 1-7 through the app. but if I hit start or have them run automatically it won’t do anything.

Have you configured a time for each zone in the device screen (not the smart app)?

Yes 10 min for all 7 zones

Also it tries to run if it rained it will stop it so I know there is some kind of communication

Yes i need 8 to always turn on with 1-7

i would like to control relay 8 so if i need to fine tune it that would help. So if it could stay a pump and control it yes.

if its not an option to control the time with the app 5 min would suffice.

and thanks

Matt and Stan,
I recently implemented your project with my 9 zone irrigation system in my garage. All went pretty smoothly based on your documentation. Thanks for all your work! More recently I was experimenting with trying to add 2 more relays (I had extras sitting in the box - an 8 relay + a 4 relay) to control the 2 garage doors. The trouble I’m having is that I’m running out of usable digital outputs on the Arduino. The SmartThingShield uses pins 2 and 3 for Rx/Tx and pins 0 and 1 also appear to be used. I thought I could use pins 0 and 1 but when I hooked it up there is a signal there already and the doors start dancing! Currently I’m using pins 12-4 for the 9 irrigation zones. Is it possible to get 2 more digital outputs working?

You are probably thinking “Why connect the doors to the irrigation controller?”. I’m beginning to rethink the wisdom of that too. I can’t connect my Garage door device handler to the same thingshield device it seems without clobbering the irrigation device handler. So this is another problem. Do I kludge the device handler to handle doors and irrigation zones which seems very possible but not pretty. Or can I somehow get a smartapp to translate the garage door virtual device handler into commands to the irrigation thingshield device assuming I can first answer the available digital output problem…

Any help/suggestions would be much appreciated!
Cheers
Mark

I found an answer to the extra digital outputs by using the analog pins… Still seeing if there is a way to map 2 device handlers to one physical device.

On top of the other issues I have I’m having a sending issue. I can manually turn on a sprinkler but when I go to turn it off it gets stuck in “sending” and won’t do anything. Eventually it times out goes back to an off tile but my sprinkler stays on.

Thanks for the help in advance.

Just to let you know system is still working great in fact in the process of making another one for someone else. I know you were looking at making changes especially with all the entries in the log. Any Luck?

Hi @mckenph,

Yes, I did update the code to add a few new features and enhance the event logging. Here are a few headlines:

Smart Sprinkler v3.01 Highlights

  • Now you can set the minimum daily temperature threshold to irrigate your lawn. This has a number of use cases. For example, you can create an additional instance of your SmartApp that triggers an additional watering only on very hot days! Or you can set a minimum temperature for an irrigation on those cool winter days when you lawn is using less water.

  • The SmartApp will now check to be sure the irrigation system actually turns on. If not, it will try to turn it on again and if unsuccessful, you will receive a notification. Although the system is very reliable, there are a few times when SmartThings is having issues that interfere with communications. This feature gives you some extra peace of mind.

  • You can view event logs within the Device Handler by going to the Recently tab. In this version, event logging has been greatly streamlined and now focuses on physical events, for example when a zone is turned on or turned off (Note: for this release there are also communications from the SmartApp that continue to get logged. As I better understand these, I will do an incremental release to remove them and/or make them a bit less cryptic).

  • The README file has been extensively updated to include updated screen shots and more importantly, have incorporated all the community feedback from this thread. THANKS to all those who took the time to share their thoughts, insights and learnings about installing this project. By adding these to the README, others can now benefit from your experience!!!

  • The Arduino code was updated to meet current standards. Also, the code for the Arduino Mega now uses the onboard hardware Serial 3 for communication. This requires a different jumper configuration. If you are already running the system, there should be no reason to update the Arduino sketch. The Device Handler is expected to be backwards compatible.

To install, you should only have to update the Device Handler and your SmartApp by going to graph.api.smartthings.com under My Device Handlers and My SmartApps. You can simply paste over your existing code. When you update in this way, all your run times and SmartApp instances should be preserved. An updated Arduino sketch is provided, however, does not offer additional features and you will likely not need to update your older version.

Enjoy

Thanks, Stan. I really appreciate everything you have created and that you’re keeping this beast going.

@d8adrvn I’m having trouble, either finding the right code or identifying it as such. I go to https://github.com/d8adrvn/smart_sprinkler and look for the scheduler App. There I see it, but it is marked as one month old and the comments say “3.0”. Is this the place to be looking?

Something else. I somehow have the 3.01 device handler. But I can’t find even that now. I vaguely recall seeing a web page that had a history with the most recent 3.0.1 code labeled in green to the left of the version history description. But, again, I don’t know where that was/is.

I’d love to tell you the right place to be but I am having multiple issues myself.