PLTS Basics - An Introduction to the Program Logic Timer Switch

Program Logic Timer Switch (PLTS) is a flexible timed switch that may be controlled using buttons on the User Interface (UI) and/or Condition expressions like those used in PLEG.

Use PLTS when you want an accurate timed output with relatively simple logic or if you want to monitor and control the timer from the UI. If you need multiple outputs or complex logic, PLEG may offer a better solution.

PLTS Basics is intended to provide newcomers with an explanation of how PLTS works and how to use its many features. Each feature is described in detail with examples of how it may be used. The guide is in the form of a pdf document with bookmarks to help with navigation.

Edit: 29/01/2014 15:18 Updated to reflect changes in PLTS V5.7
Edit: 07/03/2014 14:00 Updated to reflect changes in PLTS V6.2

This is great! Thanks for putting it together…

Cheers!

PD

Another great one; Thanks!

One thing you will have to explain to me in your example :

Condition Expressions
Reset FanOff
Trigger Humidity > 40
Trigger2 LightOn and ((LightOn; Now > 3:00) or (LightOff; LightOn < 10)) Restart LightOn and (LightOn; Now > 8:00)
On FanOn
Actions
On Turn Fan on
Off Turn Fan off
Restart Turn HWBoost VirtualSwitch on

In the condtions expressions you have “FanOn” in the “On” field, suggesting that for the “On” to be true, the fan must already be on. The action for “On” is to turn the fan on … which is already on … or ?

/Martin

[quote=“flyveleder, post:3, topic:178652”]Another great one; Thanks!

One thing you will have to explain to me in your example :

Condition Expressions
Reset FanOff
Trigger Humidity > 40
Trigger2 LightOn and ((LightOn; Now > 3:00) or (LightOff; LightOn < 10)) Restart LightOn and (LightOn; Now > 8:00)
On FanOn
Actions
On Turn Fan on
Off Turn Fan off
Restart Turn HWBoost VirtualSwitch on

In the condtions expressions you have “FanOn” in the “On” field, suggesting that for the “On” to be true, the fan must already be on. The action for “On” is to turn the fan on … which is already on … or ?

/Martin[/quote]

The purpose of the Condition On, in this case, is to start the timer if the fan is switched on manually. This allows it to be switched off automatically after one hour. It is not necessary to have any expression for On or Off - they will be switched when the timer state changes between Default and Toggled.

There is so much flexibility in PLTS that it can take a while to realise which bits do what. The good bit is that you can poke the UI buttons and watch what happens. Once you see how that works, write your Conditions to poke the buttons for you.

I’m struggling to understand this …

What I want : When a Virtual Switch is triggered a timer should start for 5 minutes; When time is up it should turn off some lights. If the lights are changed while the timer is running, the timer should be cancelled, and disregard the action to turn off the lights.

What I did in PLTS :

“Input” : LoS - LoadLevel of light bulb

Interval : 00:05:00
Trigger : VirtualSwitchOn
Reset : LoS != 20

Action for “Off” : LightOff


First part works; It triggers correct, and starts the timer. Changing the lights also does the Reset and stops the timer - BUT : When Reset I noticed the timers goes to “Off” and therefore the action for “Off” is triggered, turning off the lights. That I do not want. I only want the timer to reset, not to do any actions.

What am I doing wrong ?

If I remove the action for “Off” then the lights doesn’t turn off when the time is up.

/Martin

Try changing the timer type (SwitchMode) to Delayed Toggle/Explicit Reset and put your LightOff as an Action for On.

The Trigger will start the timer but it will only Toggle after 5 minutes. The Reset will just stop the timer. If the timer does complete and Toggle, the LightOff command should result in a Reset.

Great - thanks; I’ll give it a try.

/Martin

I have a situation where I want a light go go ON at sundown and OFF at 11:00 PM with the time randomized. How do I do this with the timer switch? This is a great program for dummies like me. I wish there was a user manual.

