music-assistant / hass-music-assistant

Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players.
Apache License 2.0
1.2k stars 44 forks source link

Unable to play music to RoPiee Airplay player #2341

Closed kcossabo closed 2 days ago

kcossabo commented 1 month ago

What version of Music Assistant has the issue?

2.0.4

What version of the Home Assistant Integration have you got installed?

not found might be the issue

Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

The problem

I started the install from https://www.home-assistant.io/blog/2024/05/09/music-assistant-2/

Clicked on the 'show add-on' - https://my.home-assistant.io/redirect/supervisor_addon?addon=d5369777_music_assistant&repository_url=https%3A%2F%2Fgithub.com%2Fmusic-assistant%2Fhome-assistant-addon

This did the install

I added my files via SMB and MA sees the music

I added AirPlay and MA sees my speakers

I can not play anything, nothing actually plays.

Select a speaker, see music in the queue, but the play button does nothing.

Log showing

`2024-05-21 08:25:26.613 WARNING (MainThread) [music_assistant.players] Ignoring command cmd_volume_set for unavailable player ap9c760e8978bc 2024-05-21 08:25:27.609 DEBUG (MainThread) [music_assistant.helpers.process.ffmpeg_image] Process ffmpeg_image started with PID 528 2024-05-21 08:25:27.624 DEBUG (MainThread) [music_assistant.helpers.process.ffmpeg_image] Process ffmpeg_image started with PID 529 2024-05-21 08:25:28.670 DEBUG (MainThread) [music_assistant.helpers.process.ffmpeg_image] Process ffmpeg_image with PID 528 stopped with returncode 0 2024-05-21 08:25:28.729 DEBUG (MainThread) [music_assistant.helpers.process.ffmpeg_image] Process ffmpeg_image with PID 529 stopped with returncode 0 2024-05-21 08:25:30.009 DEBUG (MainThread) [music_assistant.webserver] Handling command player_queues/play_pause 2024-05-21 08:25:30.015 ERROR (MainThread) [music_assistant.webserver] Error handling message: CommandMessage(message_id=53, command='player_queues/play_pause', args={'queue_id': 'ap9c760e8978bc'}) Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/music_assistant/server/controllers/webserver.py", line 351, in _run_handler result = await result ^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/music_assistant/server/controllers/player_queues.py", line 601, in play_pause if self._queues[queue_id].state == PlayerState.PLAYING:


KeyError: 'ap9c760e8978bc'`

the 'error' occured when I tried to play from the Mac Studio I am on as an output.

### How to reproduce

no idea.

Is there suppose to be a HACS integration, beyond the addon? not sure how to get that if there is.

I also installed the unRAID App / Docker version. Same issues, except the Mac Studio will play music, the Airplay do not.

### Music Providers

Local Files

### Player Providers

Juke AMP

### Full log output

[d5369777_music_assistant_2024-05-21T12-41-59.119Z.log](https://github.com/music-assistant/hass-music-assistant/files/15389953/d5369777_music_assistant_2024-05-21T12-41-59.119Z.log)

### Additional information

_No response_

### What version of Home Assistant Core are your running

2024.5.4

### What type of installation are you running?

Home Assistant OS

### On what type of hardware are you running?

Raspberry Pi
OzGav commented 1 month ago

You you tried adding the snapcast provider and playing to a browser tab?

edit: also please review the requirements for submitting these reports. You haven't attached the full log and the log excerpt you have attached is at debug level. We also ask that you list what you have tried from the troubleshooting page that hasn't helped otherwise we just back and forward asking the same questions all the time,

kcossabo commented 1 month ago

You you tried adding the snapcast provider and playing to a browser tab?

Not sure what a 'snapcast' is but will look into this.

edit: also please review the requirements for submitting these reports. You haven't attached the full log and the log excerpt you have attached is at debug level.

I attached - d5369777_music_assistant_2024-05-21T12-41-59.119Z.log

Which was generated from Home Assistant, Settings, logs, Music Assistant. What is the issue, you want a lower level of logging on that? I know that the embedded log is a snap, I provided that as a flow of the discussion, but included, what I assume is being asked.

We also ask that you list what you have tried from the troubleshooting page that hasn't helped otherwise we just back and forward asking the same questions all the time,

I have HIT THE PLAY BUTTON, not sure what else I can do. I posted the install steps, and I hit play with nothing happening. I installed a DOCKER version. Those are the steps I took.

I will review the instructions once again, but I do not see trouble shooting steps.

I am sure this is a user error, but the instructions do not help me resolve what should have been a simple

1 - Push web button to install 2 - add Music via SMB mount 3 - add Airplay 4 - hit play

Open to trouble shooting, but logs give no errors, web interface gives no errors, excluding de-installing, not sure what else I can do.

kcossabo commented 1 month ago

With Respect To 'snapcast' I have never used it so not sure what to expect, but, I believe it is not working.

image

then for the players there is no new player

image

there are two Mac's machine names, and they do not play music.

OzGav commented 1 month ago

What is the issue, you want a lower level of logging on that?

No we want you to follow the instructions.

Please DOWNLOAD then DRAG and DROP the full log output from MA SETTINGS>>CORE into the field below. Please do NOT use debug logging unless asked to do so.

I appreciate you haven’t used Snapcast before so from the docs

Clients are created by pointing a browser or Snapdroid at :1780. The browser tab must remain open to maintain the stream.

Going back to the troubleshooting docs go through the page and then write here what was suggested and why you think it isn’t relevant or didn’t work. For example, most of these problems are network related so just list why you think your network setup isn’t contributing.

And just to expand your steps

1 - Push web button to install 2 - add Music via SMB mount 3 - add Airplay 3A - select a player from the player list 4 - hit play

kcossabo commented 1 month ago

OkI am out tomorrow and will attempt to better get you what is needed. Thank You for the help. WRT the network it is a 48 port 1GE PoE switch connected to a 24 port 1/10GE PoE switchAll clients are in VLAN 40, and as AirPlay is a MDNS service I would have assumed seeing the speakers would prove the raspberry pi is in the same broadcast domain?What other network issues should I look for? It should present as a single 10.10.0.0/16 network. Sorry about the log levels I assumed when debugging people would want all the information. Will have sometime to work this on Thursday. Thank You again. Sent from my iPhoneOn May 21, 2024, at 7:46 PM, OzGav @.***> wrote:

What is the issue, you want a lower level of logging on that?

No we want you to follow the instructions.

Please DOWNLOAD then DRAG and DROP the full log output from MA SETTINGS>>CORE into the field below. Please do NOT use debug logging unless asked to do so.

I appreciate you haven’t used Snapcast before so from the docs

Clients are created by pointing a browser or Snapdroid at :1780. The browser tab must remain open to maintain the stream.

Going back to the troubleshooting docs go through the page and then write here what was suggested and why you think it isn’t relevant or didn’t work. For example, most of these problems are network related so just list why you think your network setup isn’t contributing.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

OzGav commented 1 month ago

Yes make sure that MA and all clients are in the same subnet. We have seen situations where some data gets through and not others. Firewall rules also have blocked access in the past.

kcossabo commented 1 month ago

I may just need to delete this and try something else.

"Full log output Please DOWNLOAD then DRAG and DROP the full log output from MA SETTINGS>>CORE into the field below. Please do NOT use debug logging unless asked to do so."

log.txt

With Respect To the 'trouble shooting page" Here is as much detail as I can give;


Probably the most common issue is people trying to run MA with complicated network setups. Running behind VPNs, across subnets or VLANs, ....

Not my issue same VLAN

There are settings available in MA SETTINGS>>CORE>>STREAMSERVER>>CONFIGURE>>ADVANCED that might help you if you have complicated setups. I....

I am not "If you are running MA in your own docker container "

Most players are discovered using mDNS (broadcast) so if your players do not get discovered it means that your network is blocking that traffic (e.g. IGMP or multicast snooping or filtering).....

Players are being discovered

Make sure the HA internal url is set correctly. HA SETTINGS>>SYSTEM>>NETWORK>>Home Assistant URL>>Local network (set to automatic or use your internal HA IP). If it is automatic you can try changing it to http://your.internal.ip:8123/](http://your.internal.ip:8123/)

Set to http://10.10.0.20:8123/ IP of HA is 10.10.0.20, and MA is set to this in MA->Settings-> core -> Streemserver

MA streams at high quality which may max out poor network connections. If possible use wired connections for MA players. Input codec is not always the same as the output codec (which is FLAC)....

HA is on a 1GE Wired Connection, the Player is on a 1GE Wired connection both in same VLAN, no Wifi involved.

Check the physical device settings. There have been numerous reports where the issue was actually a setting external to MA such as receivers set to repeat tracks or ESP devices with incorrect arguments passed on install.

All device work with

They do NOT WORK with this app (Airplay)

Ensure local files are tagged properly.

All files are tagged correctly and work with

Review the applicable player or music provider documentation to see if there are known issues or specific troubleshooting steps or fixes.

All device work with

Try power cycling the physical player(s) if they won't connect or if there is no sound.

Done, no effect, except interruption of other services that were working fine.

If after an update something isn't working then trying clearing the cache MA SETTINGS>>CORE>>CACHE CONTROLLER>>CONFIGURE>>CLEAR CACHE. If that doesn't fix it then check the GitHub Issues and Discord to see if it is a known problem. If not try restarting MA, try restarting HA, and try a full HOST REBOOT (in that order). If it is an integration problem then trying removing it from HA settings and HACS then restart HA then reinstall.

AirPlay has not worked at all

Before you raise an issue read this first. Report issues using the template with as much detail as possible. Often posts aren't clear about exactly what is typed where, how something is configured or what series of menus are selected. Screenshots can be helpful. DOWNLOAD and ATTACH complete logs from MA settings>>CORE. You can also look in the Browser console when you have front end issues which in Chrome browser is --> F12 for developer tools --> console. Please include the following in ALL reports:

Trying to do this, but starting to feel it is not worth the effort.

- What music provider is in use when the problem is observed? What other music providers have you tried (if you have no others then make that clear)

Local Files

- What player provider is in use when the problem is observed? What other player providers have you tried (if you have no others then make that clear)

ALL AIRPLAY devices, AppleTV Juke Amp

- Are the players grouped?

NO

- How is playback being instigated (e.g. automation or via the UI)

UI

- If you aren't using HAOS then exactly how you have installed MA

PLEASE see above, detailed this before

- What is working (e.g. player works with music provider X but not Y)

Though I still have not figured out "Snapcast" I did convert one of the inputs on the JukeAmp to UPnP/DLNA and that does work. AirPlay does not

- What you have tried from this page that hasn't helped

NO COMMENT


Please NOTE

This will work to DLNA but not AIRPLAY, where EVERY OTHER solution (excluding Roon's latest software update that is a bug on ROON) plays to the AIRPLAY devices.

OzGav commented 1 month ago

Ok so sounds like it is an Airplay problem. Have you tried with encryptions on and off? Have you tried with compression on and off?

OzGav commented 1 month ago

We will close this soon if there is no follow-up

kcossabo commented 1 month ago

FineI can not fix the AirPlay issue. You do not want more longs. Not sure how I can resolve this. Sent from my iPhoneOn May 26, 2024, at 8:52 AM, OzGav @.***> wrote: We will close this soon if there is no follow-up

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

OzGav commented 1 month ago

You haven’t advised if you have tried encryption on and off ?

kcossabo commented 1 month ago

Not sure how that did not get updated.I tried Encryption and Compression on / off, each combination and permutation. Fist setting it, then saving testing repeating through the combinations, then repeating each combination, saving and restarting the service.No effect. I also removed the addon, and re-did the install no change.I added two DLNA endpoints, that are on the same subnet but on wireless not wired (all testing to this point is wired) and MA has not scene them through autodiscovery.I have Wire Shark Traces of HA to the Amp of Airplay attempts if you wish them. I can see there is traffic when I attempt to play airplay.Sent from my iPadOn May 26, 2024, at 6:28 PM, OzGav @.***> wrote: You haven’t advised if you have tried encryption on and off ?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

OzGav commented 1 month ago

Now that you are advising DLNA is not being discovered this is starting to sound like a network problem. People in the past have identified network rules and router settings that have adversely affected the discovery and playback process.

kcossabo commented 1 month ago

Once again, it does discover a DNLA host 100% time. I agree with the WiFi, but the wired DNLA is working 100% discovered.I probably should not have mentioned the WiFi as there are many variables here. The host/speaker is a RoPiee that I have been using with Roon 100% Solid, which also needs to be in the same broadcast domain.Roon - 2 host of RoPiee - 100%Turned on DLNA (never ever tried or used this on the RoPiee before) to have test points. At THIS TIME I can not see them, but, I have no idea if it is the RoPiee or the MA.I totally respect you position you keep going back to the network. I have been at this long enough to not rule it out, thus, I have a wireshark trace if you want it, but as a Cisco System Engineer for 25 years of doing networking, I can not see why this VLAN on Meraki Switches, would have a ‘router’ issue. There is NO LAYER 3 involved all hosts are in the same broadcast domain. Now, WiFi is tricky with mDNS and thus most of the testing is WIRED to remove and mDNS to wifi issues.I will post results, but please to keep it simpleHA———VLAN40——-JukeAMP(DLNA)HA———VLAN40——-JukeAMP(AIRPLAY)JukeAMP has 4 inputs that can be defined. MA sees DLNA but not AIRPLAY. There is not a mDNS issue as the Airplay discovery is working. ,From my novice looking at the wireshark trace there is requests to the JukeAMP and the protocol is just not starting. I was hopeful on the compression as I see in the decodes GZIP which I assumes was a compression request, but I would rather not become a protocol expert on AIRPLAY, I just want to listen to music, and if DLNA would work I am good. DLNA works on the Juke, so now trying to find DLNA Pi hosts to send the music to./KevinSent from my iPadOn May 27, 2024, at 8:02 AM, OzGav @.***> wrote: Now that you are advising DLNA is not being discovered this is starting to sound like a network problem. People in the past have identified network rules and router settings that have adversely affected the discovery and playback process.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

OzGav commented 1 month ago

OK thanks. Advising that you are using a RoPiee is helpful as Marcel can probably flash that up and see whether there is an incompatability. This will get looked at in due course.

kcossabo commented 1 month ago

May 27, 2024 10:36:47 AM update

VLAN 40 - 10.10.0.0/16

What works

HA/MA ------JukeAmp(DLNA) wired HA/MA ------ NAD M33 Amp (AirPlay) wired HA/MA ------ Amplifier RX-A780 (AirPlay) wired HA/MA ------ RoPieee-MA8900 (airPlay) wired HA/MA ------ RoPieee-Bedroom (airplay) wireless

What Does not work (Discovered, can not stream)

HA/MA ------JukeAmp(AirPlay) wired HA/MA ------ Apple HomePod (AirPlay) wireless HA/MA ------ RoPieee-MA8900 (DLNA) wired

What is not discovered but configured

RoPieee-MA8900 (airPlay) worked, but I could not see it on DLNA. Disabled Airplay on the RoPieee-MA8900, now only DLNA service, configured MA for DLNA Service only. MA Can not see the streamer. In summary, the same Pi, Same RoPiee software, can be seen as Airplay, and it works, does not work, and not discovered for DLNA.

Airplay Failures present the same, the endpoint is discovered, when a file is attempted to play the play never starts.

On May 27, 2024, at 9:30 AM, OzGav @.***> wrote:

OK thanks. Advising that you are using a RoPiee is helpful as Marcel can probably flash that up and see whether there is an incompatability. This will get looked at in due course.

— Reply to this email directly, view it on GitHub https://github.com/music-assistant/hass-music-assistant/issues/2341#issuecomment-2133491566, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABP2BSG2UOIS3JPXISNF2C3ZEMYORAVCNFSM6AAAAABIBRFWTCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZTGQ4TCNJWGY. You are receiving this because you authored the thread.

kcossabo commented 1 month ago

May 27, 2024 10:36:47 AM updated at May 27, 202412:23:58 PM

I went to the main HA Integration page and HA sees - RoPieee-MA8900 (DLNA) - RoPieee-Bedroom(DLNA) MA does NOT See them but HA has them as integrations that I configured to an AREA. HA also sees the JukeAmp(DLNA) as does MA. I have Media Renderers (HA Term)/ Players (MA Term) that work, and fail in opposite manors. 1) JukeAmp, AirPlay does not work but DNLA works 2) PoPieee, DNLA does not work, but AirPlay Does Work Also all airplay devices work when streamed from an iPad, iPhone or Mac. — minor edit to network devices below — VLAN 40 - 10.10.0.0/16 - 10.10.0.20 - HomeAssistant - port 25 Switch 1, VLAN 40 - 10.10.0.41 - NAD M33 Amp - Port 10 of Switch 2, connecting port 1 to 47 to switch 2 VLAN40 - 10.10.10.13 - JukeAmp - Port 10 Switch 1, VLAN 40 - 10.10.10.31 - RoPieee-Bedroom - MR46E - Port 23 Switch 3 -connection on Aggregation 0 - Switch 1 - 10.10.102.38 - RoPieee-MA8900 - Port 6 Switch 2 -connecting port 1 to 47 to switch 2 VLAN40 - 10.10.100.24 - Amplifier RX-A780 - Port 22 Switch 2 - connecting port 1 to 47 to switch 2 VLAN40 - 10.10.101.91 - Apple HomePod - MR46E - Port 23 Switch 3 -connection on Aggregation 0 - Switch 1 What works HA/MA ------JukeAmp(DLNA) wired HA/MA ------ NAD M33 Amp (AirPlay) wired HA/MA ------ Amplifier RX-A780 (AirPlay) wired HA/MA ------ RoPieee-MA8900 (airPlay) wired HA/MA ------ RoPieee-Bedroom (airplay) wireless What Does not work (Discovered, can not stream) HA/MA ------JukeAmp(AirPlay) wired HA/MA ------ Apple HomePod (AirPlay) wireless HA/MA ------ RoPieee-MA8900 (DLNA) wired What is not discovered but configured - RoPiee endpoints (both wired and wireless) RoPieee-MA8900 (airPlay) worked, but I could not see it on DLNA. Disabled Airplay on the RoPieee-MA8900, now only DLNA service, configured MA for DLNA Service only. MA Can not see the streamer. In summary, the same Pi, Same RoPiee software, can be seen as Airplay, and it works, does not work, and not discovered for DLNA. Airplay Failures present the same, the endpoint is discovered, when a file is attempted to play the play never starts. > On May 27, 2024, at 9:30 AM, OzGav ***@***.***> wrote: > > > OK thanks. Advising that you are using a RoPiee is helpful as Marcel can probably flash that up and see whether there is an incompatability. This will get looked at in due course. > > — > Reply to this email directly, view it on GitHub , or unsubscribe . > You are receiving this because you authored the thread. >
OzGav commented 2 weeks ago

Just wanted to say this hasn’t been forgotten. What I can add is only players that support Airplay 1 will work. Additionally, DLNA isn’t great from a standardisation perspective so we have seen problems in the past where some devices work and some don’t. If you get any more useful info please add it otherwise your patience is requested.

kcossabo commented 2 weeks ago

Thank You for the update. I have a mixture of Airplay and DLNA to make everything work, so not urgent.Thank You for the great product.Sent from my iPadOn Jun 12, 2024, at 10:02 PM, OzGav @.***> wrote: Just wanted to say this hasn’t been forgotten. What I can add is only players that support Airplay 1 will work. Additionally, DLNA isn’t great from a standardisation perspective so we have seen problems in the past where some devices work and some don’t. If you get any more useful info please add it otherwise your patience is requested.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

marcelveldt commented 2 weeks ago

Please test this again with version 2.0.6 that has been released yesterday as we found something that could be a cause for no audio on airplay (just do make sure to enable the encryption option still).

OzGav commented 2 days ago

Closing due no follow up