[_CODE_] FUD - Fix UPnP Devices imported by MiOS V0.2

EOL, unsupported.

A Luup script that semi-automatically fixes [tt]UPnP[/tt] devices imported by MiOS.

Please note that for reasons completely beyond me, MCV inserts a space into the [tt]D_FUP_uuid*.xml[/tt] filename. >:(

Please report [tt]UPnP[/tt] devices for which the script doesn’t work.


[ul][li]Import your remote [tt]UPnP[/tt] device via MiOS.[/li]
[li]Find the corresponding [tt]D_FUP*.xml[/tt] file in [tt]/etc/cmh-ludl[/tt] and decompress it ([tt]pluto-lzo d[/tt]).[/li]
[li]If [tt]SCPDURL, controlURL, eventSubURL[/tt] in the decompressed file are relative [tt]URLs[/tt], use Device Spy to obtain the Base [tt]URL[/tt] for your remote [tt]UPnP[/tt] device (see attachment).[/li]
[li]Modify the user-adjustable variables in [tt]FUD[/tt]: [tt]device_definition_file[/tt] is the [tt]D_FUP*.xml[/tt] filename (without [tt].lzo[/tt]), [tt]device_base_url[/tt] is emtpy (‘’) for [tt]D_FUP*.xml[/tt] files with absolute [tt]URLs[/tt] and is the Base [tt]URL[/tt] obtained from Device Spy for [tt]D_FUP*.xml[/tt] files with relative [tt]URLs[/tt].[/li]
[li]Run [tt]FUD[/tt] from the ‘Test Luup code (Lua)’ window and reload [tt]LuaUPnP[/tt].[/li]
[li]Test it: use [tt]luup.call_action[/tt] or MiOS scenes (‘Advanced’ tab’).[/li][/ul]

Import [tt]WANDevice - FRITZ!Box Fon WLAN 7170 (UI)[/tt] via MiOS, set [tt]device_definition_file[/tt] to [tt]D_FUP_uuid 75802409-bccb-40e7-8e6b-001C4A500EB5.xml[/tt], set [tt]device_base_url[/tt] to [tt]http://192.168.x.y:49000[/tt], run [tt]FUD[/tt], reload [tt]LuaUPnP[/tt], test device:

error, error_msg, job, arguments = luup.call_action( 'urn:upnp-org:serviceId:WANCommonIFC1', 'GetTotalPacketsSent', {}, 36 )

luup.log( 'HHHH' .. tostring(error) .. '*' .. tostring(error_msg) .. '*' .. tostring(job) .. '*' .. tostring( arguments ) )

for k,v in pairs( arguments )
  luup.log( 'HHHH ' .. k .. ': ' .. v )


08      04/17/12 21:24:18.564   JobHandler_LuaUPnP::HandleActionRequest device: 36 service: urn:upnp-org:serviceId:WANCommonIFC1 action: ^[[36;1mGetTotalPacketsSent^[[0m <0x2e461680>
50      04/17/12 21:24:18.610   luup_log:0: HHHH0**0*table: 0xc5b778 <0x2e461680>
50      04/17/12 21:24:18.611   luup_log:0: HHHH NewTotalPacketsSent: 130790655 <0x2e461680>


Ok, either I am doing something wrong, or the three devices I tried to fix did not work. They were: Sony Blue Ray Player BDP-S580, PlayOn Software, LG 47LW5600.

How do I trouble shoot these?

Please delete the imported [tt]UPnP[/tt] devices, reload [tt]LuaUPnP[/tt], re-import one of your [tt]UPnP[/tt] devices and post (or PM) the corresponding [tt]/etc/cmh-ludl/D_FUP*.xml[/tt] file to this thread.


Trying to follow these instructions for to set up my Sonos:

Do I take it that this:
Is a relative URL?


Yes, it is a ‘relative [tt]URL[/tt]’, so you have to set [tt]device_base_url[/tt].

Right now working on getting a UPnP inspector working under OS X :slight_smile:


Chances are that the base [tt]URL[/tt] is [tt]http://:1400/[/tt].

Does [tt]http://:1400/xml/RenderingControl1.xml[/tt] return the [tt]XML[/tt] file?

BTW, you might find [tt]http://travelmarx.blogspot.de/2010/06/exploring-sonos-via-upnp.html[/tt] an interesting read.

Give the man a coconut :slight_smile:

Cheated and used a VM on Windows

Works just fine.

I shall carry on tomorrow, real world work permitting :wink:

Thanks for the link, looks like it’ll be interesting reading.



I have the complete upnp definition fileset for sonos in a zip file if you need it. Let me know if you succeed doing this as alternative to my plugin :slight_smile:


Oooh, if you could, it would mean I can get up and running. Work is getting in the way, sadly :frowning:




These xml files has been taken from my ZP100 - thus the references to the ZP100 inside the files. I believe that only the modelname, model description etc are unique to the model. I would expect the actual ServiceList to be the same for a ZP80 etc.

These are from November 2011 - dont know if changes to the firmware of the Zones has changed these though.


That’s awesome, thanks.

I’ll have a look and see if I can work out what to do with them!


I assume before trying to fix it but after decompressing it?

Before following the instructions outlined in the first post once again.

Ap15e: That looks to have worked, but I’ve done it from the office, so can’t actually hear anything from here :slight_smile: I do at least have controls that I can add from the devices available in the scenes menu, which is an improvement, thanks.


Possibly my most stupid question yet: What do I do with those XML files?


So can send commands to the transport. Which is fantastic, thanks for all your help.


Hi Catman,

I realise that this might be a big ask, but I am trying to get my Sonos to work on my VeraLite too.

I have tried the Wiki method and that didn’t work at all, so I am now trying the UPnP way.

Is there any way you could post your method for getting this to work?



I can but try, although ti’s been a while, so I may well have forgotten it!

Bear with me for a few days.