iTouch/iPhone/iPad as Squeezebox Remote

People frequently buy docking stations for their iDudes, so as to play their portable music on their main audio rigs. But in my case, my 32gb iTouch holds barely 5% of my iTunes music collection at a time, which is entirely encoded in Apple lossless format (ALAC). So for me, a connection to my computer makes more sense than an iDude dock.

Getting the iTunes from my computer to the Media Center for playback was a bit of a problem, since the iTunes server and the Media Center are at opposite ends of the house. I solved the problem through purchase of an inexpensive internet appliance called a Squeezebox from Logitech. It sits on the Media Center shelf and connects via digital cable to the AVR, providing stereo audio input at CD quality. It also has an ethernet connection via which it receives the iTunes audio bitstream via the Squeezebox Server (SBS) software that runs on the iTunes computer.

Note: Squeezebox is older technology, now superceded by AppleTV. But since Apple was late to this game, some of us still use the Logitech device. An alternative at the time would have been to acquire a PS3, which does audio and video streaming. Used with the open source Mac OS X PS3 Media Server software, one reportedly gets ALAC decoding as well. But having no PS3 on hand, this option was more than twice the cost of the Squeezebox. Currently, I have a PS3 also (thanks Owen) for streaming Netflix after our Roku box started green-screening; but we keep the Squeezebox for audio.

Some of the newer AVRs can stream video and audio via ethernet, but will not decode ALAC format. Our AVR has an ethernet connection, but does not stream audio/video via this interface. For those of us in that live in an ALAC realm far beyond the MP3 format, the Squeezebox was the cheapest/easiest/best game in town and still works great (although operation has some quirks restarting, particularly when the iTunes server is turned off).

The Squeezebox receiver (aka player) is usually bundled with a dedicated remote (Squeezebox Duet); the remote costs nearly twice as much as the appliance itself. iDude to the rescue. There is an iDude app called iPeng, which serves as a wireless remote control for the Squeezebox receiver, making the pricey dedicated remote unnecessary. SBS 7.5.1 is currently installed on my computer and works well. It indexes the iTunes tracks and serves them to the receiver on request from the iTouch remote. Is this great or what? It has become my primary iDude in-home function. I can see the album artwork on the iDude screen while listening; I don’t need to have the TV on.

There is an additional step to getting the Squeezebox receiver configured without access to its dedicated remote. A Net::UDAP perl script, UDAP_shell.pl, by Robin Bowes, must be run by a computer on the Squeezebox LAN. It configures the Squeezebox to address the Server machine on the LAN. The script is available at: https://projects.robinbowes.com/Net-UDAP/trac/browser/branches/1.0.x . Before running it, wire the Squeezebox receiver directly to the LAN router and have the LAN addresses available. Reset the Squeezebox by pressing the lighted front button about 6 seconds until it starts fast red blinking, changing to slow red blinking. Using a wired connection of the host computer to the LAN, open the terminal application and change directory to the scripts sub-directory within the downloaded 1.0.x directory. Then run the script via a command similar to:

perl udap_shell.pl –local-address 192.168.1.8

where the local address (parameter name preceded by double hyphen) is the LAN address of the host computer running the script (the machine that has the SBS and iTunes running).

Next, at the script prompt, enter lines similar to the following (but with environment-specific parameters to the set command):
>discover
>conf 1
>set interface=1 lan_ip_mode=1 lan_gateway=192.168.1.1 lan_subnet_mask=255.255.255.0 primary_dns=192.168.1.1 squeezecenter_address=192.168.1.8
>save_data
>reset
>exit

The discover command should print several lines enumerating the script’s attempted discovery of the Squeezebox on the LAN. The set command is entered as a single line. The example set command parameters above, in order, initialize the Squeezebox for:

  • interface 1: wired operation (0: wireless)
  • lan_ip_mode 1: DHCP (0: static address)
  • router IP
  • LAN subnet mask
  • LAN DNS IP (same as router)
  • SBS IP (same as local-address parameter to script)

When the script finishes, the Squeezebox receiver front button should glow white. Bring up the SBS web interface, either from System Preferences: Squeezebox Server: Advanced tab: Web Remote Control button; or via the localhost:9000 URI in a web browser on the SBS node. Check that the player is found. If so, start the iPeng application on your iDude. It should report in the bottom left that Squeezebox device is found (via SBS), and the available iTunes tracks/playlists/artwork should be itemized. If the player is not found, or the white light is not seen, review/repeat all steps carefully.

I had problems getting all artwork to be displayed in iPeng, and rescanning didn’t help. It turned out to be an SBS problem. A tip (thanks Joerg) from the iPeng developer led me to check the box labeled ‘Extract iTunes Artwork (experimental)’ in the iTunes tab of the Settings page of the SBS web interface; that fixed the problem, but confusingly, no fix seems possible just from the SBS Preference Pane without going to the web page.

Sometimes, the light on the front of the Squeezebox will turn blue and the Squeezebox will not be found by iPeng. This is usually a case of the iTunes server being down briefly, causing the Squeezebox to lose track of it. In this case, to restore connectivity, I simply unplug the Squeezebox for 15 seconds and then re-power it. The light goes to green for a few seconds, then switches to white when the SBS connection is re-enabled.

If the light changes back to blue from green in the above procedure, it means the specified server still can’t be found at the IP address last stored in its ROM. This may happen when a DHCP SBS/iTunes node is turned off for a while and/or network changes are made, causing the SBS node to receive a different IP address from the one registered in the Squeezebox receiver. In such cases, ask the router to identify the new IP address for the SBS and then re-run the setup procedure above using the new IP. Complete script instructions can be found on Robin Bowes’ site: http://projects.robinbowes.com/Net-UDAP/trac. Also refer to the iPeng application documentation.

My total remote software cost was around $25, including the iPeng app cost and donation to Robin.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s