Пример #1
0
	def __init__(self, session, parent):
		Screen.__init__(self, session, parent = parent)
		self["selected"] = StaticText("openATV:" + getImageVersionString())

		AboutText = _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName())

		if path.exists('/proc/stb/info/chipset'):
			chipset = open('/proc/stb/info/chipset', 'r').read()
			AboutText += _("Chipset: BCM%s") % chipset.replace('\n','') + "\n"

		AboutText += _("Version: %s") % getImageVersionString() + "\n"
		AboutText += _("Build: %s") % getBuildVersionString() + "\n"
		AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

		string = getDriverDateString()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers: %s") % driversdate + "\n"
		AboutText += _("Last update: %s") % getEnigmaVersionString() + "\n\n"

		tempinfo = ""
		if path.exists('/proc/stb/sensors/temp0/value'):
			tempinfo = open('/proc/stb/sensors/temp0/value', 'r').read()
		elif path.exists('/proc/stb/fp/temp_sensor'):
			tempinfo = open('/proc/stb/fp/temp_sensor', 'r').read()
		if tempinfo and int(tempinfo.replace('\n','')) > 0:
			mark = str('\xc2\xb0')
			AboutText += _("System temperature: %s") % tempinfo.replace('\n','') + mark + "C\n\n"

		self["AboutText"] = StaticText(AboutText)
Пример #2
0
	def __init__(self, session, request):
		WebScreen.__init__(self, session, request)
		from WebComponents.Sources.About import About
		from WebComponents.Sources.Frontend import Frontend
		from WebComponents.Sources.Hdd import Hdd
		from WebComponents.Sources.Network import Network
		from Components.config import config
		from Components.About import about
		from Components.Sources.StaticText import StaticText
		try:
			from Tools.StbHardware import getFPVersion
		except:
			from Tools.DreamboxHardware import getFPVersion
		from Tools.HardwareInfo import HardwareInfo

		hw = HardwareInfo()

		self["About"] = About(session)

		self["Network"] = Network()
		self["Hdd"] = Hdd()
		self["Frontends"] = Frontend()
		try:
			from enigma import getImageVersionString, getBuildVersionString, getEnigmaVersionString
			self["EnigmaVersion"] = StaticText(getEnigmaVersionString())
			self["ImageVersion"] = StaticText(getVersionString() + '.' + getBuildVersionString())
		except:
			self["EnigmaVersion"] = StaticText(about.getEnigmaVersionString())
			self["ImageVersion"] = StaticText(about.getVersionString())
		self["WebIfVersion"] = StaticText(config.plugins.Webinterface.version.value)
		self["FpVersion"] = StaticText(str(getFPVersion()))
		self["DeviceName"] = StaticText(hw.get_device_name())
Пример #3
0
    def __init__(self, session, request):
        WebScreen.__init__(self, session, request)
        from WebComponents.Sources.About import About
        from WebComponents.Sources.Frontend import Frontend
        from WebComponents.Sources.Hdd import Hdd
        from WebComponents.Sources.Network import Network
        from Components.config import config
        from Components.About import about
        from Components.Sources.StaticText import StaticText
        try:
            from Tools.StbHardware import getFPVersion
        except:
            from Tools.DreamboxHardware import getFPVersion
        from Tools.HardwareInfo import HardwareInfo

        hw = HardwareInfo()

        self["About"] = About(session)

        self["Network"] = Network()
        self["Hdd"] = Hdd()
        self["Frontends"] = Frontend()
        try:
            from enigma import getImageVersionString, getBuildVersionString, getEnigmaVersionString
            self["EnigmaVersion"] = StaticText(getEnigmaVersionString())
            self["ImageVersion"] = StaticText(getVersionString() + '.' +
                                              getBuildVersionString())
        except:
            self["EnigmaVersion"] = StaticText(about.getEnigmaVersionString())
            self["ImageVersion"] = StaticText(about.getVersionString())
        self["WebIfVersion"] = StaticText(
            config.plugins.Webinterface.version.value)
        self["FpVersion"] = StaticText(str(getFPVersion()))
        self["DeviceName"] = StaticText(hw.get_device_name())
Пример #4
0
    def __init__(self, session, parent):
        Screen.__init__(self, session, parent=parent)
        self["selected"] = StaticText("openATV:" + getImageVersionString())

        AboutText = _("Model:\t%s %s\n") % (getMachineBrand(),
                                            getMachineName())

        if path.exists('/proc/stb/info/chipset'):
            chipset = open('/proc/stb/info/chipset', 'r').read()
            AboutText += _("Chipset: BCM%s") % chipset.replace('\n', '') + "\n"

        AboutText += _("Version: %s") % getImageVersionString() + "\n"
        AboutText += _("Build: %s") % getBuildVersionString() + "\n"
        AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

        string = getDriverDateString()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        AboutText += _("Drivers: %s") % driversdate + "\n"
        AboutText += _("Last update: %s") % getEnigmaVersionString() + "\n\n"

        tempinfo = ""
        if path.exists('/proc/stb/sensors/temp0/value'):
            tempinfo = open('/proc/stb/sensors/temp0/value', 'r').read()
        elif path.exists('/proc/stb/fp/temp_sensor'):
            tempinfo = open('/proc/stb/fp/temp_sensor', 'r').read()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("System temperature: %s") % tempinfo.replace(
                '\n', '') + mark + "C\n\n"

        self["AboutText"] = StaticText(AboutText)
Пример #5
0
    def getlog(self):
        global ocram
        try:
            sourcefile = 'http://enigma2.world-of-satellite.com/feeds/' + getImageVersionString(
            ) + '/' + getBoxType() + '/' + self.logtype + '-git.log'
            sourcefile, headers = urllib.urlretrieve(sourcefile)
            rename(sourcefile, '/tmp/' + self.logtype + '-git.log')
            fd = open('/tmp/' + self.logtype + '-git.log', 'r')
            releasenotes = fd.read()
            fd.close()
        except:
            releasenotes = '404 Not Found'
        if releasenotes.find('404 Not Found') == -1:
            releasenotes = releasenotes.replace('\nopenvix: build',
                                                "\n\nopenvix: build")
            releasenotes = releasenotes.split('\n\n')
            ver = -1
            releasever = ""
            viewrelease = ""
            while not releasever.isdigit():
                ver += 1
                releasever = releasenotes[int(ver)].split('\n')
                releasever = releasever[0].split(' ')
                if len(releasever) > 2:
                    releasever = releasever[2].replace(':', "")
                else:
                    releasever = releasever[0].replace(':', "")

            while int(releasever) > int(getBuildVersionString()):
                if ocram:
                    viewrelease += releasenotes[int(ver)] + '\n' + ocram + '\n'
                    ocram = ""
                else:
                    viewrelease += releasenotes[int(ver)] + '\n\n'
                ver += 1
                releasever = releasenotes[int(ver)].split('\n')
                releasever = releasever[0].split(' ')
                releasever = releasever[2].replace(':', "")
            if not viewrelease and ocram:
                viewrelease = ocram
                ocram = ""
            self["text"].setText(viewrelease)
            summarytext = viewrelease.split(':\n')
            try:
                self['title_summary'].setText(summarytext[0] + ':')
                self['text_summary'].setText(summarytext[1])
            except:
                self['title_summary'].setText("")
                self['text_summary'].setText(viewrelease)
        else:
            self['title_summary'].setText("")
            self['text_summary'].setText(_("Error downloading change log."))
            self['text'].setText(_("Error downloading change log."))
Пример #6
0
	def getlog(self):
		global ocram
		try:
			sourcefile = 'http://enigma2.world-of-satellite.com/feeds/' + getImageVersionString() + '/' + getBoxType() + '/'  + self.logtype + '-git.log'
			sourcefile,headers = urllib.urlretrieve(sourcefile)
			rename(sourcefile,'/tmp/' + self.logtype + '-git.log')
			fd = open('/tmp/' + self.logtype + '-git.log', 'r')
			releasenotes = fd.read()
			fd.close()
		except:
			releasenotes = '404 Not Found'
		if '404 Not Found' not in releasenotes:
			releasenotes = releasenotes.replace('\nopenvix: build',"\n\nopenvix: build")
			releasenotes = releasenotes.split('\n\n')
			ver = -1
			releasever = ""
			viewrelease=""
			while not releasever.isdigit():
				ver += 1
				releasever = releasenotes[int(ver)].split('\n')
				releasever = releasever[0].split(' ')
				if len(releasever) > 2:
					releasever = releasever[2].replace(':',"")
				else:
					releasever = releasever[0].replace(':',"")

			while int(releasever) > int(getBuildVersionString()):
				if ocram:
					viewrelease += releasenotes[int(ver)]+'\n'+ocram+'\n'
					ocram = ""
				else:
					viewrelease += releasenotes[int(ver)]+'\n\n'
				ver += 1
				releasever = releasenotes[int(ver)].split('\n')
				releasever = releasever[0].split(' ')
				releasever = releasever[2].replace(':',"")
			if not viewrelease and ocram:
				viewrelease = ocram
				ocram = ""
			self["text"].setText(viewrelease)
			summarytext = viewrelease.split(':\n')
			try:
				self['title_summary'].setText(summarytext[0]+':')
				self['text_summary'].setText(summarytext[1])
			except:
				self['title_summary'].setText("")
				self['text_summary'].setText(viewrelease)
		else:
			self['title_summary'].setText("")
			self['text_summary'].setText(_("Error downloading change log."))
			self['text'].setText(_("Error downloading change log."))
Пример #7
0
    def populate(self):
        self["lab1"] = StaticText(_("openATV"))
        self["lab2"] = StaticText(_("By openATV Image Team"))
        model = None
        AboutText = ""
        self["lab3"] = StaticText(_("Support at") + " www.opena.tv")
        AboutText += _("Model:\t%s %s\n") % (getMachineBrand(),
                                             getMachineName())

        if path.exists('/proc/stb/info/chipset'):
            AboutText += _("Chipset:\tBCM%s") % about.getChipSetString().lower(
            ).replace('\n', '').replace('bcm', '') + "\n"

        AboutText += _("CPU:\t%s") % about.getCPUString() + "\n"
        AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n"

        AboutText += _("Version:\t%s") % getImageVersionString() + "\n"
        AboutText += _("Build:\t%s") % getBuildVersionString() + "\n"
        AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"

        string = getDriverDateString()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        AboutText += _("Drivers:\t%s") % driversdate + "\n"

        AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        elif fp_version != 0:
            fp_version = _("Frontprocessor version: %d") % fp_version
            AboutText += fp_version + "\n"

        tempinfo = ""
        if path.exists('/proc/stb/sensors/temp0/value'):
            f = open('/proc/stb/sensors/temp0/value', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/proc/stb/fp/temp_sensor'):
            f = open('/proc/stb/fp/temp_sensor', 'r')
            tempinfo = f.read()
            f.close()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("System temperature: %s") % tempinfo.replace(
                '\n', '') + mark + "C\n\n"

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
Пример #8
0
	def populate(self):
		self["lab1"] = StaticText(_("openATV"))
		self["lab2"] = StaticText(_("By openATV Image Team"))
		model = None
		AboutText = ""
		self["lab3"] = StaticText(_("Support at") + " www.opena.tv")
		AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName())

		if path.exists('/proc/stb/info/chipset'):
			AboutText += _("Chipset:\t%s") % about.getChipSetString() + "\n"


		AboutText += _("CPU:\t%s") % about.getCPUString() + "\n"
		AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n"

		AboutText += _("Version:\t%s") % getImageVersionString() + "\n"
		AboutText += _("Build:\t%s") % getBuildVersionString() + "\n"
		AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"

		string = getDriverDateString()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers:\t%s") % driversdate + "\n"

		AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		elif fp_version != 0:
			fp_version = _("Frontprocessor version: %d") % fp_version
			AboutText += fp_version + "\n"

		tempinfo = ""
		if path.exists('/proc/stb/sensors/temp0/value'):
			f = open('/proc/stb/sensors/temp0/value', 'r')
			tempinfo = f.read()
			f.close()
		elif path.exists('/proc/stb/fp/temp_sensor'):
			f = open('/proc/stb/fp/temp_sensor', 'r')
			tempinfo = f.read()
			f.close()
		if tempinfo and int(tempinfo.replace('\n','')) > 0:
			mark = str('\xc2\xb0')
			AboutText += _("System temperature: %s") % tempinfo.replace('\n','') + mark + "C\n\n"

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
Пример #9
0
from Components.ActionMap import NumberActionMap, ActionMap
from Components.NimManager import nimmanager, getConfigSatlist
from Components.config import config, ConfigSubsection, ConfigSelection, ConfigYesNo, ConfigInteger, getConfigListEntry, ConfigSlider, ConfigEnableDisable
from Components.Sources.Boolean import Boolean
from Components.Sources.StaticText import StaticText
from Components.Pixmap import Pixmap

from Tools.HardwareInfo import HardwareInfo
from Tools.Directories import resolveFilename

from enigma import eTimer, eDVBFrontendParametersSatellite, eComponentScan, eDVBSatelliteEquipmentControl, eDVBFrontendParametersTerrestrial, eDVBFrontendParametersCable, eConsoleAppContainer, eDVBResourceManager, getBoxType

try:
	from enigma import getImageVersionString, getBuildVersionString
	versionstring = getImageVersionString()
	buildstring = getBuildVersionString()
except:
	from Components.About import about
	versionstring = about.getImageVersionString()
	buildstring = about.getBuildVersionString()

def getDistro():
	try:
		from enigma import getDistro as e2_getDistro
		return e2_getDistro()
	except:
		try:
			file = open('/etc/image-version', 'r')
			lines = file.readlines()
			file.close()
			for x in lines:
Пример #10
0
	def populate(self):
		self["lab1"] = StaticText(_("Virtuosso Image Xtreme"))
		self["lab2"] = StaticText(_("By Team ViX"))
		model = None
		AboutText = ""
		self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.co.uk")
		if getBoxType() == 'vuuno':
			self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk")
		elif getBoxType() == 'vuultimo':
			self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk")
		elif getBoxType() == 'vusolo':
			self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk")
		elif getBoxType() == 'vusolo2':
			self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk")
		elif getBoxType() == 'vuduo':
			self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk")
		elif getBoxType() == 'vuduo2':
			self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.co.uk")
		elif getBoxType() == 'et4x00':
			self["lab3"] = StaticText(_("Support at") + " www.xtrend-support.co.uk")
		elif getBoxType() == 'et5x00':
			self["lab3"] = StaticText(_("Support at") + " www.xtrend-support.co.uk")
		elif getBoxType() == 'et6x00':
			self["lab3"] = StaticText(_("Support at") + " www.xtrend-support.co.uk")
		elif getBoxType() == 'et9x00':
			self["lab3"] = StaticText(_("Support at") + " www.xtrend-support.co.uk")
		elif getBoxType() == 'odinm7':
			self["lab3"] = StaticText(_("Support at") + " www.odin-support.co.uk")
		elif getBoxType() == 'odinm9':
			self["lab3"] = StaticText(_("Support at") + " www.odin-support.co.uk")

		AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName())

		if path.exists('/proc/stb/info/chipset'):
			AboutText += _("Chipset:\tBCM%s") % about.getChipSetString().lower().replace('\n','').replace('bcm','') + "\n"

		AboutText += _("CPU:\t%s") % about.getCPUString() + "\n"
		AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n"

		AboutText += _("Version:\t%s") % getImageVersionString() + "\n"
		AboutText += _("Build:\t%s") % getBuildVersionString() + "\n"
		AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"
		
		string = getDriverDateString()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers:\t%s") % driversdate + "\n"

		AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		elif fp_version != 0:
			fp_version = _("Frontprocessor version: %d") % fp_version
			AboutText += fp_version + "\n"

		tempinfo = ""
		if path.exists('/proc/stb/sensors/temp0/value'):
			f = open('/proc/stb/sensors/temp0/value', 'r')
			tempinfo = f.read()
			f.close()
		elif path.exists('/proc/stb/fp/temp_sensor'):
			f = open('/proc/stb/fp/temp_sensor', 'r')
			tempinfo = f.read()
			f.close()
		if tempinfo and int(tempinfo.replace('\n','')) > 0:
			mark = str('\xc2\xb0')
			AboutText += _("System temperature: %s") % tempinfo.replace('\n','') + mark + "C\n\n"

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
Пример #11
0
	def imageInfo(self):
		AboutText = _("Full Image Backup ")
		AboutText += _("By openATV Image Team") + "\n"
		AboutText += _("Support at") + " www.opena.tv\n\n"
		AboutText += _("[Image Info]\n")
		AboutText += _("Model: %s %s\n") % (getMachineBrand(), getMachineName())
		AboutText += _("Backup Date: %s\n") % strftime("%Y-%m-%d", localtime(self.START))

		if path.exists('/proc/stb/info/chipset'):
			AboutText += _("Chipset: BCM%s") % about.getChipSetString().lower().replace('\n','').replace('bcm','') + "\n"

		AboutText += _("CPU: %s") % about.getCPUString() + "\n"
		AboutText += _("Cores: %s") % about.getCpuCoresString() + "\n"

		AboutText += _("Version: %s") % getImageVersionString() + "\n"
		AboutText += _("Build: %s") % getBuildVersionString() + "\n"
		AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

		string = getDriverDateString()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers:\t%s") % driversdate + "\n"

		AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

		AboutText += _("[Enigma2 Settings]\n")
		AboutText += commands.getoutput("cat /etc/enigma2/settings")
		AboutText += _("\n\n[User - bouquets (TV)]\n")
		try:
			f = open("/etc/enigma2/bouquets.tv","r")
			lines = f.readlines()
			f.close()
			for line in lines:
				if line.startswith("#SERVICE:"):
					bouqet = line.split()
					if len(bouqet) > 3:
						bouqet[3] = bouqet[3].replace('"','')
						f = open("/etc/enigma2/" + bouqet[3],"r")
						userbouqet = f.readline()
						AboutText += userbouqet.replace('#NAME ','')
						f.close()
		except:
			AboutText += "Error reading bouquets.tv"
			
		AboutText += _("\n[User - bouquets (RADIO)]\n")
		try:
			f = open("/etc/enigma2/bouquets.radio","r")
			lines = f.readlines()
			f.close()
			for line in lines:
				if line.startswith("#SERVICE:"):
					bouqet = line.split()
					if len(bouqet) > 3:
						bouqet[3] = bouqet[3].replace('"','')
						f = open("/etc/enigma2/" + bouqet[3],"r")
						userbouqet = f.readline()
						AboutText += userbouqet.replace('#NAME ','')
						f.close()
		except:
			AboutText += "Error reading bouquets.radio"

		AboutText += _("\n[Installed Plugins]\n")
		AboutText += commands.getoutput("opkg list_installed | grep enigma2-plugin-")

		return AboutText
Пример #12
0
def getInfo():
	# TODO: get webif versione somewhere!
	info = {}

	brand = "Dream Multimedia"
	model = "unknown"
	chipset = "unknown"

	if fileExists("/proc/stb/info/hwmodel"):
		file = open("/proc/stb/info/hwmodel")
		model = file.read().strip().lower()
		file.close()
		if model == "tmtwinoe":
			model = "TM-TWIN-OE"
			brand = "Technomate"
		elif model == "tm2toe":
			model = "TM-2T-OE"
			brand = "Technomate"
		elif model == "tmsingle":
			model = "TM-SINGLE"
			brand = "Technomate"
		elif model == "tmnanooe":
			model = "TM-NANO-OE"
			brand = "Technomate"
		elif model == "ios100hd":
			model = "IOS-100HD"
			brand = "Iqon"
		elif model == "ios200hd":
			model = "IOS-200HD"
			brand = "Iqon"
		elif model == "ios300hd":
			model = "IOS-300HD"
			brand = "Iqon"
		elif model == "optimussos1":
			model = "Optimuss-OS1"
			brand = "Edision"
		elif model == "optimussos2":
			model = "Optimuss-OS2"
			brand = "Edision"
	elif fileExists("/proc/stb/info/boxtype"):
		file = open("/proc/stb/info/boxtype")
		model = file.read().strip().lower()
		file.close()
		if model == "gigablue":
			brand = "GigaBlue"
			if fileExists("/proc/stb/info/gbmodel"):
				file = open("/proc/stb/info/gbmodel")
				model = file.read().strip().lower()
				file.close()
				if model == "quad":
					model = "gbquad"
			else:
				model = 'gb800solo'
		elif model.startswith("et"):
			brand = "Clarke-Xtrend"
			if model == "et9500":
				model = "et9x00"
		elif model.startswith("ini"):
			if model.endswith("sv"):
				brand = "MiracleBox"
				if model == "ini-5000sv":
					model = "Premium Twin"
				elif model == "ini-1000sv":
					model = "Premium Mini"
				else:
					model
			elif model.endswith("de"):
				brand = "Golden Interstar"
				if model == "ini-1000de":
					model = "Xpeed LX"
				elif model == "ini-9000de":
					model = "Xpeed LX3"
				else:
					model
			elif model.endswith("ru"):
				brand = "Sezam"
				if model == "ini-1000ru":
					model = "Sezam 1000-HD"
				elif model == "ini-5000ru":
					model = "Sezam 5000-HD"
				elif model == "ini-9000ru":
					model = "Sezam Marvel"
				else:
					model
			else:
				brand = "Venton"
		elif model == "xp1000":
			brand = "XP-Series"
		elif model == "xp1000s":
			brand = "Octagon"
			model = "SF8 HD"
		elif model == "odinm9":
			brand = "Odin-Series"
		elif model == "odinm7":
			if getDistro() == 'axassupport':
				brand = "AXAS"
				model = "Class M"
			elif getBoxType() == 'odinm6':
				brand = "TELESTAR"
				model = "STARSAT LX"
			elif getMachineName() == 'AX-Odin':
				brand = "Opticum"
				model = "AX-Odin"	
			else:
				brand = "Odin-Series"
		elif model == "e3hd":
			if getDistro() == 'axassupport':
				brand = "AXAS"
				model = "Class E"
			else:
				brand = "E3-Series"
		elif model == "ebox5000":
			brand = "MixOs-Series"
			model = "MixOs F5"
		elif model == "ebox5100":
			brand = "MixOs-Series"
			model = "MixOs F5mini"
		elif model == "ebox7358":
			brand = "MixOs-Series"
			model = "MixOs F7"
		elif model.startswith("ixuss"):
			brand = "Ixuss-Series"
			chipset = "BCM7405"
	elif fileExists("/proc/stb/info/azmodel"):
		brand = "AZBOX"
		file = open("/proc/stb/info/model")
		model = file.read().strip().lower()
		file.close()
		if model == "me":
			chipset = "SIGMA 8655"
		elif model == "minime":
			chipset = "SIGMA 8653"
		else:
			chipset = "SIGMA 8634"
	elif fileExists("/proc/stb/info/vumodel"):
		brand = "Vu Plus"
		file = open("/proc/stb/info/vumodel")
		model = file.read().strip().lower()
		file.close()
	else:
		file = open("/proc/stb/info/model")
		model = file.read().strip().lower()
 		if model.startswith('spar'):
		    brand = "Spark"
		file.close()

	info['brand'] = brand
	info['model'] = model

	if fileExists("/proc/stb/info/chipset"):
		f = open("/proc/stb/info/chipset",'r')
		chipset = f.readline().strip()
		f.close()

	info['chipset'] = chipset

	memFree = 0
	file = open("/proc/meminfo",'r')
	for line in file:
		parts = line.split(':')
		key = parts[0].strip()
		if key == "MemTotal":
			info['mem1'] = parts[1].strip()
		elif key in ("MemFree", "Buffers", "Cached"):
			memFree += int(parts[1].strip().split(' ',1)[0])
	info['mem2'] = "%s kB" % memFree
	file.close()

	try:
		f = open("/proc/uptime", "rb")
		uptime = int(float(f.readline().split(' ', 2)[0].strip()))
		f.close()
		uptimetext = ''
		if uptime > 86400:
			d = uptime/86400
			uptime = uptime % 86400
			uptimetext += '%dd ' % d
		uptimetext += "%d:%.2d" % (uptime/3600, (uptime%3600)/60)
	except:
		uptimetext = "?"
	info['uptime'] = uptimetext

	info["webifver"] = getOpenWebifVer()
	try:
		from enigma import getImageVersionString, getBuildVersionString, getEnigmaVersionString
		info['imagever'] = getImageVersionString() + '.' + getBuildVersionString()
		info['enigmaver'] = getEnigmaVersionString()
	except:
		info['imagever'] = about.getImageVersionString()
		info['enigmaver'] = about.getEnigmaVersionString()
	info['kernelver'] = about.getKernelVersionString()

	try:
		from Tools.StbHardware import getFPVersion
	except ImportError:
		from Tools.DreamboxHardware import getFPVersion

	info['fp_version'] = getFPVersion()

	info['tuners'] = []
	for i in range(0, nimmanager.getSlotCount()):
		info['tuners'].append({
			"name": nimmanager.getNim(i).getSlotName(),
			"type": nimmanager.getNimName(i) + " (" + nimmanager.getNim(i).getFriendlyType() + ")"
		})

	info['ifaces'] = []
	ifaces = iNetwork.getConfiguredAdapters()
	for iface in ifaces:
		info['ifaces'].append({
			"name": iNetwork.getAdapterName(iface),
			"mac": iNetwork.getAdapterAttribute(iface, "mac"),
			"dhcp": iNetwork.getAdapterAttribute(iface, "dhcp"),
			"ip": formatIp(iNetwork.getAdapterAttribute(iface, "ip")),
			"mask": formatIp(iNetwork.getAdapterAttribute(iface, "netmask")),
			"gw": formatIp(iNetwork.getAdapterAttribute(iface, "gateway"))
		})

	info['hdd'] = []
	for hdd in harddiskmanager.hdd:
		if hdd.free() <= 1024:
			free = "%i MB" % (hdd.free())
		else:
			free = float(hdd.free()) / float(1024)
			free = "%.3f GB" % free
		info['hdd'].append({
			"model": hdd.model(),
			"capacity": hdd.capacity(),
			"free": free
		})
	return info
Пример #13
0
    def updateStatus(self):
        print "[TVCharts] Status Update ..."
        self.DBStatusTimer.stop()

        if not config.plugins.tvcharts.enabled.value or Screens.Standby.inStandby:
            return

        # Get Channelname
        sref = self.session.nav.getCurrentlyPlayingServiceReference()
        if sref is not None:
            ref = eServiceReference(sref.toString())
            ref.setName("")
            serviceHandler = eServiceCenter.getInstance()
            info = serviceHandler.info(ref)
            channel_name = info and info.getName(ref).replace(
                '\xc2\x86', '').replace('\xc2\x87', '').decode(
                    "utf-8", "ignore").encode("utf-8") or ""
            self.serviceref = ref.toString()
        else:
            channel_name = ""
            self.serviceref = ""

        # Get Event Info
        service = self.session.nav.getCurrentService()
        info = service and service.info()
        event = info and info.getEvent(0)
        event_name = event and event.getEventName() or ""
        event_description = ""
        event_begin = 0

        if event is not None:
            curEvent = parseEvent(event)
            event_begin = int(
                curEvent[0]) + (config.recording.margin_before.getValue() * 60)
            event_description = event.getExtendedDescription()

        # Get Box Info
        self.BoxID = iNetwork.getAdapterAttribute("eth0", "mac")
        self.DeviceName = HardwareInfo().get_device_name()
        try:
            from enigma import getImageVersionString, getBuildVersionString, getEnigmaVersionString
            self.EnigmaVersion = getEnigmaVersionString()
            self.ImageVersion = getImageVersionString(
            ) + '.' + getBuildVersionString()
        except:
            self.EnigmaVersion = about.getEnigmaVersionString()
            self.ImageVersion = about.getVersionString()

        # Get TimerList
        self.timerlist = ""
        if config.plugins.tvcharts.submittimers.value and self.LastTimerlistUpdate <= (
                time() - 1800):
            self.LastTimerlistUpdate = time()
            try:
                for timer in self.recordtimer.timer_list:
                    if timer.disabled == 0 and timer.justplay == 0:
                        self.timerlist += "%s|%s|%s|%s|%s|%s|%s\n" % (
                            timer.eit,
                            str(
                                int(timer.begin) +
                                (config.recording.margin_before.getValue() *
                                 60)),
                            str(
                                int(timer.end) -
                                (config.recording.margin_after.getValue() *
                                 60)), str(timer.service_ref), timer.name,
                            timer.service_ref.getServiceName().replace(
                                '\xc2\x86', '').replace('\xc2\x87', '').decode(
                                    "utf-8",
                                    "ignore").encode("utf-8"), timer.repeated)
            except Exception:
                print "[TVCharts] Error loading timers!"

        # Get Pluginlist
        if config.plugins.tvcharts.submitplugins.value and self.pluginlist == "":
            try:
                os_system(
                    "opkg list_installed | grep enigma2-plugin- > /tmp/plugins.txt"
                )
                for plugin in open('/tmp/plugins.txt', 'r'):
                    self.pluginlist += plugin[0:plugin.find(' - ')] + "\n"
                os_system("rm -f /tmp/plugins.txt")
            except Exception:
                print "[TVCharts] Error loading plugins!"

        # Status Update
        getPage(
            url='http://www.dreambox-plugins.de/feeds/TVCharts/status.php',
            agent="Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)",
            timeout=60,
            method='POST',
            headers={
                'Content-Type': 'application/x-www-form-urlencoded'
            },
            postdata=urlencode({
                'boxid': self.BoxID,
                'devicename': self.DeviceName,
                'imageversion': self.ImageVersion,
                'enigmaversion': self.EnigmaVersion,
                'lastchannel': channel_name,
                'lastevent': event_name,
                'eventdescr': event_description,
                'lastbegin': event_begin,
                'lastserviceref': self.serviceref,
                'timerlist': self.timerlist,
                'pluginlist': self.pluginlist
            })).addErrback(self.updateError)

        # Restart Timer
        self.DBStatusTimer.start(900000, True)
Пример #14
0
    def __init__(self, session, parent):
        Screen.__init__(self, session, parent=parent)
        self["selected"] = StaticText("openATV:" + getImageVersionString())

        AboutText = ""
        model = None

        if getBoxType() == 'vuuno':
            model = "Vu+ Uno"
        elif getBoxType() == 'vuultimo':
            model = "Vu+ Ultimo"
        elif getBoxType() == 'vusolo':
            model = "Vu+ Solo"
        elif getBoxType() == 'vusolo2':
            model = "Vu+ Solo" + chr(178)
        elif getBoxType() == 'vuduo':
            model = "Vu+ Duo"
        elif getBoxType() == 'vuduo2':
            model = "Vu+ Duo" + chr(178)
        elif getBoxType() == 'et4x00':
            model = "Xtrend ET4x00 Series"
        elif getBoxType() == 'et5x00':
            model = "Xtrend ET5x00 Series"
        elif getBoxType() == 'et6x00':
            model = "Xtrend ET6x00 Series"
        elif getBoxType() == 'et9x00':
            model = "Xtrend ET9x00 Series"
        elif getBoxType() == 'odinm7':
            model = "Odin M7"
        elif getBoxType() == 'odinm9':
            model = "Odin M9"
        elif getBoxType() == 'gb800solo':
            model = "GigaBlue HD 800 Solo"
        elif getBoxType() == 'gb800se':
            model = "GigaBlue HD 800 SE"
        elif getBoxType() == 'gb800ue':
            model = "GigaBlue HD 800 UE"
        elif getBoxType() == 'gbquad':
            model = "GigaBlue HD Quad"
        elif getBoxType() == 'ventonhdx':
            model = "Venton Unibox HDx"
        elif getBoxType() == 'ventonhde':
            model = "Venton Unibox HDe"
        elif getBoxType() == 'ixussone':
            model = "Ixuss One"
        elif getBoxType() == 'ixusszero':
            model = "Ixuss Zero"
        elif getBoxType() == 'ixussduo':
            model = "Ixuss Duo"
        elif getBoxType() == 'tmtwin':
            model = "Technomate Twin"
        elif getBoxType() == 'tm2t':
            model = "Technomate 2T"
        elif getBoxType() == 'tmsingle':
            model = "Technomate Single"
        elif getBoxType() == 'tmnano':
            model = "Technomate Nano OE"
        elif getBoxType() == 'iqonios100hd':
            model = "iqon IOS 100HD"
        elif getBoxType() == 'iqonios200hd':
            model = "iqon IOS 200HD"
        elif getBoxType() == 'iqonios300hd':
            model = "iqon IOS 300HD"
        elif getBoxType() == 'xp1000':
            model = "XP1000"
        elif getBoxType() == 'ebox5000':
            model = "MixOS F5"
        elif getBoxType() == 'ebox5100':
            model = "MixOS F5mini"
        elif getBoxType() == 'dm500hd':
            model = "DREAMBOX DM500HD"
        elif getBoxType() == 'dm800':
            model = "DREAMBOX DM800HD"
        elif getBoxType() == 'dm800se':
            model = "DREAMBOX DM800se"
        elif getBoxType() == 'dm7020hd':
            model = "DREAMBOX DM7020HD"
        elif getBoxType() == 'dm8000':
            model = "DREAMBOX DM8000HD"
        else:
            model = getBoxType()

        if model:
            AboutText += _("Model: %s") % model + "\n"

        if path.exists('/proc/stb/info/chipset'):
            chipset = open('/proc/stb/info/chipset', 'r').read()
            AboutText += _("Chipset: BCM%s") % chipset.replace('\n', '') + "\n"

        AboutText += _("Version: %s") % getImageVersionString() + "\n"
        AboutText += _("Build: %s") % getBuildVersionString() + "\n"
        AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

        string = getDriverDateString()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        AboutText += _("Drivers: %s") % driversdate + "\n"
        AboutText += _("Last update: %s") % getEnigmaVersionString() + "\n\n"

        tempinfo = ""
        if path.exists('/proc/stb/sensors/temp0/value'):
            tempinfo = open('/proc/stb/sensors/temp0/value', 'r').read()
        elif path.exists('/proc/stb/fp/temp_sensor'):
            tempinfo = open('/proc/stb/fp/temp_sensor', 'r').read()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("System temperature: %s") % tempinfo.replace(
                '\n', '') + mark + "C\n\n"

        self["AboutText"] = StaticText(AboutText)
Пример #15
0
    def populate(self):
        self["lab1"] = StaticText(_("openATV"))
        self["lab2"] = StaticText(_("By openATV Image Team"))
        model = None
        AboutText = ""
        self["lab3"] = StaticText(_("Support at") + " www.opena.tv")
        if getBoxType() == 'vuuno':
            model = "Vu+ Uno"
        elif getBoxType() == 'vuultimo':
            model = "Vu+ Ultimo"
        elif getBoxType() == 'vusolo':
            model = "Vu+ Solo\n"
        elif getBoxType() == 'vusolo2':
            model = "Vu+ Solo" + chr(178)
        elif getBoxType() == 'vuduo':
            model = "Vu+ Duo"
        elif getBoxType() == 'vuduo2':
            model = "Vu+ Duo" + chr(178)
        elif getBoxType() == 'et4x00':
            model = "Xtrend ET4x00 Series"
        elif getBoxType() == 'et5x00':
            model = "Xtrend ET5x00 Series"
        elif getBoxType() == 'et6x00':
            model = "Xtrend ET6x00 Series"
        elif getBoxType() == 'et9x00':
            model = "Xtrend ET9x00 Series"
        elif getBoxType() == 'odinm7':
            model = "Odin M/"
        elif getBoxType() == 'odinm9':
            model = "Odin M9"
        elif getBoxType() == 'gb800solo':
            model = "GigaBlue HD 800 Solo"
        elif getBoxType() == 'gb800se':
            model = "GigaBlue HD 800 SE"
        elif getBoxType() == 'gb800ue':
            model = "GigaBlue HD 800 UE"
        elif getBoxType() == 'gbquad':
            model = "GigaBlue HD Quad"
        elif getBoxType() == 'ventonhdx':
            model = "Venton Unibox HDx"
        elif getBoxType() == 'ventonhde':
            model = "Venton Unibox HDe"
        elif getBoxType() == 'ixussone':
            model = "Ixuss One"
        elif getBoxType() == 'ixusszero':
            model = "Ixuss Zero"
        elif getBoxType() == 'ixussduo':
            model = "Ixuss Duo"
        elif getBoxType() == 'tmtwin':
            model = "Technomate Twin"
        elif getBoxType() == 'tm2t':
            model = "Technomate 2T"
        elif getBoxType() == 'tmsingle':
            model = "Technomate Single"
        elif getBoxType() == 'tmnano':
            model = "Technomate Nano OE"
        elif getBoxType() == 'iqonios100hd':
            model = "iqon IOS 100HD"
        elif getBoxType() == 'iqonios200hd':
            model = "iqon IOS 200HD"
        elif getBoxType() == 'iqonios300hd':
            model = "iqon IOS 300HD"
        elif getBoxType() == 'xp1000':
            model = "XP1000"
        elif getBoxType() == 'ebox5000':
            model = "MixOS F5"
        elif getBoxType() == 'ebox5100':
            model = "MixOS F5mini"
        elif getBoxType() == 'dm500hd':
            model = "DREAMBOX DM500HD"
        elif getBoxType() == 'dm800':
            model = "DREAMBOX DM800HD"
        elif getBoxType() == 'dm800se':
            model = "DREAMBOX DM800se"
        elif getBoxType() == 'dm7020hd':
            model = "DREAMBOX DM7020HD"
        elif getBoxType() == 'dm8000':
            model = "DREAMBOX DM8000HD"
        else:
            model = getBoxType()

        if model:
            AboutText += _("Model:\t%s") % model + "\n"

        if path.exists('/proc/stb/info/chipset'):
            AboutText += _("Chipset:\tBCM%s") % about.getChipSetString().lower(
            ).replace('\n', '').replace('bcm', '') + "\n"

        AboutText += _("CPU:\t%s") % about.getCPUString() + "\n"
        AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n"

        AboutText += _("Version:\t%s") % getImageVersionString() + "\n"
        AboutText += _("Build:\t%s") % getBuildVersionString() + "\n"
        AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"

        string = getDriverDateString()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        AboutText += _("Drivers:\t%s") % driversdate + "\n"

        AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        elif fp_version != 0:
            fp_version = _("Frontprocessor version: %d") % fp_version
            AboutText += fp_version + "\n"

        tempinfo = ""
        if path.exists('/proc/stb/sensors/temp0/value'):
            f = open('/proc/stb/sensors/temp0/value', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/proc/stb/fp/temp_sensor'):
            f = open('/proc/stb/fp/temp_sensor', 'r')
            tempinfo = f.read()
            f.close()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("System temperature: %s") % tempinfo.replace(
                '\n', '') + mark + "C\n\n"

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
Пример #16
0
    def updateStatus(self):
        print "[TVCharts] Status Update ..."
        self.DBStatusTimer.stop()

        if not config.plugins.tvcharts.enabled.value or Screens.Standby.inStandby:
            return

            # Get Channelname
        sref = self.session.nav.getCurrentlyPlayingServiceReference()
        if sref is not None:
            ref = eServiceReference(sref.toString())
            ref.setName("")
            serviceHandler = eServiceCenter.getInstance()
            info = serviceHandler.info(ref)
            channel_name = (
                info
                and info.getName(ref)
                .replace("\xc2\x86", "")
                .replace("\xc2\x87", "")
                .decode("utf-8", "ignore")
                .encode("utf-8")
                or ""
            )
            self.serviceref = ref.toString()
        else:
            channel_name = ""
            self.serviceref = ""

            # Get Event Info
        service = self.session.nav.getCurrentService()
        info = service and service.info()
        event = info and info.getEvent(0)
        event_name = event and event.getEventName() or ""
        event_description = ""
        event_begin = 0

        if event is not None:
            curEvent = parseEvent(event)
            event_begin = int(curEvent[0]) + (config.recording.margin_before.getValue() * 60)
            event_description = event.getExtendedDescription()

            # Get Box Info
        self.BoxID = iNetwork.getAdapterAttribute("eth0", "mac")
        self.DeviceName = HardwareInfo().get_device_name()
        try:
            from enigma import getImageVersionString, getBuildVersionString, getEnigmaVersionString

            self.EnigmaVersion = getEnigmaVersionString()
            self.ImageVersion = getImageVersionString() + "." + getBuildVersionString()
        except:
            self.EnigmaVersion = about.getEnigmaVersionString()
            self.ImageVersion = about.getVersionString()

            # Get TimerList
        self.timerlist = ""
        if config.plugins.tvcharts.submittimers.value and self.LastTimerlistUpdate <= (time() - 1800):
            self.LastTimerlistUpdate = time()
            try:
                for timer in self.recordtimer.timer_list:
                    if timer.disabled == 0 and timer.justplay == 0:
                        self.timerlist += "%s|%s|%s|%s|%s|%s|%s\n" % (
                            timer.eit,
                            str(int(timer.begin) + (config.recording.margin_before.getValue() * 60)),
                            str(int(timer.end) - (config.recording.margin_after.getValue() * 60)),
                            str(timer.service_ref),
                            timer.name,
                            timer.service_ref.getServiceName()
                            .replace("\xc2\x86", "")
                            .replace("\xc2\x87", "")
                            .decode("utf-8", "ignore")
                            .encode("utf-8"),
                            timer.repeated,
                        )
            except Exception:
                print "[TVCharts] Error loading timers!"

                # Get Pluginlist
        if config.plugins.tvcharts.submitplugins.value and self.pluginlist == "":
            try:
                os_system("opkg list_installed | grep enigma2-plugin- > /tmp/plugins.txt")
                for plugin in open("/tmp/plugins.txt", "r"):
                    self.pluginlist += plugin[0 : plugin.find(" - ")] + "\n"
                os_system("rm -f /tmp/plugins.txt")
            except Exception:
                print "[TVCharts] Error loading plugins!"

                # Status Update
        getPage(
            url="http://www.dreambox-plugins.de/feeds/TVCharts/status.php",
            agent="Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)",
            timeout=60,
            method="POST",
            headers={"Content-Type": "application/x-www-form-urlencoded"},
            postdata=urlencode(
                {
                    "boxid": self.BoxID,
                    "devicename": self.DeviceName,
                    "imageversion": self.ImageVersion,
                    "enigmaversion": self.EnigmaVersion,
                    "lastchannel": channel_name,
                    "lastevent": event_name,
                    "eventdescr": event_description,
                    "lastbegin": event_begin,
                    "lastserviceref": self.serviceref,
                    "timerlist": self.timerlist,
                    "pluginlist": self.pluginlist,
                }
            ),
        ).addErrback(self.updateError)

        # Restart Timer
        self.DBStatusTimer.start(900000, True)
Пример #17
0
	def populate(self):
		self["lab1"] = StaticText(_("openATV"))
		self["lab2"] = StaticText(_("By openATV Image Team"))
		model = None
		AboutText = ""
		self["lab3"] = StaticText(_("Support at") + " www.opena.tv")
		if getBoxType() == 'vuuno':
			model = "Vu+ Uno"
		elif getBoxType() == 'vuultimo':
			model = "Vu+ Ultimo"
		elif getBoxType() == 'vusolo':
			model = "Vu+ Solo\n"
		elif getBoxType() == 'vusolo2':
			model = "Vu+ Solo" + chr(178)
		elif getBoxType() == 'vuduo':
			model = "Vu+ Duo"
		elif getBoxType() == 'vuduo2':
			model = "Vu+ Duo" + chr(178)
		elif getBoxType() == 'et4x00':
			model = "Xtrend ET4x00 Series"			
		elif getBoxType() == 'et5x00':
			model = "Xtrend ET5x00 Series"
		elif getBoxType() == 'et6x00':
			model = "Xtrend ET6x00 Series"
		elif getBoxType() == 'et9x00':
			model = "Xtrend ET9x00 Series"
		elif getBoxType() == 'odinm7':
			model = "Odin M/"			
		elif getBoxType() == 'odinm9':
			model = "Odin M9"
		elif getBoxType() == 'gb800solo':
			model = "GigaBlue HD 800 Solo"
		elif getBoxType() == 'gb800se':
			model = "GigaBlue HD 800 SE"
		elif getBoxType() == 'gb800ue':
			model = "GigaBlue HD 800 UE"
		elif getBoxType() == 'gbquad':
			model = "GigaBlue HD Quad"
		elif getBoxType() == 'ventonhdx':
			model = "Venton Unibox HDx"
		elif getBoxType() == 'ventonhde':
			model = "Venton Unibox HDe"
		elif getBoxType() == 'ixussone':
			model = "Ixuss One"
		elif getBoxType() == 'ixusszero':
			model = "Ixuss Zero"
		elif getBoxType() == 'ixussduo':
			model = "Ixuss Duo"			
		elif getBoxType() == 'tmtwin':
			model = "Technomate Twin"
		elif getBoxType() == 'tm2t':
			model = "Technomate 2T"
		elif getBoxType() == 'tmsingle':
			model = "Technomate Single"
		elif getBoxType() == 'tmnano':
			model = "Technomate Nano OE"
		elif getBoxType() == 'iqonios100hd':
			model = "iqon IOS 100HD"
		elif getBoxType() == 'iqonios200hd':
			model = "iqon IOS 200HD"
		elif getBoxType() == 'iqonios300hd':
			model = "iqon IOS 300HD"
		elif getBoxType() == 'xp1000':
			model = "XP1000"
		elif getBoxType() == 'ebox5000':
			model = "MixOS F5"
		elif getBoxType() == 'ebox5100':
			model = "MixOS F5mini"
		elif getBoxType() == 'dm500hd':
			model = "DREAMBOX DM500HD"
		elif getBoxType() == 'dm800':
			model = "DREAMBOX DM800HD"
		elif getBoxType() == 'dm800se':
			model = "DREAMBOX DM800se"
		elif getBoxType() == 'dm7020hd':
			model = "DREAMBOX DM7020HD"
		elif getBoxType() == 'dm8000':
			model = "DREAMBOX DM8000HD"
		else:
			model = getBoxType()

		if model:
			AboutText += _("Model:\t%s") % model + "\n"

		if path.exists('/proc/stb/info/chipset'):
			AboutText += _("Chipset:\tBCM%s") % about.getChipSetString().lower().replace('\n','').replace('bcm','') + "\n"

		AboutText += _("CPU:\t%s") % about.getCPUString() + "\n"
		AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n"

		AboutText += _("Version:\t%s") % getImageVersionString() + "\n"
		AboutText += _("Build:\t%s") % getBuildVersionString() + "\n"
		AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"

		string = getDriverDateString()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers:\t%s") % driversdate + "\n"

		AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		elif fp_version != 0:
			fp_version = _("Frontprocessor version: %d") % fp_version
			AboutText += fp_version + "\n"

		tempinfo = ""
		if path.exists('/proc/stb/sensors/temp0/value'):
			f = open('/proc/stb/sensors/temp0/value', 'r')
			tempinfo = f.read()
			f.close()
		elif path.exists('/proc/stb/fp/temp_sensor'):
			f = open('/proc/stb/fp/temp_sensor', 'r')
			tempinfo = f.read()
			f.close()
		if tempinfo and int(tempinfo.replace('\n','')) > 0:
			mark = str('\xc2\xb0')
			AboutText += _("System temperature: %s") % tempinfo.replace('\n','') + mark + "C\n\n"

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
Пример #18
0
	def __init__(self, session, parent):
		Screen.__init__(self, session, parent = parent)
		self["selected"] = StaticText("openATV:" + getImageVersionString())

		AboutText = ""
		model = None

		if getBoxType() == 'vuuno':
			model = "Vu+ Uno"
		elif getBoxType() == 'vuultimo':
			model = "Vu+ Ultimo"
		elif getBoxType() == 'vusolo':
			model = "Vu+ Solo"
		elif getBoxType() == 'vusolo2':
			model = "Vu+ Solo" + chr(178)
		elif getBoxType() == 'vuduo':
			model = "Vu+ Duo"
		elif getBoxType() == 'vuduo2':
			model = "Vu+ Duo" + chr(178)
		elif getBoxType() == 'et4x00':
			model = "Xtrend ET4x00 Series"
		elif getBoxType() == 'et5x00':
			model = "Xtrend ET5x00 Series"
		elif getBoxType() == 'et6x00':
			model = "Xtrend ET6x00 Series"
		elif getBoxType() == 'et9x00':
			model = "Xtrend ET9x00 Series"
		elif getBoxType() == 'odinm7':
			model = "Odin M7"
		elif getBoxType() == 'odinm9':
			model = "Odin M9"
		elif getBoxType() == 'gb800solo':
			model = "GigaBlue HD 800 Solo"
		elif getBoxType() == 'gb800se':
			model = "GigaBlue HD 800 SE"
		elif getBoxType() == 'gb800ue':
			model = "GigaBlue HD 800 UE"
		elif getBoxType() == 'gbquad':
			model = "GigaBlue HD Quad"
		elif getBoxType() == 'ventonhdx':
			model = "Venton Unibox HDx"
		elif getBoxType() == 'ventonhde':
			model = "Venton Unibox HDe"
		elif getBoxType() == 'ixussone':
			model = "Ixuss One"
		elif getBoxType() == 'ixusszero':
			model = "Ixuss Zero"
		elif getBoxType() == 'ixussduo':
			model = "Ixuss Duo"
		elif getBoxType() == 'tmtwin':
			model = "Technomate Twin"
		elif getBoxType() == 'tm2t':
			model = "Technomate 2T"
		elif getBoxType() == 'tmsingle':
			model = "Technomate Single"
		elif getBoxType() == 'tmnano':
			model = "Technomate Nano OE"
		elif getBoxType() == 'iqonios100hd':
			model = "iqon IOS 100HD"
		elif getBoxType() == 'iqonios200hd':
			model = "iqon IOS 200HD"
		elif getBoxType() == 'iqonios300hd':
			model = "iqon IOS 300HD"			
		elif getBoxType() == 'xp1000':
			model = "XP1000"
		elif getBoxType() == 'ebox5000':
			model = "MixOS F5"
		elif getBoxType() == 'ebox5100':
			model = "MixOS F5mini"
		elif getBoxType() == 'dm500hd':
			model = "DREAMBOX DM500HD"
		elif getBoxType() == 'dm800':
			model = "DREAMBOX DM800HD"
		elif getBoxType() == 'dm800se':
			model = "DREAMBOX DM800se"
		elif getBoxType() == 'dm7020hd':
			model = "DREAMBOX DM7020HD"
		elif getBoxType() == 'dm8000':
			model = "DREAMBOX DM8000HD"
		else:
			model = getBoxType()

		if model:
			AboutText += _("Model: %s") % model + "\n"

		if path.exists('/proc/stb/info/chipset'):
			chipset = open('/proc/stb/info/chipset', 'r').read()
			AboutText += _("Chipset: BCM%s") % chipset.replace('\n','') + "\n"

		AboutText += _("Version: %s") % getImageVersionString() + "\n"
		AboutText += _("Build: %s") % getBuildVersionString() + "\n"
		AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

		string = getDriverDateString()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers: %s") % driversdate + "\n"
		AboutText += _("Last update: %s") % getEnigmaVersionString() + "\n\n"

		tempinfo = ""
		if path.exists('/proc/stb/sensors/temp0/value'):
			tempinfo = open('/proc/stb/sensors/temp0/value', 'r').read()
		elif path.exists('/proc/stb/fp/temp_sensor'):
			tempinfo = open('/proc/stb/fp/temp_sensor', 'r').read()
		if tempinfo and int(tempinfo.replace('\n','')) > 0:
			mark = str('\xc2\xb0')
			AboutText += _("System temperature: %s") % tempinfo.replace('\n','') + mark + "C\n\n"

		self["AboutText"] = StaticText(AboutText)
Пример #19
0
    def imageInfo(self):
        AboutText = _("Full Image Backup ")
        AboutText += _("By openATV Image Team") + "\n"
        AboutText += _("Support at") + " www.opena.tv\n\n"
        AboutText += _("[Image Info]\n")
        AboutText += _("Model: %s %s\n") % (getMachineBrand(),
                                            getMachineName())
        AboutText += _("Backup Date: %s\n") % strftime("%Y-%m-%d",
                                                       localtime(self.START))

        if path.exists('/proc/stb/info/chipset'):
            AboutText += _("Chipset: BCM%s") % about.getChipSetString().lower(
            ).replace('\n', '').replace('bcm', '') + "\n"

        AboutText += _("CPU: %s") % about.getCPUString() + "\n"
        AboutText += _("Cores: %s") % about.getCpuCoresString() + "\n"

        AboutText += _("Version: %s") % getImageVersionString() + "\n"
        AboutText += _("Build: %s") % getBuildVersionString() + "\n"
        AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

        string = getDriverDateString()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        AboutText += _("Drivers:\t%s") % driversdate + "\n"

        AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

        AboutText += _("[Enigma2 Settings]\n")
        AboutText += commands.getoutput("cat /etc/enigma2/settings")
        AboutText += _("\n\n[User - bouquets (TV)]\n")
        try:
            f = open("/etc/enigma2/bouquets.tv", "r")
            lines = f.readlines()
            f.close()
            for line in lines:
                if line.startswith("#SERVICE:"):
                    bouqet = line.split()
                    if len(bouqet) > 3:
                        bouqet[3] = bouqet[3].replace('"', '')
                        f = open("/etc/enigma2/" + bouqet[3], "r")
                        userbouqet = f.readline()
                        AboutText += userbouqet.replace('#NAME ', '')
                        f.close()
        except:
            AboutText += "Error reading bouquets.tv"

        AboutText += _("\n[User - bouquets (RADIO)]\n")
        try:
            f = open("/etc/enigma2/bouquets.radio", "r")
            lines = f.readlines()
            f.close()
            for line in lines:
                if line.startswith("#SERVICE:"):
                    bouqet = line.split()
                    if len(bouqet) > 3:
                        bouqet[3] = bouqet[3].replace('"', '')
                        f = open("/etc/enigma2/" + bouqet[3], "r")
                        userbouqet = f.readline()
                        AboutText += userbouqet.replace('#NAME ', '')
                        f.close()
        except:
            AboutText += "Error reading bouquets.radio"

        AboutText += _("\n[Installed Plugins]\n")
        AboutText += commands.getoutput(
            "opkg list_installed | grep enigma2-plugin-")

        return AboutText
Пример #20
0
def getInfo():
	# TODO: get webif versione somewhere!
	info = {}

	brand = "Dream Multimedia"
	model = "unknown"
	chipset = "unknown"

	if fileExists("/proc/stb/info/hwmodel"):
		file = open("/proc/stb/info/hwmodel")
		model = file.read().strip().lower()
		file.close()
		if model == "tmtwinoe":
			model = "TM-TWIN-OE"
			brand = "Technomate"
		elif model == "tm2toe":
			model = "TM-2T-OE"
			brand = "Technomate"
		elif model == "tmsingle":
			model = "TM-SINGLE"
			brand = "Technomate"
		elif model == "tmnanooe":
			model = "TM-NANO-OE"
			brand = "Technomate"
		elif model == "ios100hd":
			model = "IOS-100HD"
			brand = "Iqon"
		elif model == "ios200hd":
			model = "IOS-200HD"
			brand = "Iqon"
		elif model == "ios300hd":
			model = "IOS-300HD"
			brand = "Iqon"
		elif model == "optimussos1":
			model = "Optimuss-OS1"
			brand = "Edision"
		elif model == "optimussos2":
			model = "Optimuss-OS2"
			brand = "Edision"
	elif fileExists("/proc/stb/info/boxtype"):
		file = open("/proc/stb/info/boxtype")
		model = file.read().strip().lower()
		file.close()
		if model == "gigablue":
			brand = "GigaBlue"
			if fileExists("/proc/stb/info/gbmodel"):
				file = open("/proc/stb/info/gbmodel")
				model = file.read().strip().lower()
				file.close()
				if model == "quad":
					model = "gbquad"
			else:
				model = 'gb800solo'
		elif model.startswith("et"):
			brand = "Clarke-Xtrend"
			if model == "et9500":
				model = "et9x00"
		elif model.startswith("ini"):
			if model.endswith("sv"):
				brand = "MiracleBox"
				if model == "ini-5000sv":
					model = "Premium Twin"
				elif model == "ini-1000sv":
					model = "Premium Mini"
				else:
					model
			elif model.endswith("de"):
				brand = "Golden Interstar"
				if model == "ini-1000de":
					model = "Xpeed LX"
				elif model == "ini-9000de":
					model = "Xpeed LX3"
				else:
					model
			elif model.endswith("ru"):
				brand = "Sezam"
				if model == "ini-1000ru":
					model = "Sezam 1000-HD"
				elif model == "ini-5000ru":
					model = "Sezam 5000-HD"
				elif model == "ini-9000ru":
					model = "Sezam Marvel"
				else:
					model
			else:
				brand = "Venton"
		elif model == "xp1000":
			brand = "XP-Series"
		elif model == "xp1000s":
			brand = "Octagon"
			model = "SF8 HD"
		elif model == "odinm9":
			brand = "Odin-Series"
		elif model == "odinm7":
			if getDistro() == 'axassupport':
				brand = "AXAS"
				model = "Class M"
			elif getBoxType() == 'odinm6':
				brand = "TELESTAR"
				model = "STARSAT LX"
			elif getMachineName() == 'AX-Odin':
				brand = "Opticum"
				model = "AX-Odin"	
			else:
				brand = "Odin-Series"
		elif model == "e3hd":
			if getDistro() == 'axassupport':
				brand = "AXAS"
				model = "Class E"
			else:
				brand = "E3-Series"
		elif model == "ebox5000":
			brand = "MixOs-Series"
			model = "MixOs F5"
		elif model == "ebox5100":
			brand = "MixOs-Series"
			model = "MixOs F5mini"
		elif model == "ebox7358":
			brand = "MixOs-Series"
			model = "MixOs F7"
		elif model.startswith("ixuss"):
			brand = "Ixuss-Series"
			chipset = "BCM7405"
	elif fileExists("/proc/stb/info/azmodel"):
		brand = "AZBOX"
		file = open("/proc/stb/info/model")
		model = file.read().strip().lower()
		file.close()
		if model == "me":
			chipset = "SIGMA 8655"
		elif model == "minime":
			chipset = "SIGMA 8653"
		else:
			chipset = "SIGMA 8634"
	elif fileExists("/proc/stb/info/vumodel"):
		brand = "Vu Plus"
		file = open("/proc/stb/info/vumodel")
		model = file.read().strip().lower()
		file.close()
	else:
		file = open("/proc/stb/info/model")
		model = file.read().strip().lower()
 		if model.startswith('spar'):
		    brand = "Spark"
		file.close()

	info['brand'] = brand
	info['model'] = model

	if fileExists("/proc/stb/info/chipset"):
		f = open("/proc/stb/info/chipset",'r')
		chipset = f.readline().strip()
		f.close()

	info['chipset'] = chipset

	memFree = 0
	file = open("/proc/meminfo",'r')
	for line in file:
		parts = line.split(':')
		key = parts[0].strip()
		if key == "MemTotal":
			info['mem1'] = parts[1].strip()
		elif key in ("MemFree", "Buffers", "Cached"):
			memFree += int(parts[1].strip().split(' ',1)[0])
	info['mem2'] = "%s kB" % memFree
	file.close()

	try:
		f = open("/proc/uptime", "rb")
		uptime = int(float(f.readline().split(' ', 2)[0].strip()))
		f.close()
		uptimetext = ''
		if uptime > 86400:
			d = uptime/86400
			uptime = uptime % 86400
			uptimetext += '%dd ' % d
		uptimetext += "%d:%.2d" % (uptime/3600, (uptime%3600)/60)
	except:
		uptimetext = "?"
	info['uptime'] = uptimetext

	info["webifver"] = getOpenWebifVer()
	try:
		from enigma import getImageVersionString, getBuildVersionString, getEnigmaVersionString
		info['imagever'] = getImageVersionString() + '.' + getBuildVersionString()
		info['enigmaver'] = getEnigmaVersionString()
	except:
		info['imagever'] = about.getImageVersionString()
		info['enigmaver'] = about.getEnigmaVersionString()
	info['kernelver'] = about.getKernelVersionString()

	try:
		from Tools.StbHardware import getFPVersion
	except ImportError:
		from Tools.DreamboxHardware import getFPVersion

	info['fp_version'] = getFPVersion()

	info['tuners'] = []
	for i in range(0, nimmanager.getSlotCount()):
		info['tuners'].append({
			"name": nimmanager.getNim(i).getSlotName(),
			"type": nimmanager.getNimName(i) + " (" + nimmanager.getNim(i).getFriendlyType() + ")"
		})

	info['ifaces'] = []
	ifaces = iNetwork.getConfiguredAdapters()
	for iface in ifaces:
		info['ifaces'].append({
			"name": iNetwork.getAdapterName(iface),
			"mac": iNetwork.getAdapterAttribute(iface, "mac"),
			"dhcp": iNetwork.getAdapterAttribute(iface, "dhcp"),
			"ip": formatIp(iNetwork.getAdapterAttribute(iface, "ip")),
			"mask": formatIp(iNetwork.getAdapterAttribute(iface, "netmask")),
			"gw": formatIp(iNetwork.getAdapterAttribute(iface, "gateway"))
		})

	info['hdd'] = []
	for hdd in harddiskmanager.hdd:
		if hdd.free() <= 1024:
			free = "%i MB" % (hdd.free())
		else:
			free = float(hdd.free()) / float(1024)
			free = "%.3f GB" % free
		info['hdd'].append({
			"model": hdd.model(),
			"capacity": hdd.capacity(),
			"free": free
		})
	return info