Difference between revisions of "Install squeeze"
(Created page with "A [http://wiki.slimdevices.com/ Logitech Media Server] (a.k.a. SqueezeCenter) can be controlled in various ways, including a Telnet [http://wiki.slimdevices.com/index.php/Logi...") |
|||
(7 intermediate revisions by one user not shown) | |||
Line 2: | Line 2: | ||
including a Telnet [http://wiki.slimdevices.com/index.php/Logitech_Media_Server_CLI Command-Line Interface] (CLI) | including a Telnet [http://wiki.slimdevices.com/index.php/Logitech_Media_Server_CLI Command-Line Interface] (CLI) | ||
or the [http://wiki.slimdevices.com/index.php/XPL xPL plugin]. | or the [http://wiki.slimdevices.com/index.php/XPL xPL plugin]. | ||
+ | Installation instructions for Linux are provided | ||
+ | on the [http://wiki.slimdevices.com/index.php/Linux_Installation_Guide slimdevices wiki]. | ||
This [https://en.wikipedia.org/wiki/XPL_Protocol xPL] client allows to control a Logitech Media Server | This [https://en.wikipedia.org/wiki/XPL_Protocol xPL] client allows to control a Logitech Media Server | ||
running on a machine where there is no xPL hub installed. | running on a machine where there is no xPL hub installed. | ||
The Media Server will be controlled via the [http://wiki.slimdevices.com/index.php/Logitech_Media_Server_CLI CLI]. | The Media Server will be controlled via the [http://wiki.slimdevices.com/index.php/Logitech_Media_Server_CLI CLI]. | ||
+ | This doesn't make use of the [http://xplproject.org.uk/wiki/Schema_-_AUDIO.html legacy xPL control] interface. | ||
Before all, make sure you have installed an [[install xpl hub|xPL hub]]. | Before all, make sure you have installed an [[install xpl hub|xPL hub]]. | ||
+ | |||
+ | = Activate xPL = | ||
+ | |||
+ | Browse to the web interface on <code><i>yourServer</i>:9000</code>. | ||
+ | Click on <code>Settings</code> on the bottom right. | ||
+ | Selcet the tab <code>Plugins</code> and then enable <code>xPL Interface</code>. | ||
+ | |||
+ | Restart the server: | ||
+ | ssh root@<i>yourServer</i>.local | ||
+ | service squeezeboxserver status | ||
+ | service logitechmediaserver status | ||
+ | service logitechmediaserver restart | ||
+ | exit | ||
+ | |||
+ | Check the xPL messages: | ||
+ | SCRIPTS_BASE_DIR=/Users/control/Documents/Controls | ||
+ | $SCRIPTS_BASE_DIR/xpl-monitor.pl -vf | ||
+ | Play with the web interface controls and check that the corresponding messages are broadcasted. | ||
= Install xPL squeeze device = | = Install xPL squeeze device = | ||
Line 80: | Line 101: | ||
service xpl-squeeze start | service xpl-squeeze start | ||
service xpl-squeeze status | service xpl-squeeze status | ||
+ | initctl list | grep xpl | ||
SCRIPTS_BASE_DIR=/home/control/Documents/Controls | SCRIPTS_BASE_DIR=/home/control/Documents/Controls | ||
Line 117: | Line 139: | ||
$SCRIPTS_BASE_DIR/xpl-send.pl -v -d dspc-squeeze.StudySqueezeslav -c slimserv.basic command=play | $SCRIPTS_BASE_DIR/xpl-send.pl -v -d dspc-squeeze.StudySqueezeslav -c slimserv.basic command=play | ||
− | [[Category: install]] | + | [[Category: all]] [[Category: install]] [[Category: xPL]] |
Latest revision as of 12:10, 15 February 2018
A Logitech Media Server (a.k.a. SqueezeCenter) can be controlled in various ways, including a Telnet Command-Line Interface (CLI) or the xPL plugin. Installation instructions for Linux are provided on the slimdevices wiki.
This xPL client allows to control a Logitech Media Server running on a machine where there is no xPL hub installed. The Media Server will be controlled via the CLI. This doesn't make use of the legacy xPL control interface.
Before all, make sure you have installed an xPL hub.
Contents
Activate xPL
Browse to the web interface on yourServer:9000
.
Click on Settings
on the bottom right.
Selcet the tab Plugins
and then enable xPL Interface
.
Restart the server:
ssh root@yourServer.local service squeezeboxserver status service logitechmediaserver status service logitechmediaserver restart exit
Check the xPL messages:
SCRIPTS_BASE_DIR=/Users/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-monitor.pl -vf
Play with the web interface controls and check that the corresponding messages are broadcasted.
Install xPL squeeze device
Download the xPL squueze script.
Move the script to xPL scripts directory:
SCRIPTS_BASE_DIR=/home/control/Documents/Controls mv xpl-squeeze.pl $SCRIPTS_BASE_DIR chown control:users $SCRIPTS_BASE_DIR/*.pl chmod 775 $SCRIPTS_BASE_DIR/*.pl
Test xPL squeeze device
Test it on a BeagleBone:
su control SCRIPTS_BASE_DIR=/home/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-squeeze.pl -h $SCRIPTS_BASE_DIR/xpl-squeeze.pl -v -n test
Open a 2nd terminal window (on any machine with xPL installed) and monitor the xPL protocol:
SCRIPTS_BASE_DIR=/home/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-monitor.pl -vf
Open another terminal and control the SqueezeCenter:
SCRIPTS_BASE_DIR=/home/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-send.pl -v -d dspc-squeeze.controller -c slimserv.request command=list $SCRIPTS_BASE_DIR/xpl-send.pl -v -d dspc-squeeze.StudySqueezeslav -c slimserv.request command=status $SCRIPTS_BASE_DIR/xpl-send.pl -v -d dspc-squeeze.StudySqueezeslav -c slimserv.basic command=play $SCRIPTS_BASE_DIR/xpl-send.pl -v -d dspc-squeeze.StudySqueezeslav -c slimserv.basic command='power 0'
Launch the xPL squeeze device at startup
The xPL SqueezeCenter controller is to start after the xPL hub.
Ubuntu
On Ubuntu, the xPL squeeze device starts-up once xpl-hub_started
has been emitted.
Edit /etc/init/xpl-actions.conf
:
Edit /etc/init/xpl-squeeze.conf
:
################################################################################ # xPL SqueezeCenter controller # description "xPL squeeze" version "1.0" author "Francois Corthay" #------------------------------------------------------------------------------- # Configuration variables # env SCRIPTS_DIR='/home/control/Documents/Controls' env SCRIPT_NAME='xpl-squeeze.pl' env PARAMETERS='-n home' #------------------------------------------------------------------------------- # Start and stop conditions # start on xpl-hub_started stop on shutdown respawn setuid control setgid users #------------------------------------------------------------------------------- # Start daemon # exec $SCRIPTS_DIR/$SCRIPT_NAME $PARAMETERS
Start the device and test it:
su root service xpl-squeeze start service xpl-squeeze status initctl list | grep xpl SCRIPTS_BASE_DIR=/home/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-send.pl -v -d dspc-squeeze.StudySqueezeslav -c slimserv.basic command=play
Mac OS
On Mac OS, the xPL actions device starts-up later than the hub.
Edit /Library/LaunchDaemons/xpl-squeeze.plist
:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>xPL SqueezeCenter controller</string> <key>OnDemand</key> <false/> <key>UserName</key> <string>control</string> <key>ProgramArguments</key> <array> <string>/Users/control/Documents/Controls/xpl-squeeze.pl</string> <string>-n</string> <string>home</string> <string>-w</string> <string>25</string> </array> </dict> </plist>
Start the device and test it:
su root launchctl load /Library/LaunchDaemons/xpl-squeeze.plist SCRIPTS_BASE_DIR=/Users/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-send.pl -v -d dspc-squeeze.StudySqueezeslav -c slimserv.basic command=play