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

Airupnp: Delay before speakers appear in iOS AirPlay menus #176

Closed
pwt opened this issue Aug 7, 2019 · 18 comments
Closed

Airupnp: Delay before speakers appear in iOS AirPlay menus #176

pwt opened this issue Aug 7, 2019 · 18 comments

Comments

@pwt
Copy link
Contributor

pwt commented Aug 7, 2019

Hi Philippe:

Occasionally I'm seeing a significant delay (10-120s) before airupnp Sonos speakers appear in Apple AirPlay menus.

  • Seems only to affect iOS devices, not macOS
  • It's all or nothing: either I see all of the airupnp speakers, or none
  • It doesn't happen with 'native' Apple Airplay devices (AirPort Express, Apple TV, Sonos speakers with AirPlay 2)
  • Sometimes the iOS device needs to have its WiFi toggled to fix the issue
  • Bringing up the AirPlay menu on a different iOS device seems to 'kick' the device experiencing the delay into showing the Sonos speakers
  • Observed on multiple iOS devices
  • Observed in multiple households with different network equipment

I'm running the latest version of airupnp-arm on a Raspberry Pi under Raspbian.

This is a relatively minor usability wrinkle, but it would be nice to resolve it. Any idea what might be going on? I'm happy to help with debugging, etc., or code changes if I can get a hint of what needs to be changed.

Thanks!
Peter

@chisaipete
Copy link

chisaipete commented Aug 7, 2019

I see a similar effect with my Google home devices.

@philippe44
Copy link
Owner

I've seen that as well but I never found why. It's obviously linked to the mDNS discovery protocol, but I don't know how. What I'm broadcasting seems to be ignored by iOS devices from time to time. I've not found a way to reliably reproduce the issue

@pwt
Copy link
Contributor Author

pwt commented Aug 8, 2019

Thanks @philippe44. If I get time I'll have a poke around and see what I can find. So far, I've not found any kind of reproducer.

@pwt pwt changed the title Airupnp: Delay before Sonos speakers appear in iOS AirPlay menus Airupnp: Delay before speakers appear in iOS AirPlay menus Aug 19, 2019
@pwt
Copy link
Contributor Author

pwt commented Aug 19, 2019

Ok, in looking for differences between native AirPlay devices and UPnP, I found the following:

I have a number of native Sonos and non-Sonos AirPlay / AirPlay 2 devices, named as follows:

  • Kitchen
  • Rear Reception
  • Apple TV 52 RCR
  • Airport Express

In addition, I have some Sonos devices with which I use airupnp:

  • Study
  • Bedroom
  • Bedroom 2
  • Front Reception

If I inspect what's being broadcast, the native devices broadcast under _airplay._tcp and under _raop._tcp. However, the airupnp devices only broadcast under _raop._tcp.

screenshot_0753

screenshot_0754

Could this difference be causing the delay in speakers appearing?

@philippe44
Copy link
Owner

From what I've read, the _raop is the only one needed for AirPlay1. I think the problem you're seeing is due to a piece of your network filtering out mDNS packets because my mDNS packet might have a field that either allows that or not exactly well set, I don't know

@pwt
Copy link
Contributor Author

pwt commented Sep 1, 2019

Thanks @philippe44. Note that I've seen this in at least three different installations with quite different networking infrastructures. On the other hand, there are installations where the problem has not been seen, or at least not reported.

If you don't mind, I'd like to leave this issue open for now in case anyone has any ideas.

@pwt
Copy link
Contributor Author

pwt commented Nov 15, 2019

Just to note that I've seen fewer problems since the release of iOS 13.2. There is still occasionally a delay of up to ~60s for AirPlay targets to appear, but I haven't yet encountered an instance where it fails completely.

@philippe44 : Is there some variable that controls the frequency with which AirConnect announces the availability of the speakers on the network?

@jonathangreen
Copy link

Just wanted to note I've seen this as well. Nothing like the delays mentioned here, but my real airplay devices seem to always be listed in the menu as soon as I open it on my iPhone where the airupnp devices take 2 or 3 seconds to populate the menu. Not a huge deal, but I thought I would add that feedback as a datapoint.

@speby
Copy link

speby commented Nov 3, 2020

This issue is still relevant and probably should be re-opened. I see delays sometimes of around ~60 seconds or so as well. Not every time but most of the time. Other native AirPlay devices show up instantly every time.

@pwt
Copy link
Contributor Author

pwt commented Nov 3, 2020

Just to note that since the release of iOS 14, I've not seen delays of more than a couple of seconds before the airupnp targets appear, and it's usually less than that.

@speby
Copy link

speby commented Nov 3, 2020

@pwt I'm on macOS Catalina 10.15.7 and iOS 14 and I see the delays on both. Maybe there are other factors, network-related, that could contribute to this? In both cases, native AirPlay devices show up virtually instantly.

@speby
Copy link

speby commented Nov 3, 2020

@pwt Also if I restart the air connect app (or daemon if it is configured that way), they will show up right away for a period of time. Eventually, there will be the delay again.

@pwt
Copy link
Contributor Author

pwt commented Nov 3, 2020

I've never seen an issue with macOS on any of my Macs. As you allude, you may be bumping into some issue with your network, or perhaps with the platform on which AirConnect is running.

(For avoidance of doubt: I'm not saying the issue doesn't exist, just pointing out that it's not universal.)

@speby
Copy link

speby commented Nov 3, 2020

@pwt Totally agree. The cause is not immediately apparent, though, since native AirPlay devices appear to work universally well in broadcasting but something is different about non-native ones that are broadcast via air connect. I think more research is needed to understand why/what causes it.

@philippe44
Copy link
Owner

philippe44 commented Nov 3, 2020

the mDNS broadcast is a pretty hairy topic and trying to find out what happens when broadcasting through different repeaters and filters, as well a tweaking some ttl fields is really complicated. Knowing that it does not seem to be a major issue for a vast amount of people, it's difficult for me to spend time on that.

@speby
Copy link

speby commented Nov 3, 2020

@philippe44 No worries. I'm not suggesting a particular person look into this. I might do it myself if I get some time.

@pwt
Copy link
Contributor Author

pwt commented Nov 18, 2020

Just another datapoint on this: with iOS / iPadOS 14.2, Apple has revamped the the AirPlay control, and I no longer see any delays in airupnp targets appearing relative to native AirPlay devices on the network.

@eizedev
Copy link

eizedev commented Nov 18, 2020

I can confirm what @pwt says. After Update to iOS 14.2 the delay is practically no longer present (sometimes maximum 1-2 seconds after the native AirPlay devices appear)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants