We have moved at community.getvera.com

Author Topic: 45604 outdoor module...go back to previous setting?  (Read 9009 times)

Offline Intrepid

  • Hero Member
  • *****
  • Posts: 536
  • Karma: +4/-0
45604 outdoor module...go back to previous setting?
« on: April 26, 2011, 09:37:09 pm »
I've got my cool homeseer event working perfectly in vera.  Well, almost perfectly.

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), side light, and back porch light all turn on.  When ALL doors are closed (via virtual any/all device), the floods and front porch lights turn off after a minute.  I want the 45604 deck lights to also turn off after a minute, but this command option does not seem to work on this module.  It stays on.  My back and side lights are on dusk to dawn, so they receive no command.

In the off scene (triggered by 'any door open' turning off), I'm using the 'turn xxx on, then after one minute go back to previous setting' option for the floods, front, and deck lights.  Floods and front are GE dimmers, the deck is the 45601 outdoor and it does not respond to this 'go back' command.

Should this work, or does 'go back' only work for light/dimmer modules?

« Last Edit: April 26, 2011, 09:50:59 pm by Intrepid »

Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: 45604 outdoor module...go back to previous setting?
« Reply #1 on: April 26, 2011, 09:57:34 pm »
Should this work, or does 'go back' only work for light/dimmer modules?
I just tried the basic case of a scene with a single outdoor module in it:
- Module is off -> run scene -> module comes on, off after 1 minute.
- Module is on -> run scene -> module comes on, stays on.
So it appears to work.
Dezwaved at the moment...

Offline Intrepid

  • Hero Member
  • *****
  • Posts: 536
  • Karma: +4/-0
Re: 45604 outdoor module...go back to previous setting?
« Reply #2 on: April 27, 2011, 06:30:36 am »
Thanks for testing, this is not working for me.  I'll try a different module and see if it's just the one that's not behaving.

.


Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: 45604 outdoor module...go back to previous setting?
« Reply #3 on: April 27, 2011, 11:26:05 am »
Thanks for testing, this is not working for me.
The basic test I did is not working for you, or you're just reiterating that your scene does not work?

At any rate, what happens if you modify the off scene to 'unchanged' and then 'after 1 min go to previous'?

Dezwaved at the moment...

Offline Intrepid

  • Hero Member
  • *****
  • Posts: 536
  • Karma: +4/-0
Re: 45604 outdoor module...go back to previous setting?
« Reply #4 on: April 27, 2011, 11:35:45 am »
My scene (same commands as your test) works for two other lights, but not the outdoor module.  I did not re-create your test scene, but I will when I get time.

Thanks for the help.


Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: 45604 outdoor module...go back to previous setting?
« Reply #5 on: April 27, 2011, 02:32:12 pm »
My scene (same commands as your test) works for two other lights, but not the outdoor module.  I did not re-create your test scene, but I will when I get time.
OK. I think my test had 2 points: 1) 'Go back' does do something with the outdoor module. 2) Entering the scene with the light on, leaves it on. Are you sure the scene has 'go back', not just 'off', for the other 2 lights?
Dezwaved at the moment...

Offline Intrepid

  • Hero Member
  • *****
  • Posts: 536
  • Karma: +4/-0
Re: 45604 outdoor module...go back to previous setting?
« Reply #6 on: April 27, 2011, 09:43:48 pm »
I created a new scene, and it works like you suggested.  

module is on
scene to go back to previous setting, it stays on

module is off
scene to go back to previous setting, it goes off

Then I went back to my original scene.  Same basic commands except for the 2 additional lights.  Since it was day when I was testing, I removed the luup...


if not ( luup.is_night() ) then
 return false

end

...and all lights and the outdoor module worked properly.  The module turned back off according to the 'go back to previous' condition.  


But tonight, on the same scene, I added back the 'is night' luup, and the outdoor module will not turn back off even if it is originally off.  The other lights turn back off fine.

I'm stumped.

Anyway, I have a scene to automatically turn off the deck lamps (triggered by an on) back off after 1.5 hours, and that might actually work better.  When we're opening the deck door at night, I don't want the deck lights switching...the 1.5 hour  delayed off is probably best.



Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: 45604 outdoor module...go back to previous setting?
« Reply #7 on: April 28, 2011, 09:33:18 am »
[...]
But tonight, on the same scene, I added back the 'is night' luup, and the outdoor module will not turn back off even if it is originally off.  The other lights turn back off fine.
Have you tried
Code: [Select]
if not ( luup.is_night() ) then
 return false
