Graphlcd-plugin/touchcol: Difference between revisions

From VDR Wiki
Jump to navigation Jump to search
m (Reverted edits by 222.127.165.111 (Talk) to last version by Mrwastl)
 
(55 intermediate revisions by 2 users not shown)
Line 3: Line 3:
'''Author:''' Community maintained.
'''Author:''' Community maintained.


This page is about a branch of the [[Graphlcd-plugin|GraphLCD plugin]] with built-in support for skins. The '''GraphLCD plugin''' integrates a graphical display into [[VDR]] and makes it possible to control VDR even if the television is off.
The '''GraphLCD plugin''' integrates a graphical display into [[VDR]] and makes it possible to control VDR even if the television is off.


This page is about a branch of the [[Graphlcd-plugin|GraphLCD plugin]] with the following '''added''' or '''enhanced features''':
The branch was started by Andreas 'powarman' Regel but was then abandoned and given to new maintainers by his request.
* '''skins'''
* '''interaction''' (e.g. touchpads)
* '''colour devices''' (including '''alpha channel''')
* '''external services''' (data from other plugins)


The branch was started by Andreas 'powarman' Regel but was then abandoned and given to new maintainers by his request.
The functionality of this branch is rather impressive but unfortunately the code is hardly documented.


So this page will be used as a starting point for collecting and formatting its features. Thus this page will be started being a pigsty and improved 'along the way'.
The documentation for the new features is rather 'sparse' at the moment but this page will be used as a starting point for collecting and formatting its features, thus this page will be started being a pigsty and improved 'along the way'.


===Images===
===Images===
Line 36: Line 40:
* Epson SED1330
* Epson SED1330
* Noritake GU140X32F-7806
* Noritake GU140X32F-7806
* Noritake GU256X64-372
* Noritake GU256X64-372


and with the extra library [[http://serdisplib.sf.net serdisplib]] even a lot more (list of supported displays/modules: [[http://serdisplib.sourceforge.net/index.html#displays supported displays]]).
and with the extra library [[http://serdisplib.sf.net serdisplib]] even a lot more (list of supported displays/modules: [[http://serdisplib.sourceforge.net/index.html#displays supported displays]]).

====displays/drivers currently supported (not all drivers are verified to correctly support the new internal 32bit colour representation)====

'''Please adapt this list if a driver is working flawlessly (add a cross to 'verified') or inform the maintainer!'''

Status informations are related to the most current GIT-version!

{|cellpadding="2" cellspacing="0" border="1" width="50%"
!driver
!verified
!may work (not verified)
|-
| avrctl
|
| x
|-
| ax206dpf <sup>2)</sup>
| x
|
|-
| dm140gink
|
| x
|-
| framebuffer
| x
|
|-
| futabaMDM166A
|
| x
|-
| g15daemon
|
| x
|-
| gu126x64D-K610A4
|
| x
|-
| gu140x32f
|
| x
|-
| gu256x64-372
| x
|
|-
| gu256x64-3900
|
| x
|-
| hd61830
| x
|
|-
| image
| x
|
|-
| ks0108
| x <sup>1)</sup>
|
|-
| network
|
| x
|-
| noritake800
|
| x
|-
| sed1330
| x
|
|-
| sed1520
|
| x
|-
| serdisp
| x
|
|-
| simlcd
| x
|
|-
| t6963c
| x
|
|-
|}

<sup>1)</sup> graphic output is very slow. use ks0108-support of serdisplib instead.

<sup>2)</sup> experimental. only available if enabled during build process.


===Software requirements===
===Software requirements===


* freetype (rendering of TrueType fonts)
* freetype (rendering of TrueType fonts)
* ImageMagick or GraphicsMagick (optional, required for reading image formats other than glcd and pbm)
* serdisplib (optional, see above, not required at compile time)
* serdisplib (optional, see above, not required at compile time)


===Installation of graphlcd===
===Installation of graphlcd===


graphlcd (skin-branch) consists of two parts:
graphlcd (touchcol-branch) consists of two parts:
* '''graphlcd-base''': library with low level drivers, basic functionality, and skin support
* '''graphlcd-base''': library with low level drivers, basic functionality, and skin support
* '''vdr-plugin-graphlcd''': VDR plugin.
* '''vdr-plugin-graphlcd''': VDR plugin.
Line 54: Line 156:
First of all a current version (contains included skin support) of <tt>graphlcd-base</tt> needs to be installed:
First of all a current version (contains included skin support) of <tt>graphlcd-base</tt> needs to be installed:
* Get current version from the GIT repoository:
* Get current version from the GIT repoository:
git clone git://projects.vdr-developer.org/graphlcd-base.git
<tt>git clone git://projects.vdr-developer.org/graphlcd-base.git -b touchcol graphlcd-base.git.touchcol</tt>
* compile and install the library
* compile and install the library (default installation directory: <tt>/usr/local/include/</tt>, can be changed in <tt>Make.config</tt>)
<tt>make</tt>

<tt>make install</tt>


