MPD audio player "disconnected client"

Hi, I’m using Moode Audio MPD player running on an old Rpi2. It’s somewhat integrated with HA through the built-in MPD integration but whenever it restarts, HA can no longer talk to it until HA is restarted too:

Failed to call service media_player/play_media. Can not
send command to disconnected client

Is there any other way to reconnect HA to MPD so it doesn’t completely break after any MPD restart or a network glitch?

2 Likes

Obviously not…

I have the same Problem. Dors anybody know of a solution (reload integration, initiate reconnect etc.)?
Only solution I can see is restarting home assistant but thats not really a good solution.

I currently have the same problem. MPD is really unstable for me, any MPD client worsk perfectly fine, only home assistant randomly disconnects. How can I fix this? Only restarts helps…

Have you ever been able to identify or fix this issue?

Same here.
MPD version: 0.22.6
HAAS version: 2023.5.4

The only solution I have found is to restart home-assistant. It’s really strange and not so good for stability and robustness.

Same here. This is really annoying. The only solution is to restart HA.

Any idea where I’d submit this as a bug? I’m trying to phase out an unstable chromecast audio for MPD on an old RPI but this is killing it!

Hello,
I think they should be submited to home-assistant/core :

I also have this problem in my parent’s house where I try to use a mpd player for TTS notifications.

This will be fixed when the following PR is added to Home Assistant.

1 Like

Is the PR still active? Looked like there wasn’t much work left and it would be shame not to see the fix being merged soon as I really would like to use the mpd again :slight_smile:

Looks like all the work is done for the PR. Just the one change in August which was resolved was never marked resolved, so it’s stuck in limbo until that happens.

1 Like

Any status on this fix?

This issue affects me too. I am using the updated version from the pull request by patching the Homeassistant docker image. I put the below in my dockerfile and rebuild it:

COPY ./mpd-patch/patched.py ./usr/src/homeassistant/homeassistant/components/mpd/media_player.py

I was also having trouble with the MPD integration not getting status updates from the media player so the state in HA was inaccurate when I used any other app to control MPD. This fixed that too.

2 Likes

Does anyone have an update on this? I have stability issues with MPD and needing to restart HA is a pretty major pain. At last with an integration I could just restart that. its not clear from this thread if people feel like its fixed.

I can use this fix as well.

Is this progressing anywhere? MPD is basically unusable for me. It works for a while (maybe) then will just stop. The worst element of this is that there is no method to kick it back into life other than a complete restart of HA. Which is really beyond frustrating.