Im trying to setup a scene where I come home and unlock the front door, then have it turn on my family room light. Ive tried to set it up as follows: Create scene called door unlocked with the light being turned on. I set a trigger as the front door lock, which is a yale real living and a schedule for everyday and the time for at sunset. this way it doesnt trip the lights on during the day. With this setup, no matter what time of day, the lights get triggered once the front door is unlocked. I only want it doing that at nightime. Im using a vera3 with ui5. any suggestions?
You need to scrap the schedule part of the scene. It’s not going to do what you’re wanting. Instead you setup the trigger as a PIN being entered, the action being turning the light on and then in the LUUP tab place the following code:
if ( luup.is_night() ) then
return true
else
return false
end
save lua and the scene and so forth.
The code will inhibit the scene if it’s not nighttime.
Okay, so I made the changes however entering my pin into the lock isn’t triggering the scene. Is there some configuring I need to do on my lock device?
Sent from my EVO using Tapatalk 2
If the scene was triggering before you entered the luup.is_night () code and now it isn’t, you most likely not copied the code correctly or it is not night when you tested it.
Also, make sure that your time and timezone on the Vera are correct.
Setup → Location - Timezone and Current city:
I’m. I just redid the scene this morning. I tested and lights aren’t coming on which is right. Now I’ll wait until nighttime to try again. Thanks.
Sent from my EVO using Tapatalk 2
You have to select “a valid pin is entered” and then enter your PIN number. Not the pin istelf mind you. Just the number for it in your Vera. So sing my pin was the first one I created my pin is #1. You can also substitute a pin # with a * and all valid pin codes will trigger the scene.
I’ve done this exact function using the Day/Nightb and PLEG plugins from RichardTSchaefer, check them out. ThebPLEG plugin allows you to use logic and combine variables to set a state and become triggers for scenes.
Thanks for all the help guys. all is working good! thanks again!