[ul][li]1. Install and start LMS (don’t forget to point LMS to your music directory; check that scanning has taken place).[/li]
[li]2. Install and start SP (My Music → Albums → → ; selected track should be playing now).[/li]
[li]3. Install and start WMS (make sure that there are no errors shown on the ‘Status’ tab and that the Whitebear icon in the status line is white).[/li]
[li]4. Install and start DS (make sure that DS lists ‘SqueezePlay (by Whitebear)’ as an UPnP device).[/li]
[li]5. Test the installation:
[list]
[li]DS: expand the line ‘SqueezePlay (by Whitebear)’,[/li]
[li]expand the line ‘urn:schemas-upnp-org:service:AVTransport:1’,[/li]
[li]double-click on ‘Pause’,[/li]
[li]press ‘Invoke’ (music should have stopped; restart the music via SP).[/li]
[/list]
[/li]
[li]6. Import ‘SqueezePlay (by Whitebear)’ into MiOS: Devices → Add Devices → Scan → Next → ‘SqueezePlay (by Whitebear)’ Add[/li]
[li]7. Reload MiOS; Devices → All: ‘SqueezePlay (by Whitebear)’ should appear as a new device.[/li]
[li]8. Unfortunately, the new Luup device is a zombie due to bug #1473 ([tt]http://bugs.micasaverde.com/view.php?id=1473[/tt]) - but there is a workaround: [tt]http://forum.micasaverde.com/index.php/topic,10165.0.html[/tt][/li]
[list]
[li]Download Apps → Develop Apps → Luup files → [tt]D_FUP_uuid%20…xml[/tt] (actual name may differ; make sure you’re downloading the right file …) (FUP=Foreign UPnP?).[/li]
[li]If the [tt]SCPDURL[/tt] or [tt]controlURL[/tt] or [tt]eventSubURL[/tt] in [tt]D_FUP_uuid%20…xml[/tt] contain relative [tt]URLs[/tt] (e.g., [tt]/upnp/scpd.xml[/tt]), use Device Spy to identify the Base [tt]URL[/tt] of your [tt]UPnP[/tt] compliant device and prepend it to relative [tt]URLs[/tt] (e.g., [tt]http://192.168.178.111:49000/upnp/scpd.xml[/tt]).[/li]
[li]Search for [tt]SCPDURL[/tt] in [tt]D_FUP_uuid%20…xml[/tt], download all remote [tt]SCPD[/tt] manually and upload them to MiOS using a unique name (e.g., [tt]D_FUP_uuid%20….xml[/tt]).[/li]
[li]Replace all [tt]SCPDURLs[/tt] in [tt]D_FUP_uuid%20…xml[/tt] with the names of the corresponding [tt]SCPD[/tt] files just uploaded to MiOS.[/li]
[li]Re-upload the modified [tt]D_FUP_uuid%20…xml[/tt] to MiOS and Reload MiOS.[/li]
[li]Note: It might be easier to use [tt]pluto-lzo[/tt] to modify the file in situ … - see [tt]http://forum.micasaverde.com/index.php/topic,10282.0.html[/tt] for a Luup script that semi-automates step 8.[/li]
[/list]
[li]9. Test the new Luup device: Automation → New scene → ‘Advanced’ → Pick a device → ‘SqueezePlay’ Add → Please select: Pause / InstanceID 0; SAVE, run the scene: SP should pause.[/li]
[li]10. Paste [tt]UGC[/tt] into the Apps → Develop Apps → Test Luup code (Lua) window, adjust [tt]UPnP_device_id[/tt] to the device number (‘Advanced’ tab: id) of the [tt]UPnP[/tt] device imported into MiOS, press ‘Go’.[/li]
[li]11. Install the device created by [tt]UGC[/tt]: Apps → Develop Apps → Create device: Description: [tt]SqueezePlay[/tt], Upnp Device Filename: [tt]D_Squeezebox_GUI.xml[/tt] → Create device[/li]
[li]12. Reload MiOS several times.[/li]
[li]13. Press the ‘Play’ button of the ‘SqueezePlay’ device on the dashboard: SP should resume playing.[/li][/ul]
This opens a whole new world to Vera and AV control! (I’m able to control Windows Media Player from scenes :)) )
But to take it a bit further, is it possible to execute these UPnP actions from Luup instead of creating scenes for them ?
I tried but got an error: No Foreign Control URLs for Device.
PS: I was writing a plugin to control DLNA media servers/renderers with complete SOAP Messages creation until I saw your post. This changes things a lot!
I’ve just updated the instructions for [tt]D_FUP*.xml[/tt] files that don’t contain absolute [tt]URLs[/tt] for [tt]SCPDURL, controlURL, eventSubURL[/tt] (e.g., /upnp/scpd.xml instead of http://192.168.178.111:49000/upnp/scpd.xml):
If the [tt]SCPDURL[/tt] or [tt]controlURL[/tt] or [tt]eventSubURL[/tt] in [tt]D_FUP*.xml[/tt] contain relative [tt]URLs[/tt] (e.g., [tt]/upnp/scpd.xml[/tt]), use Device Spy (see attachement) to identify the Base [tt]URL[/tt] of your [tt]UPnP[/tt] compliant device and prepend it to relative [tt]URLs[/tt] (e.g., [tt]http://192.168.178.111:49000/upnp/scpd.xml[/tt]).
[ul][li]Support for (almost?) all [tt]UPnP[/tt] compliant devices (please report [tt]UPnP[/tt] devices for which the script doesn’t work).[/li]
[li]Fix [tt]D_FUP*.xml[/tt] files that don’t contain absolute [tt]SCPDURLs, controlURLs, eventSubURLs[/tt].[/li][/ul]
This really helped!!! I have my upnp device imported and it works
I know Ap15e has unfortunately left the building, so I am hoping somehow else can answer this question:
I don’t like to use the absolute IP address somewhere “hidden” inside the xml file. Can I use this instead:
Also I tried downloading the UPnP GUI Compiler (UGC) from google with my google account, but it seems someone needs to grant me permission. Can somebody upload this code? I would like to implement step 9/10/11 aswell (knowing of course it is unsupported )
Okay, tested it and it works . . . but only for a short time . .
Somehow I can’t upload a file with a name that contains a character, and the upnp device filenames generated by the vera contain a . So I worked around it by renaming the file to a short name, upload and then changing the device file name in the advanced setting of the device. Unfortunately after a while the device_file gets set back to the original filename (D_FUP_uuid 44xxxx.xml) automatically. Strange !
Upload your file using a short file name (without spaces) then paste and run the code below in the Test Luup code window.
Don’t forget to replace the file names strings in the code (without the .xml.lzo extension)
[code]local shortname=“shortfilename_replace”
local longname=“D_FUP_xxxx”
Do you by any change have the “UPnP GUI Compiler (UGC)” code?
My next step is to create some buttons, instead of creating an “advanced scene”. And I am looking for ways to do this.
I think the spaces problem is not a Vera problem but a URL problem. As stated at: Programming in Lua : 20.3 spaces need to be escaped to either ‘+’ or %20 to be legal in a URL.
If you escape the spaces, and any other problematic characters for HTTP, then you may be able to handle the original filenames without having to modify them. Worth a shot.
I imported a Network binary switch light (Upnp Network light) to Vera (UI5).
after importation, I did exactly the steps mentioned in point 8 of the this post.
I downloaded the scpd file (related to the service). I renamed it to S_DoorBellService.xml than I uploaded it.
I downloaded the D_FUP_UIID…xml. I modified it like the following:
The GUI control have two buttons (On, Off). when pressing on ON the bellow message appears:
No Foreign Control URLs for Device
Could you please explain to me: the Control URL is used for what?
and what to do to make the device function properly?
any help will be appreciated. Thanks in advance.