Index: ipk/source/system_vfdbrightness_1_0/usr/lib/enigma2/python/Plugins/Extensions/VFD_Brightness/__init__.py
===================================================================
--- ipk/source/system_vfdbrightness_1_0/usr/lib/enigma2/python/Plugins/Extensions/VFD_Brightness/__init__.py	(revision 14851)
+++ ipk/source/system_vfdbrightness_1_0/usr/lib/enigma2/python/Plugins/Extensions/VFD_Brightness/__init__.py	(revision 14851)
@@ -0,0 +1,15 @@
+from Components.Language import language
+from Tools.Directories import resolveFilename, SCOPE_LANGUAGE, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE #@UnresolvedImport
+import gettext, os
+
+lang = language.getLanguage()
+os.environ["LANGUAGE"] = lang[:2]
+gettext.bindtextdomain("enigma2", resolveFilename(SCOPE_LANGUAGE))
+gettext.textdomain("enigma2")
+gettext.bindtextdomain("VFD_Brightness", "%s%s" % (resolveFilename(SCOPE_PLUGINS), "Extensions/VFD_Brightness/locale/"))
+
+def _(txt):
+	t = gettext.dgettext("VFD_Brightness", txt)
+	if t == txt:
+		t = gettext.gettext(txt)
+	return t
Index: ipk/source/system_vfdbrightness_1_0/usr/lib/enigma2/python/Plugins/Extensions/VFD_Brightness/plugin.py
===================================================================
--- ipk/source/system_vfdbrightness_1_0/usr/lib/enigma2/python/Plugins/Extensions/VFD_Brightness/plugin.py	(revision 14851)
+++ ipk/source/system_vfdbrightness_1_0/usr/lib/enigma2/python/Plugins/Extensions/VFD_Brightness/plugin.py	(revision 14851)
@@ -0,0 +1,793 @@
+from Plugins.Plugin import PluginDescriptor
+from enigma import *
+import Screens.Standby
+from Components.ActionMap import ActionMap, NumberActionMap
+from Screens.Screen import Screen
+from Components.Label import Label
+from Components.ProgressBar import ProgressBar
+from Components.Sources.StaticText import StaticText 
+from Components.Sources.Progress import Progress
+from Components.Pixmap import Pixmap
+from Components.config import config, ConfigSubsection, getConfigListEntry, ConfigInteger, ConfigYesNo, ConfigSelection, ConfigText
+from Components.ConfigList import ConfigListScreen
+from Components.ServiceEventTracker import ServiceEventTracker
+
+import ServiceReference
+import os
+from time import *
+from __init__ import _
+config.VFD  = ConfigSubsection()
+config.VFD.Bright = ConfigInteger(default=7, limits=(0, 7))
+config.VFD.Standby = ConfigInteger(default=3, limits=(0, 7))
+config.VFD.ShowTime = ConfigText(visible_width = 1)
+config.VFD.Separator = ConfigText(visible_width = 1)
+config.VFD.Format = ConfigInteger(default=0, limits=(0, 10))
+config.VFD.Scroll = ConfigText(default="0", visible_width = 1)
+config.VFD.Center = ConfigYesNo(default=True)
+
+config.PowerLed = ConfigSubsection()
+config.PowerLed.Level = ConfigInteger(default=15, limits=(0, 15))
+
+global oldbright, tel, telLed
+oldbright = 0
+tel = 0
+telLed = 0
+
+BRIGHTNESS_SKIN = """
+	<screen position="center,center" size="440,400" title="VFD Display" >
+		<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/VFD_Brightness/buttons/slider.png" position="180,36" size="144,35" alphatest="on" />
+		<widget name="bright_value" position="192,46" size="121,15" zPosition="1" transparent="1" backgroundColor="dark" />
+		<widget name="value" position="330,40" size="100,50" font="Regular;20" />
+		<eLabel text="Brightness" position="70,40" size="420,25" font="Regular;20" transparent="1" />
+		<widget name="sel0" position="55,44" size="100,50" font="Regular;20" foregroundColor="yellow" />
+		<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/VFD_Brightness/buttons/slider.png" position="180,106" size="144,35" alphatest="on" />
+		<widget name="bright_valueS" position="192,116" size="121,15" zPosition="1" transparent="1" backgroundColor="dark" />
+		<widget name="valueS" position="330,110" size="100,50" font="Regular;20" />
+		<eLabel text="Standby" position="70,110" size="420,25" font="Regular;20" transparent="1" />
+		<widget name="sel1" position="55,114" size="100,50" font="Regular;20" foregroundColor="yellow" />
+		<widget name="config" position="30,180" size="380,310" scrollbarMode="showOnDemand" />
+		<eLabel text="______________________________________" position="20,310" size="410,25" font="Regular;20" transparent="1" />
+		<widget name="box" position="190,360" size="420,25" zPosition="1" font="Regular;20" transparent="1" />
+		<ePixmap position="30,340" size="70,53" pixmap="skin_default/picon_default.png" zPosition="1" alphatest="on" />
+	</screen>"""
+
+BRIGHTNESS_SKIN_AT7000 = """
+	<screen position="center,center" size="440,440" title="VFD Display" >
+		<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/VFD_Brightness/buttons/slider.png" position="180,36" size="144,35" alphatest="on" />
+		<widget name="bright_value" position="192,46" size="121,15" zPosition="1" transparent="1" backgroundColor="dark" />
+		<widget name="value" position="330,40" size="100,50" font="Regular;20" />
+		<eLabel text="Brightness" position="70,40" size="420,25" font="Regular;20" transparent="1" />
+		<widget name="sel0" position="55,44" size="100,50" font="Regular;20" foregroundColor="yellow" />
+		<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/VFD_Brightness/buttons/slider.png" position="180,106" size="144,35" alphatest="on" />
+		<widget name="bright_valueS" position="192,116" size="121,15" zPosition="1" transparent="1" backgroundColor="dark" />
+		<widget name="valueS" position="330,110" size="100,50" font="Regular;20" />
+		<eLabel text="Standby" position="70,110" size="420,25" font="Regular;20" transparent="1" />
+		<widget name="sel1" position="55,114" size="100,50" font="Regular;20" foregroundColor="yellow" />
+		<widget name="config" position="30,180" size="380,310" scrollbarMode="showOnDemand" />
+		<widget name="key_blue" position="320,328" zPosition="1" size="100,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
+		<eLabel backgroundColor="blue" position="320,330" size="100,3" zPosition="5"/>
+		<eLabel backgroundColor="blue" position="320,360" size="100,3" zPosition="5"/>
+		<eLabel text="______________________________________" position="20,350" size="410,25" font="Regular;20" transparent="1" />
+		<widget name="box" position="190,400" size="420,25" zPosition="1" font="Regular;20" transparent="1" />
+		<ePixmap position="30,380" size="70,53" pixmap="skin_default/picon_default.png" zPosition="1" alphatest="on" />
+	</screen>"""
+
+POWERLED_SKIN = """
+	<screen name="PowerLed" position="{screen.pos}" size="{screen.size}" title="PowerLed">
+		<widget source="job_progresstext" render="Label" position="{progr.pos}" zPosition="2" font="Regular;22" transparent="1" size="{proglabel.size}" halign="center" />
+		<widget source="job_progressbar" render="Progress" position="30,125" size="{progr.size}" borderWidth="1" />
+		<widget name="min" position="10,122" zPosition="1" size="100,30" font="Regular;28" backgroundColor="#9f1313" transparent="1" />
+		<widget name="max" position="{max.pos}" zPosition="1" size="100,30" font="Regular;28" backgroundColor="#1f771f" transparent="1" />
+		<widget name="key_red" position="{red.pos}" zPosition="1" size="100,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
+		<widget name="key_green" position="{green.pos}" zPosition="1" size="100,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
+		<widget name="key_yellow" position="{yellow.pos}" zPosition="1" size="100,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
+		<eLabel backgroundColor="yellow" position="{yellow.pos}" size="100,3" zPosition="5"/>
+		<eLabel backgroundColor="green" position="{green.pos}" size="100,3" zPosition="5"/>
+		<eLabel backgroundColor="red" position="{red.pos}" size="100,3" zPosition="5"/>
+	</screen>"""
+
+class Brightness(ConfigListScreen, Screen):
+
+	def __init__(self, session):
+
+		global bright, brightS, sel, Stime, StimeSel, separatorChar, timeSel, timeShow, DisplayOff, boxversion, Scroll, ScrollSel, Center
+		if boxversion.upper() == 'AT7000':
+			self.skin = BRIGHTNESS_SKIN_AT7000
+		else:
+			self.skin = BRIGHTNESS_SKIN #Brightness.Skin
+		self.service = None
+		Screen.__init__(self, session)
+		self["value"] = Label("[ 0 ]")
+		self["sel0"] = Label("*")
+		self["bright_value"] = ProgressBar()
+		self["valueS"] = Label("[ 0 ]")
+		self["sel1"] = Label("")
+		self["key_blue"] = Label(_("PowerLed"))
+		self["box"] = Label("AAF - " + boxversion)
+		self["bright_valueS"] = ProgressBar()
+		StimeSel = [('0',_("channel")),('1',_("time + channel")),('2',_("time")),('3',_("channel + program"))]
+		Stime = ConfigSelection(StimeSel)
+		charSel = [ '-' , '/' , ':' , '.' ]
+		separatorChar = ConfigSelection(charSel)
+		timeSel = [ _('time + day + date') , _('time + date') , _('time') , _(' ') ]
+		timeShow = ConfigSelection(timeSel)
+		DisplayOff = ConfigYesNo(default=False)
+		ScrollSel = [('0',_("kein Scrolling")),('1',_("einmal Scrolling")),('2',_("dauer Scrolling"))]
+		Scroll = ConfigSelection(ScrollSel)
+		Center = ConfigYesNo(default=True)
+		self.Clist = []
+		self.Clist.append(getConfigListEntry(_("Show in VFD"), Stime))
+		self.Clist.append(getConfigListEntry(_("Date separator"), separatorChar))
+		self.Clist.append(getConfigListEntry(_("Time Format"), timeShow))
+		self.Clist.append(getConfigListEntry(_("Display in Standby OFF"), DisplayOff))
+		if boxversion.upper() == 'AT7000' or boxversion.upper() == 'AT700' or boxversion.upper() == 'AT7500':
+			self.Clist.append(getConfigListEntry(_("Scroll Display"), Scroll))
+			self.Clist.append(getConfigListEntry(_("Center Display"), Center))
+		sel = 0
+		self.Load_settings()
+		#// set brightness on VFD
+		evfd.getInstance().vfd_set_brightness(bright)
+		self["value"].setText("[ " + str(bright) + " ]")
+		self["valueS"].setText("[ " + str(brightS) + " ]")
+		ConfigListScreen.__init__(self, self.Clist)
+		#// get the remote buttons
+		self["actions"] = ActionMap(["OkCancelActions", "DirectionActions", "ColorActions"],
+		{
+			"cancel": self.Exit,
+			"left": self.left,
+			"right": self.right,
+			"up": self.up,
+			"down": self.down,
+			"ok": self.ok,
+			"blue": self.Blue,
+		}, -2)
+		self.onLayoutFinish.append(self.layoutFinished)
+
+	def layoutFinished(self):
+		#// set brightness on progressbar
+		global bright, brightS
+		self["bright_value"].setValue(int(round(bright  * 14.3)))
+		self["bright_valueS"].setValue(int(round(brightS  * 14.3)))
+		self["config"].l.setList(self.Clist)
+
+	def down(self):
+		#// select slider (0=Brightness 1=Standby 2=menu)
+		global sel
+		oldsel = sel
+		sel +=1
+		if sel > 2:
+			sel = 2
+		self.selPos()
+		if sel == 2 and oldsel == sel:
+			if self["config"].getCurrentIndex() != len(self.Clist) - 1:
+				self["config"].setCurrentIndex(self["config"].getCurrentIndex() + 1)
+		oldsel = sel
+
+	def up(self):
+		#// select slider (0=Brightness 1=Standby 2=menu)
+		global sel
+		if sel != 2:
+			sel -=1
+		if sel < 0:
+			sel = 0
+		self.selPos()
+		if sel == 2:
+			if self["config"].getCurrentIndex() == 0:
+				sel = 1
+				self.selPos()
+			else:
+				self["config"].setCurrentIndex(self["config"].getCurrentIndex() - 1)
+	def Red(self):
+		self.Exit()
+
+	def Green(self):
+		self.Exit()
+
+	def Blue(self):
+		if boxversion.upper() == 'AT7000':
+			self.session.open(PowerLedMain)
+
+	def left(self):
+		global sel
+		if sel < 2:
+			self.Bright_DOWN()
+		else:
+			ConfigListScreen.keyLeft(self)
+
+	def right(self):
+		global sel
+		if sel < 2:
+			self.Bright_UP()
+		else:
+			ConfigListScreen.keyRight(self)
+
+	def selPos(self):
+		global bright, brightS, sel
+		if sel == 0:
+			evfd.getInstance().vfd_set_brightness(bright)
+			self["sel0"].setText("*")
+			self["sel1"].setText("")
+		elif sel == 1:
+			evfd.getInstance().vfd_set_brightness(brightS)
+			self["sel0"].setText("")
+			self["sel1"].setText("*")
+		else:
+			evfd.getInstance().vfd_set_brightness(bright)
+			self["sel0"].setText("")
+			self["sel1"].setText("")
+
+	def Exit(self):
+		#// Exit VFD Brightness when pressing the EXIT button
+		self.Show_current_channel()
+		self.close()
+
+	def ok(self):
+		#// Exit VFD Brightness when pressing the OK button
+		self.Show_current_channel()
+		self.Save_settings()
+		self.close()
+
+	def Show_current_channel(self):
+		br = config.VFD.Bright.value
+		evfd.getInstance().vfd_set_brightness(br)
+		self.service = self.session.nav.getCurrentlyPlayingServiceReference()
+		service = self.service.toCompareString()
+		servicename = ServiceReference.ServiceReference(service).getServiceName().replace('\xc2\x87', '').replace('\xc2\x86', '')#.ljust(16)
+		evfd.getInstance().vfd_write_string(servicename[0:63])
+
+	def Bright_UP(self):
+		#// More brightness
+		global bright, brightS, sel
+		if sel == 0:
+			bright += 1
+			if bright > 7:
+				bright = 7
+			self["bright_value"].setValue(int(round(bright  * 14.3)))
+			self["value"].setText("[ " + str(bright) + " ]")
+			evfd.getInstance().vfd_set_brightness(bright)
+			self.selPos()
+		else:
+			brightS += 1
+			if brightS > 7:
+				brightS = 7
+			self["bright_valueS"].setValue(int(round(brightS  * 14.3)))
+			self["valueS"].setText("[ " + str(brightS) + " ]")
+			evfd.getInstance().vfd_set_brightness(brightS)
+			self.selPos()
+	def Bright_DOWN(self):
+		#// less brighness
+		global bright, brightS, sel
+		if sel == 0:
+			bright -= 1
+			if bright < 0:
+				bright = 0
+			self["bright_value"].setValue(int(round(bright  * 14.3)))
+			self["value"].setText("[ " + str(bright) + " ]")
+			evfd.getInstance().vfd_set_brightness(bright)
+			self.selPos()
+		else:
+			brightS -= 1
+			if brightS < 0:
+				brightS = 0
+			self["bright_valueS"].setValue(int(round(brightS  * 14.3)))
+			self["valueS"].setText("[ " + str(brightS) + " ]")
+			evfd.getInstance().vfd_set_brightness(brightS)
+			self.selPos()
+
+	def Save_settings(self):
+		#// save brightness value
+		global bright, brightS, Stime, StimeSel, separatorChar, timeSel, timeShow, DisplayOff, Scroll, ScrollSel, Center
+		config.VFD.Bright.value = bright
+		config.VFD.Standby.value = brightS
+		config.VFD.ShowTime.value = Stime.value
+		config.VFD.Separator.value = separatorChar.value
+		config.VFD.Format.value = timeSel.index(timeShow.value)
+		if boxversion.upper() == 'SPARK' is False:
+			config.VFD.Scroll.value = Scroll.value
+			config.VFD.Center.value = Center.value
+		config.VFD.save()
+		if boxversion.upper() == 'SPARK' is False:
+			evfd.getInstance().vfd_set_SCROLL(int(Scroll.value))
+			evfd.getInstance().vfd_set_CENTER(Center.value)
+		if os.path.exists("/etc/vdstandby.cfg") is True:
+			f = open( "/etc/vdstandby.cfg", "w" )
+			for line in self.e:
+				if line.find("DISPLAY=") > -1:
+					if DisplayOff.value:
+						f.write("DISPLAY=FALSE" + "\n")
+					else:
+						f.write("DISPLAY=TRUE" + "\n")
+				else:
+					f.write(line)
+			f.close
+
+	def Load_settings(self):
+		global bright, brightS, sel, Stime, StimeSel, separatorChar, timeSel, timeShow, DisplayOff, Scroll, ScrollSel, Center
+				#// Load settings value
+		try:
+			bright = config.VFD.Bright.value
+		except:
+			bright = 7
+		try:
+			brightS = config.VFD.Standby.value
+		except:
+			brightS = 3
+		try:
+			Stime.value = config.VFD.ShowTime.value
+		except:
+			pass
+		try:
+			separatorChar.value = config.VFD.Separator.value
+		except:
+			pass
+		try:
+			timeShow.value = timeSel[config.VFD.Format.value]
+		except:
+			pass
+		try:
+			Scroll.value = config.VFD.Scroll.value
+		except:
+			pass
+		try:
+			Center.value = config.VFD.Center.value
+		except:
+			pass
+		if os.path.exists("/etc/vdstandby.cfg") is True:
+			f = open( "/etc/vdstandby.cfg", "r" )
+			self.e = f.readlines()
+			f.close
+			for line in self.e:
+				if line.find('DISPLAY=') > -1:
+					line = line.split('=')
+					if line[1].find('TRUE') > -1:
+						DisplayOff.value = False
+					else:
+						DisplayOff.value = True
+
+
+def mainB(session, **kwargs):
+		session.open(Brightness)
+		evfd.getInstance().vfd_write_string( "VFD Brightness" )
+
+def VFDdisplay(menuid, **kwargs):
+	if menuid == "system":
+		return [("VFD Display", mainB, "vfd_display", None)]
+	else:
+		return []
+
+class PowerLedMain(Screen):
+
+	def applySkinVars(self,skin,dict):
+		for key in dict.keys():
+			try:
+				skin = skin.replace('{'+key+'}',dict[key])
+			except Exception,e:
+				print "[MC_PowerLed]",e,"@key=",key
+		return skin
+
+	def __init__(self, session):
+
+		current_w = getDesktop(0).size().width()
+		current_h = getDesktop(0).size().height()
+		print "[MC_PowerLed] DESKTOPsize is",current_w,current_h
+
+		# define the start koordinates and size
+		if current_w == 1280:
+				size_w = 720
+				size_h = 485
+				off = 100
+				off1 = 0
+		else:
+				size_w = 460
+				size_h = 385
+				off = 0
+				off1 = 0
+
+		# calculate Skin koordinates
+		font = "Regular;18"
+		pos_w = (current_w - size_w)/2
+		pos_h = (current_h - size_h)/2
+		list_w = size_w - 60
+		list_pos = (size_w - list_w)/2
+		proglabel_size = size_w/2 + 20
+		label_w = size_w/4
+		yellow_w = 190 + off
+		max_size = size_w - 20
+		red_w = 60 + off
+		green_w = 320 + off
+
+		# set Skinvariables
+		self.dict = {
+				'font': font,
+				'progr.size': "%i,26"%(list_w),
+				'proglabel.size': "%i,22"%(proglabel_size),
+				'max.pos': "%i,123"%(max_size),
+				'progr.pos': "%i,100"%(label_w),
+				'yellow.pos': "%i,310"%(yellow_w),
+				'red.pos': "%i,310"%(red_w),
+				'green.pos': "%i,310"%(green_w),
+				'screen.size': "%i,%i"%(size_w,size_h),
+				'screen.pos': "%i,%i"%(pos_w,pos_h),
+				}
+
+		self.skin = self.applySkinVars(POWERLED_SKIN,self.dict)
+
+		Screen.__init__(self, session)
+		self["key_green"] = Label(_("Save"))
+		self["key_red"] = Label(_("Cancel"))
+		self["key_yellow"] = Label(_("Default"))
+		self["job_progressbar"] = Progress()
+		self["job_progresstext"] = StaticText()
+		self["job_progressbar"].range = 15
+		self["min"] = Label("-")
+		self["max"] = Label("+")
+		self.selectbar = 0
+		self.readPowerLed()
+
+		self["actions"] = ActionMap(["OkCancelActions", "DirectionActions", "ColorActions"],
+		{
+			"cancel": self.Exit,
+			"green": self.Green,
+			"red": self.Red,
+			"yellow": self.Yellow,
+			"left": self.left,
+			"right": self.right,
+			"up": self.Up,
+			"down": self.Down,
+			"ok": self.keyOK,
+		}, -1)
+		self.onLayoutFinish.append(self.UpdateScreen)
+
+	def keyOK(self):
+		self.show()
+		evfd.getInstance().vfd_clear_string()
+
+	def UpdateScreen(self):
+		self["job_progressbar"].value = self.Level
+		self["job_progresstext"].text = str(self.Level) + " " + _("Level")
+		self.UpdateMinMax()
+
+	def readPowerLed(self):
+		self.oldLevel = config.PowerLed.Level.value
+		self.Level = self.oldLevel
+		print "MC_PowerLed] Level: " + str(self.Level)
+
+	def Exit(self):
+		evfd.getInstance().vfd_clear_string()
+		os.system("fp_control -P " + str(self.oldLevel) )
+		self.close()
+
+	def Yellow(self):
+		evfd.getInstance().vfd_clear_string()
+		self.Level = 15
+		os.system("fp_control -P " + str(self.Level) )
+		self.UpdateScreen()
+
+	def Red(self):
+		evfd.getInstance().vfd_clear_string()
+		self.Exit()
+
+	def Green(self):
+		evfd.getInstance().vfd_clear_string()
+		config.PowerLed.Level.value = self.Level
+		config.PowerLed.save()
+		self.close()
+
+	def left(self):
+		if self.selectbar == 0:
+			if self.Level > 0:
+				self.Level -= 1
+			self["job_progressbar"].value = self.Level
+			self["job_progresstext"].text = str(self.Level) + " " + _("Level")
+			os.system("fp_control -P " + str(self.Level) )
+			evfd.getInstance().vfd_write_string('Level ' + str(self.Level))
+
+	def right(self):
+		if self.selectbar == 0:
+			if self.Level < 15:
+				self.Level += 1
+			self["job_progressbar"].value = self.Level
+			self["job_progresstext"].text = str(self.Level) + " " + _("Level")
+			os.system("fp_control -P " + str(self.Level) )
+			evfd.getInstance().vfd_write_string('Level ' + str(self.Level))
+
+	def Up(self):
+		self.UpdateMinMax()
+
+	def Down(self):
+		self.UpdateMinMax()
+
+	def UpdateMinMax(self):
+		if self.selectbar == 0:
+			self["min"].setText("-")
+			self["max"].setText("+")
+
+class StandbyTime:
+
+	def __init__(self, session):
+		self.session = session
+		self.timer = eTimer()
+		self.timer.timeout.get().append(self.timerEvent)
+		self.service = None
+		self.onClose = [ ]
+		global powerledoff, showIcon, oldTime, updateVFD, updateVFDtime, oldService, scrollOnes, de, en, it, wasMenu
+		powerledoff = False
+		showIcon = False
+		oldTime=localtime()
+		updateVFD = False
+		updateVFDtime = False
+		oldService = None
+		scrollOnes = False
+		wasMenu = False
+		de = [ 'So' , 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa' ]
+		en = [ 'Su' , 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa' ]
+		it = [ 'Do' , 'Lu', 'Ma', 'Me', 'Gi', 'Ve', 'Sa' ]
+		self.__event_tracker = ServiceEventTracker(screen=self,eventmap=
+			{
+				iPlayableService.evUpdatedEventInfo: self.evUpdatedInfo,
+				iPlayableService.evStart: self.evUpdatedInfo,
+				iPlayableService.evStopped: self.evUpdatedInfo,
+			})
+
+	def evUpdatedInfo(self):
+		global updateVFD
+		print '[VFD-Brightness] evUpdatedInfo UPDATE VFD'
+		updateVFD = True
+
+	def startTimer(self):
+		if self.timer.isActive():
+			# Disable Timer?
+			print "timer still running"
+		else:
+			# Select Timer Length
+			self.timer.start(1000)
+
+
+	def StopTimer(self, result):
+		if result:
+			# Stop Timer
+			self.timer.stop()
+			# Reset Vars
+			self.service = None
+
+	def seekTimers(self):
+		print "[seekTimers] Search Timers"
+		for Timers in self.session.nav.RecordTimer.timer_list:
+			print "[seekTimers] Found timer"
+			if Timers.state == 0:
+				return True
+		print "[seekTimers] NO timer Found"
+		return False
+
+	def openEventView(self):
+		service = self.session.nav.getCurrentService()
+		info = service.info()
+		event = info.getEvent(0)
+		if event is None:
+			return None
+		text = event.getEventName()
+		print '[VFD-Brightness] EventName:', text
+		return text
+
+	def ReadServiceName(self, CurService):
+		global tm, oldService, scrollOnes
+		service = CurService.toCompareString()
+		servicename = ServiceReference.ServiceReference(service).getServiceName().replace('\xc2\x87', '').replace('\xc2\x86', '')#.ljust(16)
+		subservice = CurService.toString().split("::")
+		if subservice[0].count(':') == 9:
+			servicename = strftime("%H:%M",tm) + " " +subservice[1].replace('\xc2\x87', '').replace('\xc3\x9f', 'ss').replace('\xc2\x86', '')#.ljust(16)
+		else:
+			servicename=strftime("%H:%M",tm)+" " + servicename
+		if oldService is None or oldService[6:] <> servicename[6:]:
+			oldService = servicename
+			scrollOnes = True
+		return servicename
+
+	def doTimeFormat(self):
+		global tm, de, en, it
+		de = [ 'So' , 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa' ]
+		en = [ 'Su' , 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa' ]
+		it = [ 'Do' , 'Lu', 'Ma', 'Me', 'Gi', 'Ve', 'Sa' ]
+		daynr = int(strftime("%w",tm))
+		sep = config.VFD.Separator.value
+		Tformat = config.VFD.Format.value
+		myT = strftime("%H:%M %d" + sep + "%m" + sep + "%y",tm)
+		myT1 = myT.split(" ")
+		# Check Language (german or english)
+		if config.osd.language.value == "de_DE":
+			#// German
+			dayL = de[daynr]
+		elif config.osd.language.value == "it_IT":
+			#// Italion
+			dayL = it[daynr]
+		else:
+			#// English
+			dayL = en[daynr]
+		if Tformat == 1:
+			myTime = myT1[0] + " " + myT1[1]
+		elif Tformat == 2:
+			myTime = myT1[0]
+		elif Tformat == 3:
+			myTime = ""
+		else:
+			myTime = myT1[0] + " " + dayL + myT1[1]
+		return myTime
+
+	def timerEvent(self):
+		global boxversion, powerledoff, showIcon, oldTime, updateVFD, updateVFDtime, tm, scrollOnes, wasMenu
+		tm=localtime()
+		# Check if 1 min. is paste
+		if tm.tm_min <> oldTime.tm_min:
+				oldTime=localtime()
+				updateVFDtime = True
+				print '[VFD-Brightness] UPDATE TIME VFD'
+		# Check if in Standby
+		if Screens.Standby.inStandby:
+			#// STANDBY
+			bright = config.VFD.Standby.value
+			# Update VFD in Standby (only Time)
+			if updateVFD or updateVFDtime:
+				updateVFD =False
+				updateVFDtime = False
+				#// Set SCROLL and CENTER
+				if boxversion.upper() == 'SPARK' is False:
+					evfd.getInstance().vfd_set_SCROLL(int(config.VFD.Scroll.value))
+					evfd.getInstance().vfd_set_CENTER(config.VFD.Center.value)
+				mytime = self.doTimeFormat()
+				evfd.getInstance().vfd_write_string(mytime)
+				# Show Standby Icon
+				print '[VFD-Brightness] Show Standby Icon'
+				evfd.getInstance().vfd_set_icon(0,True)
+			# set PowerLed off in standby
+			if boxversion.upper() == 'AT7000' and not powerledoff:
+				print '[VFD-Brightness] PowerLed OFF'
+				powerledoff = True
+				os.system('fp_control -P "0"')
+			if boxversion.upper() == 'AT7000':
+				if not showIcon:
+					showIcon = True
+					# Timer Icon
+					if self.seekTimers():
+						print '[VFD-Brightness] Show Timer Icon'
+						evfd.getInstance().vfd_set_icon(4,True)
+		else:
+			#// NORMAL RUNNING
+			#// Set Max chars on VFD for each box
+			if boxversion.upper() == 'AT7000' or boxversion.upper() == 'AT7500':
+				MaxChar = 12
+			elif boxversion.upper() == 'AT700':
+				MaxChar = 8
+			else:
+				MaxChar = 17
+			# set PowerLed on
+			if boxversion.upper() == 'AT7000' and powerledoff:
+				print '[VFD-Brightness] PowerLed ON'
+				powerledoff = False
+				os.system("fp_control -P " + str(config.PowerLed.Level.value))
+			if boxversion.upper() == 'AT7000':
+				if showIcon:
+					showIcon = False
+					# Hide Standby Icon
+					print '[VFD-Brightness] Hide Standby Icon'
+					evfd.getInstance().vfd_set_icon(0,False)
+			bright = config.VFD.Bright.value
+			#// Check if AAF-Panel or Main Menu is showed or hided
+			try:
+				from Plugins.Extensions.Aafpanel.plugin import inAAFPanel
+				showPanel = inAAFPanel
+			except:
+				print '[VFD Brightness] Error showPanel'
+				showPanel = None
+			try:
+				showMenu = Screens.Menu.inMenu
+			except:
+				print '[VFD Brightness] Error showMenu'
+				showMenu = None
+			# Check if menu is open
+			if showPanel or showMenu:
+				wasMenu = True
+			# Check if menu is closed
+			if wasMenu and not showMenu and not showPanel:
+				print '[VFD Brightness] MENU Closed, UPDATE VFD'
+				wasMenu = False
+				updateVFD = True
+				updateVFDtime = False
+			if updateVFD or updateVFDtime:
+				updateVFD = False
+				#// Set SCROLL and CENTER
+				if boxversion.upper() == 'SPARK' is False:
+					evfd.getInstance().vfd_set_SCROLL(int(config.VFD.Scroll.value))
+					evfd.getInstance().vfd_set_CENTER(config.VFD.Center.value)
+				#// time + channel
+				if config.VFD.ShowTime.value == '1' and not showMenu and not showPanel:
+					self.service = self.session.nav.getCurrentlyPlayingServiceReference()
+					if not self.service is None:
+						servicename = self.ReadServiceName(self.service)
+						if scrollOnes and not updateVFDtime:
+							scrollOnes = False
+							evfd.getInstance().vfd_write_string(servicename[0:63])
+						else:
+							evfd.getInstance().vfd_write_string(servicename[0:MaxChar])
+				#// time only
+				elif config.VFD.ShowTime.value == '2' and not showMenu and not showPanel:
+						servicename="   " + strftime("%H:%M",tm)
+						evfd.getInstance().vfd_write_string(servicename[0:MaxChar])
+				#// channel + program
+				elif config.VFD.ShowTime.value == '3' and not showMenu and not showPanel:
+					self.service = self.session.nav.getCurrentlyPlayingServiceReference()
+					if not self.service is None:
+						servicename = self.ReadServiceName(self.service)
+						epgname = self.openEventView()
+						if epgname is not None:
+							servicename = servicename + " " + epgname
+						if scrollOnes and not updateVFDtime:
+							if epgname is not None:
+								scrollOnes = False
+							evfd.getInstance().vfd_write_string(servicename[6:69])
+						else:
+							evfd.getInstance().vfd_write_string(servicename[6:(MaxChar + 6)])
+				#// channel only
+				elif not showMenu and not showPanel:
+					self.service = self.session.nav.getCurrentlyPlayingServiceReference()
+					if not self.service is None:
+						servicename = self.ReadServiceName(self.service)
+						if scrollOnes and not updateVFDtime:
+							scrollOnes = False
+							evfd.getInstance().vfd_write_string(servicename[6:69])
+						else:
+							evfd.getInstance().vfd_write_string(servicename[6:(MaxChar + 6)])
+				else:
+					None
+				updateVFDtime = False
+		global oldbright, tel
+		if oldbright != bright or tel < 5:
+			evfd.getInstance().vfd_set_brightness(bright)
+			if tel > 5:
+				oldbright = bright
+			else:
+				tel += 5
+		#self.startTimer()
+
+timerInstance = None
+
+def main(session, **kwargs):
+	global boxversion
+	boxversion = command('cat /etc/model')
+	print '[VFD-Brightness] Boxversion = ' + boxversion
+	global timerInstance
+	if timerInstance is None:
+		timerInstance = StandbyTime(session)
+	timerInstance.startTimer()
+	timerInstance.timerEvent()
+
+def autostart(reason, **kwargs):
+	global timerInstance
+	if reason == 0:
+		if timerInstance is None:
+			timerInstance = StandbyTime()
+		timerInstance.startTimer()
+		timerInstance.timerEvent()
+	elif reason == 1:
+		timerInstance.StopTimer(True)
+
+def command(comandline):
+	comandline = comandline + " >/tmp/command.txt"
+	os.system(comandline)
+	text = ""
+	if os.path.exists("/tmp/command.txt") is True:
+		file = open("/tmp/command.txt", "r")
+		for line in file:
+			text = text + line.strip() + '\n'
+		file.close
+	# if one or last line then remove linefeed
+	if text[-1:] == '\n': text = text[:-1]
+	comandline = text
+	os.system("rm /tmp/command.txt")
+	return comandline
+
+def Plugins(**kwargs):
+	return [
+	#// show VFD Brightness in System Menu
+	PluginDescriptor(name="VFD Brightness", description="VFD Brightness AAF-Enigma2 01/11/2010", where = PluginDescriptor.WHERE_MENU, fnc=VFDdisplay),
+	#// start VFD Brightness on bootup
+	PluginDescriptor(name="VFD Brightness", description="VFD Brightness AAF-Enigma2 01/11/2010", where = PluginDescriptor.WHERE_SESSIONSTART, fnc=main) ]
