Home > Random noise > How to send text to the display on your Squeezebox

How to send text to the display on your Squeezebox

Did you know that you can send custom messages to your Squeezebox? I don’t recommend this to be your primary communication channel, but despite being useless, it’s still kinda cool. SqueezeCenter provides a command line interface (called CLI, of course:), allowing you to communicate with your precious Squeezebox over good, ol’ telnet.

Lets write something….
Picture 2

…that outputs nicely on the Squeezebox!

TimeForCoffee

I’m no expert at shell scripting, and I’m sure there is several more elegant way of achieving the same result. Do you know of another way? I resorted to some dirty piping. Note the sleep 1 there… I also needed (I think!) to do some substitution in order to get the whitespaces right, and sed helped me out. Here goes.


#!/bin/sh
#
MSG=$1
if [ $# -lt 1 ] ; then
echo Skriv en melding
read MSG
fi
MSG=$(echo $MSG|sed 's/ /%20/g')
(
echo show line2:$MSG font:huge centered:1
sleep 1
echo exit
) | telnet 127.0.0.1 9090
clear
exit

The text is centered and huge, and placed on line2 (the main line). More documentation on CLI is available from the SqueezeCenter web interface. It is somewhat hidden, but it’s there. Have fun!

Categories: Random noise Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment