hass_nuki_ng
hass_nuki_ng copied to clipboard
Lost connenction to web api after last update
Hello,
I made an update from 0.3.9 to 0.3.10 today and after HA reboot I lost access to Web Api sensors. After downgrade back to 0.3.9 everything is OK. It is issue on my side or not?
Device: Nuki Smart Lock 3.0 Pro without bridge
thanks, Regards, Petr
status is ok for me, but i have 404 error for lock/unlock actions
Same for me
Also a 404.
raise ConnectionError(f"Http response for {response.request.url}: {response.status_code} {response.reason}") ConnectionError: Http response for https://api.nuki.io/smartlock/XXXXXXXXX/action: 404 Not Found
Same problem here with 0.3.9 and 0.3.10, i revert to 0.3.8 and everything is working again
The discussion is in #76 There's a regression detected, but the fix isn't known yet
Hi, have the same here with thaat log message. I noticed that the integration is using wrong lock ID... even after removing and configuring a new, it is still the wrong lock ID. I hope this helps...
There should be a new device which is called Nuki WebApi. The device contains a entity for every user. Including a user for webapi. Make sure that it is on.
device is there but switches are greyed out
Reverted to 0.3.8, still same issue :/
I deleted/added the integration.
Generated new API token with all authorizations and i still have the 404 error..
I dont understand..
I need more details to help you resolving the issue.
@chu11u when you say "wrong lock ID", what is "wrong" value and what should be the correct one?
@forzewin which API call gives your 404 and what is the ID of your device?
I need more details to help you resolving the issue.
@chu11u when you say "wrong lock ID", what is "wrong" value and what should be the correct one? The part in the URL wuch hold the lockid is different than my own lockid. I ran those api calls my self to get my lockid and got a different number. Than I ran the same lock action call with the right lockid, and the device locked and unlock. So now I use the integration only for the state of the lock and using direct calls for lock/unlock untill the integration is fixed.
@forzewin which API call gives your 404 and what is the ID of your device? I got the 404 when I tried to lock or unlock. It is the action URL call. It showed briefly on the Lovelace bottom and also in the log file.
Sorry for the formatting, i am on my phone.
here the full error when trying to unlock the lock :
Échec d'appel du service "lock/unlock". Http response for https://api.nuki.io/smartlock/292XXXX48996/action: 404 Not Found
full log :
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/nuki_ng/nuki.py:39
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 11:54:11 (17 occurrences)
Last logged: 13:57:27
[140127195676832] Http response for https://api.nuki.io/smartlock/292XXXXX996/action: 404 Not Found
[140127194185936] Http response for https://api.nuki.io/smartlock/292XXXXX48996/action: 404 Not Found
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 676, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 930, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call
await result
File "/config/custom_components/nuki_ng/lock.py", line 56, in async_unlock
await self.coordinator.action(self.device_id, "unlock")
File "/config/custom_components/nuki_ng/nuki.py", line 466, in action
await self.api.web_lock_action(self.web_id(dev_id), action)
File "/config/custom_components/nuki_ng/nuki.py", line 126, in web_lock_action
await self.web_async_json(
File "/config/custom_components/nuki_ng/nuki.py", line 184, in web_async_json
return await self.async_json(
File "/config/custom_components/nuki_ng/nuki.py", line 39, 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/2928XXXX48996/action: 404 Not Found
the id of my lock in nuki app looks like this
ID Smart Lock: 30XXXF64
I lightly modified id's to anonymise them
I need more details to help you resolving the issue. @forzewin which API call gives your 404 and what is the ID of your device? I got the 404 when I tried to lock or unlock. It is the action URL call. It showed briefly on the Lovelace bottom and also in the log file.
My API call is: [140186346527696] Http response for https://api.nuki.io/smartlock/292805081XXX/action: 404 Not Found
My device ID is: ID2C8AFXXX
I have a Smart Lock Pro 3.0 (Firmware: 197381 which is 3.3.5) without Bridge. I do have a bunch of openers laying around.
Thanks for the input.
I've pushed a fix to the main
branch, could you please test the it? (Install main
version via HACS)
Just did it and i can confirm that the fix works like a charm.
Everything is back and working again
Thanks a lot @kvj
Thanks for the input. I've pushed a fix to the
main
branch, could you please test the it? (Installmain
version via HACS)
Yes, main version is working for me too!
Thanks for the input. I've pushed a fix to the
main
branch, could you please test the it? (Installmain
version via HACS)
Sorry for being novice... how do I do that? i looked at the integration and there is no update. how do I install it?
how do I install it?
Go to HACS, click on the integration, select "Re-download" from the popup menu and pick "main" from the list of all versions available
Thanks for the input. I've pushed a fix to the
main
branch, could you please test the it? (Installmain
version via HACS)Sorry for being novice... how do I do that? i looked at the integration and there is no update. how do I install it?
Go to HACS > Integrations > Search for Nuki Lock and click on it > on the upper right, click on ... > Redownload > Select Main
Thanks for the input. I've pushed a fix to the
main
branch, could you please test the it? (Installmain
version via HACS)Sorry for being novice... how do I do that? i looked at the integration and there is no update. how do I install it?
Go to HACS > Integrations > Search for Nuki Lock and click on it > on the upper right, click on ... > Redownload > Select Main Done. Do i need to re-install the integration also?
You just need to restart HA after the redownload
You just need to restart HA after the redownload
well... still get the 404 message: Http response for https://api.nuki.io/smartlock/292882605412/action: 404 Not Found
I have no problem leaving the lockid because it is wrong one...
Ill try to remove and configure the lock again
Ok. I can confirm that main worked.
is 0.3.10 the corrected version?
nope, I haven't pushed the updated release yet. That will be 0.3.11
After a complete removal and reinstall of 'main' it worked for me as well. confirm.
I can't confirm. Problem still exist.
Removal and reinstall did not work. Is equal which version i'll use: main or 0.3.10.
If a status is requested the bridge become a ping timeout for round about 2-3 Pings. This can be reproduced. I opened a ticket at Nuki, too.
If a status is requested the bridge become a ping timeout for round about 2-3 Pings. This can be reproduced. I opened a ticket at Nuki, too.
In case the bridge receives too many requests, it reboots, it's a known issue due to the hw limitations of the bridge. It can process only 1 request at a time. Probably you're sending it requests not only from this integration but from the mobile app, the web app, etc.
The bridge has a log, check it and report it here, you should see the reboots. You can dump it via curl and the /log
endpoint.
curl -H "Content-Type: application/json" 'http://bridge-ip:8080/log?token=bridgetoken'
I can't confirm. Problem still exist.
Removal and reinstall did not work. Is equal which version i'll use: main or 0.3.10.
If a status is requested the bridge become a ping timeout for round about 2-3 Pings. This can be reproduced. I opened a ticket at Nuki, too.
Remove and install "main" version
I had removed and install main, also tried to delete all files manually. Problem exists.
But a the nuki log, i can see the reboots. I have to wait for the answer from Nuki about this problem.