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

AVM FRITZ!Box Tools does not delete the devices deleted from fritz interface #106642

Closed
syntesys87 opened this issue Dec 29, 2023 · 39 comments · Fixed by #122937
Closed

AVM FRITZ!Box Tools does not delete the devices deleted from fritz interface #106642

syntesys87 opened this issue Dec 29, 2023 · 39 comments · Fixed by #122937
Assignees

Comments

@syntesys87
Copy link

syntesys87 commented Dec 29, 2023

The problem

I deleted from Fritz!Box frontend all the devices no more connected to the network, but they remains on the integration in home assistant.

What version of Home Assistant Core has the issue?

core-2023.12.3

What was the last working version of Home Assistant Core?

No response

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

config_entry-fritz-1229851ffce9169e442b58ca46b7f907.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

The log contains the devices that I have in the fritzbox; The clean button in the integration seems not doing the right operation.

Additional information

No response

@home-assistant
Copy link

Hey there @mammuth, @AaronDavidSchneider, @chemelli74, @mib1185, 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
Copy link
Contributor

mib1185 commented Dec 29, 2023

Hi @syntesys87

please enable debug logging, restart HA and provide the home-assistant.log after you have pressed the cleanup button
To do so add the following to your configuration.yaml:

logger:
  default: info
  logs:
    homeassistant.components.fritz: debug

Note: it is better to drag the log into the comment (which will add it as an attachment) and not copy paste as it is hard to read logs in GitHub.

@chemelli74
Copy link
Contributor

You need to use the cleanup button to get rid of them on HA side

@syntesys87
Copy link
Author

You need to use the cleanup button to get rid of them on HA side

I opened the issue because the cleanup button in my case is not working...

@mib1185
Copy link
Contributor

mib1185 commented Dec 29, 2023

which device you think should be removed but isn't?
as far as i can see on the logs, there are no entities on HA, which are not still reported by your Fritzbox

@syntesys87
Copy link
Author

In home assistant I see 82 entities, I think that something in the sync it's not working... I'll remove de device and readd...

@mib1185
Copy link
Contributor

mib1185 commented Dec 29, 2023

are some of these entities in state unavailable ?

@syntesys87
Copy link
Author

Yes, it's plenty of devices no more connected...

@mib1185
Copy link
Contributor

mib1185 commented Dec 29, 2023

please provide the state details of one or two of these entities from "Developer Tools" -> "States"

@NordFreak
Copy link

i have the same problem.

@syntesys87
Copy link
Author

I'm sorry, I removed the integration and readded because I needed an urgent resolution. @NordFreak could you please provide the detail requested from @mib1185? In the next days I'll add some device and remove, for check the clean.

@NordFreak
Copy link

Sorry, the function is urgently needed, I have also integrated it again. For the moment, it works for me.

@jupppo
Copy link

jupppo commented Jan 11, 2024

I have the same problem. We have an appartment we rent via AirBnB and we have up to 5-6 guest a week. Every device is added via fritzbox tools. When removed from fritzbox they are still there and the entity and neither the devices cannot be deleted. So I end up with hunderts of entities in HA.
I can temporarily remove the integration. But I have one question: when re added, are my wanted devices in fritzbox tools are there as before? I am asking because quite some in automations.

@syntesys87
Copy link
Author

@mib1185 after some days of reconfiguration, I tried to clean without success. For example, the device named "astroll" is no more present on the Fritz list, but is already on HA instance.
Here attached the log.
home-assistant_fritz_2024-01-18T20-54-30.443Z.log

@mib1185
Copy link
Contributor

mib1185 commented Apr 3, 2024

@syntesys87 sorry for the late response - in your log i can see that the device "astroll" is still reported by the fritzbox, so there is (for this case) nothing we could do from HA side

@Alteraner
Copy link

I have the same issue. In the past i was able to use fritz.cleanup service, but since last update, this service is not avaliable any more. Pressing the CleanUp button on Fritzbox device in the HA does nothing. Did someone solve the issue meanwhile?

@simphide
Copy link

Same problem here

@syntesys87
Copy link
Author

Remove and readd the integration, I resolved doing that.

@Alteraner
Copy link

I did this as well, but it solve it for now, but any further changes coming in, are not reflected again in HA. Seams the sync is not working. Would love to get back fritz.cleanup service, so i can trigger that by automation.

@mib1185
Copy link
Contributor

mib1185 commented Jun 11, 2024

you can even trigger the cleanup button via an automation (the former cleanup service did the same internally)

@jupppo
Copy link

jupppo commented Jun 11, 2024

Sorry for the question, but wheren can I find: fritz.cleanup service ?

@mib1185
Copy link
Contributor

mib1185 commented Jun 15, 2024

the cleanup service has been removed in 2024.6 (see backward-incompatible-changes), you can use the button entities instead

@Alteraner
Copy link

I'm not sure, whether the button is doing the same as cleanup did before. As of my observation, the button triggers the Fritzbox "cleanup" button in network section which deletes all dynamic devices but keeps all the devices with individual configuration (e.G. fix IP or Internet Profile). This would be fine if by doing this, the HA Fritzbox Tools would although recognize, devices has been removed on the fritzbox, so i can delete it HA device list as well. But this does not. It's reported that fritzbox does not provide this entity or device any more, but stay's in HA. I would expect to have some kind of sync between Frithbox and HA. Although if i rename the device in Fritzbox, HA does not recognize this change and keep the old name.
I understand, that maybe there are some usecases where i want to keep the list of devices in HA, but since more or less all mobile phones have dynamic MAC adresses any time it reconect to WLan, i have hundreds of the same mobile phones in HA, allways the same, because the unique identifier is changing all days and HA always creates a new device.

@mib1185
Copy link
Contributor

mib1185 commented Jun 26, 2024

the former fritz.cleanup service called the same function in the code, as the button does - so yes, it is the same.

The only provided log files has been analysed in #106642 (comment) with result, it's not an HA issue

@shelvis
Copy link

shelvis commented Jul 25, 2024

Hi, I have the same problem. In Home Assistant, there are 76 devices at the moment. More, than in my Fritzbox. But they don't get removed, when pushing the cleanup-button.
I hope, the attached logs help in finding the issue.

config_entry-fritz-36e957dba4f1d17e8fa254dfc5748d51.json
home-assistant_2024-07-25T20-32-42.111Z.log

@zavjah
Copy link

zavjah commented Jul 29, 2024

Hello, I have the same problem. I just cleaned up my devices in my fritzbox and assigned them all static I addresses. There are only 36 known devices in the network overview in my fritzbox but 93 devices in the integration in HA. I used the button to clean up, pressed it several times, but only one devices was removed.

Is there any other way to clean up? What happens with the device_tracker names if I remove and install the integration again?

thx and cheers,
zavjah

@chemelli74
Copy link
Contributor

Are you considering also the device from the extenders ? Did you restart the Fritz in the case it's stuck on a old data as reply ?
Can you enable debug log and show the result of the cleanup in HA ?

@shelvis
Copy link

shelvis commented Jul 31, 2024

I do not have any extenders. Tried again after restarting Fritzbox. No changes. Devices are still not removed from HA.
Here are fresh logs and a screenshot which shows some of the devices, that are not part of Fritzbox's device list anymore.
Btw, I don't think, that it's an issue of the Fritzbox. The list in config_entry-fritz is correct. But that does not get recognized during cleanup.
config_entry-fritz-36e957dba4f1d17e8fa254dfc5748d51 (1).json
home-assistant_fritz_2024-07-31T06-56-13.976Z.log
image

(Edited the screenshot to remove my full name from it.)

@jupppo
Copy link

jupppo commented Jul 31, 2024

I have the same problem, but I have hundrets of devices, so not in the mood to remove every single one by hand.
I made the decision to uninstall fritzbox tool, but it is really not useable, when you have too much devices coming and going.

@zavjah
Copy link

zavjah commented Jul 31, 2024

Hel

Are you considering also the device from the extenders ? Did you restart the Fritz in the case it's stuck on a old data as reply ? Can you enable debug log and show the result of the cleanup in HA ?

Hello,

I do have extenders, but they are part of my mash network so network devices cannot be managed there. I removed all old devices from fritzbox leaving 37 devices. HA shows 93.

Pfa my Core logs, there is no entry fritz to select on the logs. Hope this is right:
home-assistant_2024-07-31T08-07-56.978Z.log

@mib1185
Copy link
Contributor

mib1185 commented Jul 31, 2024

@shelvis please provide screenshots from details of some of these devices which should not be present in HA anymore. if there are still some entities connected to these devices in HA, please provide the entity details from developer tools states tab

@shelvis
Copy link

shelvis commented Jul 31, 2024

Hi @mib1185 , I hope, this is what you requested
image
image
image

@mib1185
Copy link
Contributor

mib1185 commented Jul 31, 2024

@shelvis one further question - did you remove the device tracker entities only via the cleanup button/service or manually?

@shelvis
Copy link

shelvis commented Jul 31, 2024

I removed one or two devices completely before searching for an automated way to do it. But I did not remove entities without deleting the complete device.

@mib1185
Copy link
Contributor

mib1185 commented Jul 31, 2024

@shelvis the linked PR will fix this issue for new/future orphan devices, but not for already "empty" device entries. so you need to delete the orphan device entries by your own, as soon as this PR is merged and released.

@zavjah
Copy link

zavjah commented Jul 31, 2024

@shelvis the linked PR will fix this issue for new/future orphan devices, but not for already "empty" device entries. so you need to delete the orphan device entries by your own, as soon as this PR is merged and released.

How can orphan devices be manually deleted?

There is no delete button in my HA. This is how a orphan device looks like in my HA:
image
When I click on the pen in the right upper corner I get only Update or cancel, no delete

@mib1185
Copy link
Contributor

mib1185 commented Jul 31, 2024

The easiest way should be to remove and add the "AVM Fritz!Box Tools" integration again

@Smandurlo
Copy link

The easiest way should be to remove and add the "AVM Fritz!Box Tools" integration again

lol no! This way I have to re-do all the settings to track the device_tracker I want to track! That will be crazy! I have several devices registering into my guest wlan every week and I have an automation to clean the entities. I can't do it by hand!

@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 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.

10 participants