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

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10020
  • Karma: +758/-141
    • RTS Services Plugins
Re: Program Logic Event Generator Plugin
« Reply #1620 on: July 17, 2017, 11:49:40 am »
Hopefully I will not get the wrath of the PETA group who can be a PITA ... but there are many ways to skin a cat.

Offline MrRocco

  • Sr. Newbie
  • *
  • Posts: 37
  • Karma: +0/-0
Re: Program Logic Event Generator Plugin
« Reply #1621 on: July 28, 2017, 10:26:18 am »
I posted over in the DSC plugin but it really is a question I'm trying to solve with PLEG
http://forum.micasaverde.com/index.php/topic,50049.0.html

Is there a way for wired PIR sensors on a DSC alarm to act as triggers? I think the EVL would have to be pushing REST calls out to the Vera or Vera would have to poll it pretty hard. I assumed since all of my zones showed up as devices that this would work but I probably missed something.

Thanks!

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10020
  • Karma: +758/-141
    • RTS Services Plugins
Re: Program Logic Event Generator Plugin
« Reply #1622 on: July 28, 2017, 04:14:13 pm »
If you added the zone numbers to the appropriate list in the DSC plugin it should create a motion sensor device in Vera.

That device can be used as a trigger in a PLEG device. PLEG can attach to any devices triggers or device properties.

The DSC plugin has a read operation outstanding on the EVL board. When a change in the DSC happens the EVL returns the results to the DSC plugin which changes states of the appropriate Vera device. PLEG detects these changes and evaluates your logic.

Offline MrRocco

  • Sr. Newbie
  • *
  • Posts: 37
  • Karma: +0/-0
Re: Program Logic Event Generator Plugin
« Reply #1623 on: July 31, 2017, 10:27:48 am »
If you added the zone numbers to the appropriate list in the DSC plugin it should create a motion sensor device in Vera.

That device can be used as a trigger in a PLEG device. PLEG can attach to any devices triggers or device properties.

The DSC plugin has a read operation outstanding on the EVL board. When a change in the DSC happens the EVL returns the results to the DSC plugin which changes states of the appropriate Vera device. PLEG detects these changes and evaluates your logic.

Thanks for that! This might be obvious to power users but it wasn't to me at first. A PIR on the DSC panel only seems to work as a trigger if the UI has it as "armed." I was originally trying the tArmedorDisarmed event type in PLEG. I was following the way the actual alarm panel is setup for stay mode, which is to ignore internal PIRs. Therefore when in Night Mode for UI7, I had the PIR disarmed. Of course those things are not directly related. The trigger started working when I set the PIR to be armed in UI7. Maybe I am still doing something wrong, but it started working in PLEG when I changed it.

thanks!

Offline wilme2

  • Hero Member
  • *****
  • Posts: 1154
  • Karma: +23/-13
Re: Program Logic Event Generator Plugin
« Reply #1624 on: August 08, 2017, 03:30:14 pm »
A PIR on the DSC panel only seems to work as a trigger if the UI has it as "armed." I was originally trying the tArmedorDisarmed event type in PLEG.  The trigger started working when I set the PIR to be armed in UI7. Maybe I am still doing something wrong, but it started working in PLEG when I changed it.

Did you build the trigger in PLEG that way?  Meaning there is an option to build a trigger that fires when "A sensor is tripped" and a second option in the drop-down for "An armed sensor is tripped".  I never use the second...
Long Live UI5!  (OK finally made the switch to UI7 in January 2018, and am pretty happy....)

Offline d55m14

  • Sr. Member
  • ****
  • Posts: 430
  • Karma: +8/-1
Re: Program Logic Event Generator Plugin
« Reply #1625 on: October 24, 2017, 09:43:20 am »
Hi,

is it possible to change the schedule time of an action via lua program code ?

tnks

donato

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10020
  • Karma: +758/-141
    • RTS Services Plugins
Re: Program Logic Event Generator Plugin
« Reply #1626 on: October 24, 2017, 09:50:16 am »
You can't change the schedule ...
Every schedule is already scheduled and will run (as long  as Vera is running).

i.e.  every schedule is scheduled when Vera restarts.
When a schedule is fired, it is also rescheduled.

The only schedules you can change in code are  self triggered schedules, where you can set the interval.

Offline Rompabear

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
PLEG dropdown menu under "Editor Option" does not work?
« Reply #1627 on: March 12, 2018, 10:19:39 am »
Has anyone else been having problems exiting the PLEG Editor?
When I have finished writing a Condition or Action, the dropdown menu to reload LUA or Close does not appear when I click on "Editor Option".
This happens very frequently (almost every other time) and means I cannot close the Editor.
All the other Tabs work, Relationship graph, conditions, schedules etc, but the only way I can get out is to close the tab on the browser and then go through the process of logging into Vera from scratch. Its taken me all night to write a fairly simple PLEG, would really like some help with this.

Offline rgmessick

  • Newbie
  • *
  • Posts: 16
  • Karma: +2/-0
Re: Program Logic Event Generator Plugin
« Reply #1628 on: March 12, 2018, 01:25:10 pm »
Has anyone else been having problems exiting the PLEG Editor?
When I have finished writing a Condition or Action, the dropdown menu to reload LUA or Close does not appear when I click on "Editor Option".
This happens very frequently (almost every other time) and means I cannot close the Editor.
All the other Tabs work, Relationship graph, conditions, schedules etc, but the only way I can get out is to close the tab on the browser and then go through the process of logging into Vera from scratch. Its taken me all night to write a fairly simple PLEG, would really like some help with this.

Yes, it has happened to me several times. I refresh the browser and then go back to make sure my most recent changes were saved.

Offline Kwackers

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Program Logic Event Generator Plugin
« Reply #1629 on: April 16, 2018, 04:34:02 am »
I rather foolishly updated my Vera to 1.7.3532 (to get rid of the nag screen).
I immediately lost the z-wave radio (which was fixed remotely by support - excellent service btw).

However my PLE states have gone from being rock solid to being just a bit random.
They mostly work but every now and again a device will turn on when it shouldn't or not turn on, or not turn off.
These are all devices that are controlled by the PLE plugin I don't see this behaviour with any others so I'm assuming something has gone wrong with it.

Anyone seen this behaviour? Any clues as to how I can 'debug' it and what I'm looking for?

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 1190
  • Karma: +30/-32
    • Worthington Engineering, Inc.
Re: Program Logic Event Generator Plugin
« Reply #1630 on: April 16, 2018, 08:04:52 pm »
Once a week or 10 days, one of my schedules do not fire, otherwise, I have not seen what you have described.
Vera 3, UI7 1.7.1017, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs door sensor, NuTone garage door, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual & Multi Switch, Weather, Sys. Mon.