A plugin for SqueezeCenter / Squeezebox Server

Squeezebox Server 7.4: on the Settings / Plugins page, check the box labeled "Show all 3rd party plugins", or enter the repository URL in the Additional Repositories area.
SqueezeCenter 7.3: you can use the repository URL in the web Extension Downloader interface instead of manually unzipping the plugin.
SqueezeCenter 7.0 through 7.2: download the zip file and unpack in your Plugins directory. Releases for SqueezeCenter 7 are available here.

Making child-friendly remote controls

The initial goal of KidsPlay was to provide an easy way to configure SqueezeCenter so my kid could have a remote control that offered some control over some Squeezeboxes. Squeezeboxes recognize both the infrared codes sent by Slim Devices/Logitech remotes, and codes designated for JVC DVD players. KidsPlay lets you redefine what the JVC DVD buttons do, so you can give your child a universal remote that's configured to send JVC DVD codes, and not worry about your child either messing anything up, or becoming frustrated that the system is too difficult to use.

Redefining the 6 preset buttons on a Boom or Radio

KidsPlay also lets you redefine any or all of the numbered preset buttons on a Squeezebox Boom or Squeezebox Radio. Please note the special instructions for Radio (basically, you must assign a traditional preset to a numbered button before KidsPlay can redefine it (Radio will not ask Squeezebox Server to do anything if it thinks a button has not been assigned, and if Radio doesn't ask Squeezebox Server to do anything, KidsPlay cannot redefine the button.)

Redefining the button on a Squeezebox Receiver

KidsPlay also lets you redefine any the buttons on a Squeezebox Receiver. Normally the button acts like a Pause button, but with KidsPlay you can change that to act like a Power button, or any sequence of CLI commands you wish.

Per-player settings

You can decide on a player-by-player basis whether to

  1. ignore any KidsPlay settings
  2. only use KidsPlay settings where defined, and otherwise use normal button behavior
  3. only use KidsPlay settings, and otherwise ignore the buttons

There are separate behavior settings for JVC DVD buttons and the Boom preset buttons.

As of version 2.4.0, you can redefine buttons on a per-player basis, and can mix-and-match "global" and per-player button definitions. For example, if you have five Squeezebox Radios (players A, B, C, D, and E) and define Preset 1 both globally and for Player B, then players A, C, D, and E will use the global setting, and Player B will use its player-specific definition for Preset 1.

"CLI macros"

On a button-by-button basis, you can assign zero or more Squeezecenter "Command Line Interface" (CLI) commands. A number of examples are shown on the KidsPlay configuration screen; here's one: to assign JVC button 1 to play a random selection of children's music, you can use a macro like
power 1; mixer volume 30; stop; randomplaygenreselectall 0; randomplaychoosegenre Children's 1; randomplay tracks
which says to

  1. Make sure the player is powered on
  2. Set the volume to 30 (of 100)
  3. Stop whatever's playing (needed if you're already playing a random mix!)
  4. Un-select all genres for Random Mix
  5. Select the "Children's" genre for Random Mix
  6. Start playing random songs

CLI commands must be separated by semicolons. Individual fields may be quoted if they contain spaces, e.g.
playlist play "/music/albums/directory with spaces"
Quotation marks and semicolons may be escaped with backslashes -- use \" for a quotation mark, \; for a semicolon, and \\ for a backslash. You must also escape square brackets ([ ]) and curly braces ({ }) if you want to use those literal characters.


Version 2.5.0 and newer support special "variable substitution". For example, one KidsPlay user has this macro
display "{CURRENT_TRACK_ARTIST}: {CURRENT_TRACK_TITLE} is rated <1/5>"; trackstat setrating {CURRENT_TRACK_ID} 20%
which both sets the TrackStat rating for a song and displays a message like "Pink Martini: Veronique is rated <1/5>". The web settings pages for KidsPlay list all the current variable names.

Running on certain Squeezeboxes

KidsPlay normally runs each CLI command in the context of the player where you pressed the button, e.g. "power 0" would turn off the player where you pressed the button. By prepending a "location specifier", you can specify that a command should be run on

A specific player by name
"Dining Room:" power 0 will turn off the player named "Dining Room" (note the ":")
A specific player by MAC address
00:04:20:11:22:33 power 0 or 00:04:20:11:22:33: power 0 will turn off the player with MAC address 00:04:20:11:22:33
All players
ALL: power 0 will turn off every player (note the ":")
All players except this one
OTHERS: power 0 will turn off every player except the one where you pressed the button (note the ":")

A macro like "power 1; OTHERS: power 0; playlist clear; randomplay tracks" would turn on the player where you pressed the button, turn of all other players, clear the playlist for the player where you pressed the button, and then play random tracks on the player where you pressed the button.

Other plugins - Home

$Id: KidsPlay.html,v 1.13 2010/04/17 13:41:49 peterw Exp peterw $