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.
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.
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 doesnāt get better/more precise than that.
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.
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!
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
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.
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.
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.
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?
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.
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.
@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.