core: Missing element Address (Subscribe.ConsumerReference.Address) when setting up onvif
The problem
onvif fails to setup the cameras. I have 3 cameras, all fail to setup with the same error. I have no issues with 2023.4.6.
What version of Home Assistant Core has the issue?
2023.5.0b7
What was the last working version of Home Assistant Core?
2023.4.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-asuswrt-4a0813bf563ccf3aa665284399a55d53.json(1).txt
Example YAML snippet
No response
Anything in the logs that might be useful for us?
2023-05-02 23:04:23.118 WARNING (MainThread) [homeassistant.components.onvif] The date/time on xxxx (UTC) is '1970-01-01 00:00:00+00:00', which is different from the system '2023-05-03 03:04:23.101414+00:00', this could lead to authentication issues
02/05/2023 23:04:23
2023-05-02 23:04:23.581 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry xxxxxx - xx:xx:xx:xx:xx:xx for onvif
02/05/2023 23:04:23
Traceback (most recent call last):
02/05/2023 23:04:23
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
02/05/2023 23:04:23
result = await component.async_setup_entry(hass, self)
02/05/2023 23:04:23
File "/usr/src/homeassistant/homeassistant/components/onvif/__init__.py", line 39, in async_setup_entry
02/05/2023 23:04:23
await device.async_setup()
02/05/2023 23:04:23
File "/usr/src/homeassistant/homeassistant/components/onvif/device.py", line 151, in async_setup
02/05/2023 23:04:23
self.capabilities.events = await self.async_start_events()
02/05/2023 23:04:23
File "/usr/src/homeassistant/homeassistant/components/onvif/device.py", line 335, in async_start_events
02/05/2023 23:04:23
return await self.events.async_start(pull_point_support is not False, True)
02/05/2023 23:04:23
File "/usr/src/homeassistant/homeassistant/components/onvif/event.py", line 132, in async_start
02/05/2023 23:04:23
events_via_webhook = try_webhook and await self.webhook_manager.async_start()
02/05/2023 23:04:23
File "/usr/src/homeassistant/homeassistant/components/onvif/event.py", line 635, in async_start
02/05/2023 23:04:23
if not await self._async_start_webhook():
02/05/2023 23:04:23
File "/usr/src/homeassistant/homeassistant/components/onvif/event.py", line 675, in _async_start_webhook
02/05/2023 23:04:23
await self._async_create_webhook_subscription()
02/05/2023 23:04:23
File "/usr/src/homeassistant/homeassistant/components/onvif/event.py", line 667, in _async_create_webhook_subscription
02/05/2023 23:04:23
self._webhook_subscription = await self._notification_manager.setup()
02/05/2023 23:04:23
File "/usr/local/lib/python3.10/site-packages/onvif/client.py", line 306, in setup
02/05/2023 23:04:23
notify_subscribe = await notify_service.Subscribe(self._config)
02/05/2023 23:04:23
File "/usr/local/lib/python3.10/site-packages/zeep/proxy.py", line 64, in __call__
02/05/2023 23:04:23
return await self._proxy._binding.send_async(
02/05/2023 23:04:23
File "/usr/local/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 152, in send_async
02/05/2023 23:04:23
envelope, http_headers = self._create(
02/05/2023 23:04:23
File "/usr/local/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 73, in _create
02/05/2023 23:04:23
serialized = operation_obj.create(*args, **kwargs)
02/05/2023 23:04:23
File "/usr/local/lib/python3.10/site-packages/zeep/wsdl/definitions.py", line 224, in create
02/05/2023 23:04:23
return self.input.serialize(*args, **kwargs)
02/05/2023 23:04:23
File "/usr/local/lib/python3.10/site-packages/zeep/wsdl/messages/soap.py", line 79, in serialize
02/05/2023 23:04:23
self.body.render(body, body_value)
02/05/2023 23:04:23
File "/usr/local/lib/python3.10/site-packages/zeep/xsd/elements/element.py", line 232, in render
02/05/2023 23:04:23
self._render_value_item(parent, value, render_path)
02/05/2023 23:04:23
File "/usr/local/lib/python3.10/site-packages/zeep/xsd/elements/element.py", line 256, in _render_value_item
02/05/2023 23:04:23
return self.type.render(node, value, None, render_path)
02/05/2023 23:04:23
File "/usr/local/lib/python3.10/site-packages/zeep/xsd/types/complex.py", line 307, in render
02/05/2023 23:04:23
element.render(node, element_value, child_path)
02/05/2023 23:04:23
File "/usr/local/lib/python3.10/site-packages/zeep/xsd/elements/indicators.py", line 256, in render
02/05/2023 23:04:23
element.render(parent, element_value, child_path)
02/05/2023 23:04:23
File "/usr/local/lib/python3.10/site-packages/zeep/xsd/elements/element.py", line 232, in render
02/05/2023 23:04:23
self._render_value_item(parent, value, render_path)
02/05/2023 23:04:23
File "/usr/local/lib/python3.10/site-packages/zeep/xsd/elements/element.py", line 256, in _render_value_item
02/05/2023 23:04:23
return self.type.render(node, value, None, render_path)
02/05/2023 23:04:23
File "/usr/local/lib/python3.10/site-packages/zeep/xsd/types/complex.py", line 307, in render
02/05/2023 23:04:23
element.render(node, element_value, child_path)
02/05/2023 23:04:23
File "/usr/local/lib/python3.10/site-packages/zeep/xsd/elements/indicators.py", line 256, in render
02/05/2023 23:04:23
element.render(parent, element_value, child_path)
02/05/2023 23:04:23
File "/usr/local/lib/python3.10/site-packages/zeep/xsd/elements/element.py", line 226, in render
02/05/2023 23:04:23
self.validate(value, render_path)
02/05/2023 23:04:23
File "/usr/local/lib/python3.10/site-packages/zeep/xsd/elements/element.py", line 284, in validate
02/05/2023 23:04:23
raise exceptions.ValidationError(
02/05/2023 23:04:23
zeep.exceptions.ValidationError: Missing element Address (Subscribe.ConsumerReference.Address)
Additional information
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 4
- Comments: 15 (7 by maintainers)
Commits related to this issue
- Handle webhook URL rejection in onvif fixes #92384 — committed to home-assistant/core by bdraco a year ago
2023-05-04 20:07:45.790 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Camera - dc-29-19-94-57-cc 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 "/usr/src/homeassistant/homeassistant/components/onvif/__init__.py", line 39, in async_setup_entry await device.async_setup() File "/usr/src/homeassistant/homeassistant/components/onvif/device.py", line 151, in async_setup self.capabilities.events = await self.async_start_events() File "/usr/src/homeassistant/homeassistant/components/onvif/device.py", line 331, in async_start_events pull_point_support = onvif_capabilities.get("Events", {}).get( AttributeError: 'NoneType' object has no attribute 'get'
We suppressed that error in #92405 and added more logging.
Please post the full exception you get when upgrading to 2023.5.0 with debug logs turned on. It will give us a better idea why it can’t start the webhook.
In the mean time the change will allow the camera to setup and fallback to pull point even which seems like a better choice even if its less efficient