Vera, Alexa, door locks and scenes. Oh My!!!!

Hi All,

I know that Alexa/Vera doesn’t do locks unless you set it to allow them with a pin code, even the pin code approach doesn’t seem to work though. I have 3 Kwikset locks on my house connected to Vera. Using Alexa I can tell it to lock the individual doors, (no pin code needed) ie Alexa lock the front door, etc. As far as I can tell there is no command equivalent to Alexa lock all doors.

My goal here is to create a scene to basically shut the house down for the night:
Check/lock all doors
turn lights on in the master bedroom
adjust ceiling fans to night mode
etc, etc

Alexa will not as far as I can tell accept lock commands as part of a scene, even just to lock them. I can get Alexa to run a scene I created that works as long as it has no locks in it.

I found some Lua code on the forum that is supposed to allow you to lock the doors via a scene, but lua coding isn’t my strong point so I’m not sure if there is a problem with the code or if I’m putting it into a scene incorrectly. The code is, (where xx is the id of the lock):

Luup.call_action("urn:micasaverde-com:serviceId:DoorLock1,“SetTarget”,{newTargetValue = “1”}, xx)

Any assistance would be greatly appreciated.

Thanks

Gordon

[quote=“owensct, post:1, topic:199517”] Luup.call_action("urn:micasaverde-com:serviceId:DoorLock1,"SetTarget",{newTargetValue = "1"}, xx)
Any assistance would be greatly appreciated.[/quote]

If you tried it as you have written it there, then the capital L in Luup will not be helping you. Try it with lower case. Also, your string quoting is wrong.

luup.call_action("urn:micasaverde-com:serviceId:DoorLock1","SetTarget",{newTargetValue = "1"},xx)

I built into my “Night Mode” to lock my doors and Alexa will do it without a scene. Turning it to Night arms my alarm and sensors, locks all locks including my garage door (shutting it), and adjusts my thermostat. No additional code needed.

Make sure you have the modes plugin installed. Alexa can see those, if I recall correctly.

Sent from my LGUS992 using Tapatalk

Awesome. Thanks, I appreciate the responses. I’ll give those two options a shot.

Gordon

Hi All,

Just wanted to respond back to let you guys know that I went with the luup code and it worked great. All I have to do is say Alexa turn on lockup and it runs the scene and locks all 3 doors.

Thanks again

Gordon