So first of all hi to the forums since this is my first post.
Now that that's over with I'll get to the business of posting a little How To to get UPnP running on unRAID. I know quite a few people have UPnP media devices that want to play their content from unRAID and I happend to know one of them who needed help. I'm sure there are plenty of ways to get this working and that its been discussed before but I could honestly not find a good simple guide for it on these forums or linked from this great wiki entry: http://lime-technology.com/wiki/index.php?title=UnRAID_Topical_Index
I'm aware of Twonky and the PS3mediaserver solutions but Twonky is not free and PS3mediaserver went over my head and also was not geared towards generic UPnP devices. I choose MediaTomb in the end and this is how I got it working.
How-To Version 1.2
1: Download MediaTomb from http://mediatomb.cc/pages/download and get the Static Binaries for i368. Most current right now (8 April 2009) is "mediatomb-static-0.11.0-r2-linux-uclibc-i386.tar.gz"
2: Extract the .gz and the .tar file using 7-zip or whatever unpacking utility works for you until you get to the "mediatomb" folder. Copy this folder to the root of the unRAID flashdrive.
3: To start Mediatomb when you boot you need to edit the Go file found in the config folder. Please use WordPad to edit this file since WordPad is Linux/Unix friendly unlike Notepad or Word and won't "ruin" the file. Now add the following to the file at the bottom
cd /boot/mediatomb
echo "./mediatomb.sh" | at now + 1 minute
and save the file. The reason for navigating to the folder using cd first is that the mediatomb.sh script wont run properly if its not run from the correct folder. Using echo at the start hides the script from the consol so it wont look strange and the "at now + 1 minute" part delays the start of the script. The delay is there to make sure unRAID has time to mount all the drives properly and establish a network connection.
4: Reboot the server so that MediaTomb can start up once and create all its needed configuration files.
5: Getting support for international characters such as åäö. You will need to add the following lines to the config.xml file that was created during the reboot in step 4. You will find it in "flash\mediatomb\config\".
<filesystem-charset>UTF-8</filesystem-charset>
<metadata-charset>UTF-8</metadata-charset>
Add them to the top of the Import function, namely after "<import hidden-files="no">". Again please use WordPad when editing this file for the reasons mentioned above, also NotePad and the rest tend to have problems displaying .xml files in a easy-to-read manner.
6: Reboot once again to impose the UTF-8 changes. Once its all started again you can configure MediaTomb from http://unraid-servers-ip:49152/ and also add/remove content from its database. It could be other ports if the default 49152 is taken, usually it tries going one port higher until it finds a free port so just start upping the port until you find it.
Post-Install support of UTF-8: If you already have MediaTomb installed in some manner and want to add the UTF-8 support you have to delete the database file mediatomb.db found in "flash\mediatomb\config\" first so that MediaTomb can rebuilt it with the correct UTF-8 characters when rebooting.
End of How-To
Known Bugs in Version 1.0-1.2 configuration
The current configurations has one big problem and that is you cant stop the array when the UPnP server is being used. This will cause the parity to get unsynced and you'll be forced to do a hard-reboot of the array (alternatively shut it down from the terminal) so please keep that in mind and make sure all UPnP devices are inactive before stopping the array. Suggestions on how to fix this would be appreciated. The ability to run code when stopping the array will apparently be added to unRAID 5.X, until then just remember to turn of any UPnP devices before stopping the array.
Changelog of guide:
1.0: Initial guide, had known problems and was more of a betatest.
1.1: Fixed all known problems from 1.0 with starting script and other flaws such as spelling, wording and changed from NotePad to WordPad as suggested editor. Found the de-sync bug in this configuration for the first time, its assumed to be in the 1.0 configuration as well. Special thanks goes to [glow=green,2,300]Joe L.[/glow] and [glow=green,2,300]RobJ[/glow] for their help with this version of the guide.
1.2: Guide missed the reboot step before adding UTF-8 support, hard to change a file that's not there. De-sync bug still not fixed but also the only known bug, solution supposedly on its way in 5.X.