Hello I created a scene to turn light on when a window sensor is tripped. There are 13 lights that I setup up to turn on/off in the “advanced” tab. Can anyone guide me how to copy/recreate this scene to another window sensor so I don’t have to do them all over again. Thanks
Simply add another trigger to the existing scene. Each trigger will act as a logical OR: if this window is open or this window is open…
[quote author=ih8gates link=topic=17506.msg135992#msg135992 date=1384218640]
Simply add another trigger to the existing scene. Each trigger will act as a logical OR: if this window is open or this window is open…
[/quote
yes it worked and thanks. just one more thing - i want to arm/disarm these window sensors with the toggle of a virtual switch so that when i go away even for an hour, i will just toggle the VS to on and the sensors will be armed. can you help me with the luup code. thanks again.
Create two scenes, “SensorArm” and “SensorBypass”…e.g. use the schedules (at sunset) to arm, and bypass at 10:00pm?
I don’t want a schedule. I want to toggle the VS to on whenever I leave home to arm the window sensors
You have 3 options:
- Two Scenes 1 triggered when the VS is on, one when the VS is off
- 1 Scene and some LUA code
One trigger when the VS is on, and one when the VS is off.
You will need to ARM/Disarm by lua code in the trigger LUA - Use PLEG
a) A single Input Trigger call something like VSOn
b) Two Conditions
VSTurnedOn VSOn
VSTurnedOff Not VSOn
c) Appropriate Actions to the above two conditions.
[quote=“RichardTSchaefer, post:6, topic:177772”]You have 3 options:
- Two Scenes 1 triggered when the VS is on, one when the VS is off
- 1 Scene and some LUA code
One trigger when the VS is on, and one when the VS is off.
You will need to ARM/Disarm by lua code in the trigger LUA - Use PLEG
a) A single Input Trigger call something like VSOn
b) Two Conditions
VSTurnedOn VSOn
VSTurnedOff Not VSOn
c) Appropriate Actions to the above two conditions.[/quote]
I tried PLEG (option 3) and got this error message: Program Logic: Not VSOn: Invalid Value token: VSON. I am not going to try option 2 because, i don’t know LUA. I am going to resort to option 1. By the way, I was able to follow your PLEG instruction for my kwikset lock and aeon labs door sensor and it worked. thanks.
@waltzer11
I provided 3 solutions so you could use the one you were most comfortable with.
The error message in PLEG indicates that there was not a variable called VSOn.
When you created the variable you either left the default name … or changed it to something else. Just change the conditions logic to match the name you are actually using or change the input variable name to VSOn.
[quote=“RichardTSchaefer, post:8, topic:177772”]@waltzer11
I provided 3 solutions so you could use the one you were most comfortable with.
The error message in PLEG indicates that there was not a variable called VSOn.
When you created the variable you either left the default name … or changed it to something else. Just change the conditions logic to match the name you are actually using or change the input variable name to VSOn.[/quote]
Thanks. The error message now disappeared. PLEG is armed but the window sensor associated with it does not arm. Can you check the attached status please. Although I don’t have programming skills, I want to use PLEG as a challenge and to get familiarize with its rich features. thanks for your patience.
Did not see the Status attachment!
sorry about that. here is the attachment
I would delete the Input trigger:
VS_is_turned_off
Then change the condition: VSTurnedOff to:
Not VSTurnedOn
But that will not effect the results.
It looks like you turned the Virtual Switch (Away Switch) before you created the conditions. Just toggle that switch (Away Switch) once or twice and PLEG will be synchronized.
I also add this capability to PLEG 5.3 if you want to move up. But it’s only an initialization problem (Identified because Last Trigger, or Last True is 0).
[quote=“RichardTSchaefer, post:12, topic:177772”]I would delete the Input trigger:
VS_is_turned_off
Then change the condition: VSTurnedOff to:
Not VSTurnedOn
But that will not effect the results.
It looks like you turned the Virtual Switch (Away Switch) before you created the conditions. Just toggle that switch (Away Switch) once or twice and PLEG will be synchronized.
I also add this capability to PLEG 5.3 if you want to move up. But it’s only an initialization problem (Identified because Last Trigger, or Last True is 0).[/quote]
Richard, can you help me one more time before i give up. i did everything you said. when i toggle the VS to On, the window sensor moves to “arm”; but when i toggle the VS to Off, the window sensor stays armed. also is PLEG 5.3 an update? attached is a new PLEG status. thanks.
Change the expression for your condition Not_VSTurnedOn to Not VSTurnedOn - ie. replace the underscore with a space. Leave the condition name and action as they are.
WOW- i am very happy with the help i get here. my window sensor now arm/disarm when i toggle the VS. i have about 6-7 sensors that i can tie them to the VS. thank you for all the help. it’s a big help since i don’t have any programming skills/background. thank you again. saves me a lot of time by not arming/disarming 7 of them individually.
[quote=“RichardTSchaefer, post:12, topic:177772”]I would delete the Input trigger:
VS_is_turned_off
Then change the condition: VSTurnedOff to:
Not VSTurnedOn
But that will not effect the results.
It looks like you turned the Virtual Switch (Away Switch) before you created the conditions. Just toggle that switch (Away Switch) once or twice and PLEG will be synchronized.
I also add this capability to PLEG 5.3 if you want to move up. But it’s only an initialization problem (Identified because Last Trigger, or Last True is 0).[/quote]
hi i tried to click the check box auto update of PLEG but to no avail; same thing with garage door plugin. can you please clue me in how to do this. thanks
RTS just recently turned of the feature that’ll allow auto-updating. If you’ve got earlier versions of his plugins, I believe you need to manually update them. Here’s a simple(ish) way to manually update them:
RTS just recently turned of the feature that’ll allow auto-updating. If you’ve got earlier versions of his plugins, I believe you need to manually update them. Here’s a simple(ish) way to manually update them:
http://forum.micasaverde.com/index.php?topic=14446.0[/quote]
thanks i copied the code (see below) and changed to my vera IP and plugin number to 3066 which is PLEG but did not update the plugin version. thanks anyway.
local http = require(“socket.http”)
result, status = http.request(“http://:12228/data_request?id=update_plugin&Plugin=<3066>”, “run=run”)