Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WiFi status not shown correctly in AVM FRITZ!Box Tools #107106

Closed
TRyan84 opened this issue Jan 4, 2024 · 11 comments · Fixed by #107183
Closed

WiFi status not shown correctly in AVM FRITZ!Box Tools #107106

TRyan84 opened this issue Jan 4, 2024 · 11 comments · Fixed by #107183

Comments

@TRyan84
Copy link

TRyan84 commented Jan 4, 2024

The problem

Hi,
since the update to the 2024.01 I get this Error.

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:894
First occurred: 12:29:11 (18 occurrences)
Last logged: 12:31:41

Update for switch.fritz_box_7490_wi_fi_wlan_2_4ghz fails
Update for switch.fritz_box_7490_wi_fi_wlan_5ghz fails
Update for switch.fritz_box_7490_wi_fi_wlangast fails

so it is no possible so switch the wlan on or off.

Thanks for your Help.

Greeting Tobias

What version of Home Assistant Core has the issue?

core-2024.1.0

What was the last working version of Home Assistant Core?

core-2023.12.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

AVM FRITZ!Box Tools

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:894
First occurred: 12:29:11 (18 occurrences)
Last logged: 12:31:41

Update for switch.fritz_box_7490_wi_fi_wlan_2_4ghz fails
Update for switch.fritz_box_7490_wi_fi_wlan_5ghz fails
Update for switch.fritz_box_7490_wi_fi_wlangast fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 715, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 416, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 244, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/local/lib/python3.11/http/client.py", line 1286, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.11/http/client.py", line 1332, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.11/http/client.py", line 1281, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.11/http/client.py", line 1041, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.11/http/client.py", line 979, in send
    self.connect()
  File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 205, in connect
    conn = self._new_conn()
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f5f9fead0>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 799, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/usr/local/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='192.168.188.1', port=49000): Max retries exceeded with url: /upnp/control/wlanconfig1 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5f9fead0>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 894, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1212, in async_device_update
    await self.async_update()
  File "/usr/src/homeassistant/homeassistant/components/fritz/switch.py", line 368, in async_update
    await self._update()
  File "/usr/src/homeassistant/homeassistant/components/fritz/switch.py", line 586, in _async_fetch_update
    wifi_info = await self._avm_wrapper.async_get_wlan_configuration(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/fritz/common.py", line 864, in async_get_wlan_configuration
    return await self._async_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/fritz/common.py", line 778, in _async_service_call
    result: dict = await self.hass.async_add_executor_job(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/fritzconnection/core/fritzconnection.py", line 456, in call_action
    return self.soaper.execute(service, action_name, arguments)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/fritzconnection/core/soaper.py", line 283, in execute
    with self.session.post(
         ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 637, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.188.1', port=49000): Max retries exceeded with url: /upnp/control/wlanconfig1 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5f9fead0>: Failed to establish a new connection: [Errno 111] Connection refused'))

Additional information

No response

@MoreLinuxDev
Copy link

MoreLinuxDev commented Jan 4, 2024

I can confirm this issue. WIFI switched don't work after HA update to 2024.1.0.

AVM FRITZ!Box Tools fails with this config:

  • Core : 2024.1.0
  • Supervisor: 2023.12.0
  • Operating System: 11.2
  • Frontend: 20231208.2
  • FRITZ!Box: 7590
  • FRITZ!OS: 7.57

Rolled back to

  • Core : 2023.12.4
  • Supervisor: 2023.12.0
  • Operating System: 11.2
  • Frontend: 20231208.2
  • FRITZ!Box: 7590
  • FRITZ!OS: 7.57

AVM FRITZ!Box Tools work fine again, and WIFI switches work as expected.

@ChristophCaina
Copy link
Contributor

hm... interesting :)
The switches haven't worked for me for a couple of versions in the past.
For sure, something that was there before 2024.1 and probably even before 2023.12 ...

At least, the switches are "OFF" even if wifi is on...
Changing the switch state did not work - but has not caused any log entries for me.

@MoreLinuxDev
Copy link

@ChristophCaina The WIFI switches worked perfect before 2024.1.0. Their status represented the WIFI status. The only change I have don was the upgrade to 2024.1.0 all the rest stayed on the same level.

@ChristophCaina
Copy link
Contributor

I do beleive you :)
I just wanted to highlight, that there might be another reason or something else that would cause the same - or at least a similar behave... since earlier...
Not sure, if this might be related to some additional components that might cause a conflict....

The reason, why I am pretty sure about the earlier occurance for me is the fact, that I have the switch for enabling the guest Wifi on my main dashboard ... and it was "off" for some months now... but the guest wifi is on on my fritzbox...
Then, I crosschecked my Fritzbox dashboard (which I don't use on a regular basis) and noticed, that all wifi switches are off.

@home-assistant

This comment was marked as outdated.

@ChristophCaina
Copy link
Contributor

#107121

@home-assistant
Copy link

home-assistant bot commented Jan 4, 2024

Hey there @mammuth, @AaronDavidSchneider, @chemelli74, mind taking a look at this issue as it has been labeled with an integration (fritz) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of fritz can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign fritz Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


fritz documentation
fritz source
(message by IssueLinks)

@mib1185 mib1185 changed the title Since update to 2024.01 problem with AVM FRITZ!Box Tools WiFi status not shown correctly in AVM FRITZ!Box Tools Jan 4, 2024
@mib1185
Copy link
Contributor

mib1185 commented Jan 4, 2024

i can confirm this issue ... will check it further

@gzxto1
Copy link

gzxto1 commented Jan 4, 2024

Same Problem with WIFI switches here. Worked perfectly before 2024.1.

@LaTell
Copy link

LaTell commented Jan 4, 2024

I have the same Problem with the AVM Fritz Box 7530AX. The Wifi Switches won't work.
Before I updated to 2024.1 it worked correctly

@mib1185
Copy link
Contributor

mib1185 commented Jan 4, 2024

please stop these "same issue here" posts, i've already mentioned that i'm working on it -> #107106 (comment)

@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants