Radio Station Manager for xtreamer

The xtreamer is a powerful streaming receiver. I mostly use it to watch movies, but it can do more. I was interested in using the web radio receiver function. The way the xtreamer is currently designed it is only possible to select and play radio stations with the IR remote (or web based remote) and with the TV or beamer turned on. I want to be able to define and play my favorite radio stations on a web page served by the xtreamer.

Here’s the solution. With the help of the very active xtreamer community (see this forum topic) I programmed a simple php script that let’s you define and play your favorite radio stations. This works particularly well with an iPhone or another smart phone as remote control.


  • Radio stations can be added and removed on a web page.
  • This adds and removes the according .plsx files in the MyRadio folder. This also affects the *MyRadio* folder in the xtreamer’s Internet Radio menu.
  • The radio stations can be started and stopped on a web page without having to turn on the TV or beamer.
  • The user can choose a default station that is played when the xtreamer is powered up.

Simple Installation

Unpack the files and put them on a USB stick in the top level folder named MyRadio. Nothing has to be configured and the radio station manager can be used right away.

With a browser go to the address http://<ip-of-your-xtreamer>/media/sda1/MyRadio
In some cases the mount point is sda instead of sda1.

Alternative Installation

The file index.php and the img folder can be copied to the already existing MyRadio folder or to any other folder on a external USB drive. If your USB stick is not mounted on sda1 or if index.php is not installed in the top level folder MyRadio, the variable $stationspath in index.php has to be adapted. For an alternative mount point you will usually have to change C: into D:, but other drive letters might be possible too. Hint: The last grey text line in the manage section displays the current mount points of your xtreamer.


Go to the ‘manage’ section to add and remove stations.

Go to the ‘stations’ section to start and stop playing the radio streams.

When radio stations are added in the manage section, the according .plsx files are created and stored in the folder MyRadio where the script is. Therefore, the USB stick has to reside permanently in the xtreamer. I have found no way to run .plsx files from the local xtreamer’s filesystem using the /tmp/webrun method.


radio v0.5 (April 30th 2011. Auto-Play after power up.)
radio v0.4
(Dec 27th 2010. Bugs fixed. JavaScript based play&stop.)
radio v0.3 (Dec 19th 2010. MyRadio editor)
radio v0.2
(Dec 12th 2010)
radio v0.1
(Oct 24th 2010)

