Program Logic Plugins Version 5.3 is Available

See the following thread for details on how to upgrade:
http://forum.micasaverde.com/index.php/topic,14446.0.html
[hr]
Version 5.3 is available
New features and some bugs that a few people have noted.

[ul][li]Correctly Escape Strings to support International Languages correctly
(Needed when Actions contains Notifications to Vera Alerts etc.)[/li]
[li]Detect Changes made during restart (also handles initializing state of new triggers/conditions.
On startup if triggers/conditions eval to different than last time saved … the timestamps and values will be set and may cause actions to fire.[/li]
[li]Fix bug when deleting a device that is referenced in a delayed action … and the action is still active.[/li]
[li]Added an action to the PLEG/PLTS to allow you to set a device variable in an action (using the Advanced Tab for Actions) This should reduce some of the requests to need LUA[/li]
[li]Fixed bug that allowed Input and Condition names to begin with a number.[/li]
[li]Fixed bug that allowed Inputs and Conditions to have the same name.[/li]
[li]Fixed Renaming of conditions to also rename fix the names in Notifications.[/li]
[li]Change the default names for schedules to s1…, and device properties to be p1… (previously they were both t1…)[/li]
[li]Fixed a bug that caused you to have to create a dummy device action before you could use the Advanced tab.[/li]
[li]Add support for floating point numbers.[/li]
[li]Turned on Auto Update from my end … Now you can enable it on your end.[/li][/ul]

[hr]
Version 5.2
This fixes some bugs that a few people have noted.

[ul][li]Handle case where Input Property or Triggers, or Actions reference deleted devices.[/li]
[li]Handle cascading of events when using the conditional statement.[/li]
[li]Minor enhancement … interval timers that are even multiples of hours or minutes will always fire on even hours/minutes respectively. (i.e. an interval time that runs every hour will always run at the beginning of the hour.)[/li][/ul]

[hr]
Version 5.13

[ul][li]Bug Fixes[/li]
[list]
[li]Fixed bug when the Off Schedule type was not the same as the On Schedule type.[/li]
[li]Fixed bug that would not allow arbitrary characters like quotes in the arguments for actions. This was very limiting for Actions that do user notifications.[/li]
[li]Fixed bug that would not display Device Properties if the device had no triggers defined for itself.[/li]
[/list][/ul]

[hr]
Version 5.11

[ul][li]Bug Fixes[/li]
[list]
[li]Fix bug in cascading conditions when the condition values was not true.[/li]
[li]Fix the timestamp for the report date (top of page).[/li]
[/list][/ul]

This release only requires updating the PLC
[hr]
Version 5.1

[ul][li]Timers Gone Wild Release
Support Scheduled Timers (On and Off) on Specific Date for every year (Use a year of *)
Support Scheduled Timers OFF at Specific Time (Can be relative to Sunrise/SunSet)
Modify all Timers intervals from XX Seconds, XX Minutes or XXHours to: HH:MM:SS notation
Support Triggering Timers from Actions. In Advanced Tab, Select PLEG/PLTS device; StartTimer Action; specify timer name
New Scheduled Timer Types - Self Trigger and Self ReTrigger. These are not started at any specific time, but can be started from the StartTimer action. If you issue a Start Trigger to any timer, and it is already running … it is ignored, except for the Self Retrigger type. In that case the Timer interval starts over.
Modify Report Status … to show the current state of the timer.[/li]
[li]Fixed 5.0 Bugs
Removed the code that tried to delete old state variables … it was causing problems.
Fixed bug that required an Action be defined before entering the Advanced Tab for the Actions Editor.[/li]
[li]Reserved Condition Names: ARM, BYPASS in PLEG (Already exists in PLTS)
When Set to TRUE … these will allow you to set or bypass respectively the current PLEG.[/li]
[li]Updated online documentation[/li][/ul]

[hr]
Version 5.0

[ul][li]Support for delayed Actions - Same as delayed commands in Scenes.
Unlike Scenes, if Vera is restarted during the execution … the delayed actions will still be run.[/li]
[li]Input Timers have new functionality. You can optionally specify a duration that the associated condition will be true. This eliminates the need for two timers and a sequence expression to represent a time period. Optionally the ON time and duration also support random delays to give a less Automated view.[/li]
[li]Remove the funny notification associated with input triggers. Since it’s gone … you can’t delete it and delete all of your triggers ![/li]
[li]Various cleanup on the User Interface and Report and Status pages.[/li]
[li]This completes the major restructuring started in version 4.2[/li][/ul]

[hr]
Version 4.6

[ul][li]Fix Handling of Lock Triggers for a specific ID[/li]
[li]Fix Handling of Armed Sensor Triggers
Should also fix some other lock related Triggers[/li][/ul]

[hr]
Version 4.5

[ul][li]Record Trigger, Device Variable, and Condition times with ms resolution.
This should allow sequence expressions to differentiate the order of events that happen almost concurrently.
Status reports now use a standard format that includes ms display. [/li]
[li]Fix a bug with literal numbers and strings in the conditional expression.[/li]
[li]Fix a bug with using wildcards for PIN #'s for locks.[/li]
[li]Add support for conditions to fire every time they are evaluated true … not just the first time.
The condition name needs to start with an underscore i.e. _Always[/li]
[li]Fix a bug when referencing the PLEG’s Armed variable.[/li][/ul]

[hr]
Version 4.4

[ul][li]Add support for a Status button on the control tab. This is similar to the Report, except it shows the current state and time stamp for Input Triggers, Device Properties, and Conditions.[/li]
[li]Fixed the Report so it works properly on Internet Explorer[/li][/ul]

[hr]
Version 4.3

[ul][li]Some bug fixes in handling sequences. And fixing cases where some Actions were firing when they should not have … Actions are only supposed to fire when a condition first becomes true. In some cases it would fire on subsequent evaluations being true, without the expression every evaluating to false in between.[/li]
[li]Some changes to reduce the stress on Vera in the context of a burst of events. A burst of events could cause Vera to restart because it thought there was a dead lock.
I still have some changes to make … but this should reduce some of the stress and was a mandatory first step.[/li][/ul]

[hr]
Version 4.2

[ul][li]The definitive Fix for the the problem of Phantom Actions caused by issuing a Save as opposed to Finish in the Action Editor[/li][/ul]

[hr]
Version 4.1

[ul][li]Add Conditional Statement Support
XX ? YY : ZZ
Which is interpreted as if XX then YY else ZZ
The XX expression must evaluate to true or false. If XX is true then YY is returned. If XX is false, ZZ becomes the result. This expression has the lowest precedence of any operators, use parenthesis to explicitly control the order of evaluation.[/li]
[li]More Cleanup of actions[/li][/ul]

[hr]
Version 4.0

[ul][li]Fix the problem of Phantom Actions when PL plugins are deleted.[/li]
[li]Find and Delete hidden scenes left over when deleting PL plugins[/li][/ul]

[hr]
Version 3.1

[ul][li]FIx a bug when an input trigger had no events[/li]
[li]Comparison intervals (associated with > and <) for Sequence and MultiClick expressions can now be a variable. Not terribly useful until I implement some conditional logic.[/li][/ul]

[hr]
Version 2.9 .

[ul][li]Prevent Users from entering spaces in condition names in PLEG[/li]
[li]When you rename your condition, it will automatically rename the action in PLEG[/li]
[li]The PLTS and PLEG devices now support a RunScene action. So you can now run a scene from an Action. (Previously you had to create a trigger for a scene where you indicate that the specific condition has been satisfied.) This is only available in the Advanced tab for Actions definitions.[/ul]

[hr]
Version 2.8

[ul][li]A problem in the execution engine that did not handle cascading conditions.
This has frustrated people, wondering why there code was not executing.[/li]
[li]A problem with the new condition Editor corrupting the data if you used string litterals (single or double quotes). This corruption rendered the PL device totally unusable.[/li]
[li]Identified the cases that could cause the User Interface (Inputs, Conditions, Actions) to not load … It will now gracefully inform the user of the problem and load as much as possible.[/li][/ul]

A few other minor bug fixes.
[hr]
Version 2.6

[ul][li]Bugs in editing the Interval, and Initial Switch State for PLTS[/li]
[li]Interaction bewteen the PLC and Vera Alerts
I had the same function name in both places … with different implementation. That’s a No-No in JavaScript … and I know better![/li]
[li]Remove Actions when I delete conditions for PLEG. Still need to clean up Notifications. They do not hurt anything, but they look bad in the Report[/li][/ul]

[hr]
Version 2.5

[ul][li]A Report button on the the Control tab.
This generates a report showing all inputs, conditions, actions, and notifications for the PL device. This is useful to share your configuration with others … or just to be able to see everything in one place.[/li]
[li]Allow Conditions to be wrapped onto multiple lines in the display. Should help with those longer condition expressions.
NOTE the condition expression is still just a single logical line![/li]
[li]A Condition Editor … You can use this to optionally edit your conditions. It is also helpful in that it lists all of the expression options you can place in a condition expression. A quick mouse muti-click on the condition text will expand the text selection … more clicks will expand to a wider selection. This is useful for checking the scope of nested parenthesis expressions.[/li]
[li]PLEG has the options to order the expression statements.[/li]
[li]Modify how data is accessed and saved in the PLTS conditions tab. You will now be required to do a save when you change intervals, and/or condition expressions.[/li][/ul]

GOAL: When PL device XX satisfies condition YY run scene ZZ
[hr]
Solution:

[ol][li]Add an Action for PL device XX, condition YY [/li]
[li]Go to the Advanced Tab while editing the action.[/li]
[li]Where is says: Pick a device … Select the PL device identified as XX … Then Add[/li]
[li]Edit the new action … where it says Please Select … Select Run Scene[/li]
[li]Where there is a type-in field labeled: SceneNameOrNumber enter either the Name of the ZZ scene or the Scene Number of the ZZ scene.[/li]
[li]Click Finished[/li]
[li]Close the PL Control Window[/li]
[li]Save[/li]
[li]Relax — enjoy the automation![/li][/ol]

Hello Richard,

Could you include a small modification in the next version : when I build a condition in the PL** modules using a ‘property equals value’ the double equals remains in red…
Example : ExtTemp_sup19 AND (SdB_Light == 1 )

As my PL** works, I suppose the red color is normal and there is no mistake in my formula…
If there is indeed no mistake in my formula, could you change next version to have the interface set a different color for this ‘==’ symbol ?

Richard, is it possible to alter the order of the Triggers.
I needed to alter one yesterday, after I deleted it, the new one appeared at the bottom of the list.
There appears no way of changing it’s position in the same manner as it’s possible in the Conditions Tab.

Ordering triggers will not effect outcome.
Ordering Conditions can effect outcome.

Why do you want to order triggers ?

Just for neatness of layout. :slight_smile: also it is convenient to see whether it’s complementary true or false in the Reports Window.

When I create a Trigger, I’ve generally created it’s opposite at the same time.
ie: DoorClose, DoorOpen.

If I have the order as generated DoorClose, DoorOpen,GarageCFLOn, GarageCFLOff and accidentally delete DoorOpen or any of the other 2 lower triggers, then they appear to be out of order when they are recreated and you can’t see them next to each other.(side by side, so to speak).

I never considered that the reason for altering the level of Conditions affected the order in which they were processed. I’ve learnt another facet of the PLEG. :slight_smile:

edit: spelling & grammer

@zedrally
I will add to the wish list …

But if you change one, I would think you would have to change the compliment as well.
And if you didn’t … you could delete and recreate it to keep the pairs next to each other for now.

I never thought about deleting it’s opposite…
Leave it on the wish list but right at the bottom, it’s not a priority…

One question about the PLEG in general.
I’ve now started to declare Conditions and Conditional Expressions that contain variables at the beginning of the Conditional Expression List, in the life cycle (routine) of the PLEG (if thats the right word), I presume that these are all calculated prior to testing of the Expression and make the PLEG more efficient.

A state is maintained persistently of all the Triggers, Device Variables, and Condition Values, and associated time stamps.

When Any input (Trigger, Device Variable Change, Schedule (Including NOW)) happens
the conditions are re-evaluated in order.
If any condition becomes true, associated actions are fired.

Then the state is saved.

Richard, what do you mean when you say that condition order matters? You also said that when a condition is true, the action fires and then the state is saved. The state is saved when each condition is matched and actions are executed? Or the stat e is saved at the end? Thanx.

The order of conditions is important if you refer to them in other condition expressions. They are evaluated from the top, down. The state of all Triggers, Properties and Conditions is saved following the evaluation, any any required action, of all conditions.

If you are interested in following the action of PLEG … Look at the log file for a debug instance.

Make a change and review the log file. There are lots of messages … you can see what happens.

If you have a condition whose name starts with an “_” it will get fired when true … even if it was previously true.

There are a class of conditions that want to get fired every time!

Great work, Richard.

I love the new, high-resolution time-stamps. My 30 minute interval condition - with added _ - is now firing every time.

Richard,

Is there any way to expand the UI?

It feels a bit cramped when viewing all conditions… is there a way to pop the window out? Or expand the virtual window (mios ui)?

I live in the constraints of what MCV provides for developers … It would take much more work to push the limits … I tried to resize the window … but MCV has graphics tied to the size of the window.

Is there a way to email the report/status on a daily basis? So i can quickly detect if anything was wrong?

as another user pointed out … do we need this file from here ? http://forum.micasaverde.com/index.php/topic,14322.0.html

That patch is only is needed for those that want to use PLEG or PLTS as a trigger for a Scene.
Since both of these plugins can run a scene as part of an action … there is very little need for this patch.

Thank you Richard!
I will test this in the morning. However, it seems others have reported it works.

One more thing, since I want to have PLEG condition to be a trigger for a Vera scene, I installed the cpanel patch I found in another thread (when used with 1.5.622) . You did mention however that we can fire off scenes directly from PLEG and no longer need to have the condition be a trigger. However, for some reason I have having difficulty finding how to do this. In the Actions->Edit screen I can see devices and scenes. The devices I can easily select, however the scenes I cannot select. WHen I press a button in the scene displayed, it just fires off the scene. It does not add to the list of actions.

I assume I am missing something simple here since I think you indicate that a scene can be part of an action. (I think).
As usual… thanks in advance. Wish somehow you had a "tip or charity jar " somewhere to show our appreciation.