-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
ONVIF integration failing to setup after update to 2023.4 on Hikvision iDS-7208HQHI-M1 #91398
Comments
Hey there @hunterjm, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) onvif documentation |
Thanks for the logs. Unfortunately the exception that is causing the Failure to setup is missing from the log |
You're welcome. I'm not really familiar with ONVIF, but maybe this has something to do with it: With onvif-zeep-async 1.2.2 camera profiles are not empty:
but with 1.2.3 they are:
|
You should get at least one of these messages if core/homeassistant/components/onvif/device.py Line 128 in 0ddccb2
Absent of more information, it looks like mvantellingen/python-zeep#1369 might fix the issue when it gets merged |
So its likely hitting
|
Thanks for the heads up. |
Still I would expect you would see an exception raised rather than an empty result on failure. |
Can you try adding a debug logging line and seeing what diff --git a/homeassistant/components/onvif/device.py b/homeassistant/components/onvif/device.py
index 1556ae8a1f..c08bf6b65b 100644
--- a/homeassistant/components/onvif/device.py
+++ b/homeassistant/components/onvif/device.py
@@ -114,6 +114,7 @@ class ONVIFDevice:
# No camera profiles to add
if not self.profiles:
+ LOGGER.error("No camera profiles found for %s", self.name)
return False
if self.capabilities.ptz:
@@ -307,6 +308,7 @@ class ONVIFDevice:
"""Obtain media profiles for this device."""
media_service = self.device.create_media_service()
result = await media_service.GetProfiles()
+ LOGGER.debug("%s: GetProfiles returned: %s", self.name, result)
profiles: list[Profile] = []
if not isinstance(result, list): |
You were right. I does hit that line. The PR on python-zeep sadly didn't help. I'll try to find what broke it between v1.2.2 and v1.2.3 of onvif-zeep-async, since it's working with 1.2.2. |
There were some fixes for WSAs and memory leaks in 1.2.3 that are interacting poorly with that implementation. Unfortunately we haven't been able to pin down the cause yet though even after buying a few test cameras. |
I'd try reverting the WSAs PR first openvideolibs/python-onvif-zeep-async#12 Hopefully thats not it because if we revert that one its going to break a lot of motion detection sensors for other cameras but we may be able to work around that by only enabling it on the the event services as thats were the problem was for the other devices |
Strangely enough reverting openvideolibs/python-onvif-zeep-async#11 fixed it. |
Well thats not good as it means its likely a bug in |
We are waiting for agronholm/anyio#374 to get fixed as well |
I think we could revert openvideolibs/python-onvif-zeep-async#11 and instead pass it a dummy If we already pass it one. And since we never use it, its not really a problem. Its just an ugly fix |
@denpamusic Can you try onvif-zeep-async to 1.2.5? |
Yes, sorry for long wait, gone down rabbit hole of libraries :) |
Thanks for testing
Let's hope, but with vendor implementations one has to hope quite a bit as every change seems to come with side effects due to the variety of implementations |
Dear friends. I tried to solve this problem in my home assistant updating onvif-zeep-async to 1.2.5. After i tried to reconnect my camera and i obtain the same problem. What can I do to solve the problem? |
How did you install 1.2.5? Did you modify the manifest.json to prevent it from downgrading again? |
The problem
Since upgrading to 2023.4.0 and all the way to the current 2023.4.4 release, ONVIF integration doesn't work for my Hikvision iDS-7208HQHI-M1 NVR with the latest firmware V4.71.010.
There's nothing in the logs on default log level, however by changing the level to debug I've managed to obtain entries attached in the file below:
home-assistant_2023-04-13T22-40-02.928Z.log
I've tried reloading integration and setting it up from the scratch on fresh HASS instance, sadly it was still failing to load.
In the end, I've found out that rolling back
onvif-zeep-async
requirement in the ONVIF integration's manifest.json to version 1.2.2 fixes the issue. This allowed me to download diagnostics information that is attached to this issue.What version of Home Assistant Core has the issue?
core-2023.4.0
What was the last working version of Home Assistant Core?
core-2023.3.6
What type of installation are you running?
Home Assistant Container
Integration causing the issue
onvif
Link to integration documentation on our website
https://www.home-assistant.io/integrations/onvif/
Diagnostics information
config_entry-onvif-a766f4742085d42e0c75070a583d84a5.json.txt
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: