PLEG Timers

Ok, I’m being dumb and not understanding schedules/timers.

I need a simple walk through on how to actually use timers as I’ve created them, but they aren’t working.

Simple if light is on then turn on in 5 minutes

Scenario: Deck light and door with sensor

Trigger: tGarage_Deck_Door
Condition: tGarage_Deck_Door_Open
Action: Turn on Garage_Deck_Light

Now I want a reverse with a 5 minute timer. (Using NOT for clarity of reading instead of ! )

Condition: NOT tGarage_Deck_Door AND (Garage_Deck_Light; > t5Min_Timer)
Action: Turn off Garage_Deck_Light

I don’t think I understand how to use timers, as it never turns off. But if I use the same with a NOW; > 5:00 it works.

You need to read the getting started about SEQUENCE commands.

The following is ILLEGAL syntax.

(Garage_Deck_Light; > t5Min_Timer)

In a SEQUENCE command you MUST use ! and not NOT (is that a double negative ? )

(Garage_Deck_Light; !t5Min_Timer)

[quote=“RichardTSchaefer, post:2, topic:198781”]You need to read the getting started about SEQUENCE commands.

The following is ILLEGAL syntax.

(Garage_Deck_Light; > t5Min_Timer)

In a SEQUENCE command you MUST use ! and not NOT (is that a double negative ? )

(Garage_Deck_Light; !t5Min_Timer)
[/quote]

I noticed the typo in syntax of the “>” as that was not correct and I was typing from memory. However that is fixed. As for the NOT, yes that I knew I stated I was using NOT in my post for clarity as the ! can get overlooked.

Here’s the one I’m playing with now as it’s not Night and I can easilly mess with the bathroom lights as nobody is home.

Bathroom Lights:
Triggers:
tBathroom_Motion - Motion active
tBathroom_Door - Door Open
tBathroom_Fan - Fan On
t5min_Timer - self-retrigger, interval 00:05:00

Conditions:
cBathroom_Lights_On tBathroom_Motion
cBathroom_Lights_Off !tBathroom_Motion AND tBathroom_Door
cBathroom_Fan_Off cBathroom_Lights_Off AND tBathroom_Fan AND (tBathroom_Fan; !t5min_Timer)

Actions:
Lights on
Lights off
Fan off

Everything but the cBathroom_Fan_Off works. That condition is no triggering to True. Yes I have read through the Beginners guide, a couple of times. It’s somewhat confusing because a lot of things are written for UI5 and they don’t match up with UI7 and I’m new to Vera and PLEG so, some things aren’t clicking just yet.

Post a Status Report (Pdf preferrably), it’s vital when debugging (especially when asking for help on the forum)

And here’s the status report… interesting thing is the trigger tBathroom_Lights shows never being true/false when I know for a fact the lights have been on/off as I just came from the bathroom!

Anyways, the point is to turn the fan off X minutes after the light has been turned off. I started with trying a 5 min timer then created a 1 Min timer to try and test with quicker and still…just no…

Did you restart LUA after making changes ?

yeah, about a dozen times, manually flipped the switch to see if I get any updates and I have power cycled the vera plus unit as well.

And here’s the status report… interesting thing is the trigger tBathroom_Lights shows never being true/false when I know for a fact the lights have been on/off as I just came from the bathroom!

Anyways, the point is to turn the fan off X minutes after the light has been turned off. I started with trying a 5 min timer then created a 1 Min timer to try and test with quicker and still…just no…[/quote]

I don’t see you starting the any timer in your actions. Maybe Try this.
Conditions
cBathroom_Fan_Timer cBathroom_Lights_Off AND tBathroom_Fan
cBathroom_Fan_Off cBathroom_Fan_Timer AND (cBathroom_Fan_Timer; !t1min_Timer)

Actions
cBathroom_Fan_Timer Start t1minTimer
cBathroom_Fan_Off Turn Fan Off

Also if your switch is not instant status for the light, it may take some time before vera polls the switch and knows that the light is on if you manually turn it on. If vera turns the light on, then it will know that it is on.

And here’s the status report… interesting thing is the trigger tBathroom_Lights shows never being true/false when I know for a fact the lights have been on/off as I just came from the bathroom!

Anyways, the point is to turn the fan off X minutes after the light has been turned off. I started with trying a 5 min timer then created a 1 Min timer to try and test with quicker and still…just no…[/quote]

I don’t see you starting the any timer in your actions. Maybe Try this.
Conditions
cBathroom_Fan_Timer cBathroom_Lights_Off AND tBathroom_Fan
cBathroom_Fan_Off cBathroom_Fan_Timer AND (cBathroom_Fan_Timer; !t1min_Timer)

