Squeezebox

From MiOS
Revision as of 18:01, 13 January 2012 by Ap15e (Talk | contribs)

Jump to: navigation, search


Using the SqueezeBox Plugin

Contents

Displaying cover art for the current song

1. Create new camera device(s) for the room(s) equipped with Squeezebox(es)

2. Configure the new camera device(s):

  • IP address: IP address and port of your Squeezebox Server (<ip address>:<port number>)
  • Path: music/current/cover.jpg?player=<MAC address> (replace <MAC address> with the MAC address of the player; IP address should work too)

Example

Using the SBS CLI

Luup/Lua skeleton

socket=require('socket')
local client = socket.connect('<IP address of SBS>', 9090)
client:send("<CLI command>\n")
local result=client:receive()
...

For a list of valid <CLI command> navigate to: SBS's Home / Technical Information / Help / Command Line Interface

Some examples for <CLI command>

<duration> does not work for Squeezebox Radio due to Slimdevices bug #15749.

Displaying text

Syntax:

<MAC address of player> display <line1> <line2> <duration>

Example:

client:send("00:04:20:XX:XX:XX display Hello%20World%201 Hello%20World%202 10\n")

'Pressing' a button on the Squeezebox remote

Syntax:

<MAC address of player> button <buttoncode>

Example:

client:send("00:04:20:XX:XX:XX button brightness_toggle\n")
client:send("00:04:20:XX:XX:XX button volume_up\n")
client:send("00:04:20:XX:XX:XX button volume_down\n")

<buttoncode> as defined in Default.map; telnet to your SBS port 9090, type 'subscribe button' (without quotes), press <RETURN>, press the buttons of the remote to get the buttoncodes.

Skipping to the previous/next track

Syntax:

<MAC address of player> playlist index <index|+index|-index|?> <fadeInSecs>

Example:

client:send("00:04:20:XX:XX:XX playlist index -1\n")
client:send("00:04:20:XX:XX:XX playlist index +1\n")

Pause/Unpause playing

Syntax:

<MAC address of player> pause <0|1|>  <fadeInSecs>  <suppressShowBriefly>  

Example:

client:send("00:04:20:XX:XX:XX pause\n")

Changing the volume level

Syntax:

<MAC address of player> mixer volume <0 .. 100|-100 .. +100|?>

Example:

client:send("00:04:20:XX:XX:XX mixer volume +10\n")
client:send("00:04:20:XX:XX:XX mixer volume -10\n")

Switching players (undocumented and untested)

Syntax:

switchplayer from:<MAC address of player1> to:<MAC address of player2>

Example:

client:send("switchplayer from:00:00:00:00:00:01 to:00:00:00:00:00:02\n")

[Reference: http://www.mail-archive.com/plugins@lists.slimdevices.com/msg46077.html]

Playing a file

Syntax:

<MAC address of player> playlist play file:///<filename>

Example:

Windows:
77:d3:XX:XX:XX:XX playlist play file:///I:/NewMusic/Schwanensee%20(aus%20Kinderbuch)/Content/01%20-%20Track%201.flac
Synology NAS:
77:d3:XX:XX:XX:XX playlist play file:///disk1/music/file.mp3

Sending IR codes (SB2/3 and Transporter)

Theory of operation

1. Plug an IR emitter into the phones jack of your Squeezebox/Transporter.

2. Install IRBlaster.

3. Restart your SBS.

4. Install the IR remote files for the IR devices you are going to control or use the IR-Learning Wizard (part of IRBlaster) to record the codes of your remote(s).

Now you are ready to send IR codes via Lua (adjust SBS_IP_address, SBS_CLI_port, playerid, remote_name, and command_name accordingly):

socket=require('socket')
 
local SBS_IP_address = '192.168.178.22'
local SBS_CLI_port   = 9090
local playerid 	     = '00:04:20:XX:XX:XX'
local remote_name    = 'Onkyo_RC-738M' -- as defined in the LIRC configuration file for this remote
local command_name   = 'PWR'           -- as defined in the LIRC configuration file for this remote
 
local client = socket.connect( SBS_IP_address, SBS_CLI_port ) 
 
function sendIR( device_MAC, remote, command )
 
 client:send( device_MAC .. ' irblaster send ' .. remote .. ' ' .. command .. '\n' )
 client:receive()
 
end
 
sendIR( playerid, remote_name, command_name )

Successfully tested with: SBS 7.3.2, IRBlaster/IR-Learning wizard 5.4, Skymaster DVR 7400.

Squeezebox Control beta plugin

http://forum.micasaverde.com/index.php?topic=5097.msg28878#msg28878

LOUIS4Vera

http://forum.micasaverde.com/index.php?topic=5232.0

LIRC2LuupDevice4SBS

http://forum.micasaverde.com/index.php?topic=5709.0

SAD - Squeezebox Server Announcement Device

http://forum.micasaverde.com/index.php?topic=6952.0

SPB - Squeezebox Preset Button device

SPB maps preset buttons to Luup events.

http://forum.micasaverde.com/index.php/topic,9059.0.html

squeezedVera and squeezedVeraScenes

squeezedVera is a plugin for the Logitech Squeezebox, and it gives you the possibility to run scripts in different ways that can control your z-wave devices through Vera.

squeezedVeraScenes will run the same scripts as squeezedVera but here you define conditions for when they shall run in a configuration file, e.g at sunset on Mondays and Tuesdays. You can also define different scenes with different behaviour.

http://forum.micasaverde.com/index.php/topic,1047.0.html

Personal tools