|
The SliMP3 is a music client similar to the Audiotron that makes my mp3 archive accessible from the living room. The SliMP3 is a thin client, that gets controlled from a server application on my 24/7 linux server. As the SliMP3 server software is written in Perl and distrubuted under GPL there are a lot of options to make the SliMP3 an information client on top of it's facilities to play music.
My SliMP3 is located in the kitchen where it replaces an ugly radio that never gets the local radio station without noise and plays CDs in mono and with disappointing sound. 1. SliMP3 In The Kitchen? Well my SliMP3 does the following jobs in the kitchen: - Play music from my mp3 archive on the server.
- Play the local radio station.
- Display local weather information on demand.
- Display local traffic situation on demand.
- Display new, unread e-mails on demand.
- Display weather and traffic information every 5 minutes during breakfast time.
As you see, this is quite a lot of functionality for such a small box. The picture below shows how the kitchen table hosting the SliMP3 looks like. I use a cheap Creative Inspire 2.1 amplifier and loudspeaker set, which has quite a small footprint and delivers acceptable sound for very small cash. The Subwoofer is located on the floor under the table next to the cat5 ethernet connection that makes our kitchen an e-kitchen, whatever this means. 2. SliMP3 As An Information Client The SliMP3 architecture offers an easy way to integrate self-made perl modules. These Modules can make use of the SliMP3 perl libs, which get most of the work done. Just place your perl program in the plugin folder and voila... 2.1 E-Mail Viewer The "check e-mail" module allows you to check for new e-mails on your server. A precondition is, that the server that drives the SliMP3 is also used as an IMAP or POP e-mail server to handle mail delivery for all the PCs in your LAN. Now the "check e-mail" module just has to inspect the "/var/spool/mail/$USER" file to get informed of e-mails waiting for you. The e-mail check (as well as the other extension modules I use) gets navigated by the "extra" or "plugins" item from the top level menu of the SliMP3.
As you can see there are five e-mails waiting to be read. Actually e-mail #3 is selected. You can easily toggle between the e-mails by the up/down arrows on the SliMP3's remote control.
If you are interested in reading the body of the mail just press the right arrow button and you get into the mail's body. Here you can use the up/down arrow buttons again to scroll vertically through the mail that is reformatted into a 40 column format first.
How usefull this e-mail viewer is, depends mainly from how often your PC is running. As my desktop PC is running all day long it is not of such great benefit for me, but Anke likes to have a look into her e-mailbox without having to start her computer just for that. If you are interested in the perl module, just grab it here for slimserver version 5.x and 6.x . By the way, don't forget to chanke the line my $user = "anke"; into the name of your e-mail user. Warning: It is no example of good use of perl in particular or good programming style in general. Fell free to make it better ;-) 2.2 Weather Information Another obvious use as an information client is to display some weather data. I found a weather station nearby that shows the data I need on an internet page. Processing ist easy. You just have to grab the content of this web-page, parse the needed values out if it and display it as desired on the SliMP3. This time I realized polling of the Web-Site and parsing of the resulting HTML via linux tools "wget" and "gawk". Of course, perl could do that as well (if not better). I doubt that the code will be of any help for you, as most of the magic is in the wget/gawk script and that script is totally specialized on the HTML-output of the Web-Site I get the data from.
However, here is the perl module code for slimserver version 5.x and 6.x and this is the wget/gawk script which is called from the perl module.
|