How do I use Custom UPnP with the Volume plugin?

Administrator
2013-11-03 02:03

NOTE: Starting in version 2.0 of the volume plugin, you can use the setup wizard to automatically detect if your device supports basic control using one of two common UPnP/DLNA control protocols.  To use the wizard, either choose "UPnP Custom (RendingControl)" or "UPnP Custom (Audio)" then follow the Wizard prompts.  You can also use the 'Setup Wizard' button which is visible when the control method is set to None/Disabled.

 

Old info - Only needed if you are using a pre-2.0 version of the Volume Plugin:

At some point I may add device discovery to the volume plugin but for now the priority is controlling as many device brands and types as I can while keeping the code small and light.  Because discovery of your TV or AVR is not yet available in the Volume plugin app, you will need to follow a few steps in order to determine what needs to be entered when setting up UPnP.  Essentially we need three things:  The TV or AVR's IP address, the port number it uses, and the UPnP Control URL.  Most devices will use MediaRenderer control but some AVRs may use Audio instead.

The instructions below will explain how to do this using a 3rd party app.

 

Follow the first three steps in this other FAQ to get started.  When you get to step 4, follow along below:

  1. (See other FAQ linked above)
  2. (See other FAQ linked above)
  3. (See other FAQ linked above)
  4. The app will display all UPnP devices it finds on your network.  This may change, but as of this writing the IP address it displays with the device is your phone or tablet's IP address and not the IP of the device you are looking for.  With some devices, you may see more than one item that matches your TV or AVR.  For example, on my Panasonic Viera there are two items listed.  Press on an item that matches your TV and AVR and choose 'Info' from the menu.  We are looking for MediaRenderer or Audio.  Under Device Type, if it says MediaRenderer or Audio then continue to the next step.  If it says something else, press OK to close the pop-up info and try pressing on a different item in the list that refers to your TV or AVR.  If none of them show the Device Type as MediaRenderer or Audio then you may be out of luck. 
  5. Under "Descriptor URL", the TV or AVR's IP address and port will be displayed, along with some extra text.  See example below.  Make a note of the IP address and port.  We need one more thing now.
  6. Press on the Descriptor URL text item and you should see a toast message appear that says the URL was copied to the clipboard.
  7. You can exit the Ping Tools app as we are done with that now.
  8. Open the browser on your phone or tablet and paste the copied URL into the browser's URL field and press 'Go'.
  9. You should see a bunch of XML code appear in your browser.  Scroll down near the bottom and look for the the following text (if no RenderingControl, then you may need to look for Audio:1 instead).
    <serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType>
  10. A few lines below that you should see something like the following:
    <controlURL>/dmr/control_0</controlURL>
  11. The "Control URL" that needs to be entered into the volume plugin is the text between the Control URL <Tags>.  See example below.
  12. In the Volume plugin, choose Custom UPnP (RenderingControl) or Custom UPnP (Audio) for the control method depending on what kind of results you got in the above steps then press on Edit/View Settings to enter the required info.  See examples below.

 

 

Example Info from the Ping Tools app:
----------------------------------------------------------------
Descriptor URL:
http://192.168.1.110:55000/dmr/ddd.xml
----------------------------------------------------------------

In this case, the device's IP address is 192.168.1.110 and the port it uses is 55000.  The Descriptor URL contains the Control URL that we need to add to the Volume Plugin app.  In order to get the control URL, we first need to open that link.  See steps above.

 

Example XML text after opening the URL in step 8:
----------------------------------------------------------------

<serviceList>
  <service>
    <serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType>
    <serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>
    <SCPDURL>/dmr/sdd_0.xml</SCPDURL>
    <controlURL>/dmr/control_0</controlURL>
    <eventSubURL>/dmr/event_0</eventSubURL>
  </service>
  <service>
    <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
    <serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
    <SCPDURL>/dmr/sdd_1.xml</SCPDURL>
    <controlURL>/dmr/control_1</controlURL>
    <eventSubURL>/dmr/event_1</eventSubURL>
  </service>
  <service>
    <serviceType>urn:schemas-upnp-org:service:AVTransport:1</serviceType>
    <serviceId>urn:upnp-org:serviceId:AVTransport</serviceId>
    <SCPDURL>/dmr/sdd_2.xml</SCPDURL>
    <controlURL>/dmr/control_2</controlURL>
    <eventSubURL>/dmr/event_2</eventSubURL>
  </service>
</serviceList>

----------------------------------------------------------------

In this case, the Control URL is /dmr/control_0 and that is what you will put into the plugin app.

 

Hopefully this helps but if you have problems just send me an email and I'll do what I can to get it working for you.

 

Tags: UPnP
Average rating: 0 (0 Votes)

You cannot comment on this entry