Author Topic: Program Logic Event Generator Plugin  (Read 412898 times)

Offline jenunez

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: NEW: Program Logic Event Generator Plugin
« Reply #15 on: January 16, 2013, 01:31:01 pm »
Hi There, I am having an issue with the Program Logic Event Generator Plugin
When I click the Trigger Tab, no triggers are shown
Opening pleg_Triggers...

Any help will be appreciated.

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10091
  • Karma: +764/-143
Re: NEW: Program Logic Event Generator Plugin
« Reply #16 on: January 16, 2013, 01:41:13 pm »
Did you install the Program Logic Core Plugin as well ?
Should be a warning message on the top of the web page.

If you did what version are your running ?
Are you using the Beta ?

Offline jenunez

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: NEW: Program Logic Event Generator Plugin
« Reply #17 on: January 17, 2013, 06:20:42 am »
Hi RichardTSchaefer,

After a few reloads, I can see the triggers.

Thanks for your quick response.


Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10091
  • Karma: +764/-143
Re: NEW: Program Logic Event Generator Plugin
« Reply #18 on: January 17, 2013, 09:58:28 am »
PLEG has been updated. You can now bind any Vera Device Property to an input that can be used in your condition expressions. Also support for math and string operations and comparisons have been provided. The web documentation has been updated. The first entry in this thread has been updated to reflect the current state of the plugin and provide a road map of what's next.


To Update Program Logic Timer Switch
http://Vera_IP:3480/data_request?id=update_plugin&Plugin=3018

To Update Program Logic Event Generator
http://Vera_IP:3480/data_request?id=update_plugin&Plugin=3066

To Update Program Logic Core
http://Vera_IP:3480/data_request?id=update_plugin&Plugin=3086

You should wait for Vera to restart between each update.
« Last Edit: January 17, 2013, 06:17:10 pm by RichardTSchaefer »

Offline davidd1205

  • Full Member
  • ***
  • Posts: 158
  • Karma: +0/-0
Re: NEW: Program Logic Event Generator Plugin
« Reply #19 on: January 19, 2013, 12:16:36 pm »


Also I have support for the keyword NOW for the sequence expressions.
       GarageLeftOpen = GarageClosed;GarageOpened;NOW > 30:00

If you leave the garage open for greater than 30 minutes this will trigger.

.

Hello

thanks for your job
i want to realyze a scene with a prowl notification if my garage door is open > 30 min
i have 2 door
I make 1 condition for each door but i don't understand the varaibal garageClosed and GarageOpened
i want to use a sm103 to know if my door is tripped or not

thanks for your help

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10091
  • Karma: +764/-143
Re: UPDATED: Program Logic Event Generator Plugin
« Reply #20 on: January 19, 2013, 12:38:48 pm »
In PLEG there is an Input Triggers Tab.

Create two triggers:
    GarageClosed  - Garage Door Sensor indicates Garage Door is closed
    GarageOpened - Garage Door Sensor indicates Garage Door is open

You can create a Scene with a trigger where PLEG has satisfied GarageLeftOpen
There you can add your Prowl notification.

OR you can goto the PLEG Notifications tab.
And add a notification for when PLEG has satisfied GarageLeftOpen
You will need the Vera Alerts Plugin to forward this to your prowl notifier plugin.


« Last Edit: January 19, 2013, 12:44:06 pm by RichardTSchaefer »

Offline davidd1205

  • Full Member
  • ***
  • Posts: 158
  • Karma: +0/-0
Re: UPDATED: Program Logic Event Generator Plugin
« Reply #21 on: January 19, 2013, 01:03:53 pm »
In PLEG there is an Input Triggers Tab.

Create two triggers:
    GarageClosed  - Garage Door Sensor indicates Garage Door is closed
    GarageOpened - Garage Door Sensor indicates Garage Door is open

You can create a Scene with a trigger where PLEG has satisfied GarageLeftOpen
There you can add your Prowl notification.

OR you can goto the PLEG Notifications tab.
And add a notification for when PLEG has satisfied GarageLeftOpen
You will need the Vera Alerts Plugin to forward this to your prowl notifier plugin.

thanks for your help

one trigger for a door tripped and one for a door not tripped ?

i must be select a interval time ? the properties ?

thanks

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10091
  • Karma: +764/-143
Re: UPDATED: Program Logic Event Generator Plugin
« Reply #22 on: January 19, 2013, 09:06:35 pm »
Quote
one trigger for a door tripped and one for a door not tripped ?
YES ... You want to measure the time between these two events.

Quote
must be select a interval time ? the properties ?

You still need the condition expression:
 GarageLeftOpen = GarageClosed;GarageOpened;NOW > 30:00

The condition GarageLeftOpen will be triggered 30 Minutes past the time the Garage Door was opened as long as there is not a GarageDoorClosed event. In that case the ordering of  GarageClosed then GarageOpened would fail. There are other ways to code this ... that's the nice thing about programming ... there is not just one way to do it right ... but there are a lot of ways to do it wrong.

Then use the PLEG has satisfied condition GarageLeftOpen in the PLEG notifications tab or create a scene and use it as a trigger and put whatever action you desire in the scene.
Quote
i have 2 door
Create a second PLEG to do the second door and bind to different sensors ... or use the same PLEG and have 4 triggers and 2 conditions.  Put a 1 or 2 suffix on the names  of the triggers and conditons.


Offline davidd1205

  • Full Member
  • ***
  • Posts: 158
  • Karma: +0/-0
Re: UPDATED: Program Logic Event Generator Plugin
« Reply #23 on: January 20, 2013, 07:44:07 am »
i don't understand

i have bug with sm103 and with my doorlock the condition is none sastified

thanks

Offline skropko

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-1
Re: UPDATED: Program Logic Event Generator Plugin
« Reply #24 on: January 20, 2013, 01:59:57 pm »
Also trying to set notification for if garage left open but I can't quite seem to get this working.  I'm trying to create a notification that alerts me if my garage is ever left open for more than 3 minutes as it is a detached garage and we always want it closed.  I've create 2 input triggers for GarageOpen and GarageClose and one condition (GarageLeftOpen = GarageClose; GarageOpen; NOW > 3:00).  The problem I am having is the condition is always firing after the garage is opened (not waiting the 3 minutes before firing so I get a notification everytime the garage is opened... even if it is immediately closed).  Any ideas.  I've attached the screenshots.  Thanks for any ideas
« Last Edit: January 20, 2013, 02:05:05 pm by skropko »

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10091
  • Karma: +764/-143
Re: UPDATED: Program Logic Event Generator Plugin
« Reply #25 on: January 20, 2013, 09:25:24 pm »
My bad!
You do not need the GarageClosed trigger.
The following will work:

GarageLeftOpen = GarageOpen and (GarageOpen; NOW > 3:00)

Offline skropko

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-1
Re: UPDATED: Program Logic Event Generator Plugin
« Reply #26 on: January 20, 2013, 09:55:12 pm »
So far so good.  Thanks for your help and the work on this... helpful plugin.  Looks like it is working now.  Just so I understand, can you explain the condition logic.  How does it know the garage closed?  The old code seemed to make sense to me since the GarageClose porition would seem to restart the sequence expression and cancel out the open trigger if before the time limit.  Just trying to understand for future opportunities.

Thanks!

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10091
  • Karma: +764/-143
Re: UPDATED: Program Logic Event Generator Plugin
« Reply #27 on: January 20, 2013, 10:13:26 pm »
Quote
GarageLeftOpen = GarageOpen and (GarageOpen; NOW > 3:00)

All conditions are evaluated in the following cases:
  • A PLEG trigger is fired
  • A PLEG Schedule is fired
  • A PLEG Device Property is changed
  • If you use NOW in a sequence expression it will trigger evaluation every minute
A time is attached to a trigger when it is fires (which is also when it is first evaluates to TRUE).
A time is attached to a condition when it toggles from FALSE to TRUE.
A time is attached to a Device Property every time it changes.

These times are available to be used in the Sequence and Multi Click Expressions.
NOTE: The times for the tokens in a sequence expression are looked at ... not the current true/false value)

Prior to evaluation - I re-evaluate the conditions for a Trigger

In the example at hand:
In this case if the door is closed ... than when NOW is evaluated next .. the GarageOpen will return FALSE.

Offline davidd1205

  • Full Member
  • ***
  • Posts: 158
  • Karma: +0/-0
Re: UPDATED: Program Logic Event Generator Plugin
« Reply #28 on: January 21, 2013, 04:08:22 am »
hello

thanks for your help but it "s not functionally at home

i have installed vera lert and i have a bug in the pleg control

i 'have uninstall all and reinstall core and pleg but allways the matter

i dont understand
my vera's firmware 1.5.532

Offline davidd1205

  • Full Member
  • ***
  • Posts: 158
  • Karma: +0/-0
Re: UPDATED: Program Logic Event Generator Plugin
« Reply #29 on: January 21, 2013, 04:40:22 am »
with 1.5.408 it seems good

have you a bug with a 1.5.532 ?


i have a bug with a trigger with specified status (arm) with a scene
« Last Edit: January 21, 2013, 04:47:15 am by davidd1205 »