DLNA Media Controller plugin - Common library for UPnP AV

On my side, I will try to find the time to produce a version 0.2 before the end of the week.

Hi all,

There is a while I didn’t took some news here ! (Trapped with a IR Blaster failure on my side…)

Happy to see lot of progress, can’t wait to test your new version Lolodomo

About My Sony BR I’m pretty sure Bubble Upnp perform a Shoutcast Proxy when I play webradio on it, because I see my device continuously received and send data, and if I kill bubble Upnp, The Radio playback shutdown just after.
But not sure if is a DLNA problem or a Sony limitation… (First would be the best because is tweakable :slight_smile: )

@a-forker: unfortunately, sending a HEAD request to a WEB radio does not work/ It even locks the code in the http.request … until the Vera finally reloads !

Try your code with for example: Live365 - Listen to Free Internet Radio

That’s strange, it looks like timeout is not taken into account.

If we except the not working timeout problem probably to a MCV bug, is it normal to not have a response to a HTTP HEAD request ?

Is there an alternative using HTTP GET request but without downloading the content or only download the beginning ?

[quote=“a-lurker, post:256, topic:177228”]

Can you try with http-get::audio/mpeg: please ?

Yes this alone will allow the transition from NO_MEDIA_PRESENT to STOPPED. So the “DLNA.ORG_PN=MP3” is not required and I can play the URI OK.[/quote]

And finally, can you please try with http-get:::* ?

Method: Powered up Yamaha AVR - switched to “server” input - it’s in the “NO_MEDIA” state. Uploaded modified file to Vera and restarted Lupp engine. Wait for start up to complete. Went directly into player and entered “Hello” for Goggle TTS, set volume to 70 and pushed “Say” button.

This failed with an “701 Illegal mine” type error:
http-get:::*

Repeat the above method with different default for “DEFAULT_METADATA” in plugin code.

This worked:
http-get::audio/mpeg:

[quote=“a-lurker, post:266, topic:177228”]Method: Powered up Yamaha AVR - switched to “server” input - it’s in the “NO_MEDIA” state. Uploaded modified file to Vera and restarted Lupp engine. Wait for start up to complete. Went directly into player and entered “Hello” for Goggle TTS, set volume to 70 and pushed “Say” button.

This failed with an “701 Illegal mine” type error:
http-get:::*

Repeat the above method with different default for “DEFAULT_METADATA” in plugin code.

This worked:
http-get::audio/mpeg:[/quote]

Ok, that makes sense.

As a temporary and not perfect solution in the coming version 0.2, I will set protocol http-get::audio/mpeg: for all URL starting with http and ending with .mp3.
Later, I will search a solution regarding how to get content type from an URL without a risk of blocking the Vera.
Note that it is something not required when browsing a server because the server provides the protocols.

Hi Lolodomo !

I’m trying to use your great DLNA plugin working with Openremote but I have a little problem with status feedback. Let me explain :
The first goal of this test is to manage Volume in openremote of my Linux Media Renderer through your Vera DLNA Plugin.
In OR, to set Volume, here is my http web command to Vera :
http://Vera_IP:3480/data_request?id=lu_action&serviceId=urn:upnp-org:serviceId:RenderingControl&action=SetVolume&DeviceNum=41&InstanceID=0&Channel=Master&DesiredVolume=60 (where 60 is {param} in OR but not important here)
And It work perfectly, But I have no Feedback of the command ( If I changed Volume from your UI, it doesn’t change status in OR)
The Openremote / Vera Status feedback work very well with Light Status/Level, or with a Variable Container that memorize my Audio/Video devices status.
Openremote use Polling Status to Vera with the Long Polling Method, as soon as the Vera have a Status update, it will throw it to Openremote.

Maybe I found what’s wrong, but I’m not sure, so I need your engineering :slight_smile:

This is what Openremote get from Vera Status when I push ON a light Switch :

<root full="0" loadtime="1385379912" dataversion="380254882" state="-1" comment="">
<devices>
<device altid="35" id="23" subcategory="0" room="4" parent="1" level="100" status="1" state="4" comment="Lumière: La transmission est OK"></device>
</devices>
</root>

you can noticed Vera gave the Status and the Level of the light in the update

This is what Openremote get from Vera Status when I updated the Bluray Status of my Variable Container Plugin to ON :

<root full="0" loadtime="1385379912" dataversion="380254864" state="-1" comment="">
<devices>
<device altid="" id="15" subcategory="-1" room="7" parent="0" variablename1="Bluray" variablename2="Box" variable2="off" variablename3="TV" variable3="off" variablename4="Projecteur" variable4="off" variablename5="Ecran Proj." variable5="off" variable1="on"></device>
</devices>
</root>

Here you can noticed the Variables values, especially variable1 just set to “on”.

But When I set the Volume with DLNA Control point (or with OR), here is the status feedback :

<root full="0" loadtime="1385379912" dataversion="380254949" state="-1" comment="">
<devices>
<device altid="" id="41" subcategory="-1" room="0" parent="0" state="-1" comment=""></device>
</devices>
</root>

