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

Hey @kampto , been using this app all summer and has been working great! Nice job on it.
Feature request, I have a soil moisture meter that detects the moisture in percent. Is there a way you could add the pause schedules, like the wet/dry, but for moisture value? For example, if soil moisture is over 60% then pause all schedules until its below 60%. I know I can write a rule to activate the wet/dry to do this, but it would be really tidy if it were built into the app.

Sure, can you send a screen shot of this moisture sensor Device page "Current States" . I don't see a "Moisture sensor" in Doc's the capability list so wondering if this shows as Humidity.

Yep, your right! It shows humidity, it's the sensor that most use with Ecowitt system, WH51.

OK, give this a try. I also added a Humidity indicator text line below table if you using that option. Hoping you can just paste the new code and go into app and reconfigure without having to delete existing app and start over

1 Like

Ok thanks!!! Let me give it a try :grinning:

Hi Kampto, this is great .... really appreciate all the work you have put into this. I have a feature request - would it be possible to set a specific end time rather than using an offset period ? Cheers

I can add a everything off time

That's an interesting thought although I was thinking of a specific off time per device ?

hi @kampto
Is this compatible with C8, latest firmware? I'm trying your app for the first time and I dunno what I'm missing... I'm setting the start time of my balcony lights to a specific time, with 2 minute run time (just to test things out) but it's not working. LIVE logs also didnt show any activity when the time set was met.

here's my setting

Yes, should work fine on C8. Did you hit done at the bottom of page to save app?

Just tested and is working for me. Did you check the physical light? That app page wont change the On or Off status until you hit Refresh button. Also need to hit this button for changes to take effect, or hit Done.
image

Add All Devices Off at a specified time. Tested and working.

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