Security PIR to turn on light when alarm is in state "disarmed"

Hi

I just got my Powermax installed an connected it to my Vera 2. I had an idea of using the PIR sensor as a light switch/sensor in my hallway to turn on the light for about 30-45 seconds. I have tried to make a scene that when the PIR i triggered it turns on the light. But the scene creation is in my view not very intuitive. I don’t hope i have to include Luup code.

I need a guide in step by step creating a scene… Any body?

Best Regards
Eddie

Hi

Don’t know what happend first time i made the scene. But now i works.

Create new scene. Choose what device goes on, and made a trigger.

Now i want the light turn off after x seconds. I found this luup code. But its not working:

local device = 5 -- Switch on device 5: luup.call_delay( 'switch_off', 30) -- Call the switch off function after a delay of 30 seconds function switch_off() luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="0" },device) end

No need for luup code. In the scene creation for that scene, next to the name field should be a menu with the word immediate. Click on it and then click on manage delays. Create the delay time you want and than select the off button for the light you want to turn off.

  • Garrett

Thanks Garrett

Seems like its working.

If i want the light to turn in relation to sunset i have to insert a luup code? And if i install a light LUX sensor, i can make the lux sensor be the trigger for the scene to work?

You can set up the light to turn on via the schedule tab. If you want the scene to trigger only when the sun is set you have to use luup code. You would use :

return luup.is_night()

  • Garrett

I had this small setup running for about a day now. I don’t know that much about the Powermax Pro yet. I’m still learning. I have figured out, that the NEXT K9-85 Pir Sensor from Visonic has a 2 minute sleep timer, before it triggers again on movement. I can live with that. But i think its strange, that the device on my Vera stays triggered for much longer (think about 5 min.) This means, that when i trigger the light to go on, and have a timer to switch the light off after 2 min. The light won’t turn on again for further 3 minutes. This is anoying.

Anybody know any parameteres to set in UI5 or on the Powermax?