NEW Smart Virtual Do Anything Plugin - Beta

Actually this is just a major enhancement to the Program Logic Event Generator (PLEG) and Timer Switch (PLTS) plugins. But if the complexity of automation and the proliferation of scenes and LUA code have you frustrated … read on.

MCV Provides Scenes and Triggers and if you need anything more than a logical or of the input triggers you need to revert to LUUP coding. The first generation of plugins were things like the Combination Switch and Countdown Timer plugins. This expanded the scope of what could be done with out luup code … but still need external scenes linked together via triggers. Then came the Smart Virtual Switch which allow a subset of inputs, a predefined logic, and a set of actions all in one plugin. No LUUP and NO scenes. But this is still constrained to a specific application.
I will update the Web documentation next week … But the actions tab looks just like the Scene editor. It should be familiar.

PLEG and PLTS are now the third generation of plugins.
It has all the characteristics of the Smart Virtual Switch but can be extended to many different types of tasks. By this i mean it provides the ability to specify:

[ol][li]Inputs - Triggers, Timers, and/or Device Properties[/li]
[li]Conditions - Sophisticated combination logic including boolean, numeric, and string operators, and sequence of inputs events operators[/li]
[li][i]Actions/i - You can create a scene inside PLEG/PLTS that is associated with a Condition and can control anything you can put in the Scene Device Editor and/or Scene Advanced Editor. These do not show up as scenes in Vera, and can only be activated when the associated condition is satisfied.[/li][/ol]

For all three components … the capabilities are more extensive and complete than the previous generations of plugins.

The conditional expressions still require some knowledge and understanding of logic expression. But you get to focus on your logic … and not a lot of other details that are not pertinent to the task at hand.
If you are still reading … this is UI5 only …you can download the PLEG and PLTS from the App store
Then extract and upload all of the files from the attached zip files.
These are uploaded from the AppsDevelop AppsLuup Files tabs.
You will need to click the Restart Luup after upload check box.
After Vera restarts … reload your browser window.

It should be noted that this also requires the Program Logic Core App as well.

Thanks for your invaluable contributions!

Thanks for this, now I am getting my head around the PLEG concept the flexibility of your plugin opens up more doors.

Maybe Micasaverde should give your method recognition and who knows, one dayits own sub tab on the main UI Automation tab in UI6 :wink:

I have two more changes planned for these plugins:

[ul][li]The Arm/Bypass will enable/disable the actions[/li]
[li]The ability to put a condition expression in the “Argument” fields for an action[/li][/ul]

The latter would allow you to “compute” the value for a specified command.
You can use this to compute a temperature set point, or a lighting level.

Released a new file.

Changed the PLTS user interface to be the same size as the standard control.
The ARM/DISARM will arm/disarm the actions.

This is an absolutely superb plugin, Richard. When I automated my previous house using an AppDig Leopard-II, I spent hours writing code to get things to happen in the right sequence - not to mention days waiting to see if it worked OK. With PLEG, I can implement simple or complex rules in seconds!

The latest Beta is working beautifully on my Vera Lite running UI5 1.5.408. The addition of Actions and getting Arm/Bypass working is just great. The only thing I haven’t figured out is how to set delays for the actions. Not that it matters much as it is easy to set another condition with condition1; NOW > hh:mm:ss for a delayed action. You really have thought of everything in this plugin.

One really useful feature is the ability to include device parameters as inputs. Now I can delay control actions until I know my battery-operated thermostats have woken up and been updated.

Thank you, Richard, you have saved me hours of coding. It will be a real challenge trying to find a scenario that PLEG cannot handle. ;D

Best regards, Rex

Thanks for the positive feedback …
How about a review for PLEG:
[url=]MiOS Apps
[url=]MiOS Apps
As appropriate.

The only thing I haven't figured out is how to set delays for the actions. Not that it matters much as it is easy to set another condition ...
That's why I left the delays OUT ... Currently if Vera reboots in the middle of a scene ... these delayed actions never happen. In the PLXX devices ... delayed conditions will work even if Vera reboots between them!

When the official version get’s excepted by MCV … It also has support for Computed values for device commands in Advanced tab for the Actions. Instead of a constant value you can replace with {(SomeExpression)} which is evaluated at the time the action is fired.

I would like to request an additional condition function for both PLEG and PLTS.

Would it be possible to implement a function: Random(hh:mm:ss) which returns a psuedo-random time between 00:00:00 and hh:mm:ss? This would be great for switching lights on and off when away from home.

Check out the vacation ghost plugin. It’s designed to perform this particular task.

Not to steer this thread off topic. I was also going to recommend this as well, however I believe chixxi still needs to fix the issues that it is currently having. Or did he fix this already?

  • Garrett

Richard, your PLXX plugins are looking pretty good. I’ll have to install them on my test vera and give them a try. Will need to learn your expression concept though.

The Version 2.0 of Program Logic Event Generator and Program Logic Timer Switch and Program Logic Core have been accepted by MCV and are now available from the App store.

I will update my website documentation this weekend.