How do i use the virtual switch plugin?

I have installed the virtual plugin but I have no idea how to use it,

http://apps.mios.com/plugin.php?id=1408

Im a complete newbie, could someone advise how I use this plugin.

I’m pretty new as well, so I’m sure others will chime in here with their more advanced use cases. I’m sure I’m using them in ways that over complicate things a bit, and will likely end up deleting some, but at least at the start, it’s helped me keep things more organized.

I’ve been using the virtual switches most frequently in creating scenes with PLEG. So I have a switch labeled “vacation/weekend” which when turned on modifies automated scenes I have set up (e.g. when I’m on vacation, blinds open later in the morning, coffee turns on later, etc…). Ultimately I want to get this controlled by google calendar, so it’s automatically switched. The other application I’m trying to get working is geofencing/ibeacons, so as we come home, geofence switch turns on and when this switch turns on the gate opens, outdoor lights come on, etc… Still very much a work in progress, but hoping I can get this figured out.

The other way that I use them is to fire a scene from my iPhone app. I use homewave and just add the virtual switch to the app and can use it to control lighting scenes or other actions.

If you haven’t played around with PLEG yet, it’s probably the first thing I would suggest, after you have a few devices loaded. Totally expands the capabilities of vera. I’m still learning how to use it, so I’ve also used virtual switches to compensate for my lack of PLEG skills. So for example, I want our gate to open in the morning when I leave for work. I’m still working on incorporating time/scheduling with PLEG, so I have a switch that turns on for a 10 min window in the morning when I usually leave using vera scenes. Then I have a PLEG setup so that when the front door is opened and this virtual switch is on and the gate is closed, the gate opens. I’ll probably delete this as I get more experienced with PLEG, but in the interim, I find they help me keep the logic straight.

Thank you for that. i can see that the virtual switch is going to be a great plugin.

I need some quite basic level help to get me going.

I have installed the plugin from the apps page. Now i see the virtual switch appear as a nevice.

Could someone explain to me what I do next. How do i associate a device or scene with thee virtual switch.

Apologies for what mus seem a very basic question but Im very new to all of this and need some basic level advice to get me started.

Many thanks in advance.

[quote=“col8eral, post:3, topic:181877”]Thank you for that. i can see that the virtual switch is going to be a great plugin.

I need some quite basic level help to get me going.

I have installed the plugin from the apps page. Now i see the virtual switch appear as a nevice.

Could someone explain to me what I do next. How do i associate a device or scene with thee virtual switch.

Apologies for what mus seem a very basic question but Im very new to all of this and need some basic level advice to get me started.

Many thanks in advance.[/quote]

Yes, it’s confusing when you’re first getting started! Have you installed the PLEG app yet?

I think the easiest way to approach it is to have something you want to set up. So for example, if you want the virtual switch to be turned on for a specific time window, go to Automation>>New scene, click the switch on, then go to the schedules tab and set the time you want to turn the switch on. Then click save and run scene. Note that you’ll have to set up a second scene to turn the switch off at your specified time.

As I understand it, you don’t necessarily associate a device with the switch, but can use the switch as a way to regulate scenes or actions (i.e. a scene only executes if a virtual switch is on). Hopefully someone will correct me if I’m steering you wrong!

Is there a particular use scenario you want to try? That would be the easiest way to walk you through getting it set up.

Thank you for that. So I need to install PLEG. I hadn’t realised that. I’ll do that now.

One thing I was thinking of doing was using a Switch to turn the VacationGhost on/off. Can you toggle the virtual switches to on/off like for devices?

You certainly don’t need PLEG to make very effective use of a virtual switch. They can be used both for input and output. For input, to set a state, as already described. For output to indicate a state. I use them extensively to ‘latch’ the state of an alarm: door sensors or PIRs turn on and off, but with a simple scene you can set a virtual switch to ON when one of these triggers, and then it stays that way until manually reset. Extremely useful to indicate that something has happened in the past.

If you have a bunch of Virtual Switches … you might consider use the MultiSwitch plugin … this provides 8 Virtual switches.
Vera has limited memory … and plugins use memory quickly … so you can replace a bunch of Virtual Switches with a single MultiSwitch.
Many 3rd party Remote Control Apps support this.

As @akbooer indicated … these are critical to home automation … providing a user interface for both the control of your automation, and the status of your automation.

You can do your Automation in PLEG or LUA …
PLEG lets you focus on the Logic … and not all of the Vera implementation details.

My personal goal is pure automation … it just does the right thing … so there is nothing to set or monitor.

I agree the multiswitch plugin works great… I have a virtual switch that is called “home” this triggers scenes etc… but I also want my lights in the kitchen to come on automatically, but only when i am home. I created a multiswitch that is only “on” when home = 1 and motion = 1, then it triggers the “kitchen lights” scene… after 2 min of no motion it turns the lights off…

I use Multiswitch to set various alarm states: Home, Away, Vacation, and “Goodnight”. I both run scenes based on which one is activated (“Goodnight” turns off the lights and arms sensors, for example, while “Vacation” also adjusts the thermostats and activates a random light module to simulate someone being home) but as a state input for PLEG (if multiswitch is “Away” and an armed sensor is tripped, then activate the weapons systems and smoke the intruder).