else
 return true
end
OR just
Code: [Select]
return (luup.is_night())
(Or if there is other code there, make sure you return true at the end.)
Dezwaved at the moment...

Offline MNB

  • Hero Member
  • *****
  • Posts: 689
  • Karma: +4/-9
Re: 45604 outdoor module...go back to previous setting?
« Reply #8 on: April 28, 2011, 01:06:46 pm »
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?
@Intrepid, can provide insight / Code for your "any/all" virtual device as to how your using this, thanxs in advance. Mike
Edge-1.7.2607, VRI06-1LX Dimr (6), VS05-1LX Sw (4), GE ZW3002 Dimr (1), HA01C Outlet (12), HA02C Sw (6), HA04C Sw (4), GE Sw (2), HA05 Sw (3), MiniMote Contr (5), HSM200/100 Sensor (2), ZW100A Sensor (8), Nest thermostat (1) & Protect Fire/CO (6) Kwikset Locks (3), F18918W (1) & IP3M-9 (6) Cam's

Offline Intrepid

  • Hero Member
  • *****
  • Posts: 536
  • Karma: +4/-0
Re: 45604 outdoor module...go back to previous setting?
« Reply #9 on: April 29, 2011, 05:24:42 am »
Oti, thanks for taking the time to help diagnose/understand this.  I'm up early, still dark, so I tried these.


Have you tried
Code: [Select]
if not ( luup.is_night() ) then
 return false
else
 return true
end

This gives the same result as my original without the 'else return true'.  other lights turn back off, outdoor module does not turn back off.


Quote
OR just
Code: [Select]
return (luup.is_night())
(Or if there is other code there, make sure you return true at the end.)

this does nothing, and none of the lights turn on.  it aborts the scene, i guess?


Offline Intrepid

  • Hero Member
  • *****
  • Posts: 536
  • Karma: +4/-0
Re: 45604 outdoor module...go back to previous setting?
« Reply #10 on: April 29, 2011, 05:44:33 am »
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?
@Intrepid, can provide insight / Code for your "any/all" virtual device as to how your using this, thanxs in advance. Mike

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.

1. Create a virtual device:
http://forum.micasaverde.com/index.php?topic=2138.0

2. 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.  

3. Create 4 more scenes called 'door 1 closed', door 2 closed, etc.  Each triggered by event HRDS1 tripped, no.   And the luaa:

Code: [Select]
-- 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

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.

« Last Edit: April 29, 2011, 05:49:30 am by Intrepid »

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: 45604 outdoor module...go back to previous setting?
« Reply #11 on: April 29, 2011, 08:52:19 am »
IIUC, you could get along with only two scenes.

Create scene 1 with all events from step 2.
Create scene 2 with all events from step 3.

Multiple events get OR'ed, see http://wiki.micasaverde.com/index.php/Luup_Scenes_Events#Adding_Lua_code_to_scenes_and_events.

Offline Intrepid

  • Hero Member
  • *****
  • Posts: 536
  • Karma: +4/-0
Re: 45604 outdoor module...go back to previous setting?
« Reply #12 on: May 03, 2011, 09:17:44 pm »
I think I see what you're getting at, but how do you do an OR on the EVENT that triggers the scene?  The reason I have 4 open scenes (step 2) is that the triggering even is one trigger (each door open) per scene.  Can I use one scene that is triggered if ANY of 4 hrds1s is tripped?  how?

For step 3, it is similar.  The conditional test (all doors closed) is the same in all 4 scenes, but I have 4 scenes because I don't know how to check conditions on the initial trigger (any of 4 hrds1s closed).

I get the conditions on whether or not to continue the scene, but not to start or activate the scene.

Thanks.

Offline wscannell

  • Full Member
  • ***
  • Posts: 157
  • Karma: +0/-0
Re: 45604 outdoor module...go back to previous setting?
« Reply #13 on: May 03, 2011, 09:47:09 pm »
Instead of creating one event per scene, use four events for your scene.  If any one of the four events occur, the scene will run the commands and the Luup code.  If I understand correctly, your Luup and the commands are the same for the four door open scenes, then this will work.  Similarly, the same would work to make just one door closed scene.

Offline Intrepid

  • Hero Member
  • *****
  • Posts: 536
  • Karma: +4/-0
Re: 45604 outdoor module...go back to previous setting?
« Reply #14 on: May 03, 2011, 09:57:31 pm »
Wow, now I see it, you can have multiple events for a scene.  A month with the vera and I didn't notice that. 

I assume they are OR events?

Thanks