postlund / pyatv

A client library for Apple TV and AirPlay devices
https://pyatv.dev
MIT License
839 stars 91 forks source link

Redundant pyatv devices in Apple TV Settings #2197

Open hooliowobbits opened 9 months ago

hooliowobbits commented 9 months ago

What do you need help with?

When working on #2192 it became apparent that on the Apple TV side there now are many many duplicate/redundant pyatv devices in under Settings > Remotes and Devices > Remote App and Devices.

Perhaps if there is already a registered pyatv remote the pyatv could replace an existing one? or name itself with a unique identifier (or a date added string?) so that any others can be manually identified and removed.

I haven't deleted mine because there are like 30, but from what i can see it doesn't seem to effect anything. There may be a ceiling to the total number of devices so someone running the wizard over and over may eventually reach it and then not be able to add anymore.

postlund commented 9 months ago

Yeah, every time you pair pyatv will generate new credentials and appear as a new device on the Apple TV. The name is only for convenience (so you know what devices you have paired), but the credentials are what is actually stored on the device. It's not possible for pyatv to know what devices that are paired with an Apple TV, thus its is not possible to replace any existing device. You can simply remove all devices and pair again to get rid of them. It is the only way I'm afraid.

You can change the name that appear with --remote-name when pairing or changing the info.name setting with atvremote -s <ip> change_setting=info.name,name.