We have moved at community.getvera.com

Author Topic: Scene that activates or deactivates other scenes  (Read 3873 times)

Offline kristinaw

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +0/-0
Scene that activates or deactivates other scenes
« on: December 05, 2009, 12:04:53 pm »
Wondering if there is a way to have a scene that activates/deactivates other scenes. I have a couple of scenes associated with my schlage locks that i don't necessarily want to run while i'm home. so what i'd like to do is get a scene controller, create a couple of scenes called "home" and "away", and be able to activate/deactivate the other scenes via this switch when i come and go.

i'm fiine doing this in luup too if it isn't possible in the gui, just not sure where that little "enabled" value is saved at. please let me know if this is possible or if i'm going about this the wrong way.

thanks!

Offline Sig

  • Sr. Member
  • ****
  • Posts: 377
  • Karma: +2/-3
Re: Scene that activates or deactivates other scenes
« Reply #1 on: December 05, 2009, 05:06:17 pm »
I went looking for this silver bullet a few weeks ago myself, and it just doesn't seem to exist.  So I went the route of defining a virtual device to use a flag which I set to indicate whether or not I'm at my weekend home, and then use a bit of LUUP code to check the flag for a variety of other scenes I have setup on timers (like my interior evening lighting, for example, which I only want running when I'm there). 

http://forum.micasaverde.com/index.php?topic=2495.0

Good luck.

Offline kristinaw

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +0/-0
Re: Scene that activates or deactivates other scenes
« Reply #2 on: December 06, 2009, 05:25:13 pm »
ok i see what you're saying. i'll give that a try at some point. thanks!

Offline aecchalet

  • Sr. Member
  • ****
  • Posts: 254
  • Karma: +1/-1
Re: Scene that activates or deactivates other scenes
« Reply #3 on: August 02, 2011, 01:43:44 pm »
I am interested in this topic for another reason. I have scenes that I call "Occupied" and "Unoccupied", both activated by timers, which I set based upon the start and end of each rental period respectively.  I would like to activate another scene called "Home Entry", only when the "Unoccupied" scene is activated. In the home entry scene, I would have vera notify me of any valid code entry on locks. (I set up another scene to notify me upon lock keypad entry of any invalid code or on invalid date for code.)
How can I activate a second scene from the activation of the first scene?
I looked at the Events tab of a scene and saw that I could create an event for the device "Mios" that would trigger the scene based upon another scene being activated.  However, I don't want activation of the "Unoccupied" scene to trigger the commands in my "Home Entry" scene only activate the scene so that other Event triggers (entry of valid pin code) would trigger notification.
Do all scene events trigger the scene commands?  Is there an action to make a scene inactive (ignore events) sometimes and active (events trigger commands) at other times?  If so, what does one call that action, "activate", "trigger", etc? 
« Last Edit: August 02, 2011, 02:10:44 pm by aecchalet »
Vera Plus 1.7.2138; 12xHRDS1, 2xTrane SCHTZMT400 Tstats; 5xZIR00, 4xCA9000 PIRs; 2xHA01C Recept; 2x2wy ZDW120W switch; 1xAppl (ACT, GE/Jasco), 1xLite Dim Mod (GE/Jasco, Evolve);  2xDead Bolts Schlage

Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: Scene that activates or deactivates other scenes
« Reply #4 on: August 02, 2011, 10:23:14 pm »
@aecchalet,

Have you looked at the Virtual StateDevice plugin and the various threads on Home/Away type usage? It sounds like you could have a Virtual Device that indicates Occupied/Unoccupied (controlled by the scenes you already have). You can then check against the state of the Virtual Device in other scenes (by using code), such as the HomeEntry scene, so it doesn't execute the commands, depending on the state of the Virtual Device.
Dezwaved at the moment...

Offline RastusB2

  • Jr. Member
  • **
  • Posts: 59
  • Karma: +0/-1
  • I KNEW I shouldn't have stomped those grapes!
Re: Scene that activates or deactivates other scenes
« Reply #5 on: August 07, 2011, 10:32:59 pm »
@aecchalet,

Have you looked at the Virtual StateDevice plugin and the various threads on Home/Away type usage? It sounds like you could have a Virtual Device that indicates Occupied/Unoccupied (controlled by the scenes you already have). You can then check against the state of the Virtual Device in other scenes (by using code), such as the HomeEntry scene, so it doesn't execute the commands, depending on the state of the Virtual Device.

oTi@;
You are correct.
I followed your suggestion of creating a Virtual Device EMS, (my Id #53) use it to monitor it's off/on  state, so I can run the Energy Savings mode of my thermostat

 - SEE BELOW CODE
 
local EMS
EMS = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1","Status",53)
if(EMS=="1")then
  return false
end

I also created another Virtual Device - AWAY -(#54) and when I activate it by a certain pin code in the Schlage lock (7) I can run a reduced amount of lights.
 
I placed the AWAY code in all lighting scenes that I didn't want to run, when I was using the EMS scene: (pin code #8)
I just re-wrote the above EMS code as a AWAY, lighting code, and labeled it as such.

- SEE BELOW CODE
 
local away
away = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1","Status",54)
if(away=="1")then
  return false
end
 
This way, I can activate it, by AWAY & EMS pin codes and I can run just the AWAY scene or I can run BOTH the AWAY & EMS scenes, it seems to be dependable
 and it has ran for 4 days
GE/Jassco Duplex Outlets -16-, GE 3 Way Dimmer -6-, GE 2 Way Dimmers
-8-, GE Lamp Modules -6-. GE Appliance Module -8-, Leviton VRI06-1L  Vizia RF + 600W Incandescent Scene Capable Dimmer-VRI06-1LX, Schlage Dead Bolt, Schlage/Trane Thermostat, Schlage IP wired Camera -3,-Vera 3 UI5 v1.5.408