Actions
cBathroom_Fan_Timer Start t1minTimer
cBathroom_Fan_Off Turn Fan Off

Also if your switch is not instant status for the light, it may take some time before vera polls the switch and knows that the light is on if you manually turn it on. If vera turns the light on, then it will know that it is on.[/quote]

In all the examples I see this “magic” start timer… WHERE The H### is that option? I look in actions and there’s no action for it. There’s no docs on this piece of the puzzle that are clear…

^^^
Don’t feel to bad about it and beat yourself up, I’ve never got my head around timers either as I started in UI5 before RTS had Timers up and running and just never got the hang of setting them up or using them.
I would just use NOW >5:00 . It’s never precise as NOW is to the nearest minute but it has never bothered me if it’s a few seconds either way.

And here’s the status report… interesting thing is the trigger tBathroom_Lights shows never being true/false when I know for a fact the lights have been on/off as I just came from the bathroom!

Anyways, the point is to turn the fan off X minutes after the light has been turned off. I started with trying a 5 min timer then created a 1 Min timer to try and test with quicker and still…just no…[/quote]

I don’t see you starting the any timer in your actions. Maybe Try this.
Conditions
cBathroom_Fan_Timer cBathroom_Lights_Off AND tBathroom_Fan
cBathroom_Fan_Off cBathroom_Fan_Timer AND (cBathroom_Fan_Timer; !t1min_Timer)

Actions
cBathroom_Fan_Timer Start t1minTimer
cBathroom_Fan_Off Turn Fan Off

Also if your switch is not instant status for the light, it may take some time before vera polls the switch and knows that the light is on if you manually turn it on. If vera turns the light on, then it will know that it is on.[/quote]

In all the examples I see this “magic” start timer… WHERE The H### is that option? I look in actions and there’s no action for it. There’s no docs on this piece of the puzzle that are clear…[/quote]

It is under the PLEG device. When you are defining the action, set the device as your PLEG device. Then there will be an option for starttimer. Select that and put in your timer name.

^^^
Still don’t see it. Clear as mud to me.

Ok I found it. Now there’s 2 fields.

Name
Interval

Name I get. Interval? Isn’t that defined in the timer under schedules/timers in triggers?

For others:

Logic Actions → New or Edit
Select Device to Add to the Current Interval: (drop down)
Find and select your PLEG device. Mine is in “No room” category
Select “Advanced” if not already selected (green slider)
Action Drop down → Select StartTimer
timerName – ??? I’m guessing the name of the timer defined in triggers → schedules/timers
intervalTime – ??? No clue as I thought that was defined in triggers and schedules/timers

Just leave interval blank unless you want to override the set time for the timer.

I think someone really needs to make a You Tube vid so we can follow exactly where and what to do.
I can go to Logic Actions and that’s it there is nothing to select except Conditions.

Ok. Doing some edits and going to test.

Next Questions… do I need a new condition every time I want a timer? I think I know the answer, as a new condition is needed to then associate with a timer instance otherwise calling the same condition would get different results and constantly reset the timer… but if I’m wrong great.

Ok… I think I have something backwards, or at least it seems that way. I’ve attached the logic report.

Take a look at the Garage_Deck_Lights_Off and Garage_Deck_Lights_Off_Timer… I think there’s a logic issue and it’s looping because the light doesn’t go off after the door is closed and 1 minute timer.

YAY!!! First working timer not using NOW…

I’m going to make some screenshots and post them.

Screenshots and information of the “magic” sauce with timers… I was stumped so I think others may be as well. I apologize in advance if the screenshots don’t upload in order. I haven’t used this forum system since the early 2000’s…

Steps:

  1. Create your timer in Logic Inputs → Schedules and Timers
  2. Create any Device Triggers you may need
  3. Create conditions, ON, OFF, etc… AND create a Timer condition

3a. Timer condition example
Name: cBathroom_Lights_Off_Timer
Logic: !tBathroom_Motion AND tBathroom_Door

Explanation: My triggers are for when NO motion and Bathroom_Door is OPEN… This normally works great, except some people… women folk do a lot in the bathroom with the door open and not?? moving… hmm… I don’t know… anyways.

3b. Logic Action for Timer Condition
This is the secret sauce of using the timer and where there are screenshots.

3.1.a: Select New Action dropdown and select the new timer condition

3.1.b: Select Device to Add to the Current Interval: Select your PLEG device. Mine is in “No Room” category
3.1.c: In “Advanced” Setting should be default in “Action” dropdown look for “StartTimer”
3.1.d: timerName = your timer name
3.1.e: intervalName = leave blank unless you want to override your timer

That’s it for the magic “StartTimer” that is documented but not explained.