[Release] Schedule Manager App

Hello, I've browsed other scheduling apps, but none were what I was looking for. Previously I was using RM and defining a set of triggers and then in the rule body checking to see what time it was before performing an action. Having specified times in multiple places got annoying to create/update rules so I decide to create an app for it. I hope someone can find it useful :slight_smile:

You can find the app here along with instructions on how to use it.

It's also on Hubitat Package Manager as "Schedule Manager" for easy installation.

Description

This app allows users to configure a time table, per device, and schedule the desired state for each configured time. Users can select any number of switches/dimmers, schedule them based on a set time or sunrise/set (with offset), and configure the desired state for that time. Additionally, users can pause the schedule for individual times. Advanced options include only running for desired modes or when a specific switch is set in addition to the ability to manually pause all schedules.

Features

  • Schedule any number of switches/dimmers
  • Schedules based on selected time or sunrise/set with offset
  • Individual schedules may be paused
  • Set desired state for switch/dimmer to be in at specified time
  • [Optional] Configure which modes to run schedules for
  • [Optional] Configure "override switch" that will prevent schedules from running
  • [Optional] Option to pause all schedules

Example

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

6 Likes

Looks very similar to this app, but not exactly the same: App: Switch Scheduler and More. (Schedule: Lights, Outlets, Switches, Relays, Sprinklers, Valves, and more..)

Not totally sure but it looks maybe your app can better handle multiple schedules for the same device?

Yes, that app was my inspiration (I liked the table view), but I couldn't add multiple schedules for a device. Additionally, I didn't want to always set a duration the device should be on, but rather just specify the state in which I wanted the device to be.

2 Likes

Trying your app, it's very nice, however it doesnt appear to be honoring sunrise/sunset offsets. I have some sunrise - 10min and sunset +20min, and it sets the crontab to the exact sunrise or sunset time, no offset applied.

Looks like there may be a typo here. Should it be logDebug ? or should it be logInfo? but there is no logInfo function.

A fine app except that I've had the same experience as jon1: sunrise/sunset offsets are ignored.

@jon1 @shl Thanks for checking it out! I'll get a fix out for the sunrise/set offset and the typo (should be logDebug), but it might be a little bit as I'm dealing with some storm aftermath currently.

I took a look at the code and the fix for the offsets issue is as follows:

delete line 399

then after the new line 399: state.devices["$dev.id"].schedules.each { scheduleId, schedule ->

add this line

offsetRiseAndSet = getSunriseAndSunset(sunriseOffset: schedule.offset, sunsetOffset: schedule.offset)

So it should end up looking like this starting at line 396

        //**** Update sunrise/set times and order schedules ****//

        // Set updated sunrise/set times if option is set for schedule
        state.devices["$dev.id"].schedules.each { scheduleId, schedule ->
            offsetRiseAndSet = getSunriseAndSunset(sunriseOffset: schedule.offset, sunsetOffset: schedule.offset)
            if (schedule.sunTime) {
                if (schedule.sunset) {

HTH

With those changes the offsets do work fine. My line numbers are not quite the same as yours but your instructions made the code easy to replace, even for me (the last language I wrote code in was called "BASIC" -- and so was my code). Thanks.

@jon1 @shl Thanks for taking a look at this. I have power and internet now so I've gone ahead and pushed an update. I recommend updating as it also contains a bug fix for updating the sunrise/set schedule daily.

This would be nice if it had the ability to send a message, TTS based on a schedule.

i suppose i could trigger a virtual switch that would in turn speak something.

A nice feature although I don't see myself getting to it any time soon. Happy to accept a pull request if you feel so inclined, though! I think using the virtual switch like you suggested is probably your best bet.