Author Topic: Plugin: DelayLight  (Read 444 times)

Online rigpapa

  • Sr. Member
  • ****
  • Posts: 338
  • Karma: +46/-0
    • toggledbits.com
Plugin: DelayLight
« on: February 19, 2018, 07:15:45 am »
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: https://github.com/toggledbits/DelayLight

Documentation for the project is also found in its GitHub repository. Please post issues or questions in this thread.

Current version is 1.2, and can be installed from the Vera plugin marketplace (search "DelayLight" with no space between words). It currently runs on UI7 and ALTUI. A beta version is available for openLuup and installable via the AltAppStore.


REVISION HISTORY
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 http://your-vera-ip/port_3480/data_request?id=lr_DelayLight&action=status

2018-02-19: Version 1.0 has been released in the Vera plugin marketplace.
« Last Edit: April 12, 2018, 11:26:16 am by rigpapa »
Author of Rachio, Deus Ex Machina II, Intesis WMP Gateway, SiteSensor, DelayLight, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline wilme2

  • Hero Member
  • *****
  • Posts: 1154
  • Karma: +23/-13
Re: Plugin: DelayLight
« Reply #1 on: February 19, 2018, 10:50:21 am »
I like the idea.  I use PLEG for this today, but having an easier way to automate lights would certainly speed adoption.  I agree this is such a common use case that Vera really should have this as a built-in module.

In your design, would you have a copy of the plug-in for every room with automatic lights?   I have at least 13 "rooms" with automated lighting, around 17 switches, with full on-off functionality.  Plus a few more switches that are automatic off only...
Long Live UI5!  (OK finally made the switch to UI7 in January 2018, and am pretty happy....)

Online rigpapa

  • Sr. Member
  • ****
  • Posts: 338
  • Karma: +46/-0
    • toggledbits.com
Re: Plugin: DelayLight
« Reply #2 on: February 19, 2018, 11:19:18 am »
My own production install has these spread all throughout the house. Most bathrooms have at least two: lights and fan. My master ensuite has five (main lights (for 5 dimmers), shower light, WC light, WC fan, main fan).

I also used PLEG (four licenses worth), but I decided to not include it in my configuration when I did a full rebuild a few months ago.
Author of Rachio, Deus Ex Machina II, Intesis WMP Gateway, SiteSensor, DelayLight, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Online rigpapa

  • Sr. Member
  • ****
  • Posts: 338
  • Karma: +46/-0
    • toggledbits.com
Re: Plugin: DelayLight
« Reply #3 on: March 16, 2018, 02:46:22 pm »
@wilme2, I took your inquiry as a suggestion, since these timers have a way of multiplying like rabbits (keep on coming up with ideas/uses around the house).

I will be releasing v1.2 of the plugin this weekend, for Vera's marketplace approval on Monday 3/19, that is a single-instance version: one copy of the plugin for as many timer child devices as you want to create. Existing devices from prior versions will be converted to children with settings copied.
Author of Rachio, Deus Ex Machina II, Intesis WMP Gateway, SiteSensor, DelayLight, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Online rigpapa

  • Sr. Member
  • ****
  • Posts: 338
  • Karma: +46/-0
    • toggledbits.com
Re: Plugin: DelayLight
« Reply #4 on: April 12, 2018, 11:27:48 am »
A beta version for openLuup is now available for installation via the AltAppStore.
Author of Rachio, Deus Ex Machina II, Intesis WMP Gateway, SiteSensor, DelayLight, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline RyanS

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Plugin: DelayLight
« Reply #5 on: April 18, 2018, 11:27:08 pm »
Great work Rigpapa

Is there a way to only activate the lights/load if it's night time.



Online rigpapa

  • Sr. Member
  • ****
  • Posts: 338
  • Karma: +46/-0
    • toggledbits.com
Re: Plugin: DelayLight
« Reply #6 on: April 19, 2018, 07:13:10 am »
Working on it
Author of Rachio, Deus Ex Machina II, Intesis WMP Gateway, SiteSensor, DelayLight, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.