[OBSOLETE] Nuki smart lock device handler

I have created a device handler for the Nuki smart lock

controls the lock - and also updates the lock status if was changed from outside the Smartthings app - update interval is 1 minute.



sorry to bother you but i am a newbie!!!
How do i sync your handler with my smartthings???
sorry for my total ignorance

Basically you will copy the author’s code and paste it into your own account. The following FAQ describes the process (this is a clickable link)

@volski I have a Nuki lock and I’m trying to set this up but I have no idea how to finish it. What I’ve done so far:

  1. Copied the text from github under the “nukiWebApiHandler.groovy” commit, which seemed to be the most recent.
  2. Created a new Device Handler for me in SmartThings with this code, but replaced “Enter you web API token here” with the API Token I generated here: https://web.nuki.io/en/#/admin/web-api (right column) and the “enter your NukiID” with my email for Nuki Web… seems like this is the ID to me.
  3. Published it for myself, so now I see it under My Device Handlers.
  4. Then I went to create a new Device in the dev interface, I gave it a name, Type simulated lock, version self published, location/hub/group done… but I have no idea what to put for the Device network ID.

Can you let me know if the steps I did were right and how I should continue?

Edit: well, that was easy. I just figured I’d try any Device Network ID, put in “nuki,” and it worked. I can see my lock’s state. I dare not unlock it now because I’m not home, but it’s cool to have it finally show up in SmartThings.

Out of all the files from your Github… which should we install? All of them?


I’ve followed Rita’s (guessed but really useful) instructions, which has got me some of the way…
I started with the ID set to my email, but I get “waiting” in grey where Rita gets “locked” in red.
(I waited till the net day)

Reading in here:

suggests that the NukiId should be a numeric, and it implies it starts at 1 and goes up with the number of locks.
I only have one, so I’ve set that to “1”…

but I still get "waiting"
Anyone got any pointers?

(when creating the API token, I only gave it read privileges - might that be an issue?)



first make sure you use the web api version:


  1. log in to your account at web.nuki.io
    enable the api - and copy the token

  2. in the smartthings web console.
    click on the device name you have created
    and under Preferences click on edit
    you have two fields first is the api token you copied from nuki website
    and second is the device id the simplest way is this:
    go to https://www.hurl.it select the GET method copy to the Destination url: https://api.nuki.io/smartlock
    next add HEADERS - in the name field: Authorization and in the Value write: barer yourApiToken
    and click on the Launch Request
    if all is good you will get a json response with your locks
    if you have more then one you will need to create a device handler for each one.
    from the response json copy the value of smartlockId
    this is the needed value for the second filed from the device handler
    now click on save and you can control your lock!

only this one:

1 Like

Added! Just waiting for my Nuki to arrive to test it all out… Thanks!

Now… I feel like a newb with this Q but… what are the Owner, name and branch of the github for the integration? :blush:

where are you trying to fill this fields?
on the device handler you just need you api token and the nuki lock id

1 Like

in the github integration page in the api…



you already have the repo there
in my console I dont have the repo option so when I added it i just copy paste the code
added detailed instructions:

1 Like

I was refering to the automatic sync between the ST API and Github… just for reference, here are the 3 things needed… I think… correct me if I’m wrong…

Owner: volski
Name: Smartthing-nuki
Branch: master

as for the DH itself… I can’t wait to have the lock in my hands… Thanks for your work!!! Awesome!

yes that is correct

1 Like

Hey volski thanks for this incredible DH. But is there an way that the other states like lockngo i can see in the new ST app?? At the time i only see locked unlocked :slight_smile:

Hello, thanks for explanation but I can’t find a place to input the API Token generated?

do we have to input it in the code given by Volksi?
here ?
preferences {

    input("api_token","string",title:"Api Web Token",description:"Enter your web API token",required:true ,displayDuringSetup: true)

    input("nukiId","string",title:"nukiId",description:"Enter your nukiId",required:true ,displayDuringSetup: true)

Or is this something that appears afterwards?

hello, athanks for this but I can’t find any “preferences” for the device name that I have created? Is this normal.
The Web Token API you have to input, is this a long string or the name you gave when creating the token?
where is this information to be filled in? re place the string indicated in bold in your code?

input(“api_token”,“string”,title:“Api Web Token”,description:“Enter your web API token”,required:true ,displayDuringSetup: true)

    input("nukiId","string",title:"nukiId",description:"Enter your nukiId",required:true ,displayDuringSetup: true)

Hi I got the same problem

There is no where this “preferences” to add the API information… any solution you found?


okay i solved it - copy the code NOT from the Browser but download the git code first before pasting, then it works (syntax/ copy issue otherwise)!!

I think the support of this DTH is dead!!!