LCD Display
LCD Plugin Mod
This modified nhttpd-demon for neutrino allows the control of the LCD Display of the DBox
via the Web Interface or from other dboxes or even PC's or the XBox.
If you are a scripter you can use the DBox Display to show the Information you want to.
Example could be a shoutcast stream or even a MP3 being played by your Xbox.
Scripts that run on the box can access the display via "localhost", the controlapi has been enhanced
for these reasons.
Requirements
----------------------------------
for displaying on the LCD Display the demon uses the font "/share/fonts/micron.ttf",
"/share/fonts/micron_bold.ttf" and "/share/fonts/pakenham.ttf".
Usage
----------------------------------
The LCD-Interface gets accessed normally trough the Demon via the controlapi.
This can be on the box via the "localhost" or via the network with the Dbox IP.
Via the enhanced api: "http://Box-IP/control/lcd?parameter¶meter&...".
The following Parameters are supported:
lock = n : n=1 -> You can lock until further notice the Display from being accessed by Neutrino
n=0 -> You unlock the Display
clear = n : n=1 -> The display will be deleted (should be at the beginning)
n=0 -> Before adding new data the display will not be deleted
png = filename: a local PNG file that is on the DBox will be loaded on to the Display
(ie. /share/tuxbox/lcdd/icons/setup.png as Background)
line =x1,y1,x2,y2,col : draws a line from (x1,y1) to (x2,y2) with the colour col
col=0 -> off, col=1 -> Lit up, col=2 -> inverted
rect =x1,y1,x2,y2,col1,col2 : draws a rectangle with the left upper corner (x1,y1) and the
right lower corner (x2,y2), the framecolour col1 which will be filled with
col2 (colours see "line")
update = 1 : at this position the display will be updated Display. Therefor you can output some information
and then only update at the end. This will prevent the flickering of the LCD.
Sequences without this pameter have no influence on the display.
The following Parameters apply for Text
text = : Text will be in UTF-8 Format (Gaps = %20, Linefeed = %0A usw.)
xpos = nn : Position of the first sign horizontal (default 10)
ypos = nn : Position of the left upper corner of the first sign (default 10)
size = nn : Size of the text (default 12)
color = n : Textcolour (default 1, see "line")
font = n : Font that is used (default 0)
n=0 -> micron.ttf, n=1 -> micron_bold.ttf, n=2 -> pakenham.ttf
Please notice:
----------------------------------
Within one cue multiple command can be added.They must be different commands.
Example if you cue 2 rectangle commands the 2nd one gets ignored.
They get processed in the following order:
lock, clear, png, line, rect, xpos, ypos, size, color, font, text, update.
The Parameter lock is needed, as if you do not lock out netrino accessing the LCD it will try to update
it within the normal 1 sec cycle.
Therefore you have to use first lock=1
If you do not need to access the display anymore you will need to set lock=0 so Neutrino can access the
LCD again.
Return values:
----------------------------------
The interface confirms a succesfull command with "ok"
Expample:
----------------------------------
wget -O /tmp/nhttpd.res 'http://localhost/control/lcd?lock=1&clear=1&rect=10,10,110,50,1,0&xpos=20&ypos=27&size=22&font=2&text=%20Hello%20World%0A%C3%9Cbungstext&update=1'
wget -O /tmp/nhttpd.res 'http://localhost/control/lcd?rect=10,10,110,50,1,2&update=1'
and to "free" the display again at the end
wget -O /tmp/nhttpd.res 'http://localhost/control/lcd?lock=0'
Copyright © <05.01.2006>, < PT-1> Last Changes 15.04.2008