And same for Pause command :

<root full="0" loadtime="1385379912" dataversion="380255019" state="-1" comment="">
<devices>
<device altid="" id="41" subcategory="-1" room="0" parent="0" state="-1" comment=""></device>
</devices>
</root>

Here I don’t see any status updated…

But when I manually retrieved the Full Status Of Vera, everything looks good :

http://Vera_IP:3480/data_request?id=status&output_format=xml

<device id="41" status="-1"><states>
[............]
<state id="174" service="urn:upnp-org:serviceId:RenderingControl" variable="Volume" value="27"/>
<state id="175" service="urn:upnp-org:serviceId:RenderingControl" variable="Mute" value="0"/></states>
<Jobs/><tooltip display="0"/></device>

Any Idea ???

I am not familiar neither with Openremote nor with the status command.
Maybe because the variables are refreshed with a short delay (event notification) ?

And sorry for the delay regarding release of version 0.2. I have now only one last thing to do. So maybe a release tomorrow evening.

[quote=“lolodomo, post:269, topic:177228”]I am not familiar neither with Openremote nor with the status command.
Maybe because the variables are refreshed with a short delay (event notification) ?
And sorry for the delay regarding release of version 0.2. I have now only one last thing to do. So maybe a release tomorrow evening.[/quote]

Forget Openremote (just to put some environment informations) … this is more Vera Luup http api.
Polling Vera Status with web method is explain here : http://wiki.micasaverde.com/index.php/UI_Notes#Tracking_status_changes
With Dataversion timestamp to pull status, Vera only send Difference between the actual status and the status sent in the last timestamp of Dataversion.

But it is very strange because your device launch an update notification, but without the modified values contents …
While I’m looking why, my First idea was in S_SonosRenderingControl1.xml, the stateVariable Volume have the sendEvents option set to no. I have modified it with yes value, but unfortunately it doesn’t work better …

I’m keep trying to find what’s wrong…

Something I really don’t get at the moment is which plugin is the current one for sonos?

Does this “DLNA Media Controller plugin” replace the sonos plugin? If I understand this correctly I still need to install the Sonso Plugin to get the complete functionality.

Do I still need the UPnP Proxy (MiOS Apps) or is this no more neccesarry when using the “DLNA Media Controller plugin”?

Just got my first sonos device today, and I am wondering which plugins I am supposed to use now?

[quote=“chixxi, post:271, topic:177228”]Something I really don’t get at the moment is which plugin is the current one for sonos?

Does this “DLNA Media Controller plugin” replace the sonos plugin? If I understand this correctly I still need to install the Sonso Plugin to get the complete functionality.

Do I still need the UPnP Proxy (MiOS Apps) or is this no more neccesarry when using the “DLNA Media Controller plugin”?

Just got my first sonos device today, and I am wondering which plugins I am supposed to use now?[/quote]

The DLNA plugin does not replace the Sonos plugin.
For Sonos, of course it is adviced to use the Sonos plugin.
The DLNA plugin allows to control Sonos too but with less features than with the Sonos plugin.

OK, Sonos Plugin up and running. Did not test a lot yet, but so far it seems to work.

Next step is to setup XBMC (OpenElec), so far this is not discovered, even though UPnP control is enabled. But I have to read first what has already been written in this forum…

Either the discovery code discovers DMR/DMS but not the OpenElec and we have to debug to understand why.
Either the discovery code discovers no DMR/DMS at all and in this case you could be in the same case as macfly92 and me, you have to update the network setup of your Vera: ​http://forum.micasaverde.com/index.php/topic,16905.msg132502.html#msg132502

I just released version 0.2.
You can download it here (ZIP archive at the bottom of this page): 0.2 in tags – DLNA Media Controller

What’s new in version 0.2:

[ol][li]
fixed: browsing of Media Servers
[/li]
[li]
fixed: managing of URI with non standard characters like French accents
[/li]
[li]
fixed: do not try to set AV transport URI when URI is not set (not found)
[/li]
[li]
control added to find a compatible protocol between the media to be played with the protocols accepted by the Media Renderer
[/li]
[li]
UI updated: browsing of Media Servers
[/li]
[li]
UI updated: user can now select an available server protocol or let the plugin select automatically a protocol compatible with the Media Renderer
[/li]
[li]
Scene editor: actions are now available in the devices tab
[/li]
[li]
action BrowseDMS: parameters updated
[/li]
[li]
action PlayItem: renamed into PlayDMSMedia and parameters updated
[/li]
[li]
new variable SinkProtocolInfo: store the list (CSV) of protocols accepted by the Media Renderer
[/li]
[li]
new variable CurrentAlbumArt2: same as CurrentAlbumArt except when CurrentAlbumArt is not accessible; in this case, it is set to a default album art
[/li][/ol]

