Jan 27, 2010 - Roku    Comments Off on Roku custom channel to stream home media

Roku custom channel to stream home media

Thanks to el.wubo from this thread for his work. Details are in this thread:
http://forums.rokulabs.com/viewtopic.ph … 128#159128

Installation instructions can be found here:
http://github.com/netguy204/roku_media_server

In a nutshell, here’s how it works:

  • Install Python web server on a Windows computer. This will serve the media and provide the RSS feed for the Roku unit. Since the server needs to always be running, consider setting it up to run as a service or launch a silent batch file at startup (see below).
  • Download the entire source bundle from the github site and unzip it.
  • Use the automated installed to run the springboard.py file to collect config info and upload it to the Roku unit (the unit must be in developer mode first)
  • Using the Roku SDK Developer’s guide, put the Roku unit into developer’s mode to upload files via a web browser. The new channel will be available immediately. (To do this, enter the following special remote control sequence:
Home 3x, Up 2x, Right, Left, Right, Left, Right

** Enter the code again to select the “disable installer” option **

To Troubleshoot any issues, you can Telnet to the Roku unit at <ip address>:8085

How to start the Python web server automatically

This can be done with a simple batch file. First, you should add en environment variable for your Python installation so that you can call the python.exe file from anywhere. To do this, modify the PATH statement in your environment variables to include this:

c:\python26

To add environment variables in Windows 7 & Vista:

Right-click My Computer and then click the Advanced system settings link. Click the Environment variables button. In the System Variable section, select the PATH item and click the Edit button. At the end of this string, add a semicolon and then your new variable for Python.

Now, assuming that your Roku Media Player files are in a folder named roku_media_player, create a batch file like this:

cd c:\roku_media_player\server
python rss_server.py

Save it as “roku_start.bat” to and double-click it to start your web server.

So you’ve noticed that the command windows stays open?

Here’s how to run this without showing the command window (invisible mode).

Create another file that looks like this:

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "c:\Python26\roku_start.bat" & Chr(34), 0
Set WshShell = Nothing

Save this file as “roku_start.vbs”. When you launch this .VBS file, it will call the .BAT file you made above, but will not show the command window.

Now, how do I get this to run each time I start my computer?

Easy. Just put the roku_start.vbs (or a shortcut to it) into your Windows Startup folder.

Windows Startup folder locations

Windows 7 + Vista

NOTE: The all users Startup folder is a hidden system folder located at:

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

Windows XP

C:\Documents and Settings\All Users\Start Menu\Programs\Startup

How do I stop the Python web server if I can’t see the command window?

Normally, you could use CTRL+C to stop the web server, but without a command window, this isn’t possible. Just open Windows Task Manager and on the Processes tab, sort the list to fine the process called Python. Select it and then hit the End Process button to stop the web server.

Tips & Tricks

Toggle between showing/hiding the subfolder for an artist

Around Line 116, modify the code as follows:

return getdoc(feed.dir, True).to_xml()
Hide subfolders=True, Show subfolders=False

How to add a My Stream internet radio stream

  • Find what you want at shoutcast.com
  • Right-click the “Tune In” button and select “Save Link” for the playlist file (tunein-station.pls)
  • Open the playlist file in a text editor and find the URL contained in the first line
  • Copy/paste this into My Media as a new stream