schlage lock pin code not setting

Discussions about existing Z-Wave device and their usage with Z-Way/Z-Cloud/Z-Box
Post Reply
melchoir55
Posts: 14
Joined: 13 Nov 2013 07:27

schlage lock pin code not setting

Post by melchoir55 »

Has anyone used zway with a schlage lock? I'm trying to set the pin codes using the REST api. For example, setting the code 1234:
http://192.168.1.169:8083/ZWaveAPI/Run/ ... (0,1234,1)
deleting a code:
http://192.168.1.169:8083/ZWaveAPI/Run/ ... (0,1234,0)

Neither of these commands seem to work. The device returns null, which is what I get from all command class calls which are well formed and the device has the command class. However, the code isn't actually added (or removed) from the lock. I know the pin codes can be set via zwave, because I can do so with a vera.

Is there something obviously wrong with my call that is causing my pin set to fail? I should point out that the lock interview reports as complete on all command classes, so the device should be ready to go. The lock does respond properly to lock and unlock commands.
xxcody
Posts: 2
Joined: 16 Mar 2015 04:16

Re: schlage lock pin code not setting

Post by xxcody »

I don't think there's a user 0. I know there's 2 users on mine and when I do a Get(1) and (2) they both come back as being active. Whereas (3) comes back as not active.
melchoir55
Posts: 14
Joined: 13 Nov 2013 07:27

Re: schlage lock pin code not setting

Post by melchoir55 »

Thanks for the tip. So my friend and I both have this lock. The api call didn't work for my lock no matter what number I place in the first argument (0,1,2,3,etc). It returns 'invalid argument for all numbers other than '0'. For '0' I get the expected null return value, but the code doesn't actually get added to the lock.

However, this did work for my friend, but ONLY for the number 2. So the following call worked for my friend:

http://192.168.1.169:8083/ZWaveAPI/Run/ ... (2,1234,1)

I still don't understand what is happening exactly... but I'll post if I figure it out.
xxcody
Posts: 2
Joined: 16 Mar 2015 04:16

Re: schlage lock pin code not setting

Post by xxcody »

So to double check you have the BE469?
Long shot. Check parameter 16:
http://192.168.1.169:8083/ZWaveAPI/Run/ ... 2].Get(16)

This would be how long your user code is set to (and the number of digits you need to send to set). IDK maybe you have it set for 5 digits or something.

Maybe try to do a get for the user codes you're trying to set as well. (sounds like you might be doing this already)
http://192.168.1.169:8083/ZWaveAPI/Run/ ... 99].Get(1)

Then check if hasCode is true (or false) and if status.value is 1
melchoir55
Posts: 14
Joined: 13 Nov 2013 07:27

Re: schlage lock pin code not setting

Post by melchoir55 »

So these gets return null for me. I should point out that *any* get method I run on a command class like this always returns null.
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: schlage lock pin code not setting

Post by pz1 »

melchoir55 wrote:So these gets return null for me. I should point out that *any* get method I run on a command class like this always returns null.
Afaik that is what they should do. If you send a command you either get en error message, or a null to indicate that specific action was successful. For the results you have to read the status:

Code: Select all

http://192.168.1.169:8083/ZWaveAPI/Run/devices[4].DoorLock.data.level.value ? "on" : "off"
I don't know about pin codes, so I here gave the lock as example for retrieving status value. Something similar should go for the pins.
jensmoes
Posts: 57
Joined: 10 Jan 2015 21:48
Location: San Diego
Contact:

Re: schlage lock pin code not setting

Post by jensmoes »

Have you tried getting parameter 6 from the Configuration CC? That is a 4 byte bit field telling you which user codes are in use. First byte holds the first 8 slots with the least significant bit being 1 and most significant 8. Second byte the next 8 and so on.
Perhaps you have set some manually at the keypad? The lock seems to assign those more or less arbitrary.

Code: Select all

http://192.168.1.169:8083/ZWaveAPI/Run/devices[4].Configuration.data[6].val
Post Reply