Closed Schluggi closed 3 years ago
I am not aware of a second level of authorization. Maybe noidle is sent before the password is sent? @mweinelt The following command can dump if this is the case:
$ tcpdump -i any -n port 6600 -A
We don't explicitly send noidle
.
async def _connect(self):
"""Connect to MPD."""
try:
await self._client.connect(self.server, self.port)
if self.password is not None:
await self._client.password(self.password)
except mpd.ConnectionError:
return
Maybe you can help? @chrysn
The idle command is implicitly sent with async operation when nothing has happened, and noidle
pretty much as a precaution against race conditions.
It didn't occur to me that there could be any situation in which noidle
is not accepted (not running MPD with passwords myself).
I can't write a patch right now (caught up in deadlines); if someone wants to have it faster than I get to it, look around when __in_idle
is set. Might be a bug (more than just me not thinking of password authentication) somewhere, as the connect code doesn't look like it shoudl take IMMEDIATE_COMMAND_TIMEOUT long to execute, especially as it's only started after the hello has been exchanged.
Thanks @chrysn for the explanation.
Strangely enough, the problem has just fixed itself. Therefore this issue can be closed.
Big thanks for the support!
Thanks @chrysn for the explanation.
Strangely enough, the problem has just fixed itself. Therefore this issue can be closed.
Big thanks for the support!
Let's keep it open. It sounds like a race condition to me, that just would come back in future.
Hi, I know this is probably not the best place for my problem. However, do not know what else I can do. I hope you guys can help me anyway.
As described here, I have a problem with Home Assistant and the mpd integration (which uses python-mpd2).
I am getting this error in my home assistant log.
As far as I know, the first step of an mpd connection is to connect to the mpd server (with an optional password). If I change the password to something wrong, I get a different error. So the connection and authorization seem to work. Is there another level of authorization? If so, what and how can I change this? And is this a client or a server issue?