That actually sounds like something that would be easier with a normal schedule. PLTS is handy if you need a delayed action, but it might be overkill for what you’re trying to do.

Sent from my Nexus 7 using Tapatalk

See PLTS Basics, which is attached to the first post in this thread as a pdf file.

@rtt3821
If you are going to use a timer … to turn on a timer … that is where the comment about over kill comes in.

You might try to use PLEG.
You will create a Input Schedule that has an ON Time with some random time, and an off timer/interval also with some random time. For this example call it Timer

Then create two condions:
TimerOn Timer
TimerOff Not Timer

Add actions to the above two conditions to turn on/off the lights.
The benefit of PLTS vs PLEG is that it provides a user interface to manually start the timer sequence as well as show you the progress of the timer sequences.

There is a new version of PLTS Basics. It has been updated to reflect the changes in PLTS 5.7. See the first post to download the pdf.

I have tried using the simple way to program lights on & off. Added devices {appliance modules}, scenes, triggers and schedules. The log states that the schedule was reun at the right time and day. However the lights never went ON. I must be missing a step in the configuration. Anybody know what it could be???

Did you arm the PLEG ?

Yes, I armed the PLEG and it didn’t work. I am getting an error message that states: version mismatch. PLEG version 5.7, PLC version 5.8. How do I correct this? I am also getting an error message that says: TIMER NOT TIMER, is an invalid expression.

I am getting an error message that states: version mismatch. PLEG version 5.7, PLC version 5.8. How do I correct this?

Enter this into your browser - with your Vera IP addess in place of :

http://<veraip>:3480/data_request?id=update_plugin&Plugin=3066
I am also getting an error message that says: TIMER NOT TIMER, is an invalid expression.

If you post a Status report from your PLEG, we can probably help you with this.

Here’s details on how to force the plugins to update:
http://forum.micasaverde.com/index.php?topic=14446.0

I cannot get a status report after updating the PLEG.

This is the status before the PLEG was updated. After the update NO Status.

Program Logic Event Generator
Device ID: 172014-02-04 11:58:00.831 PLC Version: 5.8
Triggers
Name Description State Last True Last False
t1_TIMERON Appliance Module #1 is turned on false 0 0
t2_TIMEROFF Appliance Module #1 is turned off false 0 0
t2_TIMERON _Appliance Module #2 is turned on false 0 0
t3_TIMEROFF _Appliance Module #2 is turned off false 0 0
Schedules
Name Type Time Days Random On Delay Off After Type Off Time Off Days Random Off Delay State Last On Last Off
s1 Weekly +00:15:00r 1,2,3,4,5,6,7 None Weekly 20:00:00 1,2,3,4,5,6,7 None true 2014-02-04 07:35:48.492 0
s2 Weekly 19:00:00 1,2,3,4,5,6,7 None Weekly 21:00:00 1,2,3,4,5,6,7 None false 2014-02-03 19:00:00.100 2014-02-03 21:00:00.451
Device Properties
Name Device Name Device Variable Value Last Change Previous Change
p2 _Appliance Module #2 ManufacturerInfo 5,2,3 2014-02-04 11:24:08.101 0
p1 Appliance Module #1 ManufacturerInfo 5,2,3 2014-02-04 11:24:08.104 0
Conditions
Name Expression State Last True Last False
c1 TimerOn Timer null 0 2014-02-04 11:02:17.786
c2 TimerOff null 0 2014-02-04 11:02:17.787
Actions
Actions for Condition: c1
Immediate
Device Action Arguments
Program Logic Event Generator SetArmed newArmedValue=1
Actions for Condition: c2
Immediate
Device Action Arguments
Program Logic Event Generator SetArmed newArmedValue=1

I cannot get a status report after updating the PLEG.

Did you try refreshing your browser page?

Best Home Automation shopping experience. Shop at getvera!

© 2021 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules