Nuki Card with Callback support (supports both Lock & Opener, it replaces the official integration)

I can check status of every device (bridge, lock and opener) just fine. As control things like lock/unlock/open.
But that error message is still present nevertheless.
Config was basic stuff. Not sure what screenshot you might want to be honest.

Thanks!
António

Seems like you’re missing some fields (RSSI) from the bridge response. What bridge hw version do you use?

Issue these commands from shell, I put the output of my bridge under each command, please report your output:

curl http://nuki-bridge:8080/info?token=xxxxxxxxxxx
{"bridgeType": 1, "ids": {"hardwareId": 458XXXX2, "serverId": 233YYYYY1}, "versions": {"firmwareVersion": "2.12.0", "wifiFirmwareVersion": "2.2.0"}, "uptime": 1920418, "currentTime": "2022-03-22T22:54:42+00:00", "wlanConnected": true, "serverConnected": true, "scanResults": [{"deviceType": 0, "nukiId": 46XXXX25, "name": "Nuki_1XXXX65", "rssi": -44, "paired": true}]}
curl http://nuki-bridge:8080/list?token=xxxxxxxxxxx
[{"deviceType": 0, "nukiId": 469XXX325, "name": "Portoncino", "firmwareVersion": "2.12.0", "lastKnownState": {"mode": 2, "state": 1, "stateName": "locked", "batteryCritical": false, "batteryCharging": false, "batteryChargeState": 50, "keypadBatteryCritical": false, "doorsensorState": 2, "doorsensorStateName": "door closed", "timestamp": "2022-03-22T20:50:04+00:00"}}]

The upgrade to 2022.4 broke my Nuki_ng integration :frowning:
Anybody seeing the same?

Upgrade the nuki_ng integration to version 0.3.0
That fixes the errors

Thank you Floo - you were absolutely right - 0.3.0 solved the problem!

I very much appreciate the work, support and help by all the people involved in this project!

Hi All,

First of all thanks for this amazing integration!
Quick question: Does anybody of you experienced any disconnections with the Bridge? In my setup it happens very often (30-40 times a day) that the devices (lock and bridge) went to unavailable.

Any suggestion? I’m running latest version and cleaned all Alex old configurations + removed all the api calls from the Bridge. I’m using the square bridge (V1?)

BR

Nik

Hi Nik,

  1. Make sure the connection of the bridge to wifi is ok, check the signal level.
  2. Make sure you have bridge v2, it’s square too, but you can see it from the fw of the bridge, if it’s ver 2.x it’s v2 hw.
  3. When you configured the component, did you use hostname or ip of the bridge? if hostname, make sure dns resolution is ok.

Alessandro

Hey Alex,
Thanks for your quick feedback!

  1. I’m using a Mikrotic AP Lite as AP and based on your suggestion I’ve seen that it disconnects from the wifi every 3 to 4 minutes…it’s seems like a pattern. Is there a way to force/reset the device maybe?
  2. Yes that’s correct!
  3. I’m using static IP Address assigned by DHCP reservation from the firewall

additional details:

  1. the bridge is isolated from and to the internet (this is wanted on purpose)
  2. Using your “old method” it worked smoothly for more than 6 months

If the bridge can’t ping the default gateway, it thinks it’s isolated, and it restarts the wifi. Make sure it is allowed to ping the gateway.

In the bridge log, if you see pings: 0 it means it can’t ping the gateway.

{“timestamp”: “2020-01-29T17:18:57+00:00”, “type”: “WLAN-Disconnected”},
{“timestamp”: “2020-01-29T17:18:57+00:00”, “type”: “WLAN-Connect”},
{“timestamp”: “2020-01-29T17:18:57+00:00”, “type”: “WLAN-Init”},
{“timestamp”: “2020-01-29T17:18:55+00:00”, “type”: “WLAN-WiFi Restart”},
{“timestamp”: “2020-01-29T17:18:55+00:00”, “type”: “WLAN-ERROR”, “unconn-cnt”: 181, “unans-msg”: 0, “lastmsg”: 2, “pings”: 0},

the bridge disconnection every X secs, if it’s due to the gw problem, should’ve been there also with my Nuki Card.

Hi Alex,

Yesteday I did a change to my firewall (enable ICMP packets from and to the bridge) just to make some tests and waited for a bit. What you said is correct, after enabling the ICPM packets: no mode disconnections!

Anyway, how do I check the bridge log?

Thanks for the info, I suspected the problem could be that but I didn’t know about the bridge checks.

Best Regards

Nik

Glad you solved with that.

from a shell: curl 'http://nuki-bridge.domain.dom:8080/log?token=xxxxxxx'

The integration worked fine for me, until I upgraded to version 3.04 and since then I get an error, I tried to upgrade backwards but it did not help, this is the error I get,

Logger: homeassistant.config_entries
Source: helpers/network.py:207
First occurred: 00:57:30 (1 occurrences)
Last logged: 00:57:30

Error setting up entry Delet for nuki_ng
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/nuki_ng/__init__.py", line 25, in async_setup_entry
    coordinator = NukiCoordinator(hass, entry, data)
  File "/config/custom_components/nuki_ng/nuki.py", line 284, in __init__
    url = config.get("hass_url", get_url(hass))
  File "/usr/src/homeassistant/homeassistant/helpers/network.py", line 168, in get_url
    request_host = _get_request_host()
  File "/usr/src/homeassistant/homeassistant/helpers/network.py", line 207, in _get_request_host
    raise NoURLAvailableError
homeassistant.helpers.network.NoURLAvailableError

Hello community,
some people still struggle to get this work. Home Assistent is sometimes tricky.
Therefore thanks to alexdelprete and kvj, I have created a video and uploaded to youtube.
But it is in german language. Hope it helps.

Is it possible to detect if the door sensor is disturbed? It shows as open for me but inside the app it says that the door sensor has a problem.

Hi all,

Is it possible to check the Nuki keypad ?
Situation as follows : I have curtains at front door that automatically closed when it’s getting dark outside, and open when we wake up… BUT: yesterday we came home at night, very late, and of course the curtains were closed at the inside of the front door

Question : Could we automatically open the curtains when we enter our Nuki keypad code to open the door ? Or should I pull the door_unlock or open function and combine it with the curtain command…

Still doubting on the best approach… But it’s better that the curtains go open BEFORE the door gets unlocked

Very curious about your opinions

Kr,

Bart

How can one obtain the bridge token from a current Nuki_ng configuration in HA?

The bridge token is configured on the bridge via Nuki’s mobile app, as described in the docs:

So you can see the configured bridge token in the mobile app.

If you want to retrieve it via HA, you will find it in the storage folder, open the file core.config_entries and search for nuki_ng, under that section you’ll find the configured token.

1 Like

Hi. Is anyone experiencing this issue with Web API? I configured the integration with both Bridge and Web API token.

My setup had been working great for the last couple of months.
I am running Home Assistant 2022.8.6, and have also updated Nuki-ng to 0.3.6.

[api token redacted below]

Logger: custom_components.nuki_ng.nuki
Source: custom_components/nuki_ng/nuki.py:38
Integration: Nuki Lock (documentation, issues)
First occurred: 20:17:31 (131 occurrences)
Last logged: 23:32:57

Error while fetching auth:
Traceback (most recent call last):
  File "/config/custom_components/nuki_ng/nuki.py", line 369, in _update
    item["web_auth"] = await self.api.web_list_all_auths(dev_id)
  File "/config/custom_components/nuki_ng/nuki.py", line 189, in web_list_all_auths
    response = await self.web_async_json(
  File "/config/custom_components/nuki_ng/nuki.py", line 177, in web_async_json
    return await self.async_json(
  File "/config/custom_components/nuki_ng/nuki.py", line 38, in async_json
    raise ConnectionError(f"Http response for {response.request.url}: {response.status_code} {response.reason}")
ConnectionError: Http response for https://api.nuki.io/smartlock/ /auth: 401 Unauthorized

@alexdelprete

im having problems getting http working… i only can use https right now (duckdns). and don’t know how to set it up with http… i have adguard running but ngix doesnt work as adguard is using that port… and don’t know how to set it up right now.

regards

Hector, if you search this thread, there are several posts regarding this duckdns issue. It’s possible to solve it. Just search through the thread…