Regarding HTTP URL you enter in the field URI (Player tab), in the new version, I only associate a protocol (http-get::audio/mpeg:) to URL ending with “.mp3”. The idea is to confirm that it improoves compatibility with Sony, Samsung, … renderers.

I am now waiting for your feedback.

I just discovered that browsing BubbleUPnP server is not working well. I will fix that in a next version.
I have mainly worked with XBMC as server, so additional tests are certainly required with other Media Servers.

Looks like a XML parsing problem in the JavaScript ! The XML looks good so I don’t understand…
Edit: I think I found the reason, not yet the solution. Bubble has the fabulous idea to use as value in media metadata …

Hi Lolodomo !

Here’s come the first feedback of the 0.2 version :

Can Browse Plex Media Server Library. Seem no problem in browsing.

Sony Bluray :

Can Discover it : YES

Cannot play song from PlexServer (works in the previous version)
Log with Automatic protocol :

08      11/30/13 17:01:21.422   JobHandler_LuaUPnP::HandleActionRequest device: 41 service: urn:dlna-org:serviceId:DLNAMediaController1 action: PlayDMSMedia <0x2ddcd680>
08      11/30/13 17:01:21.422   JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=41 <0x2ddcd680>
08      11/30/13 17:01:21.422   JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:dlna-org:serviceId:DLNAMediaController1 <0x2ddcd680>
08      11/30/13 17:01:21.423   JobHandler_LuaUPnP::HandleActionRequest argument action=PlayDMSMedia <0x2ddcd680>
08      11/30/13 17:01:21.423   JobHandler_LuaUPnP::HandleActionRequest argument ObjectID=37212eb7b3ed7d3caf52 <0x2ddcd680>
02      11/30/13 17:01:21.427   luup_log:41: DLNA: Media cannot be rendered by the selected renderer. <0x2ddcd680>

Log with protocol selected :

08      11/30/13 17:01:28.711   JobHandler_LuaUPnP::HandleActionRequest device: 41 service: urn:dlna-org:serviceId:DLNAMediaController1 action: PlayDMSMedia <0x2ddcd680>
08      11/30/13 17:01:28.712   JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=41 <0x2ddcd680>
08      11/30/13 17:01:28.712   JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:dlna-org:serviceId:DLNAMediaController1 <0x2ddcd680>
08      11/30/13 17:01:28.712   JobHandler_LuaUPnP::HandleActionRequest argument action=PlayDMSMedia <0x2ddcd680>
08      11/30/13 17:01:28.712   JobHandler_LuaUPnP::HandleActionRequest argument ObjectID=37212eb7b3ed7d3caf52 <0x2ddcd680>
08      11/30/13 17:01:28.713   JobHandler_LuaUPnP::HandleActionRequest argument Protocol=http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01500000000000000000000000000000 <0x2ddcd680>
02      11/30/13 17:01:28.717   luup_log:41: DLNA: Media cannot be rendered by the selected renderer. <0x2ddcd680>

Cannot play MP3 Webradio (Doesn’t work in the previous version too)
Logs :

08      11/30/13 17:09:34.597   JobHandler_LuaUPnP::HandleActionRequest device: 41 service: urn:dlna-org:serviceId:DLNAMediaController1 action: Play <0x2ddcd680>
08      11/30/13 17:09:34.597   JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=41 <0x2ddcd680>
08      11/30/13 17:09:34.597   JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:dlna-org:serviceId:DLNAMediaController1 <0x2ddcd680>
08      11/30/13 17:09:34.597   JobHandler_LuaUPnP::HandleActionRequest argument action=Play <0x2ddcd680>
08      11/30/13 17:09:34.598   JobHandler_LuaUPnP::HandleActionRequest argument URI=http://broadcast.infomaniak.net/ouifm-high.mp3 <0x2ddcd680>
01      11/30/13 17:09:34.662   luup_log:41: DLNA: error UPnP_request (SetAVTransportURI, urn:schemas-upnp-org:service:AVTransport:1): status=1 statusMsg=500 result=[<?xml version="1.0"?><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>716</errorCode><errorDescription>Action SetAVTransportURI failed
01      11/30/13 17:09:34.760   luup_log:41: DLNA: error UPnP_request (Play, urn:schemas-upnp-org:service:AVTransport:1): status=1 statusMsg=500 result=[<?xml version="1.0"?><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>701</errorCode><errorDescription>Action Play failed

Linux GMrenderer :

Can be discovered : NO (while I can with uPnp Device Spy)

Can play Plex Media Sounds from library !
Can play WebRadio !

I must UNCHECK “Buttons state controlled by Media Renderer” to control it.

No news from my side with the lack of updated status data from vera luup request yet …

[quote=“macfly92, post:279, topic:177228”]Hi Lolodomo !

Here’s come the first feedback of the 0.2 version :

Can Browse Plex Media Server Library. Seem no problem in browsing.

Sony Bluray :

Can Discover it : YES

Cannot play song from PlexServer (works in the previous version)[/quote]

Hi macfly.

Please try again with the attached file.

If it works, I will release immediately a version 0.3 with this fix.