Correct Z-Wave Lock API Command

@nayelyz I have finally got the CLI installed and running. I have sent the create lock code command, however when I attempt to get the log using the supplied command. I get an error saying it timed out. As of now in my current location I know the Internet is not very good. I will re-run everything once I get home and back to a better internet connection and will report back from there. Thank you being patient and so helpful. Hope you’re having a wonderful day.

Sorry about the confusion, but the logcat command should be executed in the same network as your Hub.

I have it working and have sent the log.

Hi, it’s been almost a month. Has anything been discovered about why the name supplied with a new code doesn’t get accepted?

2 Likes

I’m bumping and tracking this, as this is a pretty significant issue with the stock Z-Wave Lock Edge driver. I’m hopeful @nayelyz will be able to get resolution.

My experience is the same as yours in that I’ve found that the setCode command, as described in the CLI:

setCode(codeSlot, codePIN, codeName)

completely ignores the codeName. The only way I’ve found to set the codeName is to use the nameSlot command instead:

nameSlot(codeSlot, codeName)

That provides a rather clumsy workaround as it requires two commands to set both a code and give it a proper name, but even with that workaround, there is another problem, because the data returned upon a keypad event is wrong. Instead of using the codeName established by the nameSlot command, the response creates it own, as shown in this partial snipped where “Weekend Guest” in incorrectly presented as “Code 1.”

 "data": {
    "codeId": "1",
    "codeName": "Code 1",
    "method": "keypad"
  }

This creates an issue when creating Rules intended to provide accurate notifications of keypad events, or to be able to act on those events based onthe user name (i.e., when the name contains “guest.”)

3 Likes

Sorry about the delay.
It isn’t clear yet, the emitted event doesn’t contain the identifier code1 and contains the value “Test code” in your case. I reported this to the engineering team, I’ll ask them to see if they need more info to analyze it.
For now, could you give us access to your account, please?

  1. Go to the SmartThings Web (my.smartthings.com)
  2. Log in to your Samsung Account
  3. Select Menu (⋮) and choose Settings
  4. Toggle on Account Data Access
  5. Select the time period and confirm - In this step, please select “Until turned off”, once the team finishes, we’ll let you know so you can disable it again.

Thank you for sharing your case as well, @bthrock. I’ll let you know in case we need more info.

2 Likes

Any updates on this?

1 Like

Hi, @bthrock

Not so far. I just ping the team again to see if there are any news.

1 Like

Thanks. This issue goes back at least to August, and not having proper lock functionality with the new EDGE drivers is kind of a big deal.

I assume the Groovy Platform will still be shutdown 31 Dec regardless of the fact issues persist? I run a rental home so need the ability to control lock codes.

On the 1st Jan if I cant use smartthings I’ll need to buy a new solution, and thats a great advert for smartthings

You can use the Smart Lock Guest Access App to control codes and guest access. The issue in this thread relates to API access for rules and other implementations.

Thanks I’ll give that a try

I’m having mixed luck using Smart Lock Guest Access. Some of my codes show the name associated with the code. Others just say Code X.

You can edit the name inside the SLGA app.

1 Like

I am trying to create a rule to check who lock/unlock door to trigger arm/disarm.
From the lock I see

"capabilities": [
                        {
                            "id": "lock",
                            "version": 1
                        },
                        {
                            "id": "lockCodes",
                            "version": 1
                        },
                        {
                            "id": "battery",
                            "version": 1
                        },
                        {
                            "id": "refresh",
                            "version": 1
                        }
]

I can have a condition for lock. However, I need an extra condition to tell who is it.
I am looking into lockCodes since it’s the only one looks like something I can use.
The lockCodes look like

"lockCodes": {
            "schema": {
                "type": "object",
                "properties": {
                    "value": {
                        "title": "String",
                        "maxLength": 255,
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": []
            },
            "enumCommands": []
        }

I do not know how to add it for a condition

"equals": {
                                "left": {
                                    "device": {
                                        "devices": [
                                            "device_id"
                                        ],
                                        "component": "main",
                                        "capability": "lockCodes",
                                        "attribute": "lockCodes"
                                    }
                                },
                                "right": {
                                    "string": "something to match"
                                }
                            }

What is the string I can expect to compare? Can we use wildcard something like LIKE?
Thank you

You might be looking at an old definition for that capability. The current lockCodes is much more complex:

https://developer.smartthings.com/capabilities/lockCodes

You probably need to be looking at lock though:

https://developer.smartthings.com/capabilities/lock

The API doesn’t give you a lock code. It will only give you the slot of the code that was used.

Slot 1 Jake code 1234
Slot 2. Dan code 4321

So when you lock or unlock using the keypad it will say 1 or 2 depending on the code used. However if the lock is locked manually it reports back manual. The item your looking for in the capability is codeid.

This is a json I have sent from Sharptools to my phone showing the lock information

{ "thing":"Front Door Lock",
  "attribute":"lock",
  "state":"unlocked",
  "method":"keypad",
  "codename":"",
  "codeid":"6"
}
1 Like

Any news on this yet either? I know this isn’t on you personally, but the silence on some of these issues around here is absolutely deafening.

1 Like

Hi, @bthrock

I just talk to the team about this issue and they are planning to release this fix soon

2 Likes

The rule I set up to test this functionally every couple of days actually notified me this morning that this is now working correctly. @Jake_Mohl are you seeing this as well?

ETA: Thanks, @andresg! Now, about that missing Sonos Websockets driver … :wink:

2 Likes