Correct Z-Wave Lock API Command

I got you bro (I think). It looks like even if a command is not exposed publicly on the API you can still call it if the device has it. This means that for a Schlage Connect lock:

devices/{deviceId}/commands
with this body:

{
  "commands": [
    {
      "component": "main",
      "capability": "lockCodes",
      "command": "setCode",
      "arguments": [
        3,"1235","Test Code"
      ]
    }
  ]
}

will properly set a new code, while:
devices/{deviceId}/commands
with this body:

{
  "commands": [
    {
      "component": "main",
      "capability": "lockCodes",
      "command": "deleteCode",
      "arguments": [
        3
      ]
    }
  ]
}

will effectively delete the code you created.

I REALLY wish there was a way to see which commands were available for a given capability. I cannot believe it is not supported yet.

If you (or anyone else) find out any more info on how to do this, I would really appreciate posting the answer here.

1 Like