App: Switch Scheduler and More. (Schedule: Lights, Outlets, Switches, Relays, Sprinklers, Valves, and more..)

Just tried this and it looks good but doesn't do one thing that I was hoping it would... I'd like to add multiple lines for the SAME device (i.e. Multiple discrete time for ON and OFF for a device (including different times on particular days). My application isn't a sprinkler. Any way to do this?

Actually, after thinking about it... Although the way I described would be nice, it's pretty easy to just create another app definition for each required change.

So, for example, I could have
Monday on at 2:15pm for 1 hour as my day 1 schedule

And
Monday on at 9pm for 30 minutes for my night 1 schedule , etc ..

Even for the same device. Then if I name them with a suitable prefix they will all sort together as I want them.

After playing with it for a while, I find that I often get errors when setting the schedule... examples:
ava.lang.NullPointerException: Cannot invoke method length() on null object on line 536 (method updated)

java.lang.NumberFormatException: null on line 512 (method updated)

When this occurs (often) the schedule doesn't get set. It seems like maybe it has something to do with the 2x daily option? I'm not using that, but I've sometimes gotten it to work if I activate 2x, then de-activate it, then save settings. Unfortunately this seems hit-and-miss. Is there something I'm doing wrong?

Here's a sample setting:

I found an issue with the 2nd run time because there's some cases where it can try to schedule >24hr time. Uploaded the fix. Not sure if that fixes what you are seeing.

I will update and let you know. Until then, if it helps.. I found that I'd get the error if I set up a schedule (1x), but if I change to 2x, then back to 1x (even before refreshing or saving), then when I saved it was ok. Almost seems like an uninitialized variable with a null value...

Just found this and installed it to run my sprinklers, we shall see how it does tomorrow.

I wrote the Precipitation Monitor for NWS data back in 2022 with the intention of turning my dumb controller into a smart controller and now I'm finally getting around to it.

If the Precipitation Monitor detects more than X inches (user configurable) of rain the prior day it sets the sensor to the appropriate wet/dry value at a configurable time so this will work great with your app.

I'm hoping to cut our water bill significantly this year. Partly from the water sensor and partly because adjusting the times and durations on the actual physical controller was so painful that I rarely did it and probably over watered, especially in the spring and fall.

Looks excellent BTW. Thanks for taking the time to write this and share it.

@kampto Well the schedule all worked great but it ignored the "Pause if wet". We had 1.66 inches of rain in the last 24 hours so it's wet, wet, wet right now.

App reads the wet\dry sensor correctly but either ignores it or I'm misunderstanding the configuration process.

Thanks.

I will look into it. Thanks, for testing.

Update: Found the issue and ran a test to confirm.

Go to line #429 in Apps code and get rid of that "d", its a typo. should be "state.wetSensorValue". Go open app and hit update/store or done.

Also updated github.

2 Likes