Smart Sprinkler System

[quote=“d8adrvn, post:315, topic:3076”]Actually the Smart Sprinkler App version is still 3.0 I finished it up a month ago and haven’t had to do any minor bug fixes (knock on wood)
[/quote]Makes sense. I was wondering what was different between the “new” minimum watering temp and what I already had in the version I installed. Answer: No difference. Everything else is under-the-hood, so I in fact have it, I just didn’t know it.

Ok, I’ll try it when I get home. I’m trying to set up github integration, but I’m not able to get yours to work. What is the OWNER, NAME and BRANCH I should be using for this 8-channel project?


Thanks for the help with the code.

As for the sending issue. Sometimes I hit the button and it just says sending for like 20-30 seconds and does nothing. Sometimes I’ll already have the zone running manually and I try to turn it off and it does nothing. These instances happen only 20% of the time.
But this might have something to do with my system will not automate and run a schedule. So that might be more of a cause to other issues but I don’t know.

Thank you

Do you mind sharing your project setup? I have some ESP8266 boards that I would like to use.


I am not using a couple of my 8 relays and would like to use them for controlling a pool pump motor, on a schedule. I need a momentary closure of the relay to turn the motor on/off. Would it be better if the device handler were modified or would a new handler need to be written?

I’m looking for a relatively simple solution not a re-write of the scheduler and handler. I believe the timer.h library is based on milliseconds so how could the handler be changed to accept a 250 msec “on” command?

I’m running 2.92- works flawlessly BTW. Thanks!

I am using an mcp20s17 spi io expander to control the relays. The 8 pin header connects to the 8-channel relays described in this project. The board accepts the particle photon and uses the photon as a source of 5v power.

Hi Stan,

Great work here!

May be someone already asked it but i only have one zone one valve and i was thinking to connect the pump directly to a DC power supply connected to a Z-wave controlled outlet. can you guide me where should i look on the smartapp code to change it to use a single switch device instead the controller dive handler?



Well first problem ever. This morning I woke up and it said issue. Rebooted everything and nothing. So what is the troubleshooting process

I think my board cropped out. Removed it and now it won’t find it again

Sorry to hear it. Have you yet diagnosed whether it is the Shield or the Arduino?

I’ve only had mine a few weeks - and, so far, great - but I do worry about longevity. It’s in an outside box that’s mostly shaded but still reaches the mid-90’s inside. I threw a temperature probe inside, positioned right next to the Arduino+Shield and typically saw temps of 102.

I’ve been having this issue more and more lately (the switches not initiating or getting their state lost). I unplug it and plug it back in and it goes back to working. Not sure if this is a software bug, but it seems coincidental that several people would all be having boards go bad at the same time.

I’m still using the same board and shield from a couple years ago. It’s mounted in my non-climate controlled garage which gets quite hot in the summer (90+) and freezing in the winter. No issues yet.

@Rigging65, I saw your post from 21 days ago. Hopefully you have downloaded the code update from my main branch. It reduces the number of logs posted to the “Recently” tab in the device handler and makes it more reliable. Meanwhile, when I get a chance later this week, I’ll rebuild my development system and run it hard to look for any issues.

I don’t see anything new in the repo. I’m on v3.0.2 for the DH…is that the most recent?

Yeah v3.0.2 is the newest for the device handler.

What relay’s are people buying? I need a 16 channel one.


I use the Sainsmart 16 channel relay which you can get on Amazon. You power it with a 12V DC adapter and it has a 5V output to power the Arduino.

EDIT: Ok, I did a bit more reading on the Arduino forums. If you plan to use the 5V output from the Relay Module (above), then its recommended you supply the power to the Arduino through the USB port (cut a USB cable and wire in that way). Although it technically works to power the Arduino through the 5V pin, you can easily fry your board.

Another alternative is to use the 5v 16 channel relay modules. Since you only run one module (or at most two) at a time, the Arduino has enough power. You can get these on eBay. The quality probably varies!

First of all, thank you Stan and Matthew for writing the Smarter Irrigation. I am having troubles with the communication between the device type and the smart app. I have followed your instructions and the device type (irrigation controller) is working and I can manually turn on all the different sprinkler zones. But, when I create the smart app (Irrigation Scheduler) while on the display of the controller on my phone, the two don’t seem to communicate. I can watch the log of the smart app and I see the log entry “Zone 1 watering for 10 minutes”, but the log of the device type never receives a zone 1 switch. I am picking sprinkler controller in the “switches” preference of the smart app. Any advice for connecting the two? Thanks

Edit: The device type does have a log entries ‘Sprinkler Controller received "’, but it ends after the first double quote. I’m using the latest code update I see in branch Notifications_and_Event_Handling.

Answer: While being very careful I had somehow installed an older version of code on my Arduino. It was expecting ‘allOn’ instead of the newer ‘allOn1’. Thanks, problem fixed.

Sorry to hear you are having issues. Please only use the code from github that is from our latest release or from our master branch. Try downloading the code from the master branch

EDIT: changed “main” to “master”

Solution is working great. I have it set to water for 15 minutes at three times during the night and it is faithfully following the schedule. Thanks.

im having trouble with the scheduler. I can manually control all of my zones from within the app, no issues. I scheduled my zones to run every day in the morning for a few minutes and in the evening. Ill get a notification saying the sprinklers are on, but within a minute i get another notification that they are off. The system never turns on the first pump in the system.

I see there is a new version of the scheduler app (i was on 2.97, installed 3.0 this morning), but when i try to set it up through the IDE, i get an error. I paste the raw code from GitHub as a new smart app, i can save and publish for me, and it all seems to work. Then i select the (only) hub, edit the options i want (days of week, amount of time, etc), and click install. then i get a giant red error on the top of the page

I see a lot of other people have installed it without issue, so im sure its something i am doing. Any suggestions on where i might have gone wrong?