pyatv icon indicating copy to clipboard operation
pyatv copied to clipboard

some discovered devices cannot be ignored

Open jnewland opened this issue 2 years ago • 9 comments

Describe the bug

Using the latest code from https://github.com/postlund/hass-atv-beta, I observe that some newly-supported devices appear in Home Assistant auto-discovery without an ignore link:

image

This device is a Sonos "Room". I've successfully ignored other Sonos devices, but am not able to ignore this one for some reason.

Error log

No response

How to reproduce the bug?

Install https://github.com/postlund/hass-atv-beta, add Sonos device to network.

What is expected behavior?

Ignore link should appear on all discovered devices

Operating System

Linux

Python

3.8

pyatv

0.9.6

Device

Sonos Arc + Two SLs configured as a group

Additional context

Device is on different subnet yet MDNS packets are being relayed by my router's MDNS repeater functionality, discovery may be adversely affected by that.

jnewland avatar Nov 08 '21 13:11 jnewland

I get this too. Both my Sonos, my HomePod mini and my MacBook Pro all show up and not able to be ignored or dismissed.

Stuke00 avatar Nov 11 '21 20:11 Stuke00

This is a bit strange as it suggests that devices were found without a proper unique id (I guess). Do you also have your device on a separate VLAN @Stuke00?

postlund avatar Nov 15 '21 05:11 postlund

I do not have a separate VLAN. They are on the same network as home assistant.

Sent from my iPhone

On Nov 14, 2021, at 11:25 PM, Pierre Ståhl @.***> wrote:

 This is a bit strange as it suggests that devices were found without a proper unique id (I guess). Do you also have your device on a separate VLAN @Stuke00?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Stuke00 avatar Nov 15 '21 13:11 Stuke00

It would help me a lot of if anyone of you could drop the output of atvremote --debug scan here. I would like to look at the zeroconf output.

postlund avatar Nov 26 '21 09:11 postlund

Here's scan output for a Sonos Move that's currently appearing without an ignore link:

2021-11-27 02:21:34 DEBUG [pyatv.core.scan]: Auto-discovered move at 192.168.4.81:7000 via Protocol.AirPlay ({'acl': '0', 'deviceid': '48:A6:B8:EE:98:16', 'features': '0x445F8A00,0x1C340', 'rsf': '0x0', 'fv': 'p20.66.4-23090', 'flags': '0x4', 'model': 'Move', 'manufacturer': 'Sonos', 'serialnumber': '48-A6-B8-EE-98-16:1', 'protovers': '1.1', 'srcvers': '366.0', 'pi': '48:A6:B8:EE:98:16', 'gid': '48:A6:B8:EE:98:16', 'gcgl': '0', 'pk': 'da7c49e05e67cfea4f5974f73be448a670a8cc44138fe616bde1199a7a182c44'})
2021-11-27 02:21:34 DEBUG [pyatv.core.scan]: Auto-discovered 48A6B8EE9816@move at 192.168.4.81:7000 via Protocol.RAOP ({'cn': '0,1', 'da': 'true', 'et': '0,4', 'ft': '0x445F8A00,0x1C340', 'fv': 'p20.66.4-23090', 'md': '0,1,2', 'am': 'Move', 'sf': '0x4', 'tp': 'UDP', 'vn': '65537', 'vs': '366.0', 'pk': 'da7c49e05e67cfea4f5974f73be448a670a8cc44138fe616bde1199a7a182c44'})
Scan Results
========================================
       Name: move
   Model/SW: Move, Unknown OS
    Address: 192.168.4.81
        MAC: 48:A6:B8:EE:98:16
 Deep Sleep: True
Identifiers:
 - 48:A6:B8:EE:98:16
 - 48A6B8EE9816
Services:
 - Protocol: AirPlay, Port: 7000, Credentials: None, Requires Password: False, Password: None, Pairing: Mandatory
 - Protocol: RAOP, Port: 7000, Credentials: None, Requires Password: False, Password: None, Pairing: NotNeeded

jnewland avatar Nov 27 '21 02:11 jnewland

I can't see anything strange there. If I prepare a branch with additional log points, can you try it out for me and report the result back?

postlund avatar Dec 02 '21 11:12 postlund

If I prepare a branch with additional log points, can you try it out for me and report the result back?

Yes, happily!

However, I haven't seen any new devices appear without an ignore link in since I've been able to either pair or ignore all of my devices. This maps with my previous experience of seeing a different set of discovered devices appear at different times (with and without ignore links) during the past several weeks. Frequently, the devices I observed didn't didn't in the results of a scan run at the same time.

I'd be curious to run the branch even without any active impact: I am happy to pair/un-pair devices in the course of testing etc.

jnewland avatar Dec 02 '21 14:12 jnewland

There have been a few updates to the integration as I'm merging stuff into core. Some things are still left to sort out, but I will merge back soon and hopefully this problem will go away.

postlund avatar Dec 16 '21 13:12 postlund

I just release 2.2.0, please try that out and let me know if it seems to resolve the issue.

postlund avatar Dec 17 '21 07:12 postlund

I believe this is fixed nowadays, just let me know if you have any additional problems!

postlund avatar Jul 11 '23 09:07 postlund