Squeezebox

From MiOS
Revision as of 16:50, 1 June 2010 by Ap15e (Talk | contribs)

Jump to: navigation, search

Displaying cover art for the current song


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

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)


Using the SBS CLI

Luup/Lua skeleton

socket=require('socket') client = socket.connect('<IP address of SBS>', 9090) client:send("<CLI command>\n") 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>

Displaying text <MAC address of player> display <line1> <line2> <duration> client:send("00:04:20:XX:XX:XX display Hello%20World%201 Hello%20World%202 10\n")

Note: IIRC, <duration> does not work for Squeezebox Radio

'Pressing' a button on the remote <MAC address of player> button <buttoncode> 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 <MAC address of player> playlist index <index|+index|-index|?> <fadeInSecs> 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 <MAC address of player> pause <0|1|> <fadeInSecs> <suppressShowBriefly> client:send("00:04:20:XX:XX:XX pause\n")

Changing the volume level <MAC address of player> mixer volume <0 .. 100|-100 .. +100|?> client:send("00:04:20:XX:XX:XX mixer volume +10\n") client:send("00:04:20:XX:XX:XX mixer volume -10\n")


Sending IR codes (SB2/3 and Transporter)

1. Plug an IR transmitter into the phones jack of your Squeezebox/Transporter. 2. Install IRBlaster (http://www.gwendesign.com/slimserver/dev_hard_and_software.htm#irblaster,

  http://wiki.slimdevices.com/index.php/IRBlaster)

3. Install the IR remote files for the IR devices you are going to control (http://lirc.sourceforge.net/remotes/)

  or use the IR Learning Wizard (part of IRBlaster) to record the codes of your remote.

4. Reboot your SBS.

Now you are ready to send IR codes from 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 thr 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 ' .. remote .. ' ' .. command )
client:receive()

end

sendIR( playerid, remote_name, command_name )

Personal tools