Nuki Smart Lock 2.0 - support all available API actions (i.e. add lock/unlock)

Current HA Nuki Smart Lock component states it supports two services: NUKI_UNLATCH and NUKI_LOCK_N_GO.

The Nuki API supports five actions: unlock, lock, unlatch, lock 'n' go, lock 'n' go with unlatch.
Are there plans to support the full set of endpoints (so: add lock, unlock and lock 'n' go with unlatch)?

In the HA Nuki Smart Lock component source code I do see functions for lock/unloc being referenced (but indeed only SERVICE_UNLATCH and SERVICE_LOCK_N_GO). The pynuki library does support all actions.

So, not sure what the status is.

Related, the Nuki API now supports discovery of the bridge and activation of the API. Would be nice if this is supported by HA so there is no need to manually add the IP address and token.

Nuki already started to trigger IFTTT for statuses (door open/closed, etc.). Does anyone still contributes to this component?

The nuki api also supports Notifications now.
This would be a great addition for the new nuki opener.
For example when sombody rings the bell I Could Sent a picture of my door camera to my phone.
Or when I Open the door when I was away I could start my music.
Here is a link to the api

https://api.nuki.io/

1 Like

i’d love this to be updated!

1 Like

Agree, any plans for an upgrade?

1 Like

Same for me. Would like to see a deeper integration of the Nuki lock as it integrates with AirBnB reservation services now. But it seems that nobody is working on the actual integration (as no response on our requests since months).

Hi, I am thinking about buying this smart lock or Danalock v3.
As always, the first thing I look for is its level of integration with HA. It doesn’t seem to have much as per your comments. Can we use it for lock/unlock within homeassistant, and does it report its state in order to be able to integrate automations?. The documentation for the integration does not say much. Thanks!!

It seems the codeowner for nuki integration is @pvizeli, so we must pray to him for update of the API.
Currently it only supports open/close for the smartlock and opener errors out with 404.

That would really be great if someone would update this! Would like to use the ‘unlock’ action to trigger the alarm state to ‘off’.

Update is much appreciated!

Question:

According to the HA Nuki Smart Lock documentationPlease note that the API token should be 6-20 characters long, even though the app allows you to set a longer one.

  1. How do you get/set an Nuki API token? Because when I use the Nuki web it generates an API token for you. Mine is 80 characters long! So it does not work for me with Home-Assistant.
  2. Does anyone actually use Nuki Smart Lock 2.0 with Home-Assistant successfully?

Update:

Answers
1.Understood it wrong. You don’t have to use Niku web apparently to get the API token. Via a HTTP API call with the Nuki Web API token e.g. http://(ip-address):8080/info?token=(Niku Web API Token 80 characters) a ‘HTTP 401 Unauthorized’ message is returned ( :grimacing:).
So reuse the Nuki Bridge API token. Retrieved it via the Android app. It is working now.
2. Not relevant anymore :wink:

1 Like

If no one is up to updating the implementation, maybe it’s possible to create a template sensor that would be triggered viatwo IFTTT webhooks to show if the door is closed or opened.

Have you contacted the original author?


Hi, original author here.

The lock/unlock functionality is implemented and has been for years. When you set it up correctly you end up with a lock entity that you can lock and unlock :man_shrugging:

I haven’t tried with a 2.0 device since I do not own one, but I am very confident it’ll work just fine. If it does not, please open an issue on GitHub.

Regarding the opener, I’ve started working on it at the pynuki level (see https://github.com/pschmitt/pynuki/tree/api_v1.10) . I don’t own one either. I need people to try it out. I can only code blindly.

Happy to try it out

I have tested the available 4 services on my Nuki Combo 2.0 today:

lock.lock <- seems to work fine
lock.unlock <- unlocks the lock, but does not open the door
lock.open <- unlocks the lock, but does not open the door
nuko.lock_n_go <- unlocks the lock, but does not open the door, after 20 sec. locks again.

If I use the Nuki app, I can open the door just fine.

The automation I’m firings is:

  action:
  - service: lock.unlock
    data:
      entity_id: lock.voordeur

and

  action:
  - service: lock.open
    data:
      entity_id: lock.voordeur

I am happy to send you logs, if you can tell me what/where you need.

Interestingly I just tried doing the same from the development tools in HA and then lock.open works and opens the door:

If I however trigger the automation above (which theoretically does exactly the same), the locks unlocks, but not far enough to open the door.

I am having an issue with my brand new Nuki Lock and Opener, on latest firmware.

Both of them appear in HASS, but they keep going into “unavailable” status, always one at a time, not both, it’s quite odd.

At the same time, control through the Nuki Web api and the IOS App are working fine, so it does seem like a HA issue?

Hola! Estoy intentando integrar nuki a HA pero no soy capaz,sacaba el token de nuki web. No sé como puedo conseguirlo?
Gracias!!

What’s the status on development?

I noticed that the nuki bridge doesn’t support state checks? (If the door is closed or not, with the magnet sensor)
That only seems to work with the nuki web appu