pyatv icon indicating copy to clipboard operation
pyatv copied to clipboard

Beta 1.9.1 Showing Duplicates on Discovery

Open Colorado4Wheeler opened this issue 3 years ago • 3 comments

Describe the bug

I just installed the beta via custom repository for HACS and everything seems to be working so far, however for many devices (not all of them, but most Apple TV's) I'm getting duplicates on discovery. For instance, I show two Office Apple TV's, I configured one of them and it works fine, but the other is still showing as 'discovered'. I can ignore it and not worry about it but thought I should post here.

Error log

<place log here>

How to reproduce the bug?

Allow fresh install of the Apple TV integration to discover devices.

What is expected behavior?

A single instance of each found device.

Operating System

HASSOS

Python

3.9

pyatv

Unknown

Device

Apple TV 4

Additional context

HASS: core-2021.11.5

In the screen shot you can see two instances of my wife's Apple TV and one of my Office HomePod mini, the HomePod was already set up and is working fine so it shouldn't be showing here at all. Also, I've noticed that the TVOS 14 all work great, but her TVOS 15.1 don't show anything on the media cards in Lovelace (however, another TVOS 15.1 does work). I configured my wife's Apple TV and she was playing Netflix, nothing shows or even acknowledges that the AppleTV is on, so I removed her integration and added the second (duplicate) integration and got the same results, nothing showing on the card and the media player entity shows as "Idle".

Screen Shot 2021-11-29 at 3 05 03 PM

Colorado4Wheeler avatar Nov 29 '21 22:11 Colorado4Wheeler

Man, these duplicate things are really annoying as I have no idea why they appear nor how to fix them. I might have to add additional logging for discovery, I'll see if I can get around doing that within the next few days so we can gather some logs.

Regarding devices not reporting state, please check the log if there's anything there. Otherwise enable additional logging (instructions are in the hass-atv-beta repo).

postlund avatar Dec 02 '21 10:12 postlund

I think this is fixed by https://github.com/home-assistant/core/pull/61973. Will sync changes back from core to beta repo soon so you can test it out.

postlund avatar Dec 16 '21 13:12 postlund

I just released 2.2.0 which contains the changes in core, can you try it out and report back if the problem seems to be resolved?

postlund avatar Dec 17 '21 07:12 postlund

Please remove beta version if you are still using that and use the stock version, it will work a lot better.

postlund avatar Jul 13 '23 08:07 postlund