Change Lock PIN via lua / luup ?

I found this old thread: Syncing Door Lock Pin codes from Web server on the fly
[url=http://forum.micasaverde.com/index.php?topic=3985.0]http://forum.micasaverde.com/index.php?topic=3985.0[/url]

I have 12 locks, so changing the codes manually is a pain. I really want to do this programatically. I think I may need to clear a code before I (re)set it. Here’s what I have so far:

[code]-- Set Lock Pin
local LockUserName = “0”
local OldCode = “xxxx”
local NewCode = “xxxx”
local VeraIP1 = “10.0.1.xxx”

–Study Door
local vLockID1 = “290”
local vURL1Clear = “http://”…VeraIP1…“:3480/data_request?id=action&DeviceNum=”…vLockID1…“&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=ClearPin&UserCode=”…OldCode
luup.inet.wget(vURL1Clear,5)

–wait for command to complete (still need code here)

–Set the new PIN
local vURL1Set = “http://”…VeraIP1…“:3480/data_request?id=action&DeviceNum=”…vLockID1…“&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=SetPin&json=&UserCodeName=”…LockUserName…“&newPin=”…NewCode
luup.inet.wget(vURL1Set,5)
[/code]

Has anyone gotten the to work successfully?

[quote=“PJJP, post:1, topic:180855”]I found this old thread: Syncing Door Lock Pin codes from Web server on the fly
[url=http://forum.micasaverde.com/index.php?topic=3985.0]http://forum.micasaverde.com/index.php?topic=3985.0[/url]

I have 12 locks, so changing the codes manually is a pain. I really want to do this programatically. I think I may need to clear a code before I (re)set it. Here’s what I have so far:

[code]-- Set Lock Pin
local LockUserName = “0”
local OldCode = “xxxx”
local NewCode = “xxxx”
local VeraIP1 = “10.0.1.xxx”

–Study Door
local vLockID1 = “290”
local vURL1Clear = “http://”…VeraIP1…“:3480/data_request?id=action&DeviceNum=”…vLockID1…“&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=ClearPin&UserCode=”…OldCode
luup.inet.wget(vURL1Clear,5)

–wait for command to complete (still need code here)

–Set the new PIN
local vURL1Set = “http://”…VeraIP1…“:3480/data_request?id=action&DeviceNum=”…vLockID1…“&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=SetPin&json=&UserCodeName=”…LockUserName…“&newPin=”…NewCode
luup.inet.wget(vURL1Set,5)
[/code]

Has anyone gotten the to work successfully?[/quote]

Hi–

Anything new on this?

Don