Roku and Linkstation - setup and customization tips
- 1 Background
- 2 Hardware/Software Requirements
- 3 Directory setup
- 4 Firefly/mt-daapd Tweaks
- 5 Playlists
- 6 Hpodder
- 7 Customizing the Roku
- 8 References, etc
The term Roku can refer to any device produced by Roku Labs. These devices seem to play well with Firefly , Firefly-equipped Linkstations and other hacked NAS's. Below are some tips and tricks that may provide a more positive experience for Roku & Linkstation users.
- Any Roku soundbridge device (M500, M1000, M1001, M2000)
- Any Linkstation w/ OpenLink or FreeLink installed on it
- A wired or wireless (b or g standard) network - some Roku devices are WEP & WPA compatible
- regular computer w/ web browser & terminal/command line interface program
On the share/data partition (hda3 usually) of your Linkstation, it is a good idea to set up some sort of directory structure for organizing your music files. Here is one possible example:
/share/freelinktunes/e_Music /share/freelinktunes/i_Tunes /share/freelinktunes/hpodderdownloads /share/freelinktunes/mediarippertunes /share/freelinktunes/lossless /share/freelinktunes/internet_streams
Managing these files is easy if you have flexible access to them with Samba or NFS, so one can modify ownership and permissions to these directory with chown and/or chmod.
Making Firefly's web interface configuration page "configurable"
If you notice that your Configuration page on the web interface (available by web browser at <linkstation-ip>:3689/config.html) won't allow you to make changes, then you may need to adjust permissions on the configuration file. The very first entry on the Configuration page lists the location of this file, usually at /etc/mt-daapd.conf . To make the web configuration work, cd to the directory where this configuration file is and modify the permissions of the file:
cd /etc chown nobody mt-daapd.conf chmod 600 mt-daapd.conf
Reload the web Configuration page and it should work now. This is a method suggested by an expert at Firefly Forums. If you have concerns about security, you may want to read this thread for details on keeping it secure.
Automatically refresh the database
Also on the Configuration page, there is an option for periodic updating of the database. To make your Firefly server update every hour, go to the Database area on the Configuration page, choose or enter the following:
- Scan Type 0 - Normal,
- Rescan Interval 3600 (seconds, ie. 1 hour),
- Always Scan Yes.
Add to Recognized File Extensions
Also on the Configuration page, there is an option for getting Firefly to scan for more types of files. Normally it will only scan for .mp3 and a few others. In the section Music Files, you can add other types, such as .url files (for internet/stream play lists).
If you want to enable scanning for .url internet playlist files for instance, go to the section
- Music Files, and in Extentions add in
- .url so that the field looks like
- and press Save. Don't forget to restart Firefly for this change to take effect.
See Firefly's documentation for more details on types of files supported.
Restart Firefly from the command line
You may have to restart your mt-daapd server from the command line for some of these configuration changes to take effect.
It takes a minute or so for it to come on line after a (re)start.
Although Roku's firmware has built-in presets, these can be cumbersome to use, as they require the user to Change Configuration. Some people find it easier to put the internet/radio streams in a .url file and access them through the Roku's Playlist feature - it is much faster that way. To create and use an internet stream playlist for Firefly and Roku, do the following:
- Get the name, bit rate and URL of a stream that you want to listen to through your Roku SB. For example: Public Radio WNYC-AM from New York City, at 32 kilobit per second, with URL ,http://wnycam.streamguys.com/ (no link arrow, though).
- Start your favorite editor, e.g. nano, and create a file called (again, for example): nano wnyc-nypr.url.
- Enter the following information on one line, in the format and order of <bit rate in kbps>,<desired display title>,<URL> . For example it would look like the following, all on one line:32,WNYC-AM Public Radio,http://wnycam.streamguys.com/ (no link arrow, though)
- Save it to a directory for streams, such as /share/freelinktunes/internet_streams, so they are easy to find/organize/edit.
- Add as many as you like. They are easier and faster to access from your own Playlist than they are from the Presets. In fact, you may want to copy the presets that you like to your own internet_streams directory.
- In Firefly's Configuration page, add .url as a recognized extension.
- In Firefly's Smart Playlist page, create a smart playlist called Internet Radio Stations with criteria description = "Playlist URL"
- Update Firefly's database.
When you turn on your Roku and go to Playlists, you should see Internet Radio Stations, and when you select it, you should see WNYC-AM Public Radio. Once you have it working, create as many as you want.
Hpodder is a podcatcher that is available as a Debian package, so it is a natural choice for those running Freelink. At the time this article was written, it is available in testing and instable, so remember to (temporarily) adjust your /etc/apt/sources.list as needed - that is, you must have either the testing or unstable branch of Debian enabled.
Once you install hpodder, check its man page. It gives details on configuring it and the first run of hpodder.
You will have to declare a download directory for hpodder (like /share/freelinktunes/hpodderdownloads) , as listed above in Directory setup.
One nice implementation would be to run hpodder as a daily or periodic cron job.
Customizing the Roku
CAUTION: Customizing your Roku, like any device, could void its warranty or turn it into a Brick, or in the case of a M500/M1000/M1001/M2000, a Baton, or an Expensive Aluminum Pipe. Proceed at your own risk. See your Roku manual for details.
It is relatively easy to gain access to a Roku M1001, for instance, via telnet at your Roku's own IP address, through port 4444. A list of command available is given below. :
telnet <roku IP address> 4444 Trying <roku IP address>... Connected to <roku IP address>. Escape character is '^]'. Welcome to the SoundBridge Shell version 2.7.38 Release Type '?' for help or 'help <command>' for help on <command>. SoundBridge> ? Valid commands are: ? - displays this list help - provides help on a command clear - clears the terminal window stty - sets shell tty parameters consoleprint - sets consoleprint on or off version - prints out the software version exit - exits the shell cycles - displays a count of processor cycles uptime - reports system uptime reboot - reboots the system ps - lists threads ifconfig - lists network interface configurations ping - pings an ip address ipset - sets up a manual config mfg - performs mfg tests sketch - draw on the display irman - capture, monitor or send IR commands memstat - prints out memory statistics romcheck - print rom sizes log - dump the persistent log logclear - clear the log logadd - add string to log attract - attract eyeballs irwait - wait for a specific IR command displaytype - print type of currently connected DISplay time - displays the current time clearsettings - clears CascadeSettings and reboots softwareupgrade - perform software upgrades from network or local storage srbmod - modify srb for oem test rcp - enter the RCP shell
Many accounts of hacking Roku devices can be found on the web:
- One of the first hacks of the M500 - http://www.i-hacked.com/content/view/108/90/
- Hacking the Roku w/ TCL to display local (mini/home weather station) weather information or a Message of the Day - http://www.last-outpost.com/~malakai/roku/index.html
- Setting up a static IP for your Roku - http://www.rokulabs.com/support/soundbridge/static_ip.php
- Roku Labs Forum for SoundBridge Control & Integration (hacks & tweaks for the Roku SoundBridge) - http://www.rokulabs.com/forums/viewforum.php?f=15
- SoundBridge Email - http://www.rokulabs.com/forums/viewtopic.php?t=7040
- Displaying weather forecasts/info in a SB - http://www.rokulabs.com/forums/viewtopic.php?t=7067
- RSS using Perl via the SoundBridge - http://www.rokulabs.com/forums/viewtopic.php?t=4719
- A really cool RSS news ticker and weather display - http://users.rcn.com/apeller/roku/
Thanks to Bauldrick for advice on model & setup, and digging up the Weather & MOTD hacks at Jeff's Roku Soundbridge page
Nas-central.org Forum Thread on Roku & Other Soundbridges w/ Firefly/mt-daapd - http://buffalo.nas-central.org/forums/viewtopic.php?f=4&t=1892
Support for SoundBridge products at Roku Labs - http://www.rokulabs.com/support_sb.php