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.32k stars 48 forks source link

Casting using Chromecast to JBL BoomBox 3 WiFi plays for a few seconds and stops with an error #2951

Open techadrian opened 1 week ago

techadrian commented 1 week ago

What version of Music Assistant has the issue?

stable,beta

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

2024.7.1

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

The problem

Casting to JBL Boombox 3 Wi-Fi stops after a few seconds, then speaker looks disconnected in the web interface. Any other casting application to that speaker eq Youtube Music on Android, Spotify on Android, Youtube Music on Desktop, Youtube from Chrome on Windows from Desktop, Spotify from Windows Desktop in Chrome Browser, Spotify Windows client...works with no issues Other devices in my home connected to the same network working with no issues : Google Home Mini Speaker, Xiaomi Mi Smart Clock (two of them), Google Chromecast TV dongles (two of them), Google Chromecast 3,

How to reproduce

Play any song via Chromecast to a JBL Boombox 3 Wi-Fi from MusicAssitant

Music Providers

youtube music, filesystem

Player Providers

Chromecast

Full log output

2024-09-22 09:13:25.270 INFO (MainThread) [music_assistant] Loaded music provider YouTube Music 2024-09-22 09:13:27.156 INFO (MainThread) [music_assistant.music] Sync task for YouTube Music completed 2024-09-22 09:13:27.156 INFO (MainThread) [music_assistant.metadata] Starting metadata scanner 2024-09-22 09:13:27.158 INFO (MainThread) [music_assistant.metadata] Metadata scanner finished. 2024-09-22 09:15:20.344 ERROR (Thread-8) [pychromecast.socket_client] [JBL Boombox 3 Wi-Fi(10.1.1.162):8009] Error reading from socket. 2024-09-22 09:15:20.344 WARNING (Thread-8) [pychromecast.socket_client] [JBL Boombox 3 Wi-Fi(10.1.1.162):8009] Error communicating with socket, resetting connection 2024-09-22 09:15:20.352 ERROR (Thread-8) [pychromecast.socket_client] [JBL Boombox 3 Wi-Fi(10.1.1.162):8009] Failed to connect to service MDNSServiceInfo(name='JBL-Boombox-3-Wi-Fi-dd7b82f44610618daceef042ebf09ff5._googlecast._tcp.local.'), retrying in 5.0s

core.log

Additional information

No response

What version of Home Assistant Core are your running

2024.7.1

What type of installation are you running?

Home Assistant Container

On what type of hardware are you running?

Linux

OzGav commented 1 week ago

That isn’t the full log. Please follow the template instructions

techadrian commented 1 week ago

@OzGav Apologies, full log attached after this morning upgrade to latest beta.

core.log

marcelveldt commented 5 days ago

Looks like we're loosing connection to the speaker completely. Do you also have the cast integration setup within HA ? Try to disable that for a while and see if MA keeps up. Some of these cast players crash if they get too many socket connections.

techadrian commented 5 days ago

Hi @marcelveldt ,

Cast integration in HA is disabled since I installed MA (eq about 2 - 3 weeks ago ).

marcelveldt commented 5 days ago

Hi @marcelveldt ,

Cast integration in HA is disabled since I installed MA (eq about 2 - 3 weeks ago ).

OK, thanks for letting me know. So there is something else causing it. I'll have a look at the code if we're throttling the commands to the cast players well enough.