Onvif camera + HAssio 0.93.2 config fail

Hi i used the configuration explained for my onvif cinese camera.

My camera has 2 open ports 554 and 5000.

With VLC streaming works fine, with me HASSIO on raspberry pi 3 i get:

Log Details (ERROR)
Mon Jun 03 2019 14:54:52 GMT+0200 (Ora legale dell’Europa centrale)
Error while setting up platform onvif
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py”, line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 416, in wait_for
return fut.result()
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/onvif/camera.py”, line 101, in async_setup_platform
await hass_camera.async_initialize()
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/onvif/camera.py”, line 166, in async_initialize
device_time = await devicemgmt.GetSystemDateAndTime()
File “/usr/local/lib/python3.7/site-packages/zeep/asyncio/bindings.py”, line 15, in send
options[‘address’], envelope, http_headers)
File “/usr/local/lib/python3.7/site-packages/zeep/asyncio/transport.py”, line 95, in post_xml
response = await self.post(address, message, headers)
File “/usr/local/lib/python3.7/site-packages/zeep/asyncio/transport.py”, line 87, in post
verify_ssl=self.verify_ssl, proxy=self.proxy)
File “/usr/local/lib/python3.7/site-packages/aiohttp/client.py”, line 497, in _request
await resp.start(conn)
File “/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py”, line 844, in start
message, payload = await self._protocol.read() # type: ignore # noqa
File “/usr/local/lib/python3.7/site-packages/aiohttp/streams.py”, line 588, in read
await self._waiter
aiohttp.client_exceptions.ServerDisconnectedError: None

my configuration is:

camera:

  • platform: onvif
    host: 172.24.1.10
    password: 123!

And i don’t get nothing in home page

thanks to all, i’m getting crazy after 3 days of all tries

I’m using HA 0.94.1 and I have the same issue. I tried commenting out lines from 166 to 188 in:


as suggested in this topic:

but I got another error:
2019-06-09 11:35:14 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform onvif
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py”, line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 416, in wait_for
return fut.result()
File “/home/homeassistant/.homeassistant/custom_components/onvif/camera.py”, line 101, in async_setup_platform
await hass_camera.async_initialize()
File “/home/homeassistant/.homeassistant/custom_components/onvif/camera.py”, line 157, in async_initialize
await self._camera.update_xaddrs()
File “/srv/homeassistant/lib/python3.7/site-packages/onvif/client.py”, line 233, in update_xaddrs
capabilities = await self.devicemgmt.GetCapabilities({‘Category’: ‘All’})
File “/srv/homeassistant/lib/python3.7/site-packages/zeep/asyncio/bindings.py”, line 13, in send
options[“address”], envelope, http_headers
File “/srv/homeassistant/lib/python3.7/site-packages/zeep/asyncio/transport.py”, line 107, in post_xml
response = await self.post(address, message, headers)
File “/srv/homeassistant/lib/python3.7/site-packages/zeep/asyncio/transport.py”, line 95, in post
proxy=self.proxy,
File “/srv/homeassistant/lib/python3.7/site-packages/aiohttp/client.py”, line 497, in _request
await resp.start(conn)
File “/srv/homeassistant/lib/python3.7/site-packages/aiohttp/client_reqrep.py”, line 844, in start
message, payload = await self._protocol.read() # type: ignore # noqa
File “/srv/homeassistant/lib/python3.7/site-packages/aiohttp/streams.py”, line 588, in read
await self._waiter
aiohttp.client_exceptions.ServerDisconnectedError: None
1 Like

Hi… I setup an Onvif camera in 0.93.2 and it is still working in 0.94.1…

.95 killed it. Any idea how to fix this problem?

I have this problem in Home Assistant 0.101.3

Error while setting up platform onvif
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 118, in async_setup_platform
    await hass_camera.async_initialize()
  File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 166, in async_initialize
    await self._camera.update_xaddrs()
  File "/usr/local/lib/python3.7/site-packages/onvif/client.py", line 233, in update_xaddrs
    capabilities = await self.devicemgmt.GetCapabilities({'Category': 'All'})
  File "/usr/local/lib/python3.7/site-packages/zeep/asyncio/bindings.py", line 20, in send
    return self.process_reply(client, operation_obj, response)
  File "/usr/local/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py", line 170, in process_reply
    doc = parse_xml(content, self.transport, settings=client.settings)
  File "/usr/local/lib/python3.7/site-packages/zeep/loader.py", line 54, in parse_xml
    forbid_entities=settings.forbid_entities,
  File "/usr/local/lib/python3.7/site-packages/defusedxml/lxml.py", line 146, in fromstring
    elementtree = rootelement.getroottree()
AttributeError: 'NoneType' object has no attribute 'getroottree'
Connection lost. Reconnecting…