Then the VDR plugin needs to be retrieved, installed, and compiled:
Then the VDR plugin needs to be retrieved, installed, and compiled:
* Note: <tt>$SOURCEDIR/VDR</tt> is the source directory of VDR and needs to be adapted accordingly.
* Note: <tt>$SOURCEDIR/VDR</tt> is the source directory of VDR and needs to be adapted accordingly.
* Get current version of the branch from the GIT repository:
* Get current version of the branch from the GIT repository:
cd $SOURCEDIR/VDR/PLUGINS/src/
<tt>cd $SOURCEDIR/VDR/PLUGINS/src/</tt>
git clone git://projects.vdr-developer.org/vdr-plugin-graphlcd.git -b 0.2.0 vdr-plugin-graphlcd_0.2.0
<tt>git clone git://projects.vdr-developer.org/vdr-plugin-graphlcd.git -b touchcol vdr-plugin-graphlcd_0.3.0</tt>
ln -s vdr-plugin-graphlcd_0.2.0 graphlcd
<tt>ln -s vdr-plugin-graphlcd_0.3.0 graphlcd</tt>
* compile plugin, eg:
* compile plugin, eg:
cd $SOURCEDIR/VDR/
<tt>cd $SOURCEDIR/VDR/</tt>
make plugins
<tt>make plugins</tt>


Everything else is the same as described in [[plugin installation]].
Everything else is the same as described in [[plugin installation]].
Line 73: Line 176:
After finishing the installation, some files need to be copied.
After finishing the installation, some files need to be copied.


* copy the configuration file <tt>graphlcd.conf</tt> to some destination, on most installations this will be /etc.<br/>can be manually configured by setting parameter <tt>--skin</tt> (see below):
* copy the configuration file <tt>graphlcd.conf</tt> to some destination, on most installations this will be /etc.<br/>can be manually configured by setting parameter ''skin'' (see below):<br/>(replace <tt>/etc/</tt> if your distribution expects another destination)
cp graphlcd.conf /etc/
<tt>cp graphlcd.conf /etc/</tt>
* copy the directory with logos, fonts, and skins to <tt>$VDRCONFIG/plugins</tt> (depending on your installation this will be <tt>/etc/vdr/plugins</tt>, or <tt>/video/plugins</tt>, or some other destination):
* copy the directory with logos, fonts, and skins to <tt>$VDRCONFIG/plugins</tt> (depending on your installation this will be <tt>/etc/vdr/plugins</tt>, or <tt>/video/plugins</tt>, or some other destination):
cp -r $SOURCEDIR/VDR/PLUGINS/src/graphlcd/graphlcd $VDRCONFIG/plugins/
<tt>cp -r $SOURCEDIR/VDR/PLUGINS/src/graphlcd/graphlcd $VDRCONFIG/plugins/</tt>


===Parameter===
===Parameter===
Line 145: Line 248:
</skin>
</skin>


{{Box Info |
* skins are always UTF-8, on non UTF-8 systems UTF-8 text will be transcoded on-the-fly.
* All variable and font names must be 7-bit safe (no umlauts or diacritics).
* HTML-entities are not supported, except '''&amp;lt;''', '''&amp;gt;''', '''&amp;amp;''', '''&#x''<hexID>'';''' and '''&#''<decID>'';''' (e.g.: &amp;#xE001;).
}}


A skin definition contains different types and sections of information:
A skin definition contains different types and sections of information:
Line 178: Line 286:


===List of tokens defined in either graphlcd-base or vdr-plugin-graphlcd===
===List of tokens defined in either graphlcd-base or vdr-plugin-graphlcd===
* '''Current channel'''
:;<nowiki>{ChannelNumber}</nowiki>
::''Returns an integer value''
::Channel number
:;<nowiki>{ChannelName}</nowiki>
::''Returns a string value, may be empty''
::Channel [[Syntax_of_channels.conf#Name|name]] or group name
:;<nowiki>{ChannelShortName}</nowiki>
::''Returns a string value, may be empty''
::[[Syntax_of_channels.conf#Name|Short name]] of channel, if available
:;<nowiki>{ChannelProvider}</nowiki>
::''Returns a string value, may be empty''
::[[Syntax_of_channels.conf#Name|Provider]]/bouquet name, if available
:;<nowiki>{ChannelPortal}</nowiki>
::''Returns a string value, may be empty''
::Portal name, if available
:;<nowiki>{ChannelSource}</nowiki>
::''Returns a string value, may be empty''
::[[Syntax_of_channels.conf#Source|Signal source]] of channel, as defined in [[sources.conf|sources.conf]].
:;<nowiki>{ChannelID}</nowiki>
::''Returns a string value: "<[[Syntax_of_channels.conf#Source|Source]]>-<[[Syntax_of_channels.conf#NID|NID]]>-<[[Syntax_of_channels.conf#TID|TID]]>-<[[Syntax_of_channels.conf#SID|SID]]><nowiki>[</nowiki>-<[[Syntax_of_channels.conf#RID|RID]]><nowiki>]</nowiki>"
::Identifier of the current channel
:;<nowiki>{ChannelHasTeletext} | {HasTeletext}</nowiki>
::''Returns a boolean''
::True if teletext is present
:;<nowiki>{ChannelHasMultilang} | {HasMultilang}</nowiki>
::''Returns a boolean''
::True if more than one audio stream is present
:;<nowiki>{ChannelHasDolby} | {HasDolby}</nowiki>
::''Returns a boolean''
::True if a [[Wikipedia:Dolby_Digital|Dolby Digital]] stream is present
:;<nowiki>{ChannelIsEncrypted} | {IsEncrypted}</nowiki>
::''Returns a boolean''
::True if the channel is encrypted
:;<nowiki>{ChannelIsRadio} | {IsRadio}</nowiki>
::''Returns a boolean''
::True if the channel is a radio channel
:;<nowiki>{ChannelAlias}</nowiki>
::''Returns a string, may be empty''
::The ChannelAlias is a virtual channel name mapped through the channels.alias mapping file.<br />It's the preferred way for naming channel logos.
* '''Recording'''
:;<nowiki>{IsRecording[,<card number>]}</nowiki>
::?
:;<nowiki>{Recordings[,<card number>]}</nowiki>
::?
* '''Present EPG'''
:;<nowiki>{PresentValid}</nowiki>
::?
:;<nowiki>{PresentStartDateTime[:</nowiki>[[#strftime_format_string|<strftime format>]]<nowiki>]}</nowiki>
::?
:;<nowiki>{PresentVpsDateTime[:</nowiki>[[#strftime_format_string|<strftime format>]]<nowiki>]}</nowiki>
::?
:;<nowiki>{PresentEndDateTime[:</nowiki>[[#strftime_format_string|<strftime format>]]<nowiki>]}</nowiki>
::?
:;<nowiki>{PresentDuration[:</nowiki>[[#duration_format_string|<duration format>]]<nowiki>]}</nowiki>
::?
:;<nowiki>{PresentProgress[:</nowiki>[[#duration_format_string|<duration format>]]<nowiki>]}</nowiki>
::?
:;<nowiki>{PresentRemaining[:</nowiki>[[#duration_format_string|<duration format>]]<nowiki>]}</nowiki>
::?
:;<nowiki>{PresentTitle}</nowiki>
::?
:;<nowiki>{PresentShortText}</nowiki>
::?
:;<nowiki>{PresentDescription}</nowiki>
::?
* '''Following EPG'''
:;<nowiki>{FollowingValid}</nowiki>
::?
:;<nowiki>{FollowingStartDateTime[:</nowiki>[[#strftime_format_string|<strftime format>]]<nowiki>]}</nowiki>
::?
:;<nowiki>{FollowingVpsDateTime[:</nowiki>[[#strftime_format_string|<strftime format>]]<nowiki>]}</nowiki>
::?
:;<nowiki>{FollowingEndDateTime[:</nowiki>[[#strftime_format_string|<strftime format>]]<nowiki>]}</nowiki>
::?
:;<nowiki>{FollowingDuration[:</nowiki>[[#duration_format_string|<duration format>]]<nowiki>]}</nowiki>
::?
:;<nowiki>{FollowingTitle}</nowiki>
::?
:;<nowiki>{FollowingShortText}</nowiki>
::?
:;<nowiki>{FollowingDescription}</nowiki>
::?
* '''Volume'''
:;<nowiki>{VolumeCurrent}</nowiki>
::?
:;<nowiki>{VolumeTotal}</nowiki>
::?
:;<nowiki>{VolumeIsMute} | {IsMute}</nowiki>
::?
* '''Replay'''
:;<nowiki>{ReplayTitle}</nowiki>
::?
:;<nowiki>{ReplayPositionIndex[:</nowiki>[[#duration_format_string|<duration format>]]<nowiki>]}</nowiki>
::?
:;<nowiki>{ReplayDurationIndex[:</nowiki>[[#duration_format_string|<duration format>]]<nowiki>]}</nowiki>
::?
:;<nowiki>{ReplayIsPlaying} | {IsPlaying}</nowiki>
::?
:;<nowiki>{ReplayIsFastForward[:<replay speed>]} | {IsFastForward[:<replay speed>]}</nowiki>
::?
:;<nowiki>{ReplayIsFastRewind[:<replay speed>]} | {IsFastRewind[:<replay speed>]}</nowiki>
::?
:;<nowiki>{ReplayIsSlowForward[:<replay speed>]} | {IsSlowForward[:<replay speed>]}</nowiki>
::?
:;<nowiki>{ReplayIsSlowRewind[:<replay speed>]} | {IsSlowRewind[:<replay speed>]}</nowiki>
::?
:;<nowiki>{ReplayIsPausing} | {IsPausing}</nowiki>
::?
:;<nowiki>{ReplayPosition}</nowiki>
::?
:;<nowiki>{ReplayDuration}</nowiki>
::?
:;<nowiki>{ReplayRemaining[:</nowiki>[[#duration_format_string|<duration format>]]<nowiki>]}</nowiki>
::?
:;<nowiki>{ReplayMode}</nowiki>
::"cd", "dvd", "file", "image", "music", "vdr"
:;<nowiki>{ReplayIsShuffle}</nowiki>
::Not implemented yet!
:;<nowiki>{ReplayIsLoop}</nowiki>
::Not implemented yet!
* '''OSD related'''
:;<nowiki>{Message}</nowiki>
::?
:;<nowiki>{MenuTitle}</nowiki>
::?
:;<nowiki>{MenuItem}</nowiki>
::?
:;<nowiki>{MenuCurrent}</nowiki>
::?
:;<nowiki>{IsMenuCurrent}</nowiki>
::?
:;<nowiki>{ButtonRed}</nowiki>
::?
:;<nowiki>{ButtonGreen}</nowiki>
::?
:;<nowiki>{ButtonYellow}</nowiki>
::?
:;<nowiki>{ButtonBlue}</nowiki>
::?
* '''Settings'''
:;<nowiki>{SettingShowChannelLogo}</nowiki>
::?
:;<nowiki>{SettingShowReplayLogo}</nowiki>
::?
:;<nowiki>{SettingShowSymbols}</nowiki>
::?
:;<nowiki>{SettingShowTimebar}</nowiki>
::?
:;<nowiki>{ScrollMode}</nowiki>
::?
:;<nowiki>{ScrollSpeed}</nowiki>
::?
:;<nowiki>{ScrollTime}</nowiki>
::?
:;<nowiki>{BrightnessActive}</nowiki>
::?
:;<nowiki>{BrightnessIdle}</nowiki>
::?
:;<nowiki>{BrightnessDelay}</nowiki>
::?
:;<nowiki>{DisplayMode}</nowiki>
::?<br />Return "Normal" or "Interactive"
* '''General info'''
:;<nowiki>{IsUTF8}</nowiki>
::''Returns a boolean''
::true if the VDR is runnig with [[Wikipedia:UTF-8|UTF-8]] encoding enabled.
:;<nowiki>{DateTime[:</nowiki>[[#strftime_format_string|<strftime format>]]<nowiki>]}</nowiki>
::?
:;<nowiki>{ConfigPath}</nowiki>
::?
:;<nowiki>{SkinPath}</nowiki>
::?
:;<nowiki>{ScreenWidth}</nowiki>
::?
:;<nowiki>{ScreenHeight}</nowiki>
::?
:;<nowiki>{DefaultForegroundColor}</nowiki>
::''Returns a colour string representation, format: "0x<AA><RR><GG><BB>"''.
::Contains the default foreground colour of the currently used graphlcd driver '''''without''''' consideration of user settings.
:;<nowiki>{DefaultBackgroundColor}</nowiki>
::''Returns a colour string representation, format: "0x<AA><RR><GG><BB>"''.
::Contains the default background colour of the currently used graphlcd driver '''''without''''' consideration of user settings.
:;<nowiki>{ForegroundColor}</nowiki>
::''Returns a colour string representation, format: "0x<AA><RR><GG><BB>", (eg: 0xFFFFFFFF)''.
::Contains the foreground colour (if set in graphlcd.conf: returns ''FGColour'', or, if not set: the same as {DefaultForegroundColor}).
::(Setting ''FGColour'' is currently only supported by driver ''serdisp'').
::On monochrome displays this colour defines the colour for ''setting'' a pixel.
::{ForegroundColor} should be used in favour of {DefaultForegroundColor}.
:;<nowiki>{BackgroundColor}</nowiki>
::''Returns a colour string representation, format: "0x<AA><RR><GG><BB>", (eg: 0xFF000000)''.
::Contains the background colour (if set in graphlcd.conf: returns ''BGColour'', or, if not set: the same as {DefaultBackgroundColor}).
::(Setting ''BGColour'' is currently only supported by driver ''serdisp'').
::On monochrome displays this colour defines the colour for ''clearing'' a pixel.
::{BackgroundColor} should be used in favour of {DefaultBackgroundColor},
* [[SVDRP|SVDRP commands]]
:{|cellspacing="0" cellpadding="0" style="background-color:lightcyan"
|'''CLS'''<br>&nbsp;&nbsp;&nbsp;Clear display
|-
|'''UPD'''<br>&nbsp;&nbsp;&nbsp;Update display
|-
|'''OFF'''<br>&nbsp;&nbsp;&nbsp;Switch off plugin
|-
|'''ON'''<br>&nbsp;&nbsp;&nbsp;Switch on plugin
|-
|'''SET <key>[,display=<display>][,expire=<expire] <value>'''<br>&nbsp;&nbsp;&nbsp;Set entry <key> to value <value>. optionally expire after <expire> seconds. <value> may contain spaces
|-
|'''GET <key>[,display=<display>]'''<br>&nbsp;&nbsp;&nbsp;Unset (clear) entry <key>
|-
|'''UNSET <key>[,display=<display>]'''<br>&nbsp;&nbsp;&nbsp;Get value assigned to entry <key>
|-
|'''CONNECT [<display> [<skin>]]'''<br>&nbsp;&nbsp;&nbsp;Connect given display or reconnect all displays if called w/o parameter
|-
|'''DISCONN''' [<display>]<br>&nbsp;&nbsp;&nbsp;Disconnect given display or all displays if called w/o parameter
|}


:'''''examples:'''''
<pre style="margin-left:2em;">
PLUG GRAPHLCD SET somekey somevalue
PLUG GRAPHLCD UNSET somekey
PLUG GRAPHLCD SET someotherkey,expire=30 this will expire after 30 seconds
</pre>

* Read variables set by SVDRP command ''SET''
:;<nowiki>{ExtDataIsAvailable:<key>}</nowiki>
::Check if a given variable was set
:;<nowiki>{ExtDataItem:<key>}</nowiki>
::Retrieve the content of the given variable

:'''''example:'''''
<pre style="margin-left:2em;">
<block condition="{ExtDataIsAvailable:somekey}">
<text x="0" y="0" font="somefont">SomeKey: {ExtDataItem:somekey}</text>
</block>
</pre>

* Other Plugins Services
:;<nowiki>{ServiceIsAvailable:<service>}</nowiki>
::''Return: boolean''
::Check if a given Service is available
:;<nowiki>{ServiceItem:<service>,<key>[,<parameter 1>][,<parameter 2>]}</nowiki>
::''Return: based on <key>''
::Retrieve a service value
::*[[Radio-plugin|radio-Plugin]] Service
:::;<nowiki>{ServiceItem:radio,<key>}</nowiki>
:::{|class="wikitable"
|- style="text-align:center;"
!colspan="2"|key
!Return
!Description
|-
|colspan="2" style="text-align:center;"| '''default''' || string ||style="text-align:left;"| at rds_info = 2: "<start hh>:<start mm> <title> <nowiki>|</nowiki> <artist>"<br />at rds_info = 1: "<radiotext>"<br />at rds_info = 0: ''empty''
|-
|colspan="2" style="text-align:center;"| '''title''' || string || Title
|-
|colspan="2" style="text-align:center;"| '''artist''' || string || Artist
|-
|colspan="2" style="text-align:center;"| '''text''' || string || Radiotext
|-
|style="text-align:center;"| '''rds_info''' || '''info''' || integer ||style="text-align:left;"| 0 = No RDS present<br />1 = Radiotext present<br />2 = Radiotext, Title and Artist present
|-
|style="text-align:center;"| '''rds_pty''' || '''pty''' || integer ||style="text-align:left;"| Program type<br />http://tech.ebu.ch/docs/techreview/trev_255-beale.pdf (Page 3)
|}
:::''Update interval 100 ms''
::*[[lcr-plugin|lcr-Plugin]] Service
:::;<nowiki>{ServiceItem:lcr,<key>}</nowiki>
:::{|class="wikitable"
|- style="text-align:center;"
!colspan="2"|key
!Return
!Description
|-
|colspan="2" style="text-align:center;"| '''default''' || string || ?
|-
|colspan="2" style="text-align:center;"| '''destination''' || string || ?
|-
|colspan="2" style="text-align:center;"| '''price''' || string || ?
|-
|colspan="2" style="text-align:center;"| '''pulse''' || string || ?
|}
:::''Update interval 60 s''
::*[[Femon-plugin|femon-Plugin]] Service
:::;<nowiki>{ServiceItem:femon,<key>[,</nowiki>[[#printf_format_string|<printf format>]]<nowiki>][,<divisor>]}</nowiki>
:::{|class="wikitable"
|- style="text-align:center;"
!colspan="2"|key
!Return
!Description
|-
|style="text-align:center;"| '''default''' || '''status''' || string ||style="text-align:left;"| "Status <"LOCKED"|"-">:<"SIGNAL"|"-">:<"CARRIER"|"-">:<"VITERBI"|"-">:<"SYNC"|"-"> on device #<device number>"
|-
|colspan="2" style="text-align:center;"| '''name''' || string || "<frontend name> on device #<device number>"
|-
|colspan="2" style="text-align:center;"| '''snr''' || integer || ?
|-
|colspan="2" style="text-align:center;"| '''signal''' || integer || ?
|-
|colspan="2" style="text-align:center;"| '''percent_snr''' || integer || ?
|-
|colspan="2" style="text-align:center;"| '''percent_signal''' || integer || ?
|-
|colspan="2" style="text-align:center;"| '''ber''' || integer || ?
|-
|colspan="2" style="text-align:center;"| '''unc''' || integer || ?
|-
|style="text-align:center;"| '''video_bitrate''' || '''vbr''' || integer<br />string*) ||style="text-align:left;"| ?
|-
|style="text-align:center;"| '''audio_bitrate''' || '''abr''' || integer<br />string*)||style="text-align:left;"| ?
|-
|style="text-align:center;"| '''dolby_bitrate''' || '''dbr''' || integer<br />string*)||style="text-align:left;"| ?
|}
:::''*) if [[#printf_format_string|<printf format>]] given''
:::''Update interval 2 s''
:::'' '''[[#printf_format_string|<printf format>]]''' and '''<divisor>''' are only available with key '''video_bitrate/vbr''', '''audio_bitrate/abr''' and '''dolby_bitrate/dbr''' ''
::*[[Mailbox-plugin|mailbox-Plugin]] Service
:::;<nowiki>{ServiceItem:mailbox,<key>}</nowiki>
:::{|class="wikitable"
|- style="text-align:center;"
!colspan="2"|key
!Return
!Description
|-
|style="text-align:center;"| '''default''' || '''hasnew''' || boolean ||style="text-align:left;"| return true if there are unread mails in one of the accounts configured to report unread mails.<br />false if accounts not checked yet or if there are no new mails
|-
|colspan="2" style="text-align:center;"| '''newcount''' || integer || report how many mails are unread in all accounts configured to report this.<br />return zero if accounts not checked yet, use '''hasnew''' to check this
|-
|}
:::''Update interval 10 s''
;Format Strings
* <div id="printf_format_string">printf Format String</div>
:'''<printf format>''' is an valid [http://www.cplusplus.com/reference/clibrary/cstdio/printf/ printf format string]
* <div id="strftime_format_string">strftime Format String</div>
:'''<strftime format>''' is an valid [http://www.cplusplus.com/reference/clibrary/ctime/strftime/ strftime format string]
* <div id="duration_format_string">duration Format String</div>
:{|class="wikitable"
|- style="text-align:center;"
!specifier
!Replaced by
|-
|style="text-align:center;"| '''%H''' || Hour Part, leading Zero (2 Chars)
|-
|style="text-align:center;"| '''%k''' || Hour Part, leading Whitespace (2 Chars)
|-
|style="text-align:center;"| '''%M''' || Minute Part, leading Zero (2 Chars)
|-
|style="text-align:center;"| '''%m''' || Time in Minutes
|-
|style="text-align:center;"| '''%S''' || Second Part, leading Zero (2 Chars)
|-
|style="text-align:center;"| '''%f''' || ?
|}


==Problems==
==Problems==

Latest revision as of 19:58, 13 July 2012

Description

Author: Community maintained.

The GraphLCD plugin integrates a graphical display into VDR and makes it possible to control VDR even if the television is off.

This page is about a branch of the GraphLCD plugin with the following added or enhanced features:

  • skins
  • interaction (e.g. touchpads)
  • colour devices (including alpha channel)
  • external services (data from other plugins)

The branch was started by Andreas 'powarman' Regel but was then abandoned and given to new maintainers by his request.

The documentation for the new features is rather 'sparse' at the moment but this page will be used as a starting point for collecting and formatting its features, thus this page will be started being a pigsty and improved 'along the way'.

Images

OLED, 256x64, customised skin
GLCD, 240x128, another customised skin
LCD panel, 640x200, connected to USB13700 module


Installation

Hardware requirements

To use this plugin you need a graphical display with supported controller. It's even possible to redirect the output of the plugin to image files or to the framebuffer to drive e.g. TFT monitors.

Supported are the following controllers (or compatibles) and modules:

  • Hitachi HD61830
  • Samsung KS0108
  • Toshiba T6963
  • Epson SED1520
  • Epson SED1330
  • Noritake GU140X32F-7806
  • Noritake GU256X64-372

and with the extra library [serdisplib] even a lot more (list of supported displays/modules: [supported displays]).

displays/drivers currently supported (not all drivers are verified to correctly support the new internal 32bit colour representation)

Please adapt this list if a driver is working flawlessly (add a cross to 'verified') or inform the maintainer!

Status informations are related to the most current GIT-version!

driver verified may work (not verified)
avrctl x
ax206dpf 2) x
dm140gink x
framebuffer x
futabaMDM166A x
g15daemon x
gu126x64D-K610A4 x
gu140x32f x
gu256x64-372 x
gu256x64-3900 x
hd61830 x
image x
ks0108 x 1)
network x
noritake800 x
sed1330 x
sed1520 x
serdisp x
simlcd x
t6963c x

1) graphic output is very slow. use ks0108-support of serdisplib instead.

2) experimental. only available if enabled during build process.

Software requirements

  • freetype (rendering of TrueType fonts)
  • ImageMagick or GraphicsMagick (optional, required for reading image formats other than glcd and pbm)
  • serdisplib (optional, see above, not required at compile time)

Installation of graphlcd

graphlcd (touchcol-branch) consists of two parts:

  • graphlcd-base: library with low level drivers, basic functionality, and skin support
  • vdr-plugin-graphlcd: VDR plugin.


First of all a current version (contains included skin support) of graphlcd-base needs to be installed:

  • Get current version from the GIT repoository:
  git clone git://projects.vdr-developer.org/graphlcd-base.git -b touchcol graphlcd-base.git.touchcol
  • compile and install the library (default installation directory: /usr/local/include/, can be changed in Make.config)
  make
  make install

Then the VDR plugin needs to be retrieved, installed, and compiled:

  • Note: $SOURCEDIR/VDR is the source directory of VDR and needs to be adapted accordingly.
  • Get current version of the branch from the GIT repository:
  cd $SOURCEDIR/VDR/PLUGINS/src/
  git clone git://projects.vdr-developer.org/vdr-plugin-graphlcd.git -b touchcol vdr-plugin-graphlcd_0.3.0
  ln -s vdr-plugin-graphlcd_0.3.0 graphlcd
  • compile plugin, eg:
  cd $SOURCEDIR/VDR/
  make plugins

Everything else is the same as described in plugin installation.

Configuration

After finishing the installation, some files need to be copied.

  • copy the configuration file graphlcd.conf to some destination, on most installations this will be /etc.
    can be manually configured by setting parameter skin (see below):
    (replace /etc/ if your distribution expects another destination)
 cp graphlcd.conf /etc/
  • copy the directory with logos, fonts, and skins to $VDRCONFIG/plugins (depending on your installation this will be /etc/vdr/plugins, or /video/plugins, or some other destination):
 cp -r $SOURCEDIR/VDR/PLUGINS/src/graphlcd/graphlcd $VDRCONFIG/plugins/

Parameter

Parameter (short) Parameter (long) Description Default (if parameter not given)
-c CFG --config=CFG use CFG as driver config file /etc/graphlcd.conf
-d DISP --display=DISP use display DISP for ouput first display defined in config file
-s SKIN --skin=SKIN use skin SKIN default
-p SKINPATH path to skin files $VDRCONFIG/plugins/graphlcd/skins


Skins

A skin gives a high flexibility of how and which information is brought to a display. Its markup language is the well-known XML.

Structure and elements of a skin

Example skeleton of a skin

<?xml version="1.0"?>
<skin version="1.0" name="testskin">
 
 

 <variable id="LogoWdith" value="40" condition="le({ScreenHeight},64)" />
 <variable id="LogoWdith" value="64" />

 <display id="normal">

   <variable id="TextX" value="4" />

   <text x1="#TextX" ...>
     {PresentTitle}
   </text>

   <image ... />
   <rectangle ... />
   <progress ... />

   <block condition="{Recordings}">
     <image ... />
     <text ...>
       {Recordings}
     </text>
   </block>

   <variable id="Arrow" value="'images/arrow.pbm'"/>
   <text ... >{MenuTitle}</text>
   <list ...>
     <item height="ITEMHEIGHT" />
     <text ... >{MenuCurrent}</text>
     <text ... >{Menuitem}</text>
     <image ... path="#Arrow" condition="{IsMenuCurrent}" />
   </list>

 </display>
</skin>
Info
Info
  • skins are always UTF-8, on non UTF-8 systems UTF-8 text will be transcoded on-the-fly.
  • All variable and font names must be 7-bit safe (no umlauts or diacritics).
  • HTML-entities are not supported, except &lt;, &gt;, &amp;, &#x<hexID>; and &#<decID>; (e.g.: &#xE001;).


A skin definition contains different types and sections of information:

font
defines an easy to remember font 'handle'. if a condition is given the font item is only defined if the condition is true.
Note:: fonts can only be defined in the context 'skin'.
variable
defines a variable which can be a constant or calculated using a complex evaluation.
Note:: variables can be defined everywhere, but the scope will always be skin-wide!


sections:

skin
root element.
display
a layer containing drawing elements.
block
groups elements together. may be displayed or hidden depending on a condition.
list
a menu with a defined item height, selected text line, line marker, maybe some lines before, and after the .selected line.

drawing elements:

  • image
  • text
  • pixel
  • line
  • rectangle
  • elipse
  • slope
  • progress (progress bar)
  • item (needed in lists)


functions, conditions, evaluations, and tokens:

function
retrieves a value of a certain entity, eg. the height of a font or width of a text string in pixels.
condition
evaluates boolean terms (returns either true or false).
evaluation
evaluates a simple calculation using basic arithmetic operations.
token
contains an information (eg. runtime information from VDR like present title, current channel name, ...) and is either displayed or used in evaluations or conditions.

List of tokens defined in either graphlcd-base or vdr-plugin-graphlcd

  • Current channel
{ChannelNumber}
Returns an integer value
Channel number
{ChannelName}
Returns a string value, may be empty
Channel name or group name
{ChannelShortName}
Returns a string value, may be empty
Short name of channel, if available
{ChannelProvider}
Returns a string value, may be empty
Provider/bouquet name, if available
{ChannelPortal}
Returns a string value, may be empty
Portal name, if available
{ChannelSource}
Returns a string value, may be empty
Signal source of channel, as defined in sources.conf.
{ChannelID}
Returns a string value: "<Source>-<NID>-<TID>-<SID>[-<RID>]"
Identifier of the current channel
{ChannelHasTeletext} | {HasTeletext}
Returns a boolean
True if teletext is present
{ChannelHasMultilang} | {HasMultilang}
Returns a boolean
True if more than one audio stream is present
{ChannelHasDolby} | {HasDolby}
Returns a boolean
True if a Dolby Digital stream is present
{ChannelIsEncrypted} | {IsEncrypted}
Returns a boolean
True if the channel is encrypted
{ChannelIsRadio} | {IsRadio}
Returns a boolean
True if the channel is a radio channel
{ChannelAlias}
Returns a string, may be empty
The ChannelAlias is a virtual channel name mapped through the channels.alias mapping file.
It's the preferred way for naming channel logos.
  • Recording
{IsRecording[,<card number>]}
?
{Recordings[,<card number>]}
?
  • Present EPG
{PresentValid}
?
{PresentStartDateTime[:<strftime format>]}
?
{PresentVpsDateTime[:<strftime format>]}
?
{PresentEndDateTime[:<strftime format>]}
?
{PresentDuration[:<duration format>]}
?
{PresentProgress[:<duration format>]}
?
{PresentRemaining[:<duration format>]}
?
{PresentTitle}
?
{PresentShortText}
?
{PresentDescription}
?
  • Following EPG
{FollowingValid}
?
{FollowingStartDateTime[:<strftime format>]}
?
{FollowingVpsDateTime[:<strftime format>]}
?
{FollowingEndDateTime[:<strftime format>]}
?
{FollowingDuration[:<duration format>]}
?
{FollowingTitle}
?
{FollowingShortText}
?
{FollowingDescription}
?
  • Volume
{VolumeCurrent}
?
{VolumeTotal}
?
{VolumeIsMute} | {IsMute}
?
  • Replay
{ReplayTitle}
?
{ReplayPositionIndex[:<duration format>]}
?
{ReplayDurationIndex[:<duration format>]}
?
{ReplayIsPlaying} | {IsPlaying}
?
{ReplayIsFastForward[:<replay speed>]} | {IsFastForward[:<replay speed>]}
?
{ReplayIsFastRewind[:<replay speed>]} | {IsFastRewind[:<replay speed>]}
?
{ReplayIsSlowForward[:<replay speed>]} | {IsSlowForward[:<replay speed>]}
?
{ReplayIsSlowRewind[:<replay speed>]} | {IsSlowRewind[:<replay speed>]}
?
{ReplayIsPausing} | {IsPausing}
?
{ReplayPosition}
?
{ReplayDuration}
?
{ReplayRemaining[:<duration format>]}
?
{ReplayMode}
"cd", "dvd", "file", "image", "music", "vdr"
{ReplayIsShuffle}
Not implemented yet!
{ReplayIsLoop}
Not implemented yet!
  • OSD related
{Message}
?
{MenuTitle}
?
{MenuItem}
?
{MenuCurrent}
?
{IsMenuCurrent}
?
{ButtonRed}
?
{ButtonGreen}
?
{ButtonYellow}
?
{ButtonBlue}
?
  • Settings
{SettingShowChannelLogo}
?
{SettingShowReplayLogo}
?
{SettingShowSymbols}
?
{SettingShowTimebar}
?
{ScrollMode}
?
{ScrollSpeed}
?
{ScrollTime}
?
{BrightnessActive}
?
{BrightnessIdle}
?
{BrightnessDelay}
?
{DisplayMode}
?
Return "Normal" or "Interactive"
  • General info
{IsUTF8}
Returns a boolean
true if the VDR is runnig with UTF-8 encoding enabled.
{DateTime[:<strftime format>]}
?
{ConfigPath}
?
{SkinPath}
?
{ScreenWidth}
?
{ScreenHeight}
?
{DefaultForegroundColor}
Returns a colour string representation, format: "0x<AA><RR><GG><BB>".
Contains the default foreground colour of the currently used graphlcd driver without consideration of user settings.
{DefaultBackgroundColor}
Returns a colour string representation, format: "0x<AA><RR><GG><BB>".
Contains the default background colour of the currently used graphlcd driver without consideration of user settings.
{ForegroundColor}
Returns a colour string representation, format: "0x<AA><RR><GG><BB>", (eg: 0xFFFFFFFF).
Contains the foreground colour (if set in graphlcd.conf: returns FGColour, or, if not set: the same as {DefaultForegroundColor}).
(Setting FGColour is currently only supported by driver serdisp).
On monochrome displays this colour defines the colour for setting a pixel.
{ForegroundColor} should be used in favour of {DefaultForegroundColor}.
{BackgroundColor}
Returns a colour string representation, format: "0x<AA><RR><GG><BB>", (eg: 0xFF000000).
Contains the background colour (if set in graphlcd.conf: returns BGColour, or, if not set: the same as {DefaultBackgroundColor}).
(Setting BGColour is currently only supported by driver serdisp).
On monochrome displays this colour defines the colour for clearing a pixel.
{BackgroundColor} should be used in favour of {DefaultBackgroundColor},
CLS
   Clear display
UPD
   Update display
OFF
   Switch off plugin
ON
   Switch on plugin
SET <key>[,display=<display>][,expire=<expire] <value>
   Set entry <key> to value <value>. optionally expire after <expire> seconds. <value> may contain spaces
GET <key>[,display=<display>]
   Unset (clear) entry <key>
UNSET <key>[,display=<display>]
   Get value assigned to entry <key>
CONNECT [<display> [<skin>]]
   Connect given display or reconnect all displays if called w/o parameter
DISCONN [<display>]
   Disconnect given display or all displays if called w/o parameter
examples:
 PLUG GRAPHLCD SET somekey somevalue
 PLUG GRAPHLCD UNSET somekey
 PLUG GRAPHLCD SET someotherkey,expire=30 this will expire after 30 seconds
  • Read variables set by SVDRP command SET
{ExtDataIsAvailable:<key>}
Check if a given variable was set
{ExtDataItem:<key>}
Retrieve the content of the given variable
example:
 <block condition="{ExtDataIsAvailable:somekey}">
   <text x="0" y="0" font="somefont">SomeKey: {ExtDataItem:somekey}</text>
 </block>
  • Other Plugins Services
{ServiceIsAvailable:<service>}
Return: boolean
Check if a given Service is available
{ServiceItem:<service>,<key>[,<parameter 1>][,<parameter 2>]}
Return: based on <key>
Retrieve a service value
{ServiceItem:radio,<key>}
key Return Description
default string at rds_info = 2: "<start hh>:<start mm> <title> | <artist>"
at rds_info = 1: "<radiotext>"
at rds_info = 0: empty
title string Title
artist string Artist
text string Radiotext
rds_info info integer 0 = No RDS present
1 = Radiotext present
2 = Radiotext, Title and Artist present
rds_pty pty integer Program type
http://tech.ebu.ch/docs/techreview/trev_255-beale.pdf (Page 3)
Update interval 100 ms
{ServiceItem:lcr,<key>}
key Return Description
default string ?
destination string ?
price string ?
pulse string ?
Update interval 60 s
{ServiceItem:femon,<key>[,<printf format>][,<divisor>]}
key Return Description
default status string "Status <"LOCKED"|"-">:<"SIGNAL"|"-">:<"CARRIER"|"-">:<"VITERBI"|"-">:<"SYNC"|"-"> on device #<device number>"
name string "<frontend name> on device #<device number>"
snr integer ?
signal integer ?
percent_snr integer ?
percent_signal integer ?
ber integer ?
unc integer ?
video_bitrate vbr integer
string*)
?
audio_bitrate abr integer
string*)
?
dolby_bitrate dbr integer
string*)
?
*) if <printf format> given
Update interval 2 s
<printf format> and <divisor> are only available with key video_bitrate/vbr, audio_bitrate/abr and dolby_bitrate/dbr
{ServiceItem:mailbox,<key>}
key Return Description
default hasnew boolean return true if there are unread mails in one of the accounts configured to report unread mails.
false if accounts not checked yet or if there are no new mails
newcount integer report how many mails are unread in all accounts configured to report this.
return zero if accounts not checked yet, use hasnew to check this
Update interval 10 s
Format Strings
  • printf Format String
<printf format> is an valid printf format string
  • strftime Format String
<strftime format> is an valid strftime format string
  • duration Format String
specifier Replaced by
%H Hour Part, leading Zero (2 Chars)
%k Hour Part, leading Whitespace (2 Chars)
%M Minute Part, leading Zero (2 Chars)
%m Time in Minutes
%S Second Part, leading Zero (2 Chars)
%f ?

Problems

Links

[1] http://projects.vdr-developer.org/projects/show/graphlcd new plugin homepage
[2] http://projects.vdr-developer.org/wiki/graphlcd/GraphlcdSkin page for skin branch