Random start errors

Hi all,

I am new in the Home assistant world (coming from openhab). I am trying to configure all my devices (home automation based on KNX + a lot of devices).

I have two integration that cause me trouble. The first one concern my Synology NAS, the second, my Netgear Orbi Mesh routers. I mean, configuration was easy, and automatic, but at each reboot of home assistant, I have trouble with 0, 1 or 2 of these devices.

Error setting up entry 192.168.0.99 for synology_dsm
20:12:34 – components/synology_dsm/__init__.py (ERROR)

Error setting up entry FrMesh6Router (Gateway) for upnp
20:12:29 – components/upnp/device.py (ERROR)

And, in the interface, all the values linked to these 2 devices are ‘unnavailable’

Sometimes, it’s works for both, or for one, sometimes, they are both in error. I just reboot home assistant via the interface, so, it’s not a network connectivity problem (I presume).

Home assistant works on a raspberry pi 3, and with the last (32bits) image distribution freshly downloaded and updated.

Could you help me ?

Thanks,

Fred.

Full details


2020-09-27 20:36:11 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry FrMesh6Router (Gateway) for upnp
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/xml/etree/ElementTree.py", line 1693, in feed
    self.parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 2, column 45

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 228, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/upnp/__init__.py", line 111, in async_setup_entry
    device = await async_discover_and_construct(hass, udn, st)
  File "/usr/src/homeassistant/homeassistant/components/upnp/__init__.py", line 76, in async_discover_and_construct
    return await Device.async_create_device(hass, location)
  File "/usr/src/homeassistant/homeassistant/components/upnp/device.py", line 74, in async_create_device
    upnp_device = await factory.async_create_device(ssdp_location)
  File "/usr/local/lib/python3.8/site-packages/async_upnp_client/client_factory.py", line 52, in async_create_device
    root = await self._async_get_url_xml(description_url)
  File "/usr/local/lib/python3.8/site-packages/async_upnp_client/client_factory.py", line 295, in _async_get_url_xml
    root = DET.fromstring(response_body)  # type: ET.Element
  File "/usr/local/lib/python3.8/site-packages/defusedxml/common.py", line 131, in fromstring
    parser.feed(text)
  File "/usr/local/lib/python3.8/xml/etree/ElementTree.py", line 1695, in feed
    self._raiseerror(v)
  File "/usr/local/lib/python3.8/xml/etree/ElementTree.py", line 1602, in _raiseerror
    raise err
  File "<string>", line None
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 2, column 45
2020-09-27 20:36:13 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 192.168.0.99 for synology_dsm
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 421, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.8/http/client.py", line 1347, in getresponse
    response.begin()
  File "/usr/local/lib/python3.8/http/client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.8/http/client.py", line 268, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/local/lib/python3.8/socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "/usr/local/lib/python3.8/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/local/lib/python3.8/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 726, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 403, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.8/site-packages/urllib3/packages/six.py", line 735, in reraise
    raise value
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 428, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 335, in _raise_timeout
    raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='192.168.0.99', port=5001): Read timed out. (read timeout=10)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/synology_dsm/synology_dsm.py", line 255, in _execute_request
    resp = self._session.get(
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 529, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='192.168.0.99', port=5001): Read timed out. (read timeout=10)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 228, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/synology_dsm/__init__.py", line 163, in async_setup_entry
    await api.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/synology_dsm/__init__.py", line 255, in async_setup
    await self._hass.async_add_executor_job(self._fetch_device_configuration)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/synology_dsm/__init__.py", line 323, in _fetch_device_configuration
    self.utilisation = self.dsm.utilisation
  File "/usr/local/lib/python3.8/site-packages/synology_dsm/synology_dsm.py", line 351, in utilisation
    data = self.get(SynoCoreUtilization.API_KEY, "get")
  File "/usr/local/lib/python3.8/site-packages/synology_dsm/synology_dsm.py", line 179, in get
    return self._request("GET", api, method, params, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/synology_dsm/synology_dsm.py", line 223, in _request
    response = self._execute_request(request_method, url, params=params, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/synology_dsm/synology_dsm.py", line 275, in _execute_request
    raise SynologyDSMRequestException(exp)
synology_dsm.exceptions.SynologyDSMRequestException: {'api': None, 'code': -1, 'reason': 'Unknown', 'details': "ReadTimeout = HTTPSConnectionPool(host='192.168.0.99', port=5001): Read timed out. (read timeout=10)"}

Did you get to the bottom of this?

I work on others integration in the mean time, and finally, With upgrade to .117, it disappeared.