Using PLEG in place of Vera Scenes

Hi Richard,
In some other thread, you suggested replacing scenes with PLEG’s. How are you suggesting tying the PLEG to a button so it can be triggered in the UI? Virtual Switch? Just curious if there is something I am missing.

Roger

In my case, I do not have any manual scenes - everything is triggered by some event. I eventually moved all of my scenes to PLEG so they survive a restart of Vera. You could use a Virtual Switch. This switch could be the trigger in PLEG that executes the Action defined in PLEG.

How to create a Virtual Switch?

MiOS Apps. I use it to display both iPhones being home or away, cameras being armed, and exterior lights being; displayed on VeraMate:

[quote=“Don Phillips”]MiOS Apps. I use it to display both iPhones being home or away, cameras being armed, and exterior lights being; displayed on VeraMate:[/quote]Guess I need to read up on implementation of this plugin…

Sent from my SM-G930P using Tapatalk

Just today I removed all my scenes and have PLEG control all of my scene actions. I use VS’s and then define PLEG actions to do all things my scenes used to do. I will test over the next several days and test everything, but I like the fact that now these actions will survive a Vera restart.

Hi Bucko, i am on the verge of doing the same thing. do you noticed any speed improvements in terms of triggering defined actions/events over Vera’s Scenes?

[quote=“Sammy2, post:5, topic:198379”][quote=“Don Phillips”]MiOS Apps. I use it to display both iPhones being home or away, cameras being armed, and exterior lights being; displayed on VeraMate:[/quote]Guess I need to read up on implementation of this plugin…

Sent from my SM-G930P using Tapatalk[/quote]

So I installed the app on my VeraPlus. Now what? LOL

EDIT: Is this it?

Sammy2,

Here is a link to a simple basic PLEG intro.
[url=http://forum.micasaverde.com/index.php/topic,21603.msg330158.html#msg330158]http://forum.micasaverde.com/index.php/topic,21603.msg330158.html#msg330158[/url]

This should help you understand the basic principals.

kartcon

[quote=“kartcon, post:9, topic:198379”]Sammy2,

Here is a link to a simple basic PLEG intro.
[url=http://forum.micasaverde.com/index.php/topic,21603.msg330158.html#msg330158]http://forum.micasaverde.com/index.php/topic,21603.msg330158.html#msg330158[/url]

This should help you understand the basic principals.

kartcon[/quote]

I get PLEG for the most part, as it is basically visual programming.

It is the Virtual Switch App that I was asking how to use.

was just looking at virtual switch. Has a pulse feature that looks like a good trigger for some of my PLEGs to replace scenes.

[quote=“Sammy2, post:8, topic:198379”][quote=“Sammy2, post:5, topic:198379”][quote=“Don Phillips”]MiOS Apps. I use it to display both iPhones being home or away, cameras being armed, and exterior lights being; displayed on VeraMate:[/quote]Guess I need to read up on implementation of this plugin…

Sent from my SM-G930P using Tapatalk[/quote]

So I installed the app on my VeraPlus. Now what? LOL

EDIT: Is this it?[/quote]

You can now configure the new device. It should be in no room. It has an on and off status and that is it. You use the App to create additional switches. The key is to name it and place it in a room. For instance, I have a Don Home, Thea Home, and No One Home VS. When iPhone Locator updates, it sets the first 2 switches on when either of us is home. This is the switch that appears on VeraMate only when on. When both are gone, the No One Home VS is turned on and it appears on VeraMate only when on.

The switches are turned on and off with PLEG.

You can use them as a trigger in PLEG. I use them for information in VeraMate.

[quote=“Don Phillips, post:12, topic:198379”][quote=“Sammy2, post:8, topic:198379”][quote=“Sammy2, post:5, topic:198379”][quote=“Don Phillips”]MiOS Apps. I use it to display both iPhones being home or away, cameras being armed, and exterior lights being; displayed on VeraMate:[/quote]Guess I need to read up on implementation of this plugin…

Sent from my SM-G930P using Tapatalk[/quote]

So I installed the app on my VeraPlus. Now what? LOL

EDIT: Is this it?[/quote]

You can now configure the new device. It should be in no room. It has an on and off status and that is it. You use the App to create additional switches. The key is to name it and place it in a room. For instance, I have a Don Home, Thea Home, and No One Home VS. When iPhone Locator updates, it sets the first 2 switches on when either of us is home. This is the switch that appears on VeraMate only when on. When both are gone, the No One Home VS is turned on and it appears on VeraMate only when on.

The switches are turned on and off with PLEG.[/quote]

Okay but do you need to change things in the Advanced Settings Tab on the VS? I’m not sure how you’re doing what you’re doing. Other than the icon on VeraMate, does the switch actually do anything else? :-\

I don?t see why you would want to use a virtual switch as a trigger except in special circumstances. Use other devices as triggers for automation, ie. ping your phones to see if you are home. I use the virtual switch for those exceptions that I have a hard time controlling, ie. We have visitors and I don?t want the home to go into Away mode.

I can’t say if anything is faster. It is at least as fast.
What is more important is stability. I want something to happen 100% of the time. In scenes, it’s a crapshoot if the scene actually completes. I always had to add delays, change device order, etc to finally get a scene to do all it’s business. If Vera reloads during a scene, the scene just stops working. Using PLEG, even with a reload, things pick up where they left off so everything does get done.

In my case, for no reason me or support to explain, when I go to disarm my security, Vera always does a reload. That means scenes never complete. VS switches and PLEG is a solution to this problem.

It has been less then 24 hrs since I converted, so I cannot give more details than this at the moment.

I can’t say if anything is faster. It is at least as fast.
What is more important is stability. I want something to happen 100% of the time. In scenes, it’s a crapshoot if the scene actually completes. I always had to add delays, change device order, etc to finally get a scene to do all it’s business. If Vera reloads during a scene, the scene just stops working. Using PLEG, even with a reload, things pick up where they left off so everything does get done.

In my case, for no reason me or support to explain, when I go to disarm my security, Vera always does a reload. That means scenes never complete. VS switches and PLEG is a solution to this problem.

It has been less then 24 hrs since I converted, so I cannot give more details than this at the moment.[/quote]

This is why every off and on of my pool filtration is a separate scene with a back up scene. I have 20+ scenes just to control the various speeds that my multiple speed pool pump goes through during the day…

For me when I set up a VS, I define a delay to turn the VS back off. That way PLEG has no problem seeing a changed switch state. So I have a PLEG that it’s only purpose is to manage my VS’s. I have 15 VS’s. PLEG simply manages the VS for it’s on/ogg state.

My other PLEGs then use these VS’s as triggers to preform whatever actions I need done. I simply select a switch as a device and apply actions to it, knowing my PLEG VS takes care of the actual switch on/off function.

Still trying to get how Virtual Switches are set up…

A virtual switch is basically an electronic (virtual) switch. On or off. You can use it as a trigger. I have two. One is for if we have guests. If I put it on then the doors do not alarm when opened. The other is to keep the back door alarm from going off, if I am working in the garage.