DelayLight is my version of a time-delay light/load control. It will turn off a configured set of lights after a delay period, optionally using one or more sensors to determine presence. Sensor triggers can also turn lights on. Sensor-based triggering turns lights on for an automatic timing interval, while manual activation of a light uses a separate manual timing interval.
I wrote this plugin in late-2017 when I had to rebuild my Vera configuration from scratch, and I decided not to use the same approach I had used for years prior. Until now, this plugin was just a tool I kept for my own use, and it didn’t even have a UI–it was configured by directly manipulating its state variables. But recently, some of the older plugins that implemented this kind of functionality seem to have lost their maintainers and their future has become less certain, so I decided to package up my expression of a solution for public use.
The GitHub repository for this project is here: [url=https://github.com/toggledbits/DelayLight]https://github.com/toggledbits/DelayLight[/url]
Documentation for the project is also found in its GitHub repository. Please post issues or questions in this thread.
DelayLight can be installed from the Vera plugin marketplace (search “DelayLight” with no space between words), or using the AltAppStore (ALTUI users).
DelayLight is free to use, and if you find it useful, please make a small donation to support its ongoing development.
REVISION HISTORY
Note: You can always see the current release info and latest changes by looking at the CHANGELOG.md file in the Github repo.
2019-08-25: Version 1.12. Fixes an issue with schedules and inhibit devices disabling manual mode. See the changelog (linked above) for details.
2019-06-08: Version 1.11. Works around issue where Luup creating variables from SwitchPower1 service on a lock makes luup.device_support_service()
report that the device supports SwitchPower1, which is doesn’t.
2019-05-28: Version 1.10: Adds trigger quieting (see docs) and supports locks as triggers.
2019-01-07: Version 1.8. Fix for Monoprice switches that advertise themselves as dimmers but don’t dim; full wait for Z-Wave ready before initializing for better acquisition of device states after power failures; additional small bug fixes.
2018-08-19: Version 1.7. This version fixes a deployment error in posting 1.6 to the Vera Plugin Marketplace that was creating problems for fresh installs. Users of AltAppStore/openLuup are not affected, and there are no changes to the code of this release.
2018-08-05: Version 1.6 released. This version allows devices that implement SwitchPower1 to be used as inhibitors, and corrects a bug in the initialization of inhibitor tests.
2018-07-29: Version 1.5 released. This version allows the timer to not turn on lights if there’s an “on” delay and the trigger sensors all reset before it expires; handles change in load level to a dimmer that is already on as a manual trigger; adds ability for manual-on to not “set scene” by turning on all “on” list devices, just leave everything under manual control. See the Github repo’s CHANGELOG.md for more detail on these changes.
2018-07-02: Version 1.4 has been released to the Vera Plugin Marketplace and AltAppStore. This version fixes a bug in “Mode 2” timer restrictions (don’t start timing until all triggers have reset).
2018-06-24: Version 1.3 has been released to the AltAppStore and Vera Plugin Marketplace. See changelog.
2018-06-11: The “stable” branch of DelayLight has been enhanced to add Inhibit devices and active time periods. There is no UI for these functions yet, so you’ll need to edit state variables if you want to try them. Also, if running on openLuup, this version checks to make sure you’re not using a version of openLuup that a child startup bug.
2018-04-12: A beta version based on 1.2/1.3dev is available for openLuup and installable using the AltAppStore.
2018-03-19: Version 1.2 is now available in the Vera plugin marketplace. This version creates timer devices as children of the parent controller device, making it a single-instance plugin in which all timers share the same code. This should result in a much smaller in-memory footprint for systems with lots of timers (I have 16 in 9 rooms, for example). A single Luup timer/delay task is used as well, so it’s very resource-efficient.
2018-02-26: Version 1.1. This was a maintenance release that includes some code cleanups and an extension of the status interface for additional reporting when needed. Status reports are user-initiated by requesting [url=http://your-vera-ip/port_3480/data_request?id=lr_DelayLight&action=status]http://your-vera-ip/port_3480/data_request?id=lr_DelayLight&action=status[/url]
2018-02-19: Version 1.0 has been released in the Vera plugin marketplace.