home-assistant / home-assistant.io

:blue_book: Home Assistant User documentation
https://www.home-assistant.io
Other
4.88k stars 7.25k forks source link

Onvif cameras failed to setup after HA upgrade #27749

Closed nautos closed 1 year ago

nautos commented 1 year ago

Feedback

Since HA upgrade Onvif cameras not working with status failed to setup. Until HA version 2023.4 Onvif was functioning properly.

URL

https://www.home-assistant.io/integrations/onvif/

Version

2023.6.1

Additional information

This error originated from a custom integration.

Logger: homeassistant.config_entries Source: custom_components/onvif/init.py:98 Integration: ONVIF First occurred: 2:24:57 PM (3 occurrences) Last logged: 2:26:26 PM

Error setting up entry Rear Balcony Camera - DC:29:19:E1:A3:B9 for onvif Error setting up entry Front Balcony Camera - 00:12:41:97:36:CF for onvif Error setting up entry Living Room TAPO - B0:A7:B9:CA:18:22 for onvif Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/onvif/init.py", line 98, in async_setup_entry hass.config_entries.async_setup_platforms(entry, platforms) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

home-assistant[bot] commented 1 year ago

Hey there @hunterjm, mind taking a look at this feedback as it has been labeled with an integration (onvif) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `onvif` can trigger bot actions by commenting: - `@home-assistant close` Closes the feedback. - `@home-assistant rename Awesome new title` Renames the feedback. - `@home-assistant reopen` Reopen the feedback. - `@home-assistant unassign onvif` Removes the current integration label and assignees on the feedback, add the integration domain after the command.
AJStubbsy commented 1 year ago

Home Assistant 2023.6.2 Supervisor 2023.06.2 Operating System 10.3 Frontend 20230608.0 - latest

I seem to be experiencing a similar, or possibly related, problem. I had two ONVIF cameras (Yi-Hack Firmware 0.3.4) setup and working fine but then then I lost the camera feed. I decided to delete the integration and set them up again but now I get an 'Unknown error occurred' message whenever I try to add them and the following Error in my logs: -


Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle
result = await handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 181, in post
return await super().post(request, flow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
result = await method(view, request, data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
result = await self._flow_mgr.async_configure(flow_id, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 271, in async_configure
result = await self._async_handle_step(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 246, in async_step_configure
errors, description_placeholders = await self.async_setup_profiles()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 290, in async_setup_profiles
await device.update_xaddrs()
File "/usr/local/lib/python3.11/site-packages/onvif/client.py", line 401, in update_xaddrs
for name in capabilities:
TypeError: 'NoneType' object is not iterable```
nautos commented 1 year ago

Hallo, I solved my problem by replacing the files of ONVIF integration from the latest version on GitHub. I hope it will help you.

Στις Τετ 21 Ιουν 2023, 12:21 π.μ. ο χρήστης AJStubbsy < @.***> έγραψε:

Home Assistant 2023.6.2 Supervisor 2023.06.2 Operating System 10.3 Frontend 20230608.0 - latest

I seem to be experiencing a similar, or possibly related, problem. I had two ONVIF cameras (Yi-Hack Firmware 0.3.4) setup and working fine but then then I lost the camera feed. I decided to delete the integration and set them up again but now I get an 'Unknown error occurred' message whenever I try to add them and the following Error in my logs: -

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle result = await handler(request, *request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 181, in post return await super().post(request, flow_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper result = await method(view, request, data, args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post result = await self._flow_mgr.async_configure(flow_id, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 271, in async_configure result = await self._async_handle_step( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 246, in async_step_configure errors, description_placeholders = await self.async_setup_profiles() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/onvif/config_flow.py", line 290, in async_setup_profiles await device.update_xaddrs() File "/usr/local/lib/python3.11/site-packages/onvif/client.py", line 401, in update_xaddrs for name in capabilities: TypeError: 'NoneType' object is not iterable```

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/home-assistant.io/issues/27749#issuecomment-1599577119, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOY5NI5SLPMAZ5UF6RAEUTTXMIH5ZANCNFSM6AAAAAAZCJEOFA . You are receiving this because you authored the thread.Message ID: @.***>

AJStubbsy commented 1 year ago

Thanks nautos. Maybe I'll just wait until July and hopefully the latest version will fix my issue. I'm not desperate to see the camera feed in HA but it is nice having it in one place.

Out of interest, can you tell me the path to the ONVIF integration files in HAOS please?

klaasnicolaas commented 1 year ago

Hi there 👋

It seems like you want to report an issue with an Home Assistant integration, however, you have submitted documentation feedback instead. Please raise an issue in the Home Assistant core issue tracker instead:

https://github.com/home-assistant/core/issues

Thanks! 👍

./Klaas