Jörg Sommer (8a5afd9f) at 22 Aug 20:31
Release 1.0.3
The example on page 27 of the referenced spec clearly contains spaces around =.
NOTIFY * HTTP/1.1 HOST: 239.255.255.250:1900 CACHE-CONTROL: max-age = seconds until advertisement expires LOCATION: URL for UPnP description for root device NT: notification type
Jörg Sommer (40e9b2a9) at 31 Dec 09:40
Merge parser: fix priority for file rules.
... and 1541 more commits
Jörg Sommer (82ca08b1) at 31 Dec 09:39
Jörg Sommer (318fb304) at 31 Dec 09:23
Allow write access to /run/user/*/dconf/user
I had this message in my log
Dez 30 08:14:46 kernel: audit: type=1400 audit(1735542886.787:307): apparmor="DENIED" operation="open" class="file" profile="/usr/sbin/cupsd" name="/etc/paperspecs" pid=317509 comm="cupsd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
If the second commit is bad, I can drop it.
Jörg Sommer (c3af6228) at 31 Dec 09:12
cupsd: convert profile to @etc_ro/rw
... and 1543 more commits
Gtk applications like Firefox request write access to the file
/run/user/1000/dconf/user. The code in dconf_shm_open opens the file
with O_RDWR | O_CREAT.
https://github.com/GNOME/dconf/blob/4057f8c84ff8c834dcd1cb82f946dd8cc49712ff/shm/dconf-shm.c#L68
Jörg Sommer (4bf94a96) at 31 Dec 08:43
Allow write access to /run/user/*/dconf/user
... and 1542 more commits
upnp ERROR Exception in task 'UPnPRootDevice uuid:RINCO...01400' - function UPnPRootDevice._run():
UPnPXMLError('No namespace starting with urn:schemas-upnp-org: in dict_values([\'http://www.real.com/rhapsody/xmlns/upnp-1-0\', \'http://www.tencent.com\'])--\'<?xml version="1.0" encoding="utf-8" ?>\\n<root xmlns="urn:schemas-upnp-org:device-1-0">\\n <specVersion>\\n <major>1</major>\\n <minor>0</minor>\\n </specVersion>\\n <device>\\n <deviceType>urn:schemas-upnp-org:device:ZonePlayer:1</deviceType>\\n <friendlyName>192.168.178.25 - Sonos Play:1</friendlyName>\\n <manufacturer>Sonos, Inc.</manufacturer>\\n <manufacturerURL>http://www.sonos.com</manufacturerURL>\\n <modelNumber>S1</modelNumber>\\n <modelDescription>Sonos Play:1</modelDescription>\\n <modelName>Sonos Play:1</modelName>\\n <modelURL>http://www.sonos.com/products/zoneplayers/S1</modelURL>\\n <softwareVersion>57.22-59130</softwareVersion>\\n <swGen>1</swGen>\\n <hardwareVersion>1.8.3.7-2.0</hardwareVersion>\\n <serialNum>B8-E9-37-5B-28-3C:8</serialNum>\\n <MACAddress>B8:E9:37:5B:28:3C</MACAddress>\\n <UDN>uuid:RINCON_B8E9375B283C01400</UDN>\\n <iconList>\\n <icon>\\n <id>0</id>\\n <mimetype>image/png</mimetype>\\n <width>48</width>\\n <height>48</height>\\n <depth>24</depth>\\n <url>/img/icon-S1.png</url>\\n </icon>\\n </iconList>\\n <minCompatibleVersion>56.0-00000</minCompatibleVersion>\\n <legacyCompatibleVersion>36.0-00000</legacyCompatibleVersion>\\n <apiVersion>1.18.10</apiVersion>\\n <minApiVersion>1.1.0</minApiVersion>\\n <displayVersion>11.15</displayVersion>\\n <extraVersion>OTP: </extraVersion>\\n <roomName>Front</roomName>\\n <displayName>Play:1</displayName>\\n <zoneType>9</zoneType>\\n <feature1>0x00000000</feature1>\\n <feature2>0x00403332</feature2>\\n <feature3>0x0001100e</feature3>\\n <seriesid>A101</seriesid>\\n <variant>0</variant>\\n <internalSpeakerSize>5</internalSpeakerSize>\\n <bassExtension>75.000</bassExtension>\\n <satGainOffset>6.000</satGainOffset>\\n <memory>128</memory>\\n <flash>64</flash>\\n #DEACTIVATION_STATE_TAG_AND_VALUE#\\n #DEACTIVATION_TTL_TAG_AND_VALUE#\\n #DEACTIVATION_DATE_TIME_TAG_AND_VALUE#\\n <ampOnTime>10</ampOnTime>\\n <retailMode>0</retailMode>\\n <serviceList>\\n <service>\\n <serviceType>urn:schemas-upnp-org:service:AlarmClock:1</serviceType>\\n <serviceId>urn:upnp-org:serviceId:AlarmClock</serviceId>\\n <controlURL>/AlarmClock/Control</controlURL>\\n <eventSubURL>/AlarmClock/Event</eventSubURL>\\n <SCPDURL>/xml/AlarmClock1.xml</SCPDURL>\\n </service> \\n <service>\\n <serviceType>urn:schemas-upnp-org:service:MusicServices:1</serviceType>\\n <serviceId>urn:upnp-org:serviceId:MusicServices</serviceId>\\n <controlURL>/MusicServices/Control</controlURL>\\n <eventSubURL>/MusicServices/Event</eventSubURL>\\n <SCPDURL>/xml/MusicServices1.xml</SCPDURL>\\n </service> \\n <service>\\n <serviceType>urn:schemas-upnp-org:service:DeviceProperties:1</serviceType>\\n <serviceId>urn:upnp-org:serviceId:DeviceProperties</serviceId>\\n <controlURL>/DeviceProperties/Control</controlURL>\\n <eventSubURL>/DeviceProperties/Event</eventSubURL>\\n <SCPDURL>/xml/DeviceProperties1.xml</SCPDURL>\\n </service> \\n <service>\\n <serviceType>urn:schemas-upnp-org:service:SystemProperties:1</serviceType>\\n <serviceId>urn:upnp-org:serviceId:SystemProperties</serviceId>\\n <controlURL>/SystemProperties/Control</controlURL>\\n <eventSubURL>/SystemProperties/Event</eventSubURL>\\n <SCPDURL>/xml/SystemProperties1.xml</SCPDURL>\\n </service> \\n <service>\\n <serviceType>urn:schemas-upnp-org:service:ZoneGroupTopology:1</serviceType>\\n <serviceId>urn:upnp-org:serviceId:ZoneGroupTopology</serviceId>\\n <controlURL>/ZoneGroupTopology/Control</controlURL>\\n <eventSubURL>/ZoneGroupTopology/Event</eventSubURL>\\n <SCPDURL>/xml/ZoneGroupTopology1.xml</SCPDURL>\\n </service> \\n <service>\\n <serviceType>urn:schemas-upnp-org:service:GroupManagement:1</serviceType>\\n <serviceId>urn:upnp-org:serviceId:GroupManagement</serviceId>\\n <controlURL>/GroupManagement/Control</controlURL>\\n <eventSubURL>/GroupManagement/Event</eventSubURL>\\n <SCPDURL>/xml/GroupManagement1.xml</SCPDURL>\\n </service>\\n <service>\\n <serviceType>urn:schemas-tencent-com:service:QPlay:1</serviceType>\\n <serviceId>urn:tencent-com:serviceId:QPlay</serviceId>\\n <controlURL>/QPlay/Control</controlURL>\\n <eventSubURL>/QPlay/Event</eventSubURL>\\n <SCPDURL>/xml/QPlay1.xml</SCPDURL>\\n </service>\\n </serviceList>\\n <deviceList>\\n <device>\\n <deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>\\n <friendlyName>192.168.178.25 - Sonos Play:1 Media Server</friendlyName>\\n <manufacturer>Sonos, Inc.</manufacturer>\\n <manufacturerURL>http://www.sonos.com</manufacturerURL>\\n <modelNumber>S1</modelNumber>\\n <modelDescription>Sonos Play:1 Media Server</modelDescription>\\n <modelName>Sonos Play:1</modelName>\\n <modelURL>http://www.sonos.com/products/zoneplayers/S1</modelURL>\\n <UDN>uuid:RINCON_B8E9375B283C01400_MS</UDN>\\n <serviceList>\\n <service>\\n <serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType>\\n <serviceId>urn:upnp-org:serviceId:ContentDirectory</serviceId>\\n <controlURL>/MediaServer/ContentDirectory/Control</controlURL>\\n <eventSubURL>/MediaServer/ContentDirectory/Event</eventSubURL>\\n <SCPDURL>/xml/ContentDirectory1.xml</SCPDURL>\\n </service>\\n <service>\\n <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>\\n\\t <serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>\\n\\t <controlURL>/MediaServer/ConnectionManager/Control</controlURL>\\n\\t <eventSubURL>/MediaServer/ConnectionManager/Event</eventSubURL>\\n\\t <SCPDURL>/xml/ConnectionManager1.xml</SCPDURL>\\n\\t </service>\\n\\t</serviceList>\\n </device>\\n <device>\\n\\t<deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType>\\n <friendlyName>Front - Sonos Play:1 Media Renderer</friendlyName>\\n <manufacturer>Sonos, Inc.</manufacturer>\\n <manufacturerURL>http://www.sonos.com</manufacturerURL>\\n <modelNumber>S1</modelNumber>\\n <modelDescription>Sonos Play:1 Media Renderer</modelDescription>\\n <modelName>Sonos Play:1</modelName>\\n <modelURL>http://www.sonos.com/products/zoneplayers/S1</modelURL>\\n\\t<UDN>uuid:RINCON_B8E9375B283C01400_MR</UDN>\\n\\t<serviceList>\\n\\t <service>\\n\\t <serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType>\\n\\t <serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>\\n\\t <controlURL>/MediaRenderer/RenderingControl/Control</controlURL>\\n\\t <eventSubURL>/MediaRenderer/RenderingControl/Event</eventSubURL>\\n\\t <SCPDURL>/xml/RenderingControl1.xml</SCPDURL>\\n\\t </service>\\n\\t <service>\\n\\t <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>\\n\\t <serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>\\n\\t <controlURL>/MediaRenderer/ConnectionManager/Control</controlURL>\\n\\t <eventSubURL>/MediaRenderer/ConnectionManager/Event</eventSubURL>\\n\\t <SCPDURL>/xml/ConnectionManager1.xml</SCPDURL>\\n\\t </service>\\n\\t <service>\\n\\t <serviceType>urn:schemas-upnp-org:service:AVTransport:1</serviceType>\\n\\t <serviceId>urn:upnp-org:serviceId:AVTransport</serviceId>\\n\\t <controlURL>/MediaRenderer/AVTransport/Control</controlURL>\\n\\t <eventSubURL>/MediaRenderer/AVTransport/Event</eventSubURL>\\n\\t <SCPDURL>/xml/AVTransport1.xml</SCPDURL>\\n\\t </service>\\n\\t <service>\\n\\t <serviceType>urn:schemas-sonos-com:service:Queue:1</serviceType>\\n\\t <serviceId>urn:sonos-com:serviceId:Queue</serviceId>\\n\\t <controlURL>/MediaRenderer/Queue/Control</controlURL>\\n\\t <eventSubURL>/MediaRenderer/Queue/Event</eventSubURL>\\n\\t <SCPDURL>/xml/Queue1.xml</SCPDURL>\\n\\t </service>\\n <service>\\n <serviceType>urn:schemas-upnp-org:service:GroupRenderingControl:1</serviceType>\\n <serviceId>urn:upnp-org:serviceId:GroupRenderingControl</serviceId>\\n <controlURL>/MediaRenderer/GroupRenderingControl/Control</controlURL>\\n <eventSubURL>/MediaRenderer/GroupRenderingControl/Event</eventSubURL>\\n <SCPDURL>/xml/GroupRenderingControl1.xml</SCPDURL>\\n </service>\\n <service>\\n <serviceType>urn:schemas-upnp-org:service:VirtualLineIn:1</serviceType>\\n <serviceId>urn:upnp-org:serviceId:VirtualLineIn</serviceId>\\n <controlURL>/MediaRenderer/VirtualLineIn/Control</controlURL>\\n <eventSubURL>/MediaRenderer/VirtualLineIn/Event</eventSubURL>\\n <SCPDURL>/xml/VirtualLineIn1.xml</SCPDURL>\\n </service>\\n\\t</serviceList>\\n <X_Rhapsody-Extension xmlns="http://www.real.com/rhapsody/xmlns/upnp-1-0">\\n <deviceID>urn:rhapsody-real-com:device-id-1-0:sonos_1:RINCON_B8E9375B283C01400</deviceID>\\n <deviceCapabilities>\\n <interactionPattern type="real-rhapsody-upnp-1-0"/>\\n </deviceCapabilities>\\n </X_Rhapsody-Extension>\\n <qq:X_QPlay_SoftwareCapability xmlns:qq="http://www.tencent.com">QPlay:2</qq:X_QPlay_SoftwareCapability>\\n <iconList>\\n <icon>\\n <mimetype>image/png</mimetype>\\n <width>48</width>\\n <height>48</height>\\n <depth>24</depth>\\n <url>/img/icon-S1.png</url>\\n </icon>\\n </iconList>\\n </device>\\n </deviceList>\\n </device>\\n</root>\\n\'')
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pa_dlna/upnp/util.py", line 42, in wrapper
return await coro(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pa_dlna/upnp/upnp.py", line 468, in _run
root, namespace = upnp_org_etree(description)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pa_dlna/upnp/xml.py", line 37, in upnp_org_etree
upnp_namespace = UPnPNamespace(xml, UPNP_NAMESPACE_BEG)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pa_dlna/upnp/xml.py", line 217, in __init__
raise UPnPXMLError(f'No namespace starting with {prefix} in {ns}--{repr(xml)}')
pa_dlna.upnp.xml.UPnPXMLError: No namespace starting with urn:schemas-upnp-org: in dict_values(['http://www.real.com/rhapsody/xmlns/upnp-1-0', 'http://www.tencent.com'])--'<?xml version="1.0" encoding="utf-8" ?>\n<root xmlns="urn:schemas-upnp-org:device-1-0">\n <specVersion>\n <major>1</major>\n <minor>0</minor>\n </specVersion>\n <device>\n <deviceType>urn:schemas-upnp-org:device:ZonePlayer:1</deviceType>\n <friendlyName>192.168.178.25 - Sonos Play:1</friendlyName>\n <manufacturer>Sonos, Inc.</manufacturer>\n <manufacturerURL>http://www.sonos.com</manufacturerURL>\n <modelNumber>S1</modelNumber>\n <modelDescription>Sonos Play:1</modelDescription>\n <modelName>Sonos Play:1</modelName>\n <modelURL>http://www.sonos.com/products/zoneplayers/S1</modelURL>\n <softwareVersion>57.22-59130</softwareVersion>\n <swGen>1</swGen>\n <hardwareVersion>1.8.3.7-2.0</hardwareVersion>\n <serialNum>B8-E9-37-5B-28-3C:8</serialNum>\n <MACAddress>B8:E9:37:5B:28:3C</MACAddress>\n <UDN>uuid:RINCON_B8E9375B283C01400</UDN>\n <iconList>\n <icon>\n <id>0</id>\n <mimetype>image/png</mimetype>\n <width>48</width>\n <height>48</height>\n <depth>24</depth>\n <url>/img/icon-S1.png</url>\n </icon>\n </iconList>\n <minCompatibleVersion>56.0-00000</minCompatibleVersion>\n <legacyCompatibleVersion>36.0-00000</legacyCompatibleVersion>\n <apiVersion>1.18.10</apiVersion>\n <minApiVersion>1.1.0</minApiVersion>\n <displayVersion>11.15</displayVersion>\n <extraVersion>OTP: </extraVersion>\n <roomName>Front</roomName>\n <displayName>Play:1</displayName>\n <zoneType>9</zoneType>\n <feature1>0x00000000</feature1>\n <feature2>0x00403332</feature2>\n <feature3>0x0001100e</feature3>\n <seriesid>A101</seriesid>\n <variant>0</variant>\n <internalSpeakerSize>5</internalSpeakerSize>\n <bassExtension>75.000</bassExtension>\n <satGainOffset>6.000</satGainOffset>\n <memory>128</memory>\n <flash>64</flash>\n #DEACTIVATION_STATE_TAG_AND_VALUE#\n #DEACTIVATION_TTL_TAG_AND_VALUE#\n #DEACTIVATION_DATE_TIME_TAG_AND_VALUE#\n <ampOnTime>10</ampOnTime>\n <retailMode>0</retailMode>\n <serviceList>\n <service>\n <serviceType>urn:schemas-upnp-org:service:AlarmClock:1</serviceType>\n <serviceId>urn:upnp-org:serviceId:AlarmClock</serviceId>\n <controlURL>/AlarmClock/Control</controlURL>\n <eventSubURL>/AlarmClock/Event</eventSubURL>\n <SCPDURL>/xml/AlarmClock1.xml</SCPDURL>\n </service> \n <service>\n <serviceType>urn:schemas-upnp-org:service:MusicServices:1</serviceType>\n <serviceId>urn:upnp-org:serviceId:MusicServices</serviceId>\n <controlURL>/MusicServices/Control</controlURL>\n <eventSubURL>/MusicServices/Event</eventSubURL>\n <SCPDURL>/xml/MusicServices1.xml</SCPDURL>\n </service> \n <service>\n <serviceType>urn:schemas-upnp-org:service:DeviceProperties:1</serviceType>\n <serviceId>urn:upnp-org:serviceId:DeviceProperties</serviceId>\n <controlURL>/DeviceProperties/Control</controlURL>\n <eventSubURL>/DeviceProperties/Event</eventSubURL>\n <SCPDURL>/xml/DeviceProperties1.xml</SCPDURL>\n </service> \n <service>\n <serviceType>urn:schemas-upnp-org:service:SystemProperties:1</serviceType>\n <serviceId>urn:upnp-org:serviceId:SystemProperties</serviceId>\n <controlURL>/SystemProperties/Control</controlURL>\n <eventSubURL>/SystemProperties/Event</eventSubURL>\n <SCPDURL>/xml/SystemProperties1.xml</SCPDURL>\n </service> \n <service>\n <serviceType>urn:schemas-upnp-org:service:ZoneGroupTopology:1</serviceType>\n <serviceId>urn:upnp-org:serviceId:ZoneGroupTopology</serviceId>\n <controlURL>/ZoneGroupTopology/Control</controlURL>\n <eventSubURL>/ZoneGroupTopology/Event</eventSubURL>\n <SCPDURL>/xml/ZoneGroupTopology1.xml</SCPDURL>\n </service> \n <service>\n <serviceType>urn:schemas-upnp-org:service:GroupManagement:1</serviceType>\n <serviceId>urn:upnp-org:serviceId:GroupManagement</serviceId>\n <controlURL>/GroupManagement/Control</controlURL>\n <eventSubURL>/GroupManagement/Event</eventSubURL>\n <SCPDURL>/xml/GroupManagement1.xml</SCPDURL>\n </service>\n <service>\n <serviceType>urn:schemas-tencent-com:service:QPlay:1</serviceType>\n <serviceId>urn:tencent-com:serviceId:QPlay</serviceId>\n <controlURL>/QPlay/Control</controlURL>\n <eventSubURL>/QPlay/Event</eventSubURL>\n <SCPDURL>/xml/QPlay1.xml</SCPDURL>\n </service>\n </serviceList>\n <deviceList>\n <device>\n <deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>\n <friendlyName>192.168.178.25 - Sonos Play:1 Media Server</friendlyName>\n <manufacturer>Sonos, Inc.</manufacturer>\n <manufacturerURL>http://www.sonos.com</manufacturerURL>\n <modelNumber>S1</modelNumber>\n <modelDescription>Sonos Play:1 Media Server</modelDescription>\n <modelName>Sonos Play:1</modelName>\n <modelURL>http://www.sonos.com/products/zoneplayers/S1</modelURL>\n <UDN>uuid:RINCON_B8E9375B283C01400_MS</UDN>\n <serviceList>\n <service>\n <serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType>\n <serviceId>urn:upnp-org:serviceId:ContentDirectory</serviceId>\n <controlURL>/MediaServer/ContentDirectory/Control</controlURL>\n <eventSubURL>/MediaServer/ContentDirectory/Event</eventSubURL>\n <SCPDURL>/xml/ContentDirectory1.xml</SCPDURL>\n </service>\n <service>\n <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>\n\t <serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>\n\t <controlURL>/MediaServer/ConnectionManager/Control</controlURL>\n\t <eventSubURL>/MediaServer/ConnectionManager/Event</eventSubURL>\n\t <SCPDURL>/xml/ConnectionManager1.xml</SCPDURL>\n\t </service>\n\t</serviceList>\n </device>\n <device>\n\t<deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType>\n <friendlyName>Front - Sonos Play:1 Media Renderer</friendlyName>\n <manufacturer>Sonos, Inc.</manufacturer>\n <manufacturerURL>http://www.sonos.com</manufacturerURL>\n <modelNumber>S1</modelNumber>\n <modelDescription>Sonos Play:1 Media Renderer</modelDescription>\n <modelName>Sonos Play:1</modelName>\n <modelURL>http://www.sonos.com/products/zoneplayers/S1</modelURL>\n\t<UDN>uuid:RINCON_B8E9375B283C01400_MR</UDN>\n\t<serviceList>\n\t <service>\n\t <serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType>\n\t <serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>\n\t <controlURL>/MediaRenderer/RenderingControl/Control</controlURL>\n\t <eventSubURL>/MediaRenderer/RenderingControl/Event</eventSubURL>\n\t <SCPDURL>/xml/RenderingControl1.xml</SCPDURL>\n\t </service>\n\t <service>\n\t <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>\n\t <serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>\n\t <controlURL>/MediaRenderer/ConnectionManager/Control</controlURL>\n\t <eventSubURL>/MediaRenderer/ConnectionManager/Event</eventSubURL>\n\t <SCPDURL>/xml/ConnectionManager1.xml</SCPDURL>\n\t </service>\n\t <service>\n\t <serviceType>urn:schemas-upnp-org:service:AVTransport:1</serviceType>\n\t <serviceId>urn:upnp-org:serviceId:AVTransport</serviceId>\n\t <controlURL>/MediaRenderer/AVTransport/Control</controlURL>\n\t <eventSubURL>/MediaRenderer/AVTransport/Event</eventSubURL>\n\t <SCPDURL>/xml/AVTransport1.xml</SCPDURL>\n\t </service>\n\t <service>\n\t <serviceType>urn:schemas-sonos-com:service:Queue:1</serviceType>\n\t <serviceId>urn:sonos-com:serviceId:Queue</serviceId>\n\t <controlURL>/MediaRenderer/Queue/Control</controlURL>\n\t <eventSubURL>/MediaRenderer/Queue/Event</eventSubURL>\n\t <SCPDURL>/xml/Queue1.xml</SCPDURL>\n\t </service>\n <service>\n <serviceType>urn:schemas-upnp-org:service:GroupRenderingControl:1</serviceType>\n <serviceId>urn:upnp-org:serviceId:GroupRenderingControl</serviceId>\n <controlURL>/MediaRenderer/GroupRenderingControl/Control</controlURL>\n <eventSubURL>/MediaRenderer/GroupRenderingControl/Event</eventSubURL>\n <SCPDURL>/xml/GroupRenderingControl1.xml</SCPDURL>\n </service>\n <service>\n <serviceType>urn:schemas-upnp-org:service:VirtualLineIn:1</serviceType>\n <serviceId>urn:upnp-org:serviceId:VirtualLineIn</serviceId>\n <controlURL>/MediaRenderer/VirtualLineIn/Control</controlURL>\n <eventSubURL>/MediaRenderer/VirtualLineIn/Event</eventSubURL>\n <SCPDURL>/xml/VirtualLineIn1.xml</SCPDURL>\n </service>\n\t</serviceList>\n <X_Rhapsody-Extension xmlns="http://www.real.com/rhapsody/xmlns/upnp-1-0">\n <deviceID>urn:rhapsody-real-com:device-id-1-0:sonos_1:RINCON_B8E9375B283C01400</deviceID>\n <deviceCapabilities>\n <interactionPattern type="real-rhapsody-upnp-1-0"/>\n </deviceCapabilities>\n </X_Rhapsody-Extension>\n <qq:X_QPlay_SoftwareCapability xmlns:qq="http://www.tencent.com">QPlay:2</qq:X_QPlay_SoftwareCapability>\n <iconList>\n <icon>\n <mimetype>image/png</mimetype>\n <width>48</width>\n <height>48</height>\n <depth>24</depth>\n <url>/img/icon-S1.png</url>\n </icon>\n </iconList>\n </device>\n </deviceList>\n </device>\n</root>\n'
FWIW UPnP Device Architecture 2.0 on page 52 does not list
idas one of the sub element oficonList.
But this doesn't matter as long as you are a consumer and not a validator. “Be conservative in what you do, be liberal in what you accept from others”
And it's said in the spec on page 54:
For future extensibility and according to the requirements in clause 2.7, “Non-standard vendor extensions” and clause 2.8, “UPnP Device Schema”, when processing XML like the listing above, devices and control points shall ignore: (a) any unknown elements and their sub elements or content, and (b) any unknown attributes and their values.
pa-dlna might give an info or notice about the device behaves badly, but the user of pa-dlna can't do anything about it. Hence, an error or rejection (of broken input) doesn't help.
pa-dlna does an HTTP 1.0 GET request and this is done on purpose. Chunked transfer encoding is not possible with HTTP 1.0
Wireshark shows that the client responds with HTTP/1.1
395 6.338227773 laptop 192.168.178.24 HTTP 137 GET /xml/device_description.xml HTTP/1.0
405 6.383759085 192.168.178.24 laptop HTTP/XML 3305 HTTP/1.1 200 OK
Hypertext Transfer Protocol, has 122 chunks (including last chunk)
HTTP/1.1 200 OK\r\n
Content-Type: text/xml\r\n
Transfer-Encoding: chunked\r\n
Server: Linux UPnP/1.0 Sonos/57.22-59130 (ZPS5)\r\n
Connection: close\r\n
\r\n
[Request in frame: 395]
[Time since request: 0.045531312 seconds]
[Request URI: /xml/device_description.xml]
[Full request URI: http://192.168.178.24:1400/xml/device_description.xml]
HTTP chunked response
File Data: 9650 bytes
eXtensible Markup Language
upnp DEBUG Bad XML from http://192.168.178.23:1400/xml/device_description.xml: '105\r\n<?xml version="1.0" encoding="utf-8" ?>\n<root xmlns="urn:schemas-upnp-org:device-1-0">\n <specVersion>\n <major>1</major>\n <minor>0</minor>\n </specVersion>\n <device>\n <deviceType>urn:schemas-upnp-org:device:ZonePlayer:1</deviceType>\n <friendlyName>\r\ne\r\n192.168.178.23\r\n9\r\n - Sonos \r\n6\r\nBridge\r\n8a\r\n</friendlyName>\n <manufacturer>Sonos, Inc.</manufacturer>\n <manufacturerURL>http://www.sonos.com</manufacturerURL>\n <modelNumber>\r\n5\r\nZB100\r\n2b\r\n</modelNumber>\n <modelDescription>Sonos \r\n6\r\nBridge\r\n29\r\n</modelDescription>\n <modelName>Sonos \r\n6\r\nBridge\r\n3f\r\n</modelName>\n <modelURL>http://www.sonos.com/store/products/\r\n5\r\nZB100\r\n21\r\n</modelURL>\n <softwareVersion>\r\nb\r\n57.22-59130\r\n1e\r\n</softwareVersion>\n <swGen>\r\n1\r\n1\r\n1e\r\n</swGen>\n <hardwareVersion>\r\nb\r\n1.5.0.0-2.0\r\n22\r\n</hardwareVersion>\n <serialNum>\r\n13\r\nB8-E9-37-12-67-22:6\r\n1d\r\n</serialNum>\n <MACAddress>\r\n11\r\nB8:E9:37:12:67:22\r\n1c\r\n</MACAddress>\n <UDN>uuid:\r\n18\r\nRINCON_B8E93712672201400\r\n99\r\n</UDN>\n <iconList>\n <icon>\n <id>0</id>\n <mimetype>image/png</mimetype>\n <width>48</width>\n <height>48</height>\n \r\n2b\r\n <depth>24</depth>\n <url>/img/icon-\r\n5\r\nZB100\r\n43\r\n.png</url>\n </icon>\n </iconList>\n <minCompatibleVersion>\r\na\r\n56.0-00000\r\n35\r\n</minCompatibleVersion>\n <legacyCompatibleVersion>\r\na\r\n36.0-00000\r\n2f\r\n</legacyCompatibleVersion>\n <displayVersion>\r\n5\r\n11.15\r\n24\r\n</displayVersion>\n <extraVersion>\r\n1e\r\n</extraVersion>\n <roomName>\r\n6\r\nBRIDGE\r\n1d\r\n</roomName>\n <displayName>\r\n6\r\nBridge\r\n1d\r\n</displayName>\n <zoneType>\r\n1\r\n4\r\n1a\r\n</zoneType>\n <feature1>\r\na\r\n0x00000000\r\n1a\r\n</feature1>\n <feature2>\r\na\r\n0x00008173\r\n1a\r\n</feature2>\n <feature3>\r\na\r\n0x00031000\r\n1a\r\n</feature3>\n <seriesid>\r\n4\r\nX999\r\n19\r\n</seriesid>\n <variant>\r\n1\r\n0\r\n49\r\n</variant>\n <internalSpeakerSize>-1</internalSpeakerSize>\n <memory>\r\n1\r\n8\r\n15\r\n</memory>\n <flash>\r\n1\r\n8\r\nd\r\n</flash>\n \r\n22\r\n#DEACTIVATION_STATE_TAG_AND_VALUE#\r\n5\r\n\n \r\n20\r\n#DEACTIVATION_TTL_TAG_AND_VALUE#\r\n5\r\n\n \r\n26\r\n#DEACTIVATION_DATE_TIME_TAG_AND_VALUE#\r\naa\r\n\n <serviceList>\n <service>\n <serviceType>urn:schemas-upnp-org:service:DeviceProperties:1</serviceType>\n <serviceId>urn:upnp-org:serviceId:DeviceProp\r\n400\r\nerties</serviceId>\n <controlURL>/DeviceProperties/Control</controlURL>\n <eventSubURL>/DeviceProperties/Event</eventSubURL>\n <SCPDURL>/xml/DeviceProperties1.xml</SCPDURL>\n </service> \n <service>\n <serviceType>urn:schemas-upnp-org:service:SystemProperties:1</serviceType>\n <serviceId>urn:upnp-org:serviceId:SystemProperties</serviceId>\n <controlURL>/SystemProperties/Control</controlURL>\n <eventSubURL>/SystemProperties/Event</eventSubURL>\n <SCPDURL>/xml/SystemProperties1.xml</SCPDURL>\n </service> \n <service>\n <serviceType>urn:schemas-upnp-org:service:ZoneGroupTopology:1</serviceType>\n <serviceId>urn:upnp-org:serviceId:ZoneGroupTopology</serviceId>\n <controlURL>/ZoneGroupTopology/Control</controlURL>\n <eventSubURL>/ZoneGroupTopology/Event</eventSubURL>\n <SCPDURL>/xml/ZoneGroupTopology1.xml</SCPDURL>\n </service> \n <service>\n <serviceType>urn:schemas-upnp-org:service:GroupManagement\r\n15b\r\n:1</serviceType>\n <serviceId>urn:upnp-org:serviceId:GroupManagement</serviceId>\n <controlURL>/GroupManagement/Control</controlURL>\n <eventSubURL>/GroupManagement/Event</eventSubURL>\n <SCPDURL>/xml/GroupManagement1.xml</SCPDURL>\n </service>\n </serviceList>\n <deviceList>\n </deviceList>\n </device>\n</root>\n\r\n0\r\n\r\n'
It would be helpful if the template from pa-dlna -d contains the link https://pa-dlna.readthedocs.io/en/stable/configuration.html
# The pa-dlna default configuration.
#
…
# - then lossy encoders
# See https://trac.ffmpeg.org/wiki/Encode/HighQualityAudio.
# See https://pa-dlna.readthedocs.io/en/stable/configuration.html
[DEFAULT]
And I think a hint about pa-dlna -d to regenerate it would be helpful, because when you look at the file two years later, you don't remember how easy it is to get the current template.
I came about other errors, and I think it would be better to log as much information (e.g. backtrace) as possible with an error. Errors often happen under special circumstances and you can't easily reproduce them. To make a good bug report or get near the source of the error, you need as much information as possible.
In other projects I saw error messages containing guidelines to report a bug: “This should not have happened. Please, report the output above at https://gitlab.com/xdegaye/pa-dlna/-/issues”. So the output should contain everything you need to analyse the bug.
Maybe you can add the command .. as alias to previous, because it's easier to type and does also mean the upper level on Unix shell.
I think it would be useful to group the meta-commands help, previous, quit together and list the real commands afterwards.
It would be helpful to have a path or pwd meta-command to get the current path. When navigating through the tree, I often lost track how I came to the current place.
Maybe it's possible to support input via command line arguments, which would ease scripting: upnp-cmd 'device 3' 'embedded 0' 'service ConnectionManager' GetProtocolInfo
Some log messages contain line breaks which makes they show up as two separate lines in the journal. Would it be possible to keep these log message as one line?
Dec 23 18:55:31 pa-dlna[64286]: upnp INFO New avmnexus root device at 192.168.178.1 with UDN:
Dec 23 18:55:31 pa-dlna[64286]: uuid:535502409-bccb-40e7-8e6c-C80E14BFFCD0
Dec 23 18:55:32 pa-dlna[64286]: pa-dlna INFO New Sonos Play:1-00_MR renderer with Mp3Encoder handling 'audio/mp3'
Dec 23 18:55:32 pa-dlna[64286]: URL: http://192.168.178.22:5674/audio-content/uuid:RINCON_B8E_MR
Dec 23 18:55:32 pa-dlna[64286]: pulse INFO Load null-sink module Sonos Sub-uuid:RINCON_000E_MR
Dec 23 18:55:32 pa-dlna[64286]: description='Küche - Sonos Sub Media Renderer - 00_MR'
Here is a Systemd unit file to run pa-dlna:
[Unit]
Description=Sound Service DLNA connector
Documentation=https://gitlab.com/xdegaye/pa-dlna
After=pipewire.service
Requires=pipewire.service
# After=pulseaudio.service
# Requires=pulseaudio.service
[Service]
ExecStart=/usr/bin/pa-dlna
LockPersonality=true
NoNewPrivileges=true
MemoryDenyWriteExecute=true
RemoveIPC=true
RestrictNamespaces=true
RestrictRealtime=true
RestrictSUIDSGID=true
SystemCallArchitectures=native
SystemCallFilter=@system-service
[Install]
WantedBy=default.target
My Sonos device sends HTTP chunked transfer. I've added this code to make it work, but I think it's better to switch to an HTTP parsing library to handle all corner cases.
diff --git pa_dlna/upnp/network.py pa_dlna/upnp/network.py
index 2ebfd30..3917ce2 100644
--- pa_dlna/upnp/network.py
+++ pa_dlna/upnp/network.py
@@ -1,6 +1,7 @@
"""Networking utilities."""
import asyncio
+import io
import socket
import struct
import time
@@ -251,6 +252,18 @@ async def http_query(method, url, header='', body=''):
body = await reader.read()
+ if header_dict.get('TRANSFER-ENCODING') == 'chunked':
+ chunked_body = io.BytesIO(body)
+ body = io.BytesIO()
+ while True:
+ size = chunked_body.readline()
+ if not size:
+ break
+ body.write(chunked_body.read(int(size, 16)))
+ chunked_body.read(2) # \r\n
+
+ body = body.getvalue()
+
# Check that we have received the whole body.
if content_length is not None:
if len(body) != content_length: