Skip to content

Notes, Caveats and known problems

Daniel Scheller edited this page Jun 20, 2013 · 7 revisions

Table of Contents

Python Versions below 2.7

Please note that if the installed System Python Version is "older" than 2.7 (the case e.g. on Ubuntu Lucid 10.04, Debian Squeeze and maybe more), special care on upper/lower-case correctness has to be taken, as these versions don't support the "flags=re.IGNORECASE" statement for re.sub() calls.

Please use the exact casings as described in the Configuration section, then everything should work perfectly.

Backlight not turned off on suspend

As the addon currently doesn't have a way to determine if XBMC is instructed to suspend the system, you can try this little workaround which should turn off the display's backlight (tested and reported working on Ubuntu, YMMV on other distributions):

  • Create this Python script on your system (assuming /usr/local/bin/lcdbacklightoff.py) and make it executable (chmod +x):
 #!/usr/bin/env python2
 
 import telnetlib
 import time
 import re
 
 tn = telnetlib.Telnet()
 
 tn.open("localhost", "13666")
 tn.write("hello\n")
 rep = tn.read_until("\n", 2)
 
 lcdinfo = re.match("^connect .+ protocol ([0-9\.]+) lcd wid (\d+) hgt (\d+) cellwid (\d+) cellhgt (\d+)$", rep)
 
 tn.write("screen_add backlight\n")
 rep = tn.read_until("\n", 2)
 
 tn.write("screen_set backlight -priority alert\n")
 rep = tn.read_until("\n", 2)
 
 tn.write("screen_set backlight -backlight off\n")
 rep = tn.read_until("\n", 2)
 
 # overwrite/"empty" screen if proper lcdinfo was received
 if lcdinfo is not None:
   tn.write("widget_add backlight cleartext scroller\n")
   rep = tn.read_until("\n", 2)
 
   tn.write("widget_set backlight cleartext 1 1 %s %s m 1 \"\"\n" % (lcdinfo.group(2), lcdinfo.group(3)))
   rep = tn.read_until("\n", 2)
 
 while True:
   time.sleep(10)

To make sure this works, you can try running it straight from the shell - your display's backlight should turn off, and turn on after stopping the script by hitting CTRL+C. If your LCDd runs on another host or some non-standard port, you need to adjust the line that says "tn.open(...)" accordingly.

Afterwards, save this shell script to /etc/pm/sleep.d/92_lcdisplay and also make it executable:

 #! /bin/sh
 
 case "${1}" in
   suspend)
     /usr/local/bin/lcdbacklightoff.py &
     ;;
   resume|thaw)
     killall python
 ;;
 esac

Your display's backlight should now turn off when suspending, and turn on again when resuming.

Getting Futaba/Targa mdm166a VFD hardware running on Ubuntu Precise

This is a short guide to get Futaba/Targa mdm166a VFD modules running on Ubuntu 12.04 with the shipped lcdproc-0.5.5. Unfortunately, the supplied LCDproc package doesn't ship with the needed driver (due to a missing dependency), so this has to be manually built. Thanks to user freaksworth at the XBMCNerds.de forum for sharing this information!

  • Update package lists and install required build dependencies:
 $ sudo apt-get update && sudo apt-get install build-essential lcdproc
  • Manually build and install the missing libhid (due to this library being missing for whatever reason, the lcdproc package is built without the mdm166a driver):
 $ wget http://alioth.debian.org/frs/download.php/1958/libhid-0.2.16.tar.gz
 $ tar xzvf libhid-0.2.16.tar.gz
 $ cd libhid-0.2.16
 $ ./configure --disable-werror
 $ make
 $ sudo make install
  • Build LCDd with all modules enabled and copy the mdm166a driver to the LCDproc modules dir:
 $ wget http://downloads.sourceforge.net/project/lcdproc/lcdproc/0.5.5/lcdproc-0.5.5.tar.gz
 $ tar xzvf lcdproc-0.5.5.tar.gz
 $ cd lcdproc-0.5.5
 $ ./configure --enable-drivers=all
 $ cd server/drivers
 $ make
 $ sudo cp mdm166a.so /usr/lib/lcdproc/.

You can now enable (and thus use) the mdm166a driver by putting

 Driver=mdm166a

to your /etc/LCDd.conf, replacing any existing "Driver="-lines. After restarting the LCDd service, the display should show it's empty server screen. The display is now ready to be used with XBMC and script.xbmc.lcdproc.

Filled block chars wrong with CFontz-driven displays

When using displays driven by LCDproc's CFontz driver, it might happen that the filled block char used by progress bars (using the $INFO[LCD.ProgressBar] InfoLabel) is displayed wrong, e.g. as a ÿ - this occasion has been reported with M204SD01B VFD Module hardware, of course YMMV with other CFontz display modules.

As it seems, this is either a bug in the CFontz driver which maps the block char to the wrong character of the display's character ROM, or - regarding the mentioned hardware - a bug in the arduino library which acts as a middleware between LCDproc and the hardware. When the latter applies, the problem can be fixed by patching the arduino wrapper so when the filled block is to displayed, the correct char gets sent to the hardware. Apparently, there's no recipe (patch) available to just quickly fix this.

For more information, please check this post by Elf1sh at the XBMC.org community forum - credits to him for sharing this information.

Clone this wiki locally