New AVM Fritz!box Tools

Tags: #<Tag:0x00007fc40c696680>

Hi all,
I tonight I relized my HA wasn’t able anymore to see devices connected to my network. I was using a version from february (2021) using old device-tracker platform fritz.
So I decided to upgrade to the latest 2021.6.6 docker container and to use the newerAVM Fritz!box Tools integration.
but when I try to configure it I get the following error:


I obviously used the new fritz user with the password (I’m running on 7.27) but I really cannot login.
From the log I get:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/components/fritz/config_flow.py", line 71, in fritz_tools_init

await self.fritz_tools.async_setup()

File "/usr/src/homeassistant/homeassistant/components/fritz/common.py", line 82, in async_setup

return await self.hass.async_add_executor_job(self.setup)

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/fritz/common.py", line 86, in setup

self.connection = FritzConnection(

File "/usr/local/lib/python3.8/site-packages/fritzconnection/core/fritzconnection.py", line 126, in __init__

self.device_manager.add_description(source)

File "/usr/local/lib/python3.8/site-packages/fritzconnection/core/devices.py", line 75, in add_description

root = get_xml_root(source, timeout=self.timeout, session=self.session)

File "/usr/local/lib/python3.8/site-packages/fritzconnection/core/utils.py", line 56, in get_xml_root

source = get_content_from(source, timeout=timeout, session=session)

File "/usr/local/lib/python3.8/site-packages/fritzconnection/core/utils.py", line 38, in get_content_from

with session.get(url, timeout=timeout) as response:

File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 555, in get

return self.request('GET', url, **kwargs)

File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request

resp = self.send(prep, **send_kwargs)

File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send

r = adapter.send(request, **kwargs)

File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 516, in send

raise ConnectionError(e, request=request)

requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.1xy.zz.', port=49000): Max retries exceeded with url: /igddesc.xml (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f14badbaeb0>: Failed to establish a new connection: [Errno -2] Name does not resolve'))

Do you have any clue?

Thx

1 Like

Hi,

did you make sure to enable TR064 on the Fritzbox. Assume you did, considering that the old integration worked. But maybe that used another mechanism?

Also, since the screenshot you show seems as if you try to configure the intergration manually - did the auto discovery not find the Fritzbox? It should appear automatically in the notifications (after a HA restart).

I’m in the same situation, updated today, removed from configuration yaml the netmonitor data and now i can’t configure the new AVM Fritz!box Tools. TR064 is enabled, as before. The integrations showed automatically after HA restart but can’t configuring it.



Logger: homeassistant.components.fritz.config_flow
Source: components/fritz/common.py:105
Integration: AVM FRITZ!Box Tools (documentation, issues)
First occurred: 10 agosto 2021, 23:35:40 (3 occurrences)
Last logged: 10 agosto 2021, 23:54:30
Unexpected exception

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 445, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 440, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.9/http/client.py", line 1349, in getresponse
    response.begin()
  File "/usr/local/lib/python3.9/http/client.py", line 316, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.9/http/client.py", line 277, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/local/lib/python3.9/socket.py", line 704, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 532, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.9/site-packages/urllib3/packages/six.py", line 769, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 445, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 440, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.9/http/client.py", line 1349, in getresponse
    response.begin()
  File "/usr/local/lib/python3.9/http/client.py", line 316, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.9/http/client.py", line 277, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/local/lib/python3.9/socket.py", line 704, in readinto
    return self._sock.recv_into(b)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/fritz/config_flow.py", line 75, in fritz_tools_init
    await self.fritz_tools.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/fritz/common.py", line 101, in async_setup
    await self.hass.async_add_executor_job(self.setup)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/fritz/common.py", line 105, in setup
    self.connection = FritzConnection(
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 155, in __init__
    self.device_manager.add_description(source)
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/devices.py", line 75, in add_description
    root = get_xml_root(source, timeout=self.timeout, session=self.session)
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/utils.py", line 56, in get_xml_root
    source = get_content_from(source, timeout=timeout, session=session)
  File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/utils.py", line 38, in get_content_from
    with session.get(url, timeout=timeout) as response:
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))


Tried different browsers too :confused:

Ok, figured it out, after restarting again HA i can see two “AVM Fritz!box Tools”, one generic and one with my router name (???). The second was configured without issue. :open_mouth: