how to turn off all lights from door lock?

Hi. I have a new quickset door lock, and I think it would be great if one press of the lock button locked the door (as normal) and a second push of that button turned off all the lights in the house. is that possible? or some other way to do it from the lock? I did try creating an “expired” code and then trigger all that from an event when an expired code is clicked, but it works maybe 25% of the time.

Not possible?

I don’t have the Kwikset lock to know the actions of that button, but I guess it can be used as you asked providing the button can be used as a trigger with the lock already locked.

What if…
You create a scene to turn off all the lights with the trigger being the lock button.
Create a virtual device, record the device number to add to the code.
Add the code to the Luup tab and add the VD’s number in place of the ??

[code]local DEV_SWITCH = ??

local LightState = luup.variable_get(“urn:upnp-org:serviceId:VSwitch1”, “Status”, DEV_SWITCH)

if (LightState == “0”)
then
return false
else
return true
end[/code]
The first press on the lock turns the VD on, pressing the lock button again allows the scene to run.
Add the same virtual device to your unlock scene to toggle the VD off.

Instead of using the virtual switch, you can probably just check the status of the lock and if it is locked, perform the action.

  • Garrett

I have a Kwikset and a scene that turns off all of my lights. If I wanted to do what you’re suggesting, I’d just set the “lock button” as an event in that scene. Thereafter, if the lock button is pressed, all of the lights would go off.

I don’t do this because there are lots of cases in which the door is locked from outside when there are still people in the house. I just have a scene controller at (the inside of) the front door with an “ALL OFF” button.

[quote=“DeltaNu1142, post:5, topic:171599”]I have a Kwikset and a scene that turns off all of my lights. If I wanted to do what you’re suggesting, I’d just set the “lock button” as an event in that scene. Thereafter, if the lock button is pressed, all of the lights would go off.

I don’t do this because there are lots of cases in which the door is locked from outside when there are still people in the house. I just have a scene controller at (the inside of) the front door with an “ALL OFF” button.[/quote]

Wish there was a way to enter an alternate code that will run a scene (like all lights off or on) versus just triggering on the fact the door is locked or unlocked…

You mean, enter a code that does not unlock, but instead triggers a scene? Yes, that would be cool. I can only think of a few situations in which that would be useful, though.

You could have one PIN code that unlocks only, and one PIN code that unlocks & does some stuff… but again, not really useful.

You mean, enter a code that does not unlock, but instead triggers a scene? Yes, that would be cool. I can only think of a few situations in which that would be useful, though.

You could have one PIN code that unlocks only, and one PIN code that unlocks & does some stuff… but again, not really useful.[/quote]

Yes unlock, but also a way to lock and activate a scene. I put a trigger on my yale lock so that when you locked the door the lights would shut off (you know we leave the house and all lights off) but quickly realized that even locking the door from the inside still triggers the scene.

I guess other than battery depletion, there’s nothing stopping you from using a special PIN to trigger a scene that switches your lights off and then re-locks the door!

This is the beauty of having an alarm system, as things like this are much easier to control!

Well… of course you can do that on the Kwikset. I think that’s what the OP is asking, no? “Lock button pressed” can be used as an event that triggers a scene.

Hah… well, I considered saying that, but that would render the function useless in the very few times I can even think I could be useful otherwise.