[Release] Schedule Manager App

I'm also using illuminance and motion to trigger the lights. Any chance that you're interested?

I don’t really think that falls into the purpose of this app. It’s more for scheduling actions at specific times. Behind the scenes a cron is generated for each schedule. Using an event like motion or illuminance would be a fundamental change to how the scheduling works.

Addng Hub Variables will be great. It will make the system easier to manage.
Some of my Hub Variables get changed every few days. Is there a way to force your app to update the cron settings if a Hub Variable is changed?
Would like to update a Hub Variable in a rule and then trigger an update of the cron in your app and not have to manually update your app.

Working on the Hub Variables now. There's more there than originally anticipated so it's taking a bit longer, but yes, it will include handlers for updates to either the name or value of Hub Variables.

1 Like

I updated to 2.0.0, but im still getting the Required field error when I click Done. I went to the child app code and changed required to false for the appName input in line 103, and now it saves and exits properly. Not sure why, but there it is.

Do I assume the note in the code that says to "re-save" the schedules to get sunrise/sunset working, just means to open each child and click Done?

Also the version deployed still shows 1.0.0.

Hmm, that's interesting. I was never able to reproduce this error, even after ensuring I was on the latest hub version. I'm glad you figured out it was just the appName. Out of curiosity, is the name saving properly?

Yes, "re-save" is just open the app and click Done.

Thanks, I'll push a fix for that!

@JimB I've pushed an update for Hub Variables. See above release notes.

@John_Land I have a fix for the bug you reported, thanks.

1 Like

Yes the child has the correct name, Lighting in attached screenshot. The input is under the initial set-up section, which opens up as hidden on an already-setup schedule child. However it's not populated when I open it, so perhaps it needs to be pre-populated with the child name? or leave it as not required?

Interesting :thinking:. The name shouldn’t be getting cleared out like that. When you type in an input for the name, the input then sets the app label, which is what Hubitat uses as the display title and likely why it still displays “Lighting” even though the app name input is being cleared out.

Unfortunately I don’t know why that is getting cleared for you. It should be saved by default and I don’t clear it at any point. If modifying the input to be not required works for you, that’s probably a fine temp fix, although I would think that pausing or unpausing the app would cause the app label to be reset since doing so updates the app label to ‘{appName} (paused)’.

Thanks Evan. Will try it out when we return from vacation.

Looks great! I look forward to trying this out soon.

1 Like

Tried the new version. Worked well for Hub Variables. But an offset from a Hub Variable caused an error: java.lang.RuntimeException: CronExpression '0 :40 T22 ? * SUN,MON,TUE,WED,THU,FRI,SAT *' is invalid. on line 890 (method mainPage)


EDIT: noticed that the values for my Hub Variable times in your app were in date/time format. I saved them as time without date. That could be an issue when adding an offset.

I've been looking for a scheduler for a while that schedules Rule Machine rules. I have a number of utility rules that run at various times that do more than turn on/off lights. I also like the UI for the Schedule Manager app. So here's how I cobbled together various elements to schedule time-based rules:

  1. For each rule, create a virtual switch (e.g., "VS Trigger - Utility - Beep Siren/Chime at Noon").

  2. As the Type for the VS, select "Virtual Switch uDTH Lite (user)". This is a user driver that can be downloaded via Hubitat Package Manager (search for "Universal Virtual Switch uDTH Lite").

  3. In Preferences for the VS, select "Force State Update ON" and set "Enable Auto-Off" for some time (I arbitrarily use 1 minute). The former setting means that setting the VS to an ON state in the Schedule Manager app will send an ON trigger to your rule even if the VS was already ON. The latter setting means you don't have to deal with resetting the VS to OFF in your rule.

  4. In your rule, use the VS as a trigger. Example (ignore the disabled old trigger in red text):

  5. In the Schedule Manager app, I created a new child app named "Timed Rules", and set a scheduled run for the VS. Examples:

My next kludge is to create another Schedule Manager child app, "System Restart Rules" and a companion rule that sets a hub variable, "hvSystemRestartTime", to "now() + a few minutes" when triggered by Location event: systemStart. I can then schedule a number of rules to run using the hub variable and different offsets. Example:

  • Rule 1 is triggered by its VS when the run time = hvSystemRestartTime + 1 minute
  • Rule 2 is triggered by its VS when the run time = hvSystemRestartTime + 3 minutes
1 Like

Here are examples for the "System Restart Rules" mentioned above:

1 Like