Simple "Away" Mode

Hi There,

I am new to the Vera and so far I really like what it can do. However, I am having a little trouble wrapping my head around the PLEG.

I am just trying to make a simple “away” mode. So, if I leave the house for the weekend, I push the “Arm” button and it will turn on two of my lights at 5p and then off at 11p. I know I can make separate scenes for this, but I would just like to have one button to push and forget about it.

Can someone push me in the right direction?

I have a home/away virtual switch (there’s a virtual switch plugin). You can then set it up in your PLEG as an input. Say the virtual switch is “home”. Virtual switches have an on/off, so “on” would be home, “off” away.

In your PLEG, create an input for when it’s turned on and call it “home”.
Create a schedule input for 5pm and call it “five_pm” (input names can’t start with a number)

Your condition could be:
turn_on_lights == !home and five_pm

Then set your lights on in the action tab.

You might try basing the time on sunset - you can create schedules that occur at/before/after sunset. I have indoor lights come on before sunset since it’s darker indoors. Outdoor lights come on at sunset. Then you could have:

turn_on_lights == !home and hour_before_sunset

or similar.

Great, thanks.

I did get it figured out and you already answered my next question on the virtual switch…off to the app store. :slight_smile: