Open
Description
The problem
I have a dlna speaker, which usually works well with DLNA DMR, but when I use QQ Music to play music on it, it becomes unavailable in HA.
What version of Home Assistant Core has the issue?
core-2025.1.2
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
DLNA Digital Media Renderer
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?
2025-01-12 12:45:02.392 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/local/lib/python3.13/xml/etree/ElementTree.py", line 1713, in feed
self.parser.Parse(data, False)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 1055, in _async_update_entity_states
await entity.async_update_ha_state(True)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 978, in async_update_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1107, in __async_calculate_state
if (entity_picture := self.entity_picture) is not None:
^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1081, in entity_picture
return self.media_image_local
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1086, in media_image_local
if (image_hash := self.media_image_hash) is None:
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 652, in media_image_hash
if (url := self.media_image_url) is not None:
^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/dlna_dmr/media_player.py", line 894, in media_image_url
return self._device.media_image_url
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/async_upnp_client/profiles/dlna.py", line 1198, in media_image_url
items = _cached_from_xml_string(xml)
File "/usr/local/lib/python3.13/site-packages/async_upnp_client/profiles/dlna.py", line 239, in _cached_from_xml_string
return didl_lite.from_xml_string(xml, strict=False)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/didl_lite/didl_lite.py", line 1077, in from_xml_string
xml_el = defusedxml.ElementTree.fromstring(xml_string)
File "/usr/local/lib/python3.13/site-packages/defusedxml/common.py", line 126, in fromstring
parser.feed(text)
~~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/xml/etree/ElementTree.py", line 1715, in feed
self._raiseerror(v)
~~~~~~~~~~~~~~~~^^^
File "/usr/local/lib/python3.13/xml/etree/ElementTree.py", line 1622, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 0
Additional information
This is the description.xml
file for the speaker when the entity becomes unavailable.
<?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:dlna="urn:schemas-dlna-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<dlna:X_DLNADOC>DMR-1.50</dlna:X_DLNADOC>
<deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType>
<friendlyName>main bedroom</friendlyName>
<manufacturer>wiimu</manufacturer>
<manufacturerURL>http://www.wiimu.com/</manufacturerURL>
<modelDescription>WiiMu LinkPlayer</modelDescription>
<modelName>WiiMu LinkPlayer</modelName>
<modelURL>http://www.muzohifi.com/</modelURL>
<UDN>uuid:FF310092-AE0B-BE9A-139A-89A6FF310092</UDN>
<modelNumber>V01-Jun 4 2018
</modelNumber>
<serialNumber>00001</serialNumber>
<ssidName>GGMM_E3_9D4C</ssidName>
<uuid>FF310092AE0BBE9A139A89A6</uuid>
<qq:X_QPlay_SoftwareCapability xmlns:qq="http://www.tencent.com">QPlay:2</qq:X_QPlay_SoftwareCapability>
<iconList>
<icon>
<mimetype>image/png</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/upnp/grender-48x48.png</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/upnp/grender-120x120.png</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/upnp/grender-48x48.jpg</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/upnp/grender-120x120.jpg</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:AVTransport:1</serviceType>
<serviceId>urn:upnp-org:serviceId:AVTransport</serviceId>
<SCPDURL>/upnp/rendertransportSCPD.xml</SCPDURL>
<controlURL>/upnp/control/rendertransport1</controlURL>
<eventSubURL>/upnp/event/rendertransport1</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
<serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
<SCPDURL>/upnp/renderconnmgrSCPD.xml</SCPDURL>
<controlURL>/upnp/control/renderconnmgr1</controlURL>
<eventSubURL>/upnp/event/renderconnmgr1</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType>
<serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>
<SCPDURL>/upnp/rendercontrolSCPD.xml</SCPDURL>
<controlURL>/upnp/control/rendercontrol1</controlURL>
<eventSubURL>/upnp/event/rendercontrol1</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-wiimu-com:service:PlayQueue:1</serviceType>
<serviceId>urn:wiimu-com:serviceId:PlayQueue</serviceId>
<SCPDURL>/upnp/PlayQueueSCPD.xml</SCPDURL>
<controlURL>/upnp/control/PlayQueue1</controlURL>
<eventSubURL>/upnp/event/PlayQueue1</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-tencent-com:service:QPlay:1</serviceType>
<serviceId>urn:tencent-com:serviceId:QPlay</serviceId>
<SCPDURL>/upnp/QPlaySCPD.xml</SCPDURL>
<controlURL>/upnp/control/QPlay1</controlURL>
<eventSubURL>/upnp/event/QPlay1</eventSubURL>
</service>
</serviceList>
</device>
</root>