Note: this isn't supported by Logitech, and won't survive firmware
updates. Also some plugins won't work -- some won't load in Touch's SBS
instance because they assume the Web UI will be available and blindly
try to call APIs that aren't available on Touch; others may have
architectural dependencies (for instance, my DenonSerial plugin on
Linux requires a compiled version of the Device::SerialPort Perl
module, and does not bundle a copy compiled for the Touch/ARM
architecture). Many plugins, especially older plugins, cannot be fully
configured without the Web interface. 

Also, there is *very* little free RAM on Touch -- the device only has
128 MB of RAM, and I've seen it use about 115-125 MB to run the
built-in Squeezebox Server instance alongside the normal Touch "player"
software. Some plugins might need more than the 5-10 MB of unallocated
RAM that is available on Touch. Push it too far and Touch will
crash/reboot. There doesn't seem to be any easy way to create a
page/swap file to give you some breathing room (at the expense of
performance). If you really want an ultra-lower power, compact server,
you're probably better off with a SheevaPlug -- since about half of
Touch's memory is need for the player software (jive and jive-alsa) and
SheevaPlug has twice the installed RAM, it should be a much better
server platform. Caveat hacker.

What you'll need:
    
- 'Squeezebox Touch'
  
(http://www.amazon.com/gp/product/B002LARRDA?ie=UTF8&tag=petesstuf-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B002LARRDA)
  (note:  Amazon affiliate code shamelessly embedded in URL)
- A computer for copying the plugin to Touch.
- For that computer, an SCP client program like WinSCP for Windows
- For that computer, a Telnet client (Windows, Mac, Linux all include
  command-line Telnet clients)
  

What to do:
    
- Download the plugin's zip file. If the author hasn't provided an
  easy way to find the link, you may need to examine some Squeezebox
  Server repository XML files. Logitech hosts a few on
  MySqueezebox.com: 'Logitech extensions'
  (http://test.mysqueezebox.com/public/plugins/logitech.xml),
  'Recommended extensions'
  (http://test.mysqueezebox.com/public/plugins/repository.xml), and
  'Other 3rd-party extensions'
  (http://test.mysqueezebox.com/public/plugins/other.xml). Here's the
  XML for my current VolumeLock plugin (the latest version of the first
  plugin I ever wrote, finishing it before I even received my
  Squeezebox):
    
Code:
--------------------
        <plugin name="VolumeLock" creator="Watkins, Peter" 
email="[email protected]" 
    link="http://www.tux.org/~peterw/slim/VolumeLock.html"; maxTarget="7.*" 
    minTarget="7.0" sha="144a84253a1e1dc7b97b06bc80cc7d831c0542e7"
    
url="http://www.tux.org/~peterw/slim/slim7/VolumeLock/VolumeLock-2.1.15.zip"; 
    version="2.1.15">
    <changes lang="EN">
    2.1.15: fixed volume & unmuting in 7.4/Radio; 2.1.14: more 7.4 fixes, new 
approach for Radio and Touch; 2.1.12: initial fixes for 7.4, but do NOT try to 
lock or cap the volume of a Touch or Radio (or Controller)!
    </changes>
    <desc lang="EN">
    Allows you to lock the analog and digital output levels of any Squeezebox, 
Transporter, or SliMP3. Can either prevent any changes in volume, or simply set 
a maximum volume. (Boom, Classic, Radio, Receiver, Slimp3, SoftSqueeze, 
Squeezebox1, Touch, Transporter)
    </desc>
    <title lang="EN">VolumeLock</title>
    </plugin>
--------------------
    
  The "plugin" tag tells you it's a plugin (and not an applet,
  wallpaper image, etc.) The "url" attribute of that first "plugin" tag
  tells you where my zip file is (the minTarget says it should work on
  Squeezebox Server 7.0 or newer, and maxTarget says it should work on
  any 7.x version. Touch runs SBS 7.5, so this plugin is a good
  candidate.
-  Unzip the zip file on your computer. You should end up with a
  directory with the plugin's name (e.g. VolumeLock). The directory
  will have an "install.xml" file and some other content, possibly
  other subdirectories.
- Make sure remote login is enabled for your Touch. On Touch itself,
  use Home > Settings > Advanced > Remote login and check the Enable
  SSH box. 
-  Use your SSH client to log in to your Touch (use Home > Settings >
  Advanced > Diagnostics to find the IP address for your Touch)
- Use your SCP client to copy the unzipped folder to the
  /usr/squeezecenter/Plugins directory on Touch (so you should end up
  with a new directory on Touch like
  /usr/squeezecenter/Plugins/VolumeLock).
- On Touch, use Home > Settings > Advanced > Squeezebox Server and
  stop Touch's SBS instance. Wait patiently for it to stop.
- On Touch, use Home > Settings > Advanced > Squeezebox Server and
  start Touch's SBS instance. Wait patiently for it to start.
- With your SCP client, browse to /etc/squeezecenter/prefs on Touch.
  You should now see a folder named "plugin" or "plugins" and inside
  that you should see a file named after the plugin you just installed,
  e.g. "VolumeLock.prefs".
-  I would suggest you go back and disable remote login now.**
  

At this point you may still need to configure the plugin. For instance,
VolumeLock is somewhat effective on Touch and Radio but cannot be
configured through the normal Touch and Radio menus. Here's how I
configured VolumeLock to cap the volume on my Touch. This is a little
tricky no just because the command line stuff can feel awkward, but
because the preferences used for specific plugins are usually not
documented. Normally you'd need to either configure the plugin on a
full version of SBS and mimic its settings, or read the plugin's source
code. VolumeLock has two key per-player preferences. The
"volumeLockMode" pref determines how & whether to restrict a player's
volume. Possible values are "PLUGIN_VOLUME_ALLOW_ALL" (don't
interfere), "PLUGIN_VOLUME_FIX" (try to prevent any change up or down),
and "PLUGIN_VOLUME_SET_MAX" (allow turning the volume down, but never
allow it to go louder than the configured maximum). The
"volumeLockVolume" pref is the volume level specified for the fixed or
max volume scenarios.

On Touch, Home > Settings > Advanced > Diagnostics gives you its IP
address and its MAC address (there are other ways to get the MAC
address, including looking on the label underneath your Touch). You can
now use your telnet app to connect to its CLI network interface, with a
command on your computer like 
Code:
--------------------
    telnet 192.168.1.10 9090
--------------------
. replacing 192.168.1.10 with the Touch IP address. After turning
Touch's volume down, I used these CLI commands to configure it for a
maximum volume:

Code:
--------------------
    00:04:20:11:22:33 playerpref plugin.VolumeLock:volumeLockVolume 70
  00:04:20:11:22:33 playerpref plugin.VolumeLock:volumeLockMode 
PLUGIN_VOLUME_SET_MAX
--------------------

where 00:04:20:11:22:33 is my player's MAC address, and
"plugin.VolumeLock" is taken from the file & directory names in Touch's
/etc/squeezecenter/prefs directory. Now when I try to increase the
volume on my Touch beyond 70, VolumeLock takes action, turning the
volume down and displaying a popup reminding me that the volume is
capped.

Did I mention running plugins on Touch like this is not supported by
Logitech? If something goes horribly wrong, you should perform a
factory reset. On Touch, you can do this by holding the reset button
(just above the power jack) for about 20 seconds. 

-Peter

** For quite a while now, remote access to Controller, Radio, and Touch
has set up SSH with a constant default password. This is a security
risk, especially if you ever connect your Squeezebox to "public"
networks. It's this kind of security flaw that makes jailbreaked
iPhones vulnerable -- the jailbreak software tends to set a default
root password, and the phone owners don't bother changing it. You can
change Touch's root password, but why not just disable SSH?


-- 
peterw

http://www.tux.org/~peterw/
Free plugins:  'AllQuiet'
(http://www.tux.org/~peterw/slim/AllQuiet.html) 'Auto Dim/AutoDisplay'
(http://www.tux.org/~peterw/slim/AutoDisplay.html) 'BlankSaver'
(http://www.tux.org/~peterw/slim/BlankSaver.html) 'ContextMenu'
(http://www.tux.org/~peterw/slim/ContextMenu.html) 'DenonSerial'
(http://www.tux.org/~peterw/slim/DenonSerial.html)
'FuzzyTime' (http://www.tux.org/~peterw/slim/FuzzyTime.html) 'KidsPlay'
(http://www.tux.org/~peterw/slim/KidsPlay.html) 'KitchenTimer'
(http://www.tux.org/~peterw/slim/KitchenTimer.html) 'PlayLog'
(http://www.tux.org/~peterw/slim/PlayLog.html)
'PowerCenter/BottleRocket'
(http://www.tux.org/~peterw/slim/PowerCenter.html) 'SaverSwitcher'
(http://www.tux.org/~peterw/slim/SaverSwitcher.html)
'SettingsManager'
(http://www.tux.org/~peterw/slim/SettingsManager.html) 'SleepFade'
(http://www.tux.org/~peterw/slim/SleepFade.html) 'StatusFirst'
(http://www.tux.org/~peterw/slim/StatusFirst.html) 'SyncOptions'
(http://www.tux.org/~peterw/slim/SyncOptions.html) 'VolumeLock'
(http://www.tux.org/~peterw/slim/VolumeLock.html)
------------------------------------------------------------------------
peterw's Profile: http://forums.slimdevices.com/member.php?userid=2107
View this thread: http://forums.slimdevices.com/showthread.php?t=77474

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to