[quote=“Michael_N_Blackwell, post:9, topic:168224”][quote=“Intrepid, post:1, topic:168224”]I have 4 outside doors with hrds1 sensors and a virtual ‘any/all door’ device. If it is night, and any door is opened, the flood lights, front porch light, deck lights (on 45604 outdoor module),
Should this work, or does ‘go back’ only work for light/dimmer modules?[/quote]
@Intrepid, can provide insight / Code for your “any/all” virtual device as to how your using this, thanxs in advance. Mike[/quote]
Sure! I’m ultra-new and not a programmer, but I did get this one going. I’ve had this working in homeseer for 10 years. HS allows conditionals in GUI events, but this is actually just as easy in Vera.
I have 4 exterior doors with HRDS1 sensors. If ANY door is opened (tripped), the ‘any door’ virtual device turns on. When ALL 4 doors are closed, the vrtual device turns off.
I mainly use this for night scenes where I want all exterior lighting (mainly floods) to come on when any exterior door is opened and stay on until all exterior doors are closed.
-
Create a virtual device:
[url=http://forum.micasaverde.com/index.php?topic=2138.0]http://forum.micasaverde.com/index.php?topic=2138.0[/url]
-
Create 4 scenes (one for each door) called ‘door 1 open’, ‘door 2 open’, etc. Each of these are triggered by the event HRDS1 for being tripped, yes. And the command of turning ‘any door virtual’ on.
-
Create 4 more scenes called ‘door 1 closed’, door 2 closed, etc. Each triggered by event HRDS1 tripped, no. And the luaa:
[code]
– Find the status of any doors
local Door1State= luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 8)
local Door2State= luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 27)
local Door3State= luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 28)
local Door4State= luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 29)
– Exit the scene if any door is open
if (Door1State == “1”) or (Door2State == “1”) or (Door3State == “1”) or (Door4State == “1”) then
return false
end[/code]
8, 27, 28, 29 are the devices for my HRDS1s.
I’m sure there is a more elegant way to handle this without having 8 scenes, but this was my first attempt, and it works.
Besides the lighting scene being discussed in this thread, It’s also handy to have one indicator device to see if any door is open on my iphone.
Hope that helps.