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
MPD integration may break when MPD service becomes unreachable #103889
Comments
Once the upstream issue has been resolved, I'll submit a PR here to upgrade the |
I have this problem. Any news about it? |
The PR was merged two weeks ago. Now I am waiting for a new release of python-mpd2 to be published to PyPI. Next I'll submit another PR here to pull that new version instead of the buggy 3.1.0.
Restart HA and you should be good to go. |
Version 3.1.1 of python-mpd2 that includes the fix was released over the weekend. I will work on upgrading this dependency in the mpd component ASAP, unless someone beats me to it. |
The problem
This issue describes an upstream problem in
python-mpd2
for which I have submitted a fix hereI figured it was helpful to open an issue here because:
Details of the symptoms in HA:
If the connection with MPD breaks while the integration is reading MPD's response to a command (for me, it happened while reading the response to the "status" command here) the
ConnectionError
raised withinpython-mpd2
is not propagated to the client code (HA'sMpdDevice
class in our use case). Instead, the coroutine executing the MPD command hangs forever and this is what causes the integration to freeze. Restoring the connection to MPD does not help.What version of Home Assistant Core has the issue?
at least in any >= 2023.10.0
What was the last working version of Home Assistant Core?
I don't know
What type of installation are you running?
Home Assistant Core
Integration causing the issue
MPD
Link to integration documentation on our website
https://www.home-assistant.io/integrations/mpd/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
The last line corresponds to the next async update being aborted because the previous one is still running. It is actually stuck awaiting the "status" command, which will never complete.
The text was updated successfully, but these errors were encountered: