PowerCenter

A plugin for SqueezeCenter/SlimServer

SqueezeCenter 7.3: you can use the repository URL https://tuxreborn.netlify.com/slim/slim7/repodata.xml in the web Extension Downloader interface instead of manually unzipping the plugin.
SlimServer 6.5.x: download BottleRocket.zip.
Install it by unpacking the zip file in your Plugins directory.

Configuration:
SqueezeCenter 7.x: start SqueezeCenter, go to the Web SqueezeCenter settings, Advanced, PowerCenter global settings to configure the location of 'br' or 'heyu' (for X10) and the host:port for Insteon Device Manager, and the list of "other" X10 and Insteon devices. Use the Web PowerCenter player settings Web page for each player that should use PowerCenter to control a device when that player turns on and off, and enter the appropriate X10 or Insteon code. (At this time, the CM11A controller is only supported in Linux.)
SlimServer 6.5.x: start SlimServer, go to the Plugins settings Web 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 or Insteon 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 PowerCenter 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 PowerCenter to control other X-10 or Insteon devices

PowerCenter 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 PowerCenter 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 PowerCenter screen Pressing "0" on any PowerCenter 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 PowerCenter 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 PowerCenter 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 PowerCenter screen Pressing "0" after pressing Sleep
sleep all devices off

While the player is showing any PowerCenter 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, PowerCenter'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 SqueezeCenter PowerCenter configuration and the PowerCenter "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 PowerCenter screen
all lights on

PowerCenter and the Squeezebox Controller

PowerCenter also provides a menu in the Controller's Extras menu for controlling "other" devices: it lists the "other" devices and allows you to turn them on or off (using menu choices or pressing "+" for off or Play for on while on a device line or looking at a screen listing options for a particular device), and brighten or dim (using menu options only).

Requirements

This version requires the 'br' command-line software or the 'heyu' command-line software to be installed on your SqueezeCenter host (PowerCenter includes pre-compiled versions of br for 32-bit Intel Linux and Windows computers, and a pre-compiled version of heyu for 32-bit Intel Linux computers, and source code for both apps). You must have an X10 Firecracker or CM11A device on your SqueezeCenter host (CM11A only supported on Linux at this time).

In addition to unzipping PowerCenter to your Plugins directory (and restarting SqueezeCenter), you'll need to set some configuration variables in the web interface.

Also you'll need to ensure that the user your SqueezeCenter 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 SqueezeCenter user at system boot.

There is a Perl CPAN project for Perl X10 modules that should be a viable alternative to 'br' and 'heyu' on Windows, but it depends on compiling a DLL for the serial port, and I have not gotten around to working on that.

SqueezeNetwork limitation

This plugin will not work if your player is connected directly to SqueezeNetwork, due to technical limitations. (It *will* work if you're connected to your local SqueezeCenter server and using SqueezeNetwork services through SqueezeCenter.) When a Squeezebox or Transporter(?) is connected to SqueezeNetwork, it is not connected to the "local" SqueezeCenter host at all. This means that plugins you've installed on your local SqueezeCenter 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 SquezeCenter, 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 PowerCenter, 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 PowerCenter and X10 or Insteon

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!). This approach also allows PowerCenter to work with players like the Squeezebox Receiver that don't have the same flexibility with their headphone jacks that the Squeezebox Classic does. 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 PowerCenter 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 PowerCenter SsqueezeCenter 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, Squeezebox Controller, and CLI -- all work). The plugin knows which players are associated with which X10 codes. If a player associated with an X10 or Insteon code is powered on or off, this plugin will send the appropriate X10 or Insteon control codes through the Firecracker by way of the 'br' command, or a CM11A via 'heyu', or Insteon via Insteon Device Manager.

Other plugins - Home

$Id: PowerCenter.html,v 1.2 2008/11/15 16:32:25 peterw Exp peterw $