Closed tomasz8w closed 3 years ago
dlna_dmr documentation dlna_dmr source (message by IssueLinks)
Hey there @stevenlooman, @chishm, mind taking a look at this issue as it has been labeled with an integration (dlna_dmr
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
Thank you for the bug report and the detailed log, @tomasz8w. I'm still working through it to figure out what is wrong, but I do have some information to share. It looks like some requests are made twice with the second request succeeding, followed by one more separate request, just before the disconnect occurs.
It also looks like the poll availability option is turned on for the device. Could you please try turning that off (in the integration page, the options for that particular device) and see if that helps? It may only have the effect that the device goes unavailable then doesn't become available again, but even that information is good to know.
It looks that turning off poll availability fixes this switching behavior. Thanks! Let me know if there is something else I can do in this matter.
I noticed that unavailable states no longer occurs but when trying to play a stream, sometimes I get following error:
Error during call async_media_play: UpnpConnectionError('[Errno None] Can not write request body for http://192.168.8.95:49152/upnp/control/rendertransport1')
I'm on core-2021.10.2 version now
That looks like the device is closing connections while UPnP (HTTP) requests are being made. Are you also seeing any messages from async_upnp_client that end with during request; retrying
?
I can see this kind of messages but they are not time related to my problem. But they occurs quite often, about 50 per day. Nothing suspicious in log apart from that, just play request followed by error:
2021-10-15 14:55:44 DEBUG (MainThread) [async_upnp_client.traffic.upnp] Sending request:
POST http://192.168.8.95:49152/upnp/control/rendertransport1
SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#Play"
Host: 192.168.8.95:49152
Content-Type: text/xml; charset="utf-8"
Content-Length: 288
<?xml version="1.0"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:Play xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID>
<Speed>1</Speed></u:Play></s:Body></s:Envelope>
2021-10-15 14:55:44 ERROR (MainThread) [homeassistant.components.dlna_dmr] Error during call async_media_play: UpnpConnectionError('[Errno None] Can not write request body for http://192.168.8.95:49152/upnp/control/rendertransport1')
Hi @tomasz8w, this should be fixed now in the dev branch, and should make it into the 2021.10.7 release. If you have the same problems after that, please open an issue linked to this one.
The problem
After upgrade to newest release, dlna_dmr integration no longer works properly. It behaves properly when nothing is being played. When something is playing, media player entity is switching between playing and unavailable state (but it is mostly unavailable).
Receiver: yamaha yas-209
What is version of Home Assistant Core has the issue?
2021.10.0
What was the last working version of Home Assistant Core?
2021.9.7
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
DLNA Digital Media Renderer
Link to integration documentation on our website
https://www.home-assistant.io/integrations/dlna_dmr/
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response