home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.01k stars 31.05k forks source link

DLNA Digital Media Renderer for Onkyo NR Receiver Media Browser Unknown Error #75598

Closed oetelaar24 closed 2 years ago

oetelaar24 commented 2 years ago

The problem

Hello,

I'm using an Onkyo TX-NR509 Home Theatre Receiver, Home Assistant automatically discovers it as a DLNA Media Rendere device. Controlling it seems fine. I can at least change the volume. However, when I try to browse the media, I get an unknown error:

2022-07-22 00:43:54 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140283154004912] Error handling message: Unknown error (unknown_error)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1218, in websocket_browse_media
payload = await player.async_browse_media(media_content_type, media_content_id)
File "/usr/src/homeassistant/homeassistant/components/dlna_dmr/media_player.py", line 777, in async_browse_media
content_filter = self._get_content_filter()
File "/usr/src/homeassistant/homeassistant/components/dlna_dmr/media_player.py", line 803, in _get_content_filter
protocol, _, content_format, _ = protocol_info.split(":", 3)
ValueError: not enough values to unpack (expected 4, got 1)

I've also tried using the HACS Music Assistant integration. This also has troubles and gives errors like (debugging mode on the async_upnp_client.traffic):

I've tried looking into what this problem could be, however I cannot find anything substantial to help me...

What version of Home Assistant Core has the issue?

2022.7.6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

https://www.home-assistant.io/integrations/dlna_dmr/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2022-07-19 16:57:57 DEBUG (MainThread) [async_upnp_client.profiles.dlna] Set transport uri: http://10.1.2.160:8095/e9f7fcc665e54d77b17f4215118ba714.mp3
2022-07-19 16:57:57 DEBUG (MainThread) [async_upnp_client.traffic.upnp] Sending request:
    POST http://10.1.2.24:8888/upnp_control_2
    SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI"
    Host: 10.1.2.24:8888
    Content-Type: text/xml; charset="utf-8"
    <?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:SetAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
                <InstanceID>0</InstanceID>
                <CurrentURI>http://10.1.2.160:8095/e9f7fcc665e54d77b17f4215118ba714.mp3</CurrentURI>
                <CurrentURIMetaData>
                    <DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/">
                        <item id="1" parentID="0" restricted="1">
                            <dc:title>Streaming from Music Assistant</dc:title>
                            <dc:creator/>
                            <upnp:album/>
                            <upnp:channelName>Music Assistant</upnp:channelName>
                            <upnp:channelNr>0</upnp:channelNr>
                            <upnp:class>object.item.audioItem.audioBroadcast</upnp:class>
                            <res protocolInfo="http-get:*:audio/mp3:DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=0d500000000000000000000000000000">http://10.1.2.160:8095/e9f7fcc665e54d77b17f4215118ba714.mp3</res>
                        </item>
                    </DIDL-Lite>
                </CurrentURIMetaData>
            </u:SetAVTransportURI>
        </s:Body>
    </s:Envelope>
2022-07-19 16:57:57 DEBUG (MainThread) [async_upnp_client.traffic.upnp] Got response from POST http://10.1.2.24:8888/upnp_control_2:
    200
    Server: Linux/2.6.33-rc4 UPnP/1.0 MediabolicUPnP/1.8.225
    Content-Type: text/xml; charset="utf-8"
    Content-Length: 304
    Connection: keep-alive
    b'<?xml version="1.0" encoding="utf-8"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <s:Body>
            <u:SetAVTransportURIResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"/>
        </s:Body>
    </s:Envelope>'
2022-07-19 16:57:57 DEBUG (MainThread) [async_upnp_client.traffic.upnp] Sending request:
    POST http://10.1.2.24:8888/upnp_control_2
    SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#Play"
    Host: 10.1.2.24:8888
    Content-Type: text/xml; charset="utf-8"
    <?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>
2022-07-19 16:57:58 DEBUG (MainThread) [async_upnp_client.traffic.upnp] Incoming request:
    NOTIFY
    Content-Type: text/xml; charset="utf-8"
    Content-Length: 3145
    NT: upnp:event
    NTS: upnp:propchange
    SID: uuid:2b4ea645-d60c-4ea2-915e-492346b58361
    SEQ: 5
    Host: 10.1.2.160:38809
    User-Agent: Mediabolic-IMHTTP/1.8.225 UPNP/1.0 DLNADOC/1.50
    <?xml version="1.0" encoding="utf-8"?>
    <e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0">
        <e:property>
            <LastChange>
                <Event xmlns='urn:schemas-upnp-org:metadata-1-0/AVT/'>
                    <InstanceID val='0'>
                        <TransportState val='STOPPED'/>
                        <TransportStatus val='OK'/>
                        <NumberOfTracks val='1'/>
                        <CurrentTrack val='1'/>
                        <CurrentTrackDuration val='00:00:00'/>
                        <CurrentMediaDuration val='00:00:00'/>
                        <CurrentTrackMetaData val='&amp;lt;DIDL-Lite xmlns:dc=&amp;quot;http://purl.org/dc/elements/1.1/&amp;quot; xmlns:upnp=&amp;quot;urn:schemas-upnp-org:metadata-1-0/upnp/&amp;quot; xmlns=&amp;quot;urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/&amp;quot; xmlns:dlna=&amp;quot;urn:schemas-dlna-org:metadata-1-0/&amp;quot;&amp;gt;&amp;lt;item id=&amp;quot;1&amp;quot; parentID=&amp;quot;0&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;dc:title&amp;gt;Streaming from Music Assistant&amp;lt;/dc:title&amp;gt;&amp;lt;dc:creator&amp;gt;&amp;lt;/dc:creator&amp;gt;&amp;lt;upnp:album&amp;gt;&amp;lt;/upnp:album&amp;gt;&amp;lt;upnp:channelName&amp;gt;Music Assistant&amp;lt;/upnp:channelName&amp;gt;&amp;lt;upnp:channelNr&amp;gt;0&amp;lt;/upnp:channelNr&amp;gt;&amp;lt;upnp:class&amp;gt;object.item.audioItem.audioBroadcast&amp;lt;/upnp:class&amp;gt;&amp;lt;res protocolInfo=&amp;quot;http-get:*:audio/mp3:DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=0d500000000000000000000000000000&amp;quot;&amp;gt;http://10.1.2.160:8095/e9f7fcc665e54d77b17f4215118ba714.mp3&amp;lt;/res&amp;gt;&amp;lt;/item&amp;gt;&amp;lt;/DIDL-Lite&amp;gt;'/>
                        <CurrentTrackURI val='http://10.1.2.160:8095/e9f7fcc665e54d77b17f4215118ba714.mp3'/>
                        <AVTransportURI val='http://10.1.2.160:8095/e9f7fcc665e54d77b17f4215118ba714.mp3'/>
                        <AVTransportURIMetaData val='&amp;lt;DIDL-Lite xmlns:dc=&amp;quot;http://purl.org/dc/elements/1.1/&amp;quot; xmlns:upnp=&amp;quot;urn:schemas-upnp-org:metadata-1-0/upnp/&amp;quot; xmlns=&amp;quot;urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/&amp;quot; xmlns:dlna=&amp;quot;urn:schemas-dlna-org:metadata-1-0/&amp;quot;&amp;gt;&amp;lt;item id=&amp;quot;1&amp;quot; parentID=&amp;quot;0&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;dc:title&amp;gt;Streaming from Music Assistant&amp;lt;/dc:title&amp;gt;&amp;lt;dc:creator&amp;gt;&amp;lt;/dc:creator&amp;gt;&amp;lt;upnp:album&amp;gt;&amp;lt;/upnp:album&amp;gt;&amp;lt;upnp:channelName&amp;gt;Music Assistant&amp;lt;/upnp:channelName&amp;gt;&amp;lt;upnp:channelNr&amp;gt;0&amp;lt;/upnp:channelNr&amp;gt;&amp;lt;upnp:class&amp;gt;object.item.audioItem.audioBroadcast&amp;lt;/upnp:class&amp;gt;&amp;lt;res protocolInfo=&amp;quot;http-get:*:audio/mp3:DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=0d500000000000000000000000000000&amp;quot;&amp;gt;http://10.1.2.160:8095/e9f7fcc665e54d77b17f4215118ba714.mp3&amp;lt;/res&amp;gt;&amp;lt;/item&amp;gt;&amp;lt;/DIDL-Lite&amp;gt;'/>
                        <CurrentTransportActions val='Play,Previous,Seek,X_DLNA_SeekTime'/>
                    </InstanceID>
                </Event>
            </LastChange>
        </e:property>
    </e:propertyset>
2022-07-19 16:57:58 DEBUG (MainThread) [async_upnp_client.traffic.upnp] Sending response: HTTPStatus.OK
2022-07-19 16:57:58 DEBUG (MainThread) [async_upnp_client.traffic.upnp] Incoming request:
    NOTIFY
    Content-Type: text/xml; charset="utf-8"
    Content-Length: 484
    NT: upnp:event
    NTS: upnp:propchange
    SID: uuid:2b4ea645-d60c-4ea2-915e-492346b58361
    SEQ: 6
    Host: 10.1.2.160:38809
    User-Agent: Mediabolic-IMHTTP/1.8.225 UPNP/1.0 DLNADOC/1.50
    <?xml version="1.0" encoding="utf-8"?>
    <e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0">
        <e:property>
            <LastChange>
                <Event xmlns='urn:schemas-upnp-org:metadata-1-0/AVT/'>
                    <InstanceID val='0'>
                        <TransportState val='STOPPED'/>
                        <TransportStatus val='ERROR_OCCURRED'/>
                        <CurrentTransportActions val='Play,Previous,Seek,X_DLNA_SeekTime'/>
                    </InstanceID>
                </Event>
            </LastChange>
        </e:property>
    </e:propertyset>
2022-07-19 16:57:58 DEBUG (MainThread) [async_upnp_client.traffic.upnp] Sending response: HTTPStatus.OK
2022-07-19 16:57:58 DEBUG (MainThread) [async_upnp_client.traffic.upnp] Got response from POST http://10.1.2.24:8888/upnp_control_2:
    500
    Server: Linux/2.6.33-rc4 UPnP/1.0 MediabolicUPnP/1.8.225
    Content-Type: text/xml; charset="utf-8"
    Content-Length: 441
    Connection: keep-alive
    b'<?xml version="1.0" encoding="utf-8"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <s:Body>
            <s:Fault>
                <faultcode>s:Client</faultcode>
                <faultstring>UPnPError</faultstring>
                <detail>
                    <UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
                        <errorCode>705</errorCode>
                        <errorDescription>Transport is locked</errorDescription>
                    </UPnPError>
                </detail>
            </s:Fault>
        </s:Body>
    </s:Envelope>'
2022-07-19 16:57:58 ERROR (MainThread) [homeassistant.components.dlna_dmr] Error during call async_media_play: UpnpActionResponseError('Error during async_call(), status: 500, upnp error: 705 (Transport is locked)')

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

dlna_dmr documentation dlna_dmr source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

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)