Using a digital frame as a secondary monitor

Without HW modding ;-)

Idea

How about having a secondary (low cost, low consumption) pc monitor to show status data for a server?

Hardware needed:

  • digital frame (bluetooth enabled)
  • at least 1 pc with bluetooth

They must be in range of course.

Develop a script that (periodically):

  1. gathers information to be displayed (text?)
  2. aggregates this info into one single page/image (the final format MUST be recognized by the digital frame, i.e., JPG, GIF, etc.)
  3. uploads this image via bluetooth to the digital frame

Implementation

  1. no need to explain, just use whatever sequence you are interested in (e.g. 'df', 'top', 'who', etc.)
  2. ideas:
    1. text → parsewiki → latex → pdf → jpg
    2. imagemagick (superimpose)
    3. pbmtext (from netpbm package) !!!
  3. as easy as: '$ obexput -v -b <BLUEADDR> -p <filename>'

The uploaded (via bluetooth) image is displayed as soon as received and it's not stored, so there are no overflow (only 10 Mb of memory on the frame) problems :-)

I “crontabbed” the script, it runs every minute, it also picks a random photo from my library and displays it (after a small delay).

If you want to monitor websites you can use “web thumbnailing” software to display snapshots of webpages on the frame.

The USB channel could also be used BUT the frame switches to a “pc connection” mode when the cable is connected and does not display anything until the cable is disconnected and, anyway, bluetooth is better (for the range).

Scripts

Generate image from textual file:

cat $FILENAME|pbmtext> $FILENAME.pbm
convert $FILENAME.pbm $FILENAME.jpg

The conversion is a must since the frame does not accept/display PBM files.

Upload and display:

obexput -v -b <BLUEADDR>  -p <nomefile>

A complete example

FILENAME=$(mktemp)
##########################
# status here, modify at will
date >> $FILENAME
df >> $FILENAME
top -b -n1 |head -n 10 >> $FILENAME
##########################
cat $FILENAME
# cut to 70 char is a must, to keep text viewable
cat $FILENAME|cut -c-70|pbmtext> $FILENAME.pbm
convert $FILENAME.pbm $FILENAME.jpg
obexput -v -b <BLUEADDR>  -p $FILENAME.jpg
rm ${FILENAME}*

An evolution...

statusOnFrame.sh   # script for status (see above)
sleep 5

#########################################################
TEMPDIR=$(mktemp -d)
pushd $TEMPDIR

#METEO################
wget http://www.ilmeteo2.com/italy.png
convert italy.png -resize 410x234 foto.jpg
mandaFoto.sh foto.jpg
sleep 5

for num in 1 2 3 4
do
 wget http://www.ilmeteo2.com/italy${num}.png
 convert italy${num}.png -resize 410x234 foto.jpg
 mandaFoto.sh foto.jpg  # obexput...
 sleep 5
done

#UNAFOTOACASO################
PHOTO=$(find <!!!your path here!!!> -type f|grep -i 'jpg$'|shuf|head -n 1)
LABEL=$(echo $PHOTO|cut -c 27-)
convert $PHOTO -resize 410x234 label:$LABEL +swap -append foto.jpg
#ls -l $PHOTO
mandaFoto.sh foto.jpg  # obexput...
pausa

#NEWS################
#wget http://ansa.it/web/ansait_web_rss_homepage.xml
wget -O - http://ansa.it/mobile/ |html2text|tail -n +5|head -n 15|pbmtext > ansa.pbm
convert ansa.pbm foto.jpg
mandaFoto.sh foto.jpg  # obexput...
sleep 5

#########################################################
popd

rm -f ${TEMPDIR}/*
rmdir ${TEMPDIR}

Result

digitalframeasmonitor.jpg