Nuki Smartlock

Have you created a button? Access the button, then click on the gear :gear: icon, then edit device. You will see the screen that allow you to enter the details.

Thanks so much for the assist Chan. I can now see the place to enter the details.

I see that the tile icon is showing as an outlet. Is it possible to change it to a lock icon?
Is it something like change the standardTile to:

standardTile(“toggle”, “device.lock”, width: 2, height: 2)

Thanks again

Hi,

Thanks again for the code. I have managed to use a Danalock device handler code to made this a “http lock”.

However I have a query on the last part of the code.

if (varCommand == “off”){
sendEvent(name: “switch”, value: “off”)
log.debug “Executing OFF”
} else {
sendEvent(name: “switch”, value: “on”)
log.debug “Executing ON”
}

The varCommand variable is the path correct? So the statement if (varCommand == “off”) will never be satisfied right?
And the actual HTTP POST command is executed in this loop or it is executed in the def hubAction = new physicalgraph.device.HubAction portion?

Thanks again.

No. You can safely ignore that part, it’s just to update the switch label on UI. Path is taken from the path you define in the settings.

Take a look on my sample screen below

I see. Thank you for the quick response.

So can I remove the entire section from the code? It will not affect the on/off fuctionality right?
//sendEvent
if (varCommand == “off”){
sendEvent(name: “switch”, value: “off”)
log.debug “Executing OFF”
} else {
sendEvent(name: “switch”, value: “on”)
log.debug “Executing ON”
}

Thanks.

Why you want to remove it? It’s to update the front-end display

Hi Chan,

Ok, I am just trying to understand what that last part does, as it seems like it would always go to the else statement.
For me it doesn’t log either “Executing …” statement.

Here is my revised version.

http://pastebin.com/pHgDTR8x

1 Like

Does it work for your lock?

Hi Chan,

I am not sure as I will only receive my lock next week. :grin:
but the hubaction returned this:

GET /lockAction?nukiId=1&action=2&token=c8v7b6 HTTP/1.1
Accept: /
User-Agent: Linux UPnP/1.0 SmartThings
HOST: 192.168.0.200:8080
Content-Type: application/x-www-form-urlencoded

Does this mean that the Get was successful?

Hi, did you manage to integrate this and test it sucessfully in the end? I’m quite interested in this and would like to avoid having to buy the hub myself.
Many thanks

Hi,

I have successfully integrated it to my Smartthings. However I am using the Nuki Bridge to talk to the Smartthings Hub. Without the Nuki Bridge the Nuki lock cannot talk to the Smartthings Hub as the Nuki Lock is using Bluetooth.

3 Likes

Hi @kaznad, I also have a Nuki Lock with bridge and am wondering if you could share your Device Handler code? Does it properly handle the lock/unlock status (displaying correctly locked or unlocked in smartthings) as well (in the event someone uses the physical button to lock/unlock, or the nuki app)?

1 Like

Any news on this? I just installed my nuki locks. Waiting for the bridge to arrive from backorder but I have the software bridge installed.

Hi there…
I have 2 Nukis at home.
For now I have only been using IFTTT to connect Nuki and Smartthings, and a simulated switch on the ST side.
But a DH would be great !
Thanks @kaznad :smiley:

What are your use cases to connect it? I was thinking about adding it to my evening routine that shuts down all lights and locks the doors.

Hi @FrankReymenants
I am actually using a routine to lock the doors when I switch to “night” mode.
I also added a door sensor to know if my backdoor is open or not
Best
G

Hi there, is Nuki bridge compatible with US smartthings hub? Can Nuki smart lock be installed for my door attached below?

https://www.photobox.co.uk/my/photo/full?photo_id=500789581431

Thanks a lot.

Cant’ see your picture :frowning:

Yes it now supports both US style (lever) and European (knob/bar) style operations. Check out this post for details: