New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nuki 2.0 smartlock fails to setup #41827
Comments
Are you using a software bridge by any chance? |
No, hardware bridge |
same here, just installed a nuki lock + bridge and no entity is created. Even no errors in logs! |
you use the wrong token, you have to take the token from the bridge, not from the web api. The "local" bridge token is only 6 characters long |
Even in the official documentation (HA) the token has a length of 8 characters. |
It is the token in your hardware bridge, the one you can manage using the app. I have set it to 10 tokens. |
I mean the "local" http-Api there also is the "web-api" that you can configure online on the nuki website. That one got a "long" token. The web-api got a 6 digit token So if you use that token it should Work. |
Alright, okay. So thats the correct one - anyway, mine does also not work anymore as it runs in an timeout for sometime now. Sadly there seems nobody to activly develop this integration. |
In my case it suddenly stopped working (with a token that had been working for about a year). In the bridge log I see that the brige's wifi does a reset as soon as HA tries to connect. If I start an iobroker test system, the connection works without problems. |
Being rather new to home assistant on my Raspberry Pi this is an issue I also have. After restarting HA it works for a few minutes (sometimes hours) until it stops to work and then the only way to get it back to work is a HA restart. My config is a rather default one. If there is anything I, as a non developer, can do to help here I would be happy to do so.
|
Update: For me this is working again since one of the more recent updated without any issues ever since. |
Dear all, First HA connection got killed because nuki got no NTP Time Update and HA uses a key combined with timestamp for its api calls. I dont have the possibility to analyse the IP and Ports needed for nuki Bridge to work properly but please check if your restricted internet connectivity could be the problem too? pp. |
Well I checked if NTP could be an issue, but the bridge has unrestricted access to the internet. If I open the bridge URL in a browser I can see the correct timestamp as JSON output. It still gives the same error:
Version core-2021.2.3 I have even reset the token to something else to see if that helps but no. I installed the VM of Home Assistant OS using Virtualbox (https://www.home-assistant.io/installation/linux) and added only the Nuki integration. The same error occurs. |
I have two Nuki 2.0 smart locks connected to one Nuki Bridge configured like this in locks.yaml:
It worked from day 1 for ~ 4 weeks now. Setup: System Health
Home Assistant Community Store
Home Assistant Cloud
Hass.io
Lovelace
|
@TheDK could you share your hardware bridge settings perhaps? I have changed the token again to a six character one (since you have that) but I still get the same error. Under Dev options under the Nuki Bridge I have enabled:
I see the IP which I use in the config.yaml, the port and my API token I use. The firmware of the bridge is version 2.9.1 |
Thanks! I have the same settings though so it has to be something else. What bothers me that in a clean install (VM) of Home Assistant I get the same error. |
Are you using the a fully supervised image or only HA core? I'm running a test environment using VirtualBox on a Windows server with this image: https://github.com/home-assistant/operating-system/releases/download/5.12/hassos_ova-5.12.vdi.xz |
Yes! That the same one I have used in Virtualbox for testing. |
OMG! I feel such a dumb person!. I was debugging this and I saw that the name of the lock was between quotes. So the JSON output on the cmdline looked like: `[{"deviceType": 0, "nukiId": xxxxxx, "name": ""The Cave" entrance"... I have removed the quotes in the name and guess what, it is now working! |
PBSC (problem between screen and chair) - happens... :) |
My new Nuki 2.0 doorlock does not seem to setup in HA. Does not work in 0.115 and in my current version of HA.
I have this in my configuration.yaml (from the HA integration page). I tested with and without the port, but the error stays the same.
After I reboot HA I always get this log:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 193, in _async_setup_platform await asyncio.shield(task) File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/nuki/lock.py", line 61, in setup_platform devices = [NukiLockEntity(lock) for lock in bridge.locks] File "/usr/local/lib/python3.8/site-packages/pynuki/bridge.py", line 234, in locks return self._get_devices(device_type=const.DEVICE_TYPE_LOCK) File "/usr/local/lib/python3.8/site-packages/pynuki/bridge.py", line 199, in _get_devices for l in self.list(device_type=device_type): File "/usr/local/lib/python3.8/site-packages/pynuki/bridge.py", line 128, in list data = self.__rq("list") File "/usr/local/lib/python3.8/site-packages/pynuki/bridge.py", line 107, in __rq data = result.json() File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 898, in json return complexjson.loads(self.text, **kwargs) File "/usr/local/lib/python3.8/site-packages/simplejson/__init__.py", line 525, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 370, in decode obj, end = self.raw_decode(s) File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 400, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) simplejson.errors.JSONDecodeError: Expecting ',' delimiter or '}': line 1 column 51 (char 50)
Running version 0.116.1 (as mentioned, 0.115 did not work either)
Supervisor version: 247
The text was updated successfully, but these errors were encountered: