mikebrady / shairport-sync

AirPlay and AirPlay 2 audio player
Other
7.2k stars 571 forks source link

4.0-dev-312 - No audio when using HomePod as source #1269

Closed bloomkd46 closed 2 years ago

bloomkd46 commented 3 years ago

Hello, I have been streaming music from my phone the my pi via Apple Music with no problem, however when I try to do it from a HomePod it will fail to connect. it works fine if I play from my phone the the HomePod and pi but not from the HomePod to pi. The following shows up afterwards when I run systemctl status shairport-sync:

pi@RPI3:~ $ systemctl status shairport-sync
● shairport-sync.service - Shairport Sync - AirPlay Audio Receiver
   Loaded: loaded (/lib/systemd/system/shairport-sync.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2021-08-17 20:08:29 BST; 22min ago
 Main PID: 694 (shairport-sync)
    Tasks: 12 (limit: 2059)
   CGroup: /system.slice/shairport-sync.service
           └─694 /usr/local/bin/shairport-sync

Aug 17 20:22:19 RPI3 shairport-sync[694]: warning: Unrecognised SETUP incoming message -- ignored.
Aug 17 20:22:19 RPI3 shairport-sync[694]: warning: Unrecognised SETUP incoming message -- ignored.
Aug 17 20:22:19 RPI3 shairport-sync[694]: warning: Unrecognised SETUP incoming message -- ignored.
Aug 17 20:22:20 RPI3 shairport-sync[694]: warning: Unrecognised SETUP incoming message -- ignored.
Aug 17 20:22:20 RPI3 shairport-sync[694]: warning: Unrecognised SETUP incoming message -- ignored.
Aug 17 20:22:20 RPI3 shairport-sync[694]: warning: Unrecognised SETUP incoming message -- ignored.
Aug 17 20:22:58 RPI3 shairport-sync[694]: warning: Unrecognised SETUP incoming message -- ignored.
Aug 17 20:22:59 RPI3 shairport-sync[694]: warning: Unrecognised SETUP incoming message -- ignored.
Aug 17 20:22:59 RPI3 shairport-sync[694]: warning: Unrecognised SETUP incoming message -- ignored.
Aug 17 20:23:00 RPI3 shairport-sync[694]: warning: Unrecognised SETUP incoming message -- ignored.

PS could you also make it so that it will show up in HomeKit as playing when it is playing, as mentioned in issue #1247 could you also add the artwork since the .conf file already has the option to temporarily cache it?

bloomkd46 commented 3 years ago

I tested further and it works with Apple TV's just not HomePods

charlesomer commented 3 years ago

Hi, unfortunately as you've discovered those features aren't currently available: https://github.com/mikebrady/shairport-sync/blob/development/AIRPLAY2.md

It's interesting you say it works with Apple TV though - I'm not sure if this is expected or not. It was my understanding that the behaviour was the same as a HomePod but I could be wrong, someone else may know better

bloomkd46 commented 3 years ago

it kept disconnecting if no audio was playing, but that was must likely because my active state timeout was 10 seconds

mikebrady commented 3 years ago

Thanks for your posts. Would you be kind enough to post the version string please? You can get it by entering $ shairport-sync -V (Note it’s an uppercase ‘V’.)

bloomkd46 commented 3 years ago

Here it is:

4.0-dev-312-g687fd167-AirPlay2-OpenSSL-Avahi-ALSA-soxr-metadata-dbus-sysconfdir:/ etc 
mikebrady commented 3 years ago

Many thanks. Unfortunately, we do not have access to a HomePod -- a HomePod mini: yes, an original HomePod: no.

Out of curiosity, if you could set the log_verbosity to 1 in the diagnostics stanza at the end of the configuration file (remember to uncomment the relevant lines and to restart Shairport Sync afterwards), a message with some more information will be logged which you can access using journalctl. If you could do that and post the response, it would be appreciated.

mikebrady commented 3 years ago

Again as just a matter of curiosity, a slightly odd thing is that the tag in your version string is 8 digits long (g687fd167), but is 7 by default (g687fd16). Is that something you have set in your environment? Thanks.

[Update] It's okay -- the number of digits used by git is now dynamically estimated.

bloomkd46 commented 3 years ago

so I tried connecting HomePods to it and they never fully connected, the systemctl status shairport-sync shows nothing about it and the journalctl is filed with the kernel user.

bloomkd46 commented 3 years ago

I was playing around with it some more and there is nothing showing up in the logs because it is working! however it is behaving like my Mac running Montgomery beta where it will say that it isn't playing audio on the target device even if it is, however it is much easier to disconnect thanks to HomeKit. unfortunately you can't add Macs to HomeKit (Yet) so it is a pain to disconnect since it docent even show that it is connected.

bloomkd46 commented 3 years ago

I take that back… if you are streaming from a HomePod HomeKit will not display what's playing on the speaker. the audio still plays though.

mikebrady commented 3 years ago

Thanks for the update. Yeah, we know it plays but doesn’t show up as connected. We have a lot to figure out still 😊.

tmolinos commented 3 years ago

I've just tried telling my home pod's SIRI to play something on my old stereo (connected with Sharesync via RPi Zero and a DAC Hat), and it started playing correctly! It was great. It was playing low so I asked SIRI to raise the volume, and that was a no go. SIRI talked back saying there was problem controlling the volume. I've updated my HomePod to version 15 today. Still working :)

mikebrady commented 3 years ago

Just pushed an update to the development branch which should improve this. If you got a chance to try it and report back, that would be cool.

tmolinos commented 2 years ago

Hi! Just to let you know that I was testing the latest dev version today and it's incredible. I was able to:

To control volume you have to specify which device you want to control, like, "Hey SIRI, lower the volume on the Old Stereo".

Thank you so much for this! And all this with a very cheap RPI zero W. I even have SOX enabled... (at least I included it while compiling). Maybe along the road I'll upgrade to the new zero W 2...

mikebrady commented 2 years ago

Thanks for the update!

ytzeng1 commented 2 years ago

Hi! Just to let you know that I was testing the latest dev version today and it's incredible. I was able to:

  • play from Apple TV, control volume from Apple TV remote;
  • play from HomePod, control volume from SIRI. You cannot control volume from the +- signs on the HomePod as it stops music and start playing directly in the HomePod.
  • transfer audio from Apple TV to shairport, and back to HomePod.

To control volume you have to specify which device you want to control, like, "Hey SIRI, lower the volume on the Old Stereo".

Thank you so much for this! And all this with a very cheap RPI zero W. I even have SOX enabled... (at least I included it while compiling). Maybe along the road I'll upgrade to the new zero W 2...

@tmolinos Do you need any prior setup (e.g. add speaker to homekit) to make this work? What I want to achieve is to ask homepod mini to play music on shairport-sync. Thanks!

leo150 commented 2 years ago

Having the same question. Siri always plays on the HomePod mini no matter what room I specify. It only moves the music to shairport if I start to play on the HomePod and then ask to transfer "please transfer music to the kitchen" where the shairport is.

github-actions[bot] commented 2 years ago

This issue has been inactive for 45 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.