core: AVM FRITZ!Box Tools - device tracker entities for the Fritz Box and all repeaters are not defined/created since 2022.2.0
The problem
I am tracking the availability of all my network devices using device_tracker entities. Since I upgraded to version 2022.2.0 all the device trackers for the fritz box and all fritz repeaters are “unavailable” while other entities (button, switch, binary_sensors) for those equipments exist. All other devices I am tracking have been correctly created… No error message seems to be existent for that integration but I have the following error at startup (but this one was already there in 2021.12.x without creating any issues):
2022-02-03 10:14:19 ERROR (SyncWorker_8) [homeassistant.components.fritz.common] Connection Error: Please check the device is properly configured for remote login
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/fritz/common.py", line 537, in _service_call_action
result: dict = self.connection.call_action(
File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/fritzconnection.py", line 284, in call_action
return self.soaper.execute(service, action_name, arguments)
File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/soaper.py", line 259, in execute
return handle_response(response)
File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/soaper.py", line 241, in handle_response
raise_fritzconnection_error(response)
File "/usr/local/lib/python3.9/site-packages/fritzconnection/core/soaper.py", line 164, in raise_fritzconnection_error
raise exception(message)
fritzconnection.core.exceptions.FritzArgumentError: UPnPError:
errorCode: 402
errorDescription: Invalid Args
I have also the following error (a couple times at startup) but not sure if this is linked with Fritz Box integration:
2022-02-03 10:19:45 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that uses str (config) for entity category. This is deprecated and will stop working in Home Assistant 2022.4, it should be updated to use EntityCategory instead. Please report this issue.
Stack (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/src/homeassistant/homeassistant/__main__.py", line 203, in <module>
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/__main__.py", line 191, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 119, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 629, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 596, in run_forever
self._run_once()
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1890, in _run_once
handle._run()
File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in _async_add_entity
entry = entity_registry.async_get_or_create(
File "/usr/src/homeassistant/homeassistant/helpers/entity_registry.py", line 401, in async_get_or_create
entity_category=_convert_to_entity_category(entity_category),
File "/usr/src/homeassistant/homeassistant/helpers/entity_registry.py", line 103, in _convert_to_entity_category
return convert_to_entity_category(value, raise_report=raise_report)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 214, in convert_to_entity_category
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 74, in report
_LOGGER.warning(msg, stack_info=True)
Stack (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/src/homeassistant/homeassistant/__main__.py", line 203, in <module>
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/__main__.py", line 191, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 119, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 629, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 596, in run_forever
self._run_once()
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1890, in _run_once
handle._run()
File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in _async_add_entity
entry = entity_registry.async_get_or_create(
File "/usr/src/homeassistant/homeassistant/helpers/entity_registry.py", line 401, in async_get_or_create
entity_category=_convert_to_entity_category(entity_category),
File "/usr/src/homeassistant/homeassistant/helpers/entity_registry.py", line 103, in _convert_to_entity_category
return convert_to_entity_category(value, raise_report=raise_report)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 214, in convert_to_entity_category
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 74, in report
_LOGGER.warning(msg, stack_info=True)
What version of Home Assistant Core has the issue?
core-2022.2.0
What was the last working version of Home Assistant Core?
core-2021.12.x
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
https://www.home-assistant.io/integrations/fritz/
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 77 (16 by maintainers)
@Smandurlo and all the others, we are working hard to achive 2 goals:
I think that we are now very close: firmware update, mesh management, details of each device tracker, set guest password, are all implemented. We just wait for QR code for Guest WIFI . The Team doesn’t have anything left on the todo after that.
About the second, unfortunately some API from AVM are broken on some devices, and we need to find different ways to achive the same result. Luckily often there is more than 1 way to do it, so we are actively looking into all issues to find a stable solution for you all.
We are also looking for an updated fritzconnection to get the last requested performance improvement; with that we will do 1 single call for all devices instead of 1 for each device!
Please share an updated log and diagnostics from 2022.02.2 or later to help this process.
Simone
I am closing this issue … If you have still specific problems please open a new issue…
@chemelli74 I restored the initial title of this issue… You changed it because you discovered an error in my log (for this so please open a new issue…), but this error has nothing to do with my problem: “device_tracker not defined for all the Fritz devices” and as far as I know, I am not the only one… This issue does not have any error associated, the device tracker is just not created… all the other entities for the fritz boxes (box and repeaters) are correctly created though… @NullEnt1ty, initial issue topic restored…
I’ve now spent quite a bit of time with the integration. Yes, the binary sensors and the switches seem to work as expected. All is well. Actually, @chemelli74 was very helpful with some debugging so we worked together on this via Discord. I first thought the integration was still bugged, but it turns out that I misconfigured something else (my shellies) which had the side effect of HA not starting properly, which again didn’t load the new fritz integration properly.
From my perspective, this can be closed now. Thanks to all those who worked on this integration!
Option A, back to the same code used for 2021.12.x
known_devices.yamlare deprecated in HomeAssistant.Simone
@chemelli74 I can confirm that all of my devices showed up after using “Enable old discovery method” 🎉
Thanks for your work, Simone!
The beta of 2022.3.0 (currently 2022.3.0b2) has a new integration system option:
Please enable it and report back if issue is fixed.
Simone
Update: I had to switch off the electricity on a section of my house where there is a mesh repeater connected with ethernet. After some minutes, I got the notification of my offline devices as expected, PLUS my fritz mesh repeater that was not discovered anymore. Funny thing is, it works in reverse mode! HA lists it as home. When I switched back on the eletricity, the mesh repeater went not_home.
Out of curiosity, I switched off again, and it went “home”. Switched on electricity and “not_home”. The other device trackers work as supposed to be.
2022.2.5 didn’t fix the problem, despite “Change detection of router devices for Fritz” fix
No mesh routers/repeater. I created the integration from scratch to be sure.
@NullEnt1ty Thanks for the feedback… I am afraid to remove and recreate the integration, as I probably changed some entities name to match previous installation of that integration. Doing that (re-adding the integration) will probably create for me more problems than it solves… 😃 Hopefully they will find the problem quickly…
Same on my system
I have the same issue lost all my device trackers from the fritzbox integration. FRITZ!Box Fon WLAN 7360 by AVM Connected via meterkast Firmware: 124.06.87