30 thoughts on “Radio Station Manager for xtreamer”

  1. Hi Rolf,
    many thanks for you cool little script!
    I copied the version from Dec 19’th on my internal HDD in the MyRadio folder and it was working instantly, playing .plsx files from the MyRadio folder on the HDD (sda1)!
    I just found the minor issue that removing stations wasn’t working, but I’m so happy that I can now control the Internetradio from my Notebook.
    Thank you very much for your effort and have a merry christmas,

    1. Thanks for your feedback, Marcus. I was able to replicate that bug. I’ll fix this and make an updated version available soon. Stay tuned 🙂

  2. Very good idea! But I can’t get it work! If I copy it to myradio (internal hdd) folder and browse to “media/sda1/MyRadio” I just get “404 – Not Found”.

    If i put it in root in a folder named “radio” (media/sda1/radio) – as in the example inside your index.php – then the Manager appears. But when I select a station the Xtreamer application goto menu “Media Library” and select “HDD”. But it wont open it. What’s wrong ?

    I have firmware 2.5.2S

    1. Hi Bernt,
      If I get it right, you have 2 issues. The first is delivering web pages with the xtreamer’s web server. I only have experiences with web pages on an USB attached disk.

      The second issue is running plsx files from an internal hd. As far as I know there is currently no possibility to do this with the /tmp/webrun method. But I will continue to investigate that issue.

      The only solution I have for you so far is to put the MyRadio folder on a USB-stick (or external hd)

      1. I took out my internal hd and put MyRadio on USB-stick. Browsing to “media/sda1/MyRadio” work but again it’s not playing, as before it stop at “HDD”. Shouldn’t it be “USB” ? My USB is mounted as “C:” so paths is correct.

      2. Correction. Your Mangaer doesn’t select HDD or USB. It select “Media Library” and the shown selected is what was used last time.

  3. Thanks Rolf! I was finding my way how to play custom radio channels on my new Xtreamer and with your script I got it working in two minutes in very convenient way.


  4. This looks like a usefull tool! I really want to try it, but the download link doesn’t work (for all versions)….
    Hope you can repair this

      1. Thanks a lot. The installation is easy and it works very nice! Without the tv on selecting my favourite stations on my iphone, one more happy man on earth!
        Thanks Rolf!

  5. Dear Rolf,
    this is great! Such a little program increasing the usability of xtreamer significantly! Now sorry to bother with one more question: is there any possibility to add some auto start feature for web radio? Something like this:
    -one selects which web radio station to auto run in your script
    -then it needs to be defined that your script gets automatically called upon power-up
    -and when your script gets called then it will start the previously defined station
    That would be cool!

    1. Hi T,

      That’s an interesting suggestion, but it is tricky. PHP scripts are not initialized when the xtreamer is powered up. There is no power up “hook” in PHP or httpd that could trigger the script. I have implemented a method that uses a unix initialization script. Please let me know it it works for you.

  6. Dear Rolf,

    and could you add a “Power Off” function to the Web Interface? So that it is possible to witch the Xtreamer off via the WebUI.

    Thanks & Regards in advance…

  7. Dear Rolf,

    have installed and tested it. It works great! Thank you very much. You even included the PowerOff button in the version 5! Now the Xtreamer can really be used as a proper WebRadio…

    Thanks & Greetings!

  8. This is what i was looking for! No need to turn on the tv when i only want to listen to the radio. Thanks!

  9. Thanks for this nice petit interface! I just unplugged the fan from my Xtreamer Pro as it was making too much noise, removed the disk (which will be used for offline backup soon) and used one of those 2GB USB sticks on a lanyard that I got at some conference, just copied your tool on it, opened it, worked! 🙂

    Greetings from much too hot for work (IMHO 🙂 Zurich 🙂

  10. This is fantastic. Just installed and tested the auto-start feature and it work great. I so wanted the auto-start thingy that I was even contemplating buying a new net-radio for it. So thanks a lot!

  11. Dear Rolf,
    When I found out about your script, I got really excited. This is exactly what I am looking for. To play soma FM without turning on the video part.
    I followed your instructions and copied everything on sda1 on my Sidewinder2 and then accessed the relevant http. I do get to see your interface but I cannot turn the music on. I press on the buttons and nothing happens.
    Any input would be highly appreciated.

  12. Further to my previous post, when I try to set SomaFM to autoplay on power-up I get the following message: Warning: file_put_contents(/etc/init.d/S90radio) [function.file-put-contents]: failed to open stream: Unknown error 30 in tmp/usbmounts/sda1/MyRadio/index.php on line 376

  13. Hallo Rolf
    Ich finde deine Idee des Radio-Station-Managers toll und wollte ihn für einen Xtreamer Prodigy benutzen. Dazu hab’ ich die Version Radio V5 ins Wurzelverzeichnis eines USB Sticks kopiert. Über den Browser lässt sich die Seite auch finden. Sobald ich allerdings im Browser einen der vorinstallierten Radiosender auswähle, startet der Xtreamer kurz den Player und geht dann zu HDD/sda1/myradio/img. Nun passiert nichts mehr. Wie kann ich dieses Problem beheben? Wie oder wo kann ich einstellen, dass nicht auf das Verzeichnis HDD (habe im Xtreamer übrigens keine Festplatte installiert), sondern auf den USB-Stick zugeriffen wird?

    Schon jetzt vielen Dank für deine Unterstützung.

  14. Hi Rolf,
    Really nice work but security is a bit of concern as passing anything to execute is really easy with this script. Adding the device default web interface security will make it at least a bit more robust. So to achieve this I did took the log-in process php files from the and after slight modification I did reapply them to your index.php. Now it asks to login with the device web admin account and password before you can do anything with it and after login there is also option to log out. If you are interested let me know and I will share the details with you. Do you know where can I find more info on the syntax and parameters for tcmd_openshare value.
    Thanks again, great script

    1. Hi Felix,
      I fully agree with you, that this script isn’t secured at all. Requiring authentication is definitely a good idea. But I think the script should remain as simple as possible – to install and use. So maybe the best approach would be to make authentication optional.
      I’d greatly appreciate an updated version of the script, and I happily make it available here for download. Thanks!

  15. hello,

    i’ve downloaded this because it looked very handy.
    my problem is dat when i click a station xtreamer sidewinder 3 starts mediaplayer but closes inmediatly.
    could you tell me what i’m doing wrong?


    1. Hi Stephan, I’m sorry for the trouble you have. Unfortunately I have no possibility to help you because I don’t own a Sidewinder 3. Sorry!

  16. Nice script!
    Unfortunately not working for me as same issue as Stephan here. The audioplayer stops right after the starting.
    I have the Xtreamer Prodigy. Seems there are a few issues with system and script

    1) the Prodigy accepts .pls files rather than .plsx files. Script can easily be adopted for that.
    2) For pls(x) files the link is build on the title rather than the filename… seems not right to me. I fixed this by replacing the line with the link with the filename
    print "$currstation";
    3) The Prodigy seems to have firmware bug on playing these pls files from the web, at least in firmware R4.02 also the regular webinterface shows the same closing direct issue while clicking play

    1. seems the code part did not copy nicely:


  17. Hi Rolf,

    I’ve just tried to install your tool but failed.
    My hard disk ist sda2 so I’ve changed with a editor the index.php
    but I still got a lot of text on the browser screen and none of the buttons works.

    I’m using Xtreamer MK1 with an interal hard disk and an usb drive,
    firmware 2.7


  18. Still some issues, Rolf 🙁

    So, finally I’ve acces to my xtreamer and can add stations in the list.
    Stop, shut down, volume up and down is working fine but
    when clicking on the link to a station it doesn’t start :-((

    The TV screen changes to Home and is then going back to the previous screen without starting the new radio station.

    Any Ideas?


Leave a Reply

Your email address will not be published. Required fields are marked *