Author Topic: Plugin: DelayLight  (Read 5060 times)

Online rigpapa

  • Hero Member
  • *****
  • Posts: 635
  • Karma: +92/-1
Re: Plugin: DelayLight
« Reply #30 on: May 19, 2018, 01:08:36 pm »
I have had it running in pleg, but dont really understand pleg.....

Will have a think and a test.

You might consider vosmont's Rules Engine plugin. It requires you to use ALTUI, but that's a good idea anyway.
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline jswim788

  • Hero Member
  • *****
  • Posts: 786
  • Karma: +57/-2
Re: Plugin: DelayLight
« Reply #31 on: May 20, 2018, 05:06:19 pm »
You might also find the workflows of AltUI useful http://forum.micasaverde.com/index.php?topic=37746.0.  They are another visual way to create your automation routines.  I suggest you look first at the examples, then go back and read the initial documentation.  It's a nice way to see the flow of your automation.

Offline pukka

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +1/-0
Re: Plugin: DelayLight
« Reply #32 on: May 28, 2018, 04:21:46 am »
Hi rigpapa

The plugin has been working great and much more simple than others i have tried, I have just installed the update to include "Do not start off-delay timer until registered sensors reset"  will let you know how it goes.

Just pondering another idea and wonder how to implement it.

If a door is open and the plugin is set to "Do not start off-delay timer until registered sensors reset" or "Do not turn off until timer expires and all trigged sensors have reset" is they anyway to turn the light off automatically after 30 minutes?

Paul

Offline pukka

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +1/-0
Re: Plugin: DelayLight
« Reply #33 on: June 03, 2018, 07:32:40 am »
Just one more usage questions.

kitchen light and a PIR.

What I would like to acheive,
PIR or switch to turn ON the light at night and OFF after 10min or reset timer if they is movement. 
If the switch is turned on during the day, turn ON the light and OFF after 10min or reset timer if they is movement.

I can work out how to achieve them separately but not as one.

Paul

Online rigpapa

  • Hero Member
  • *****
  • Posts: 635
  • Karma: +92/-1
Re: Plugin: DelayLight
« Reply #34 on: June 03, 2018, 02:09:50 pm »
A couple of things to know:

1) If an "auto" delay is set (non-zero), the loads in the "on" list will be turned on automatically when a trigger sensor trips, and the timer will run for the auto delay duration, at least;

2) If a controlled load is turned on manually, and the manual delay is non-zero, the timer will run for the manual delay duration;

3) Whichever delay starts first determines the mode (auto or manual);

4) If a trigger sensor trips during the auto period, the timer restarts the auto delay period;

5) If a trigger sensor trips during manual timing, the timer is extended to the auto delay period if the remaining manual time is less than the auto delay time.

So, everything you want to do it will do out of the box, except the night-sensitivity. I'm planning on adding "inhibitors" for auto triggering, but it's not there yet.
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline HSD99

  • Sr. Member
  • ****
  • Posts: 273
  • Karma: +11/-0
Re: Plugin: DelayLight
« Reply #35 on: June 03, 2018, 09:06:13 pm »
A couple of things to know:

1) If an "auto" delay is set (non-zero), the loads in the "on" list will be turned on automatically when a trigger sensor trips, and the timer will run for the auto delay duration, at least;

2) If a controlled load is turned on manually, and the manual delay is non-zero, the timer will run for the manual delay duration;

3) Whichever delay starts first determines the mode (auto or manual);

4) If a trigger sensor trips during the auto period, the timer restarts the auto delay period;

5) If a trigger sensor trips during manual timing, the timer is extended to the auto delay period if the remaining manual time is less than the auto delay time.

So, everything you want to do it will do out of the box, except the night-sensitivity. I'm planning on adding "inhibitors" for auto triggering, but it's not there yet.
Thanks for this---it confirms my observations. After living with it for a couple of weeks, and despite my stated aversion to creeping featurism, I would like to have trigger inhibitors, mainly schedule-based, although light-level would also be useful. 

Online rigpapa

  • Hero Member
  • *****
  • Posts: 635
  • Karma: +92/-1
Re: Plugin: DelayLight
« Reply #36 on: June 04, 2018, 07:33:42 am »
That's helpful. So time schedules and sensors. It already does house mode. Anything else?
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline HSD99

  • Sr. Member
  • ****
  • Posts: 273
  • Karma: +11/-0
Re: Plugin: DelayLight
« Reply #37 on: June 04, 2018, 09:43:46 am »
Nothing right now. The trigger inhibit should do the job without overcomplicating it.

Online rigpapa

  • Hero Member
  • *****
  • Posts: 635
  • Karma: +92/-1
Re: Plugin: DelayLight
« Reply #38 on: June 11, 2018, 10:26:20 am »
The stable branch on Github now contains a version of DelayLight that implements inhibits and active/inactive time periods. It also adds compatibility checks for version of openLuup, as certain versions have a problem with child startup (@akbooer has already fixed this, but it's still in his testing branch).

There is no UI yet for the Inhibits or schedules, so you need to edit state variables. The service for these variables is urn:toggledbits-com:serviceId:DelayLightTimer

To use the inhibits, put the device numbers, as a comma-separate list, of the devices that should be used to prevent triggering when tripped/on into the state variable called InhibitDevices. These can be any device that implements SecuritySensor1 (motion sensors, door sensors, etc.), or any device that implements SwitchPower1 (switches, dimmers, and many others). If you need to invert the sense of the test, make the device number negative (e.g. 4 will inhibit when device 4 is tripped, but -4 will inhibit when device 4 is not tripped).

To use the active periods, put the start and end 24-hour time ranges into the ActivePeriods state variable (format HHMM-HHMM). If you have multiple active periods, you can make it a comma-separate list of multiple ranges. For example, 0500-0900,1800-2200 would be active between 5am and 9am, and 6pm and 10pm, daily. Outside these periods, auto-triggering is inhibited.
« Last Edit: June 11, 2018, 10:29:40 am by rigpapa »
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Online rigpapa

  • Hero Member
  • *****
  • Posts: 635
  • Karma: +92/-1
Re: Plugin: DelayLight
« Reply #39 on: June 22, 2018, 11:41:58 am »
The stable branch now has a UI for active periods and inhibitors. Users of ALTUI on either Vera or openLuup can install or update to this latest code via the AltAppStore.

As long as testing completes without issue, I plan on releasing this version in the Vera Plugin Marketplace over the weekend for availability on Monday June 25 2018.
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline pukka

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +1/-0
Re: Plugin: DelayLight
« Reply #40 on: June 24, 2018, 03:10:02 pm »
I have installed the stable branch, not sure if i have found a bug more testing needed, at the moment i have a door sensor that is set to (2) do not start off-delay timer until sensors reset. if the door is left open for a long period (unknown how long at this time) when the door is shut the timer does not start.. only noticed it the other day when i upgraded the plugin to one of the older releases. (maybe two weeks ago).

I will do some more testing tomorrow and report back, unless you have an idea?

Paul

Online rigpapa

  • Hero Member
  • *****
  • Posts: 635
  • Karma: +92/-1
Re: Plugin: DelayLight
« Reply #41 on: June 24, 2018, 06:35:10 pm »
Yup, I broke it. Stable branch updated with fix.
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline pukka

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +1/-0
Re: Plugin: DelayLight
« Reply #42 on: June 25, 2018, 10:22:47 am »
I have manually installed the stable branch this morning and reboot the lupp, but i am still see the same problem. anything else i need to try?

Paul

Online rigpapa

  • Hero Member
  • *****
  • Posts: 635
  • Karma: +92/-1
Re: Plugin: DelayLight
« Reply #43 on: June 25, 2018, 04:52:16 pm »
Open a tab in your browser and request this URL: http://your-vera-local-ip/port_3480/data_request?id=lr_DelayLight&action=status

Send me the output via PM or email (on my profile here). I'll take a look.
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline pukka

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +1/-0
Re: Plugin: DelayLight
« Reply #44 on: June 26, 2018, 04:04:20 am »
Might have found the problem,

when i try and upload the file

1). L_DelayLight.lua
ERROR: Request Entity Too Large