Action code "241"

Hi
I’m analysing my log in GET [/smartlock/log]
But comparing the action codes with the ones in documentation I’m surprised to see one I can’t reconcile with the documentation: https://developer.nuki.io/page/nuki-web-api-120/3#heading--smart-lock-action

  {
    "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "smartlockId": xxxxxxxxx,
    "deviceType": 0,
    "name": "",
    "action": 241,
    "trigger": 0,
    "state": 0,
    "autoUnlock": false,
    "date": "2019-10-06T14:28:01.000Z"
  },

Where can I find a complete list with all the action codes?

You can find the values at the swagger model for the /smartlock/log endpoint:

https://api.nuki.io/#!/SmartlockLog/get

Just switch to Model view (from the default Example Value view)

You’ll see that it is
241 .. door closed

Amazing, thanks for pointing me in the right direction!
Does this means that the docu in https://developer.nuki.io/page/nuki-web-api-120/3#heading--smart-lock-action is not up to date?

No. Here only lock actions are listed. This is not to be confused with the action which triggered a log entry. The name similarity can be confusing, yes.
And in general I agree, that we need to update the documentation to maybe contain more information which is currently only available in the Swagger models. (Though you will always find them there directly at the endpoint which you need.)

Awesome, I get it thanks for the clarification! :+1:

Hello, it looks like the swagger documentation for the smartlocklog is slightly off. For the state parameter, the swagger model documentation lists the state’s as:

state* integer($int32)
minimum: 1
maximum: 255

The completion state: 0 … Success, 1 … Motor blocked, 2 … Canceled, 3 … Too recent, 4 … Busy, 5 … Low motor voltage, 6 … Clutch failure, 7 … Motor power failure, 8 … Incomplete, 9 … Rejected, 10 … Rejected night mode, 254 … Other error, 255 … Unknown error

But this list is incomplete. There is a possible state 224 - I know because it caused an enum to throw a validation error in our application logs. Unless I’m missing something…

Is there a complete list of the possible states I can refer to to update our code? Thanks

Hello Robert,

224 = unauthorized entry or a wrong keypad entry code
For your reference, it was already discussed on the forum before: I search a list of log states
We will update the documentation with this information.