BottleRocket

A plugin for SlimServer

Beta versions with Windows support available! Download the "beta2" or newer version.

Releases for SqueezeCenter 7 are available here.

SlimServer 6.5.x: download BottleRocket.zip, install it by unpacking the zip file in your Plugins directory, start SlimServer, go to the Plugins settings page for each player that should use BottleRocket to control a device, and edit the settings as appropriate. All players share the same 'br' command path, serial port, "resend" count, and list of "other devices", but each player can have its own X10 code.

SlimServer 6.0 through Slimserver 6.3.x: download BottleRocket.pm.6.3, install it as BottleRocket.pm, and edit the USER SETTINGS area of BottleRocket.pm as appropriate. Note: BottleRocket for SlimServer 6.3 does not have any Squeezebox interface and cannot control other X-10 devices.

Other versions are available.

Using X-10 to control your receiver/amplifier power

One of my Squeezebox units is connected to an audio receiver that does not have any sort of remote control. My Kill-A-Watt power meter showed that the receiver used over 30 watts of power when turned on but not playing any music. This plugin causes my receiver to be turned on and off when that Squeezebox is, so my Squeezebox remote control is all I need. The plugin handle not only turning on the Squeezebox with the Power button on its remote control, but also by other means like the web interface. (My other Squeezebox is connected to a receiver with a remote control, so I have not associated an X10 code with it, and BottleRocket does nothing when that Squeezebox is turned on or off.)

Player with an X-10 code for its amp Player with no X-10 amp code
player with X-10 code player with noX-10 code

Using BottleRocket to control other X-10 devices

BottleRocket allows you to control other X-10 devices independently of player power status by way of the Squeezebox remote control. With the Up and Down buttons, you can cycle through the list of devices you've entered in the web configuration. You can do this with any Squeezebox, regardless of whether the player has an amplifier X-10 code associated with it.
device 1 device 2
When a device is shown on the Squeezebox screen, you can turn it on by pressing Play, and turn it off by pressing Pause. You can send "brighten" commands to lamp modules with the Forward button and "dim" commands with the Rewind button.
Play Pause
device 2 on device 2 off
"Rewind" to dim "Forward" to brighten
dim brighten

Each of the first 9 "other devices" you enter in the web interface will be associated with the corresponding 1 to 9 button. By simply pressing the corresponding button when the player shows any normal BottleRocket screen, you can turn the device on. When you press the "0" key, all the "other devices" you've set up will be turned on, one at a time. The "0" key does not affect the devices associated with specific players unless you explicitly add their device codes to the "other devices" list.
Pressing "1" on any BottleRocket screen Pressing "0" on any BottleRocket screen
device 1 on all devices on
If you want to turn a device off without scrolling up or down to its entry on a BottleRocket screen, you can press the Sleep button (or the Search button) before pressing the appropriate device number button. To turn all the "other devices" off, press the Sleep (or Search) button before pressing the "0" button. Once you press the Sleep button, all you can do in BottleRocket screens is press "0", or a 1-9 button corresponding to a configured device, or press Sleep again to return to normal behavior.
Pressing Sleep on any BottleRocket screen Pressing "0" after pressing Sleep
sleep all devices off

While the player is showing any BottleRocket screen, you can press the Add button to have "all lights on" commands sent to each house code that is in the "other devices" list. For instance, if your "other devices" list includes X-10 codes B2, B7, and C1, the Add button will send "all lights on" commands to house codes B and C. Unlike the normal X-10 "all lights on" feature, BottleRocket's "all lights on" can also be used to turn on lights connected to "appliance" and other non-lamp modules. Simply put a "+" in the name of the device when you enter it in the SlimServer player/plugins configuration and the BottleRocket "all lights on" command will send an "on" command to all such individual devices in addition to the normal X-10 "all lights on" codes.
Pressing "Add" on any BottleRocket screen
all lights on

Requirements

This version requires the 'br' BottleRocket command-line software to be installed on your SlimServer host. You must have an X10 Firecracker device on your SlimServer host. This probably only works on Linux and Unix systems. Note: The "beta2" and newer versions include ready-to-run 'br' programs for Intel/x86 Linux and Intel/x86 Microsoft Windows, and full source code for the 'br' utility.

In addition to copying the BottleRocket.pm file to your Plugins directory (and possibly restarting SlimServer), you'll need to set some configuration variables in the web interface (for SlimServer 6.5.x) or edit the variables in the "USER SETTINGS" area toward the top of the BottleRocket.pm file (for SlimServer 6.3.x or older). The newer code has a minimal player UI -- it will tell you if a player is configured for BottleRocket (and, if so, its X10 code) -- but as of SlimServer 6.5.x, all configuration is through the normal SlimServer web interface.

Also you'll need to ensure that the user your SlimServer software runs as will have permissions to use the serial port on which you've put your Firecracker device. On my Fedora system, I modified the "console perms" file so that the "console" user would *not* be given all serial ports. I then modified "rc.local" so that the serial port would be given to the SlimServer user at system boot.

There is a Perl CPAN project for 100% Perl X10 modules that should be a viable alternative to the BottleRocket software, but I have not tried using that software yet -- laziness on my part, mostly, since this 'br' approach works and the Perl X10 CPAN documentation didn't look very clear.

SqueezeNetwork limitation

This plugin will not work with SqueezeNetwork, due to technical limitations. When a Squeezebox or Transporter(?) is connected to SqueezeNetwork, it is not connected to the "local" Slimserver host at all. This means that plugins you've installed on your local Slimserver won't see any activity on the Squeezebox. While using SqueezeNetwork, only the SqueezeNetwork servers can tell when you turn your Squeezebox on or off. If you connect to SqueezeNetwork from the regular player menu while the player is "on" and connected to Slimserver, your amp should be turned on when you use SqueezeNetwork. The problem is that your amp will remain powered on if you turn your player "off" while still on SqueezeNetwork. To turn your amp off with BottleRocket, you'd need to Sign Off SqueezeNetwork and then turn your Squeezebox off. It appears that Felix Mueller's AMP Switch I2C software+hardware solution has the same limitiation, unfortunately.

Why BottleRocket and X10

There are a number of hardware plans available for driving an external relay from the Squeezebox hardware. Some appear to use the Squeezebox headphone jack, so they at least don't require internal hardware modifications. But I've had an X10 brand "Firecracker" kit for years that seemed suitable, and wouldn't require soldering anything that would have to be plugged into an AC jack (I prefer soldering low voltage, low risk projects!). Wikipedia article on the X10 standard

The Firecracker hardware

The X10 brand Firecracker kit includes (among other things) an RF transmitter that attaches to a 9-pin serial port on a computer (the Firecracker itself), and an RF receiver/X10 transmitter/X10 "appliance module" unit. An X10 appliance module is essentially an AC relay controlled by X10 signals; like a traditional relay, it only has "on" and "off" modes. Other X10 modules are available, most notably the "lamp" modules that are designed to alter the AC output to allow for changing the brightness of incandescent lamps/light bulbs. It's generally recommended that only incandescent lamps use the lamp modules since you don't want to "dim" the power to your expensive audio gear.

The BottleRocket command-line software

Years ago, the X10 company offered the Firecracker kits for a very low price which spawned some interest and development. One result of this was the BottleRocket command-line software for Linux/Unix. The 'br' command from this software can be used to make the Firecracker send commands via RF with simple commands like br -n 2 to turn on module number 1.

This BottleRocket.pm SlimServer plugin

This plugin, when enabled, looks at the status of all players whenever a player is powered on or off (I've tested the web interface, IR remote control, and CLI -- all work). The plugin knows which players are associated with which X10 codes. If a player associated with an X10 code is powered on or off, this plugin will send the appropriate X10 control codes through the Firecracker by way of the 'br' command.

Other plugins - Home

$Id: BottleRocket.html,v 1.13 2008/09/14 16:41:23 peterw Exp $