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

DLNA player disappears randomly, even when playing music #3823

Open
2 tasks done
checkiecheck opened this issue Apr 4, 2025 · 4 comments
Open
2 tasks done

DLNA player disappears randomly, even when playing music #3823

checkiecheck opened this issue Apr 4, 2025 · 4 comments

Comments

@checkiecheck
Copy link

checkiecheck commented Apr 4, 2025

What version of Music Assistant has the issue?

2.5.0

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

  • Yes

The problem

My player is KEFLSX and seems to be unstable in MA. In HA as media renderer it's very stable.
One other DLNA player also shortly disappeard, but i dont even notice that as it comes back quickly (just noticed from logs)
Player just disappeard while playing music and it's still playing. would love to have a more stable experience and looked at how HA is doing DLNA, but not sure yet on the differences. Seems like the notify there is instant and HA just consumes the descriptor.xml and player never disappears.
MA runs now in its own docker, but also as HA addin it shows the same behaviour. If we could improve the stickyness of a dlna player a little more, i would already be happy
MAlogs:

2025-04-04 08:58:28.011 INFO (MainThread) [music_assistant.players] Player removed: RX-V673 92F50F
2025-04-04 08:58:40.345 INFO (MainThread) [music_assistant] Loaded player provider UPnP/DLNA Player provider
2025-04-04 08:58:41.624 INFO (MainThread) [music_assistant.players] Player registered: uuid:5f9ec1b3-ed59-1900-4530-00a0de92f50f/RX-V673 92F50F
2025-04-04 08:59:05.017 INFO (MainThread) [music_assistant] Loaded plugin provider Home Assistant
2025-04-04 09:25:09.425 INFO (MainThread) [music_assistant.players] Player removed: RX-V673 92F50F
2025-04-04 09:25:12.079 INFO (MainThread) [music_assistant] Loaded player provider UPnP/DLNA Player provider
2025-04-04 09:25:13.269 INFO (MainThread) [music_assistant.players] Player registered: uuid:5f9ec1b3-ed59-1900-4530-00a0de92f50f/RX-V673 92F50F
2025-04-04 09:25:26.276 INFO (MainThread) [music_assistant] Loaded player provider Home Assistant MediaPlayers
2025-04-04 09:25:26.476 INFO (MainThread) [music_assistant.players] Player registered: media_player.kef_lsx/KEF LSX
2025-04-04 09:34:01.011 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue KEF LSX
2025-04-04 09:34:18.002 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue KEF LSX
2025-04-04 09:35:37.974 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue KEF LSX
2025-04-04 09:44:19.186 INFO (MainThread) [music_assistant.players] Player removed: KEF LSX

HA logs:

2025-04-02 08:32:38.310 DEBUG (MainThread) [homeassistant.components.dlna_dmr] Setting up config entry: uuid:5f9ec1b3-ed59-1900-4530-841715029a9d
2025-04-02 08:32:38.310 DEBUG (MainThread) [homeassistant.components.dlna_dmr] media_player.async_setup_entry df534cd16ad52fa332074f5113a3b044 (KEF LSX)
2025-04-02 08:32:38.313 DEBUG (MainThread) [homeassistant.components.dlna_dmr] SSDP SsdpChange.ALIVE notification of device uuid:5f9ec1b3-ed59-1900-4530-841715029a9d::urn:schemas-upnp-org:device:MediaRenderer:1 at http://192.168.1.244:8080/description.xml
2025-04-02 08:32:38.313 DEBUG (MainThread) [homeassistant.components.dlna_dmr] Connecting to device at http://192.168.1.244:8080/description.xml
2025-04-02 08:32:38.313 DEBUG (MainThread) [async_upnp_client.client_factory] Creating device, description_url: http://192.168.1.244:8080/description.xml
2025-04-02 08:32:38.313 DEBUG (MainThread) [async_upnp_client.traffic.upnp] Sending request:
GET http://192.168.1.244:8080/description.xml

How to reproduce

It just happens, i have not found a way to trigger disappearing (or even reappearing)

Music Providers

any, no difference

Player Providers

DLNA
HA player (referring to HA DLNA player), always working fine

Full log output

log.log

Additional information

reloading dlna provider does sometimes solve it, and sometimes player just comes back. I'm happy to provide any more info for investigations.

What version of Home Assistant Core are your running

2025.2.3

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Alternative

Have you included ALL of the information specified in the Troubleshooting FAQ or explained why you cannot

  • Yes
@marcelveldt
Copy link
Member

If the device is added to both HA and MA at the same time and those are running on the same host, that could explain this behavior.

@checkiecheck
Copy link
Author

FAir point, I also thought it could have interfered. I did disable DLNA integration on HA too. As docker and HA are not on the same host now it would not matter, but i'll try again to be 100% sure. (and for the other dlna player it doesn affect either btw)

@checkiecheck
Copy link
Author

checkiecheck commented Apr 4, 2025

So i deleted all DLNA integration from HA and waited a bit. KEF dlan did not come back at MA. KEF did get discovered by HA again, so i started to read the code of MA DLNA a bit and maybe it would help if there are a few more log statements for debugging in helpers.py to start , can you agree on that?

Additionally, the HA integration has more handling and also a manual descriptor url adding option to not rely on SSDP, that would definitly solve most issues for more players that are flaky. idea?

@OzGav
Copy link
Contributor

OzGav commented Apr 5, 2025

@benbender is looking into this

@OzGav OzGav added the DLNA/UPNP label Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants