Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Adapter seems to create wrong url #104

Open
Berchemer opened this issue Jan 28, 2022 · 7 comments
Open

[Bug]: Adapter seems to create wrong url #104

Berchemer opened this issue Jan 28, 2022 · 7 comments
Assignees

Comments

@Berchemer
Copy link

Contact Details

No response

What happened?

As written in https://forum.iobroker.net/topic/51767/vorlage-upnp-media-player/10?_=1643386555921 the adapter seems to create a wrong url.
Attached wanted Objekt AVTransport.

2022-01-28 - 17_18 - Objekte - upnp.0.1__OG_-Salon-_Internetradio.MediaRenderer.AVTransport.txt

Adapter Version

1.0.20

JS-Controller Version

3.3.22

Node JS Version

v14.18.2

NPM Version

6.14.15

Operating System

Ubuntu

Relevant log output

No response

Anything else?

No response

@Jey-Cee
Copy link
Owner

Jey-Cee commented Jan 28, 2022

Open the link and post it here: http://192.168.0.113:1400/xml/device_description.xml

@Berchemer
Copy link
Author

The Output of http://192.168.0.73:1400/xml/device_description.xml which is the Symfonic/Sonos-Device

new 139.txt

Can't get an Output of http://192.168.0.81:8080/xml/device_description.xml which should be the Output of the Silvercrest-Device.
Onlöy Output is:

XML-Verarbeitungsfehler: Kein Wurzel-Element gefunden
Adresse: http://192.168.0.81:8080/xml/device_description.xml
Zeile Nr. 1, Spalte 1:

@Jey-Cee
Copy link
Owner

Jey-Cee commented Jan 28, 2022

If it is no sonos device the file name is not the same. You can search for it with the app "upnp tool" for Android.

@Berchemer
Copy link
Author

Berchemer commented Jan 29, 2022

Attached are all XML outputs created with the UPnP tool.

There are four different devices.

A Sonos-compatible device "Symfonisk" from IKEA - SYMFONISK_neu.zip

Three devices from Silvercrest that work in the manner of Fontier Silicon.
Since I wanted to be sure that I hadn't overlooked any differences, I'm attaching the information for all three devices.

However, the expenditure should be uniform so far.

It is about:
Internet Radio: Silvercrest_SIRD14C4 - Silvercrest_SIRD14C4.zip
WiFi speaker: Silvercrest_SMRS18A1 - Silvercrest_SMRS18A1.zip
WiFi speaker: Silvercrest_SMRS30A1 - Silvercrest_SMRS30A1.zip

I hope I could help 😁

@Jey-Cee
Copy link
Owner

Jey-Cee commented Jan 30, 2022

The URL is wrong because the silvercrest devices deliver it wrong.
You have to add "/" in the AVTransport Object at URL entries.

Leave this issue open, as reminder to add validation for the url.

@Jey-Cee Jey-Cee added enhancement and removed bug labels Jan 30, 2022
@Berchemer
Copy link
Author

The URL is wrong because the silvercrest devices deliver it wrong. You have to add "/" in the AVTransport Object at URL entries.

Leave this issue open, as reminder to add validation for the url.

You mean:
{ "type": "channel", "common": { "name": "AVTransport" }, "native": { "serviceType": "urn:schemas-upnp-org:service:AVTransport:1", "serviceID": "urn:upnp-org:serviceId:AVTransport", "controlURL": "/AVTransport/control", "eventSubURL": "/AVTransport/event", "SCPDURL": "/AVTransport/scpd.xml", "name": "AVTransport" }, "_id": "upnp.0.1__OG_-_Salon_-_Internetradio.MediaRenderer.AVTransport", "acl": { "object": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" }, "from": "system.adapter.admin.0", "user": "system.user.admin", "ts": 1643546278100 }

In this case I get following warn-message:
Unexpected answer from upnp service: {"statusCode":500,"body":"<s:Envelope\r\n 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>501</errorCode><errorDescription>Invalid XML</errorDescription></UPnPError></detail></s:Fault></s:Body></s:Envelope>","headers":{"content-length":"397","ext":"","content-type":"text/xml; charset=\"utf-8\"","server":"POSIX, UPnP/1.0, Intel MicroStack/1.0.2777"},"request":{"uri":{"protocol":"http:","slashes":true,"auth":null,"host":"192.168.0.81:8080","port":"8080","hostname":"192.168.0.81","hash":null,"search":null,"query":null,"pathname":"/AVTransport/control","path":"/AVTransport/control","href":"http://192.168.0.81:8080/AVTransport/control"},"method":"POST","headers":{"Content-Type":"text/xml; charset=\"utf-8\"","SOAPAction":"\"urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI\"","USER-AGENT":"UPnP/1.0, ioBroker.upnp","content-length":426}}} Sent message: {"uri":"http://192.168.0.81:8080/AVTransport/control","headers":{"Content-Type":"text/xml; charset=\"utf-8\"","SOAPAction":"\"urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI\"","USER-AGENT":"UPnP/1.0, ioBroker.upnp"},"method":"POST","body":" \n <s:Envelope s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">\n <s:Body><u:SetAVTransportURI xmlns:u=\"urn:schemas-upnp-org:service:AVTransport:1\"><InstanceID>0</InstanceID><CurrentURI>http://192.168.0.131:8082/vis.0/Sounds01/gong2.mp3</CurrentURI><CurrentURIMetaData></CurrentURIMetaData></u:SetAVTransportURI></s:Body>\n </s:Envelope>"}

😢

Or I didn't understand what you meant and you may write your suggestion in englisch AND german ;-)

@Berchemer
Copy link
Author

Berchemer commented Jan 30, 2022

Or maybe you just show the full-Objekt-ID, like
"upnp.0.1__OG_-Salon-_Internetradio.MediaRenderer.AVTransport.SetAVTransportURI"
and maybe also the raw-Object-Data as an example for me :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants