Nuki smart lock 2.0 not connecting to the bridge

I’m trying to set up my brand new nuki smart lock, but I can’t make it work, I enabled the API and retrieved the token and in my configuration I have this:

lock:
  - platform: nuki
    host: 192.168.x.x
    port: 8080
    token: !secret nuki_token

but in the logs i receive the following message:

 raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.x.x', port=8080): Max retries exceeded with url: /info?ts=2020-11-25T22:02:33Z&rnr=235xx&hash=e177b8001e86f98(Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x6f0b7988>: Failed to establish a new connection: [Errno 113] Host is unreachable'))

this seems like a Bridge problem, I’m using and old HTC m8 with the bridge app,
but if i use the following command
time curl -v "http://192.168.x.x:8080/lockState?token=tokenSixDigits&nukiId=nukiId" | python -m json.tool

i receive the correct response

{ [73 bytes data]
100    73  100    73    0     0     15      0  0:00:04  0:00:04 --:--:--    15
* Connection #0 to host 192.168.x.x left intact
{
    "batteryCritical": false,
    "state": 3,
    "stateName": "unlocked",
    "success": true
}

So im not sure what is happening, i don’t know why HA can’t connect :frowning: any suggestion?
Debug info:

HA Version	0.118.3
HassOS 4.17
Supervisor version 2020.11.0

Any help will be appreciatedthanks a lot!!!

1 Like

Were you able to solve this issue? I have exactly the same problem and haven’t been able to use my lock.
The strange thing is that it used to work in the past (like 5 months ago)

The component uses a package called pynuki which introduced a breaking change which prevents software bridges from working. Follow along here: https://github.com/pschmitt/pynuki/issues/55