[Release] Lighting schedules app

Hi all, to follow on from my first driver, here is my first app. Again, hope this is useful to someone out there.

It is (yet another) app for scheduling lighting, but what might make it different is how you specify time periods, and behaviours - which makes it quicker/easier to set up than doing the same with the likes of rule-machine:

  • Timings are written simply and quickly like this:

    sunrise-20 - 0720, 13:00-14:00, sunset+30 - 00:00
  • It can be set to be active at all times, or only for certain modes.

  • It can be set to constantly force lights on/off, or to only turn them on/off at the start or end of the timing periods you defined.

More info on its features and how to use it is in the README

I suggest the best way to install is using the Hubitat package manager.

Alternatively, install in the traditional way via the Hubitat Elevation web based interface:

  1. Click "Apps Code" then click "New App" then "Import"
  2. Enter the Import URL then click "Import"
  3. Click "Save"
  4. Repeat steps 1-3 for the child app:

NOTE: You must install the parent app before the child app.

This app and any others I write in future are available here on GitHub under the BSD 3-clause open source licence. Any suggestions/feedback from more seasoned app authors will be gratefully received!


Looks interesting. Thank you for this!

I've now made this app available via the hubitat package manager.

1 Like

Somewhat new HE user here...I installed the app and configured up a rule to turn 2 switches on and off according to schedule hit done, then poof. It all disappeared on me. The rule is there and running, but the app doesn't show up in my apps list but debug logs are being generated. I installed using Hubitat Package Manager and I can't uninstall as it says it's in use.

Every minute I'm getting these logs:

[app:120]2021-06-30 09:19:40.099 pm [debug]Checking for device ID 5 ... isOn: false, inPeriod: true, wasInPeriod: true
[app:120]2021-06-30 09:19:40.096 pm [debug]Checking for device ID 4 ... isOn: false, inPeriod: true, wasInPeriod: true

OK and as I paste those links I see the url for the configure and if I click on "debug" it takes me to the config page. Thankfully I left debug logging turned on as I don't normally or I wouldn't have any idea how to get back to it. It's also showing up in the logs as "Lighting Schedule" and not with the name I chose for "Name for this application*"

And I figured I might as well try re-installing. I went into the schedule through debug link then removed it and then removed the app using HPM. Then I installed it manually as user apps using the raw github links to the files and installed as user app. Before I created the first schedule I exited out and went to apps list and it was there. Then I created my rule and went back out and now it shows "Lighting Schedules" in my app list with a single "Lighting Schedule" underneath it. So...it appears to be working now except for showing the schedule/child app(?) name properly if I'm assuming correctly how it should work.

All this said. This app does exactly what I wanted! I wanted a dehumidifier and fan to be ON at certain times of the day and I originally made a repeating rule machine rule and it just didn't seem right to me and also it was only triggered to kick off once a day so this app solved my problem perfectly.

Aaaand...the name has magically changed to what it was supposed to.
I was watching and waiting for the 22:00-00:00 period to kick in and turn on...and it didn't...and didn't...and I figured maybe it didn't like 00:00 as the end so I changed it to 23:59 and boom, the 2 devices turned on and the name of the child app changed.

So, I don't know if this is all user error (surely wouldn't put it past me) or not but figured I'd leave this here just in case.

Hi, thanks - I'm glad you've found it useful.

I'll take a look I to what you described and see if I can figure out if there was a problem. Will let you know.

1 Like

@dstutz ... Can I ask you what timezone you live in? (Including whether you currently are in daylight-saving time)

America/New_York and yes

Hi @dstutz ... I've been able to replicate the issues you encountered:

... and I think I've fixed them. It should appear as a new version in HPM.

Awesome, thanks! Updated and created a new rule to test both fixes and things appear to be working properly. Praise Be to those that do date/time math properly, I don't know if I could, lol.

Is there a way to trigger the pause/unpause of a schedule from another part of hubitat? I'm trying to get a "vacation mode" set up and one of the things I'd like to do is pause one of my schedules automatically with that. Ideally I'd like to tie the pause/unpause to a switch but I'm open to anything that will accomplish the task.

Hi @dstutz ... at the moment the application supports using modes to control whether a schedule runs or not. For example - you could have a mode corresponding to "vacation" and set the schedule to not run when in that mode. Toggle off "active in all modes" and then you can pick the modes for which the schedule will run. You could then set up a button to change the mode - perhaps using rule machine, for example.

There might be other ways an application can signal information to another application, but I'm not really very familiar with them; but would love to hear from anyone who can suggest ways.

1 Like

Yep, I'm blind and missed that toggle. That will do nicely. Thanks again!

This is an interesting tool. I have added it to my other HA tools. One thing I would like is if I have more than one device selected for control, I would like to be able to make them all the same trigger times. I know I can make a "group" and control that group, but that is an extra strep.

Don't go out of your way to implement this suggestion, it was just something that crossed my mind while trying your app out. Thanks for you effort on this app.

Thanks - That's an interesting idea. I might have a think about how to make that work.