We have moved at community.getvera.com

Author Topic: Read PIN code from kwikset deadbolt  (Read 2839 times)

Offline bmeyer29

  • Sr. Newbie
  • *
  • Posts: 29
  • Karma: +0/-0
Read PIN code from kwikset deadbolt
« on: July 15, 2011, 01:13:00 am »
I'm looking for guidance on how to extract the last entered user code (PIN) from a kwikset deadbolt using luup code. I have been able to read (and post in an email) binary variables such as "Armed" and "Status" from the deadbolt, but am confused when trying to read text such as sl_UserCode.

I know the information exists, because I can see it in a standard notification message. I don't like the built-in notification because it is slow and the text in the message is too verbose. I have inserted my own smtp code, based on several threads in this forum and it is working well. (Many thanks to all that have posted suggestions and sample code on that topic!)

I purchased this vera2 a few weeks ago and updated to the latest firmware during the initial setup.

Thanks in advance for your assistance!

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
Re: Read PIN code from kwikset deadbolt
« Reply #1 on: July 16, 2011, 03:18:32 am »
I think all the lock does is report back user 1 or 2 etc.

If you have a scene that uses luup and the SMTP snipet then you most likely just need separate scenes (for user 1 and user 2) with the respective SMTP verbiage to reflect which user code was used from the configured user 1 or user 2 created event.
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster

Offline MNB

  • Hero Member
  • *****
  • Posts: 689
  • Karma: +4/-9
Re: Read PIN code from kwikset deadbolt
« Reply #2 on: July 16, 2011, 11:23:11 am »
Another question re PIN's, before ver 1245 I was able to see which user with time stamp open the door any way of being able to see them again. I notice that when I use notifications I simply get that the door open/closed but no userid associated with it. Mike
Edge-1.7.2607, VRI06-1LX Dimr (6), VS05-1LX Sw (4), GE ZW3002 Dimr (1), HA01C Outlet (12), HA02C Sw (6), HA04C Sw (4), GE Sw (2), HA05 Sw (3), MiniMote Contr (5), HSM200/100 Sensor (2), ZW100A Sensor (8), Nest thermostat (1) & Protect Fire/CO (6) Kwikset Locks (3), F18918W (1) & IP3M-9 (6) Cam's

Offline bmeyer29

  • Sr. Newbie
  • *
  • Posts: 29
  • Karma: +0/-0
Re: Read PIN code from kwikset deadbolt
« Reply #3 on: July 16, 2011, 05:10:41 pm »
Just a quick update on my progress.

@strangely: Thanks for your quick response.
Yes, you are right, the sl_UserCode string looks like:
   User ID="3"

where in this case 3 is the PIN index number (in other words the third PIN in the list) and Name3 is the name tied to this third code. I am testing this remotely and don't have physical access to the deadbolt. I don't know if this usercode gets cleared when someone unlocks the door with a physical key. However, the usercode remains even if the door is repeatedly locked and unlocked remotely over the internet, so by itself it is not a good indicator of how the door was unlocked.... which of course is where I'm really trying to get to.

I used:
local kwikset_usercode =luup.variable_get("urn:micasaverde-com:serviceId:DoorLock1","sl_UserCode",11) or "99"

where 11 is my deadbolt device number and "99" is used in case UserCode is null.