[OBSOLETE] Smart Sprinkler System

I am having issues with the scheduler simply not watering the lawn anymore. I have mine set to water every 3 days, and use my weather station. Now, it basically never does anything. I debugged it about a week ago and basically ran it three times in a row while watching the logs. (I commented out the line in updated() that reset the watering days variable). And of course it worked fine.

But when I run it normally it simply does not water the lawn. There are no events from the smartapp, and no notifications. The IDE shows that the scheduled job runs every day as expected.

Is the app still working for everybody else? I guess Iā€™ll try and re-install it next.

@Dan999,

For what its worth, I am running my own system, two development systems (8 zone and 24 zone, each under control of multiple smart app instances that turn them on/off 6 times a day) and all running normally this week. The only exception was on Sunday, my real irrigation system failed to trigger. When I checked the history for the SmartApp, the status was ā€œpendingā€. It never triggered. Since Monday, its been fine.

My understanding is that some users have SmartApps that ā€œdisappearedā€ as part of an update over the weekend. And the only way to fix is a complete re-install or send a ticket to have your database refreshed. I posted the full incident above. You could try and create a ticket, but it may be quicker to deinstall and completely reinstall a new version of the smart app.

We added some code to alert a user if the sprinkler system does not respond when scheduled. The code catches a situation where the Arduino or the device handler is unresponsive. Unfortunately, it requires the SmartApp (Irrigation Scheduler) event to trigger. Turns out, this is the least reliable part of the platform. There is at least one idea posted in this thread to create an alert. Iā€™m thinking about implementing something that double checks the SmartApp.

Had this issue consistently with this program. What I ended up doing was putting in an appliance module and then plugging that relays and the arduinoā€™s power into that. And I set a CoRE piston to recycle the power times a day. That is, it just turns the power off and 30 seconds later turns it back on. That seems to have removed most of the failings although I still get one once in a while.

@Dan999,

Turns out I replied to soon. Looking at my logs more closely, my actual sprinkler system is scheduled from two different smart apps. One that schedules the zones for the lawn and one for the drip irrigation zones. The latter has been running faithfully. The smart app that schedules the lawn actually stopped triggering last Sunday. I deleted and re-installed the app and it kicked off a scheduled event this evening.

Like I mentioned earlier, I have two other dev systems that continue to function normally and are scheduled to run many times per day.

The issue appears to be that the event scheduled within the smart app does not trigger. Failure to trigger appears to be correlated with broader issues with SmartThings. I donā€™t believe it has anything to do with the code per se nor would I think that Rigging65ā€™s workaround is immune. I am open to suggestions if anyone has ideas to make the SmartApp more robust. Also, I am continuing to think through approaches to monitor smart app activity and alert when there are issues.

@ady624 added some resiliency features to CoRE that might be applicable to the irrigation scheduler. Iā€™m not smart enough to know if itā€™s truly the case, but you might look at CoRE to see.

For me, mine were supposed to run this morning, but didnā€™t. The DTH says itā€™s due to rain, but going to the source at Wunderground, the precip levels (past 2 days plus forecast) donā€™t seem to justify skipping this cycle.

I would take an aeon moistore sensor (the one with the wired sensor) and put it in a plastic container with a tiny hole at the bottom. Or even attach it to the edge of the roof and hide the sensor underneath the roof, next to the soffit - then modify the DTH to not be a leak sensor anymore - make it a rain sensor :smiley: doesnā€™t get better/more precise than that.

Someone else had the idea before me, I found: [RELEASE] Aeon Water/Flood Sensor (DSB45-ZWEU / DSB45-ZWUS)

Stan,

I have been testing the system and I seem to have at least one issue.
I can turn on/off any of my 16 relays via the manual method. However, the valve button always shows ā€œsendingā€. I never see it change color or show a different message.
I was monitoring the system via the Live Logging and I see the following message whenever I turn on/off a relay: 423d9233-cfa9-4ef9-be9c-3f49a8441b35 12:33:59 PM: error java.lang.NullPointerException: Cannot invoke method contains() on null object.

I also ran the Scheduler app and it started fine, I see the relays turning on/off, I see a notification that the watering has started, but, I then see a notification that the watering did not start after two attempts. I also see under my Recently tab several entries: ā€œSwitch is Warningā€.

I suspect I may have a communication issue, but, I am not certain how to troubleshoot this issue.

I grabbed another log from the SmartApps Scheduler and enclosed it below.

f057494c-effc-41aa-8f91-6d5f475282cd
12:20:58 PM: debug getChildDevices(false), children=1
f057494c-effc-41aa-8f91-6d5f475282cd
12:20:17 PM: debug getChildDevices(false), children=1
f057494c-effc-41aa-8f91-6d5f475282cd
12:18:37 PM: debug getChildDevices(false), children=1
f057494c-effc-41aa-8f91-6d5f475282cd
12:18:05 PM: debug getChildDevices(false), children=1
f057494c-effc-41aa-8f91-6d5f475282cd
12:17:56 PM: debug getChildDevices(false), children=1
f057494c-effc-41aa-8f91-6d5f475282cd
12:17:45 PM: debug getChildDevices(false), children=1
2da54338-c6b3-4686-bfe9-92cafd1afaa1
12:16:15 PM: debug Parse returned {{ linkText }} has arrived
b31a7159-6e0b-4cfb-9c7f-84306702cbe6
12:15:50 PM: trace getPhrases(), state.welcomeIssue = null
84dce47c-0fc8-4fce-b9d7-bfb1e522e43e
12:15:49 PM: info SHM getInitialData 0.033 (00) incidents:00,
locationId:3b096d76-1a4d-4103-bbb1-ed9fa0a63b5a
84dce47c-0fc8-4fce-b9d7-bfb1e522e43e
12:15:49 PM: debug summaryData: [[icon:indicator-dot-gray,
iconColor:#878787, value:Unconfigured]] - [[icon:indicator-dot-gray,
value:Unconfigured, iconColor:#878787]]
f057494c-effc-41aa-8f91-6d5f475282cd
12:15:19 PM: debug getChildDevices(false), children=1
f057494c-effc-41aa-8f91-6d5f475282cd
12:15:16 PM: debug getChildDevices(false), children=1
f057494c-effc-41aa-8f91-6d5f475282cd
12:15:14 PM: debug getChildDevices(false), children=1
f057494c-effc-41aa-8f91-6d5f475282cd
12:15:12 PM: debug getChildDevices(false), children=1
f057494c-effc-41aa-8f91-6d5f475282cd
12:15:03 PM: debug getChildDevices(false), children=1

Cheers,

John

Update:
I worked with SmartThings Support to try and further isolate the problem.
Since the SmartThing Shield LED is changing colors they believe communications is working in both directions.
There is a simple Arduino program called on/off Hello that can be used to confirm the communications. I may give that a try as a double check. I also have other devices that are working ok, so that eliminates the Hub.

Any suggestion as to tracking down this issue would be helpful!

Cheers,

John

@JWB,

This looks more like a bug in the code. Best thing is to let me look at at the code tomorrow and see what the issue is. I personally donā€™t have a pump/valve with the system so it may be something escaped testing. Can you confirm you are using zone16 as a valve and have activated it as a valve using the device handler? Iā€™ll do my best to look at this first thing in the morning

Stan,

No I am not using zone 16 as a pump. What I am using is all 16 zones. I
do not need to use the pump feature with my system.

For some reason the cloud does not see my controller status, although it
does turn on/off all 16 relays.

I also see the SmartThings LED change state from blue to yellow as each
relay is turned on/off.

However, I see notices that indicate the watering did not occur after
two attempts when running the scheduler.

If I turn on a zone manually, the button only shows sending. It never
changes color or show a different state other than sending. If I turn
off a zone the button changes back to grey.

Cheers,

John Boyd

@jwb,

I updated the handling events for the overall system switch (device.switch). The status of the system switch is reflected in the allZonesTile which is the main tile you are pressing to turn on or off the entire system at once. The code is Device_Type_16_Zone_Irrigation_Controller.groovy v3.0.2 which can be found on my main branch of github (just click the link).

Go ahead and copy paste this on top of your current device handler and see if it fixes the issue. After saving and publishing (for me), go ahead and kill your smartthings app on your smartphone (just be sure it fully refreshes) and then test. I did not look into the smart app issues yet. Let me know if you are still having smart app issues after updating the device handler code.

Stan,

Ok, I tried the new driver and I see the same problem as before.

I collected logs from the Arduino serial monitor, Live logging and from
the driver. They are all attached.

Here are the steps I did:

1- I overwrote the driver with the new one.

2- Unpaired the controller from the hub.

3- Removed the device from my iPhone

4- Paired the controller with the hub.

5- Added the device and configured it.

6- Manually turned on/off zones 1, 2, 3, 4, 5, etc.

I see the SmartThings LED change color from blue to yellow when the zone
is turned on and then back to blue when a zone is off.

I see an error message in the Live Logging every time the zone is turned
on or off.

Cheers,

John Boyd

Hi John,

I donā€™t see the attachments? Can you try to send again or if you prefer, just send to my email: stan@dotson.info

I am watching my device handler logs and donā€™t see any errors. I am interested in what you are seeing

Also, I have my dev system set up to run about a dozen times per day. Two of three went off without a hitch. One of the scheduled events threw the following error:

d954578f-bbad-46bb-a419-e8a9a60bb0e8 4:02:40 PM CDT: error java.util.concurrent.TimeoutException: Execution timed out after 40 units. Start time: Sat Aug 06 21:01:14 UTC 2016

The irrigation scheduler smart app tried a second time and it kicked off at 4:03. The error is interesting because its not a code error. Its one of the reasons I have the smart app checking just to be sure things are kicking off.

Stan,

I am sending the three logs to your email address as it is unclear why
you did not get them in the original reply.

I have some other questions as I brain storm this issue.

Is it possible that I used the wrong SmartThings library for the
Arduino? I believe there were several, but, only one was correct.I had
initially grabbed the library from the SmartThings web site. However,
the docs indicated I should use a different library and I used the link
provided for that.

However, I am not certain which one was actually used in the Arduino
Irrigation sketch compile.

I mention this, as I am new to both Arduino and SmartThings and it is
very possible I messed things up.

Is there anyway to tell which library I used during the sketch compile?

B.T.W. the compile did not show any errors.

Cheers,

John Boyd

Stan- Thanks for your continued support of this project (along with the AD2 project, these are my favorite ST integrations).

Iā€™m at v3.0.2 of the 8-zone DTH. Should I be updating your code as you go?

Similar question: Any thought to offer github integration?

Hi @Cal7,

Thanks for the comments on our projects. Iā€™ll look into github integration. I think that would make my life easier as well.

RE: updates
I think many of my updates are to get a system up and running for someone who is experiencing errors that I donā€™t see on my system and/or adding in some code to accommodate a slightly different use case or simply updating the README. If its working for you, I donā€™t see any reason to make every update. If we are adding some new features that would be useful to everyone, Iā€™ll usually create a release and post on this forum.

1 Like

Stan,

Success at last! Your last enhancement to the SmartThings driver to check for null values fixed my pointer errors. YES!
I have ran the controller for at least 1 week with 5 different schedules and they all ran with no issues.
Many thanks for tracking down the problem and developing a fix!

This project has been a lot of fun! It has helped me learn a lot about the Arduino, its s/w and h/w and showed me how the SmartThings system works. I feel more confident now about tackling some of my own projects.

Thanks again for all your help!

Just did the install this evening. So far everything looks great. Awesome work getting this together for the community.

Thank you!

@d8adrvn Stan, would you consider a feature request?

I find myself constantly checking the Wunderground web site for the rain data (past 2 days plus immediate forecast) to estimate whether my irrigation is going to run. Could you, would you, report the rain data that is used to determine whether the threshold has been met? Maybe an option if others donā€™t care.

Thank you!

1 Like