[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.

Download the Hubitat app