[Addon] Fritz Mesh - live view of your Fritz!Box Mesh network

Hello fellow owners of an AVM Fritz!Box,

Are you also annoyed that the pretty Fritz!Box Mesh overview is hidden in the FritzBox UI, accessible only via separate login? How nice would it be to have this dashboard available in Home Assistant!

I have created a HA add-on to solve this problem:

Fritz Mesh

This add-on allows to integrate the Fritz Mesh Overview into home Assistant:

Note: This is currently tested solely in my private setup, using FritzBox 7530, Fritz!OS 7.57.

Feel free to give it a try and share with me if it works for you.

4 Likes

Wow - thatā€™s amazing!
I was desparately waiting for such an overview.
The fritzbox integration does not provide a proper feedback about which devices are connected to which mesh repeater!
Thank you so much!
I will try it right away.

1 Like

Awesome, exactly what I was looking for. Thank you!

I redesign my local network / mesh - so the auto logout of the FB kinda sucksā€¦

perfect and it works for me as a beginner !!! thx very much, nice work !!!

kind regards from germanyā€¦

Hi @Scritch,

after solving some problems regarding the access credentials for the Fritz!Box I can use your add-on. But one question is left for me: " will the actual picture of the mesh-network just generated when you press the ā€œnetwork-buttonā€? Or is it a generalized scematic , which is produced only one time?

Reason for my question is, that due to my ā€œunstableā€ WLAN I am looking for a fast check, which of my APā€™s is not running?

Thx in advance.
Best regards
Thomas

The live mesh structure is polled every 5 seconds from the fritzbox and gets stored in the add-on.

When you open the network view, this cached data gets rendered.

Unfortunatly itā€™s not working on my endā€¦This is my log, can you help me?

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/urllib3/util/connection.py", line 72, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/socket.py", line 962, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/urllib3/connectionpool.py", line 715, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/urllib3/connectionpool.py", line 416, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.11/site-packages/urllib3/connection.py", line 244, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/lib/python3.11/http/client.py", line 1298, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1344, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1293, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1052, in _send_output
    self.send(msg)
  File "/usr/lib/python3.11/http/client.py", line 990, in send
    self.connect()
  File "/usr/lib/python3.11/site-packages/urllib3/connection.py", line 205, in connect
    conn = self._new_conn()
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f986807d0>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/urllib3/connectionpool.py", line 799, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='https', port=80): Max retries exceeded with url: //192.168.178.1/login_sid.lua?version=2&sid=0000000000000000 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f986807d0>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/fritzmesh.py", line 317, in <module>
    main()
  File "/fritzmesh.py", line 284, in main
    mySid = updateLogin()
            ^^^^^^^^^^^^^
  File "/fritzmesh.py", line 170, in updateLogin
    response = requests.get('http://' + fritzboxHost + '/login_sid.lua?version=2&sid=' + currentSid)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/requests/adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='https', port=80): Max retries exceeded with url: //192.168.178.1/login_sid.lua?version=2&sid=0000000000000000 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f986807d0>: Failed to establish a new connection: [Errno -3] Try again'))
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Is it possible that you entered an ā€œhttpsā€ prefixed string instead of a plain hostname or IP address in the Add-on config?

HI @Scritch ā€¦First of all, great jobā€¦ Iā€™ve been using it for a while on HA OS, now Iā€™m switching to docker with HA Core and I no longer have the possibility to install AddOnsā€¦ is it possible to install it as a separate docker container?

Thank you

Every HA add-on itself is also just a docker container.

Here the docker config of fritzmesh (its part of the regular add-on source tree): fritzmesh/fritzmesh_addon/Dockerfile at 7530a4b9e4abf1ebec3bc8eda2b7fc973299a065 Ā· Lamarqe/fritzmesh Ā· GitHub

Iā€™ve tried everything:

Nothing seems to workā€¦

Iā€™m not very good at handling a docker fileā€¦ but I tryā€¦ :slight_smile:

First two seem to be correct.
I assume itā€™s a problem with username and password you configured.

Iā€™ve tried also my admin username/password, same issue. Maybe it has to do with the type of FritzBox? (I have a 7590) or settings within the Fritzbox?

Login should work with fritz os, starting version 7.24. fritzbox type should be irrelevant.

Hi @CrashyNL ,
at the end, are you able to set the integration?

You can see the master username in configuration of your Fritz; probably your fritz has autoconfigurate the username
The password is the same that you use to enter on your fritzā€™s configuration (visible on the back of your fritz)

Donā€™t know exactly what I changed, but I got it working!

  • host: fritz.box
  • Seperate username / Password, with rights:
    • FRITZ!Box Settings
    • Voice messages, faxes, FRITZ!App Fon and call list
    • Smart Home

Thanks for helping out!

Hi,
Iā€˜m running HA on x86 natively.
I downloaded the Add-on and configured the username/ password & ip. Nevertheless the Network page remains completely empty. The Log show:

======== Running on http://0.0.0.0:8099 ========

(Press CTRL+C to quit)

s6-rc: info: service s6rc-oneshot-runner: starting

s6-rc: info: service s6rc-oneshot-runner successfully started

s6-rc: info: service fix-attrs: starting

s6-rc: info: service fix-attrs successfully started

s6-rc: info: service legacy-cont-init: starting

s6-rc: info: service legacy-cont-init successfully started

s6-rc: info: service legacy-services: starting

s6-rc: info: service legacy-services successfully started

What else do I need to configure. Sorry Iā€™m pretty new to HA and itā€™s like a deep rabbit hole:-)

Thanks

I guess you are using FritzOS version 8.0 or higher.

In this case, I have to share bad news. Starting with FritzOS 8.0, AVM has added javascript obfuscation.
Due to this, I have not been able to implement the changes required to adopt to their new OS version.
Its doable, but would require non-trivial effort to re-engineer their javascript.
Thatā€™s a kind of game which I am not willing to play with AVM for every update. :frowning:

Hi,

Indeed I do. Oh thatā€™s a pittybut i can fully understand your point of view.

Thanks for quick reply.