Esempio n. 1
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())
Esempio n. 2
0
	def imageInfo(self):
		AboutText = _("OpenHDF Full-Image Backupscript\n")
		AboutText += _("Support at") + " www.hdfreaks.cc\n\n"
		AboutText += _("[Image Info's]\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") % getImageVersion() + "\n"
		AboutText += _("Build: %s") % getImageBuild() + "\n"
		AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

		string = getDriverDate()
		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[Installed Plugins]\n")
		AboutText += commands.getoutput("opkg list_installed | grep enigma2-plugin-")

		return AboutText
Esempio n. 3
0
def getEnigmaVersionString():
    import enigma

    enigma_version = enigma.getEnigmaVersionString()
    if "-(no branch)" in enigma_version:
        enigma_version = enigma_version[:-12]
    return enigma_version
Esempio n. 4
0
 def __init__(self, session, parent):
     Screen.__init__(self, session, parent=parent)
     self['selected'] = StaticText('MediaSat:' + getImageVersion())
     AboutText = _('Model: %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') % getImageVersion() + '\n'
     AboutText += _('Build: %s') % getImageBuild() + '\n'
     AboutText += _('Kernel: %s') % about.getKernelVersionString() + '\n'
     string = getDriverDate()
     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)
Esempio n. 5
0
	def __init__(self, session, parent):
		Screen.__init__(self, session, parent=parent)
		self["selected"] = StaticText("ViX:" + getImageVersion())

		AboutText = _("Model: %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") % getImageVersion() + "\n"
		AboutText += _("Build: %s") % getImageBuild() + "\n"
		AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

		string = getDriverDate()
		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)
Esempio n. 6
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") % getImageVersion() + "\n"
        AboutText += _("Build:\t%s") % getImageBuild() + "\n"
        AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"

        string = getDriverDate()
        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: %s") % 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:\t%s") % tempinfo.replace("\n", "") + mark + "C\n"

        tempinfo = ""
        if path.exists("/proc/stb/fp/temp_sensor_avs"):
            f = open("/proc/stb/fp/temp_sensor_avs", "r")
            tempinfo = f.read()
            f.close()
        if tempinfo and int(tempinfo.replace("\n", "")) > 0:
            mark = str("\xc2\xb0")
            AboutText += _("Processor temperature:\t%s") % tempinfo.replace("\n", "") + mark + "C\n"

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
Esempio n. 7
0
def getEnigmaVersionString():
	import enigma
	list = []
	enigma_version = enigma.getEnigmaVersionString()
	if '-(no branch)' in enigma_version:
		enigma_version = enigma_version [:-12]
#iq [
		list = enigma_version.split("-")
	return list[1] + "-" + list[2] + "-" + list[0]
Esempio n. 8
0
def getEnigmaVersionString():
    import enigma

    enigma_version = enigma.getEnigmaVersionString()
    if "-(no branch)" in enigma_version:
        enigma_version = enigma_version[:-12]
        # [ IQON : by LeeWS : return enigma_version is replaced to below 2 lines.
    list = enigma_version.split("-")
    return list[0] + "-" + list[1] + "-" + list[2]
Esempio n. 9
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.com")

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

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

		AboutText += _("CPU:\t%s\n") % about.getCPUString()
		AboutText += _("CPU speed:\t%s\n") % about.getCPUSpeedString()
		AboutText += _("Cores:\t%s\n") % about.getCpuCoresString()
		imageSubBuild = ""
		if getImageType() != 'release':
			imageSubBuild = ".%s" % getImageDevBuild()
		AboutText += _("Build:\t%s.%s%s (%s)\n") % (getImageVersion(), getImageBuild(), imageSubBuild, getImageType().title())
		AboutText += _("Skin name:\t%s\n") % config.skin.primary_skin.value[0:-9]

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

		AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString().replace("GStreamer ","")
		AboutText += _("Python:\t%s\n") % about.getPythonVersionString()

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

		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') and getBoxType() not in ('gbquad'):
			f = open('/proc/stb/sensors/temp0/value', 'r')
			tempinfo = f.read()
			f.close()
		elif path.exists('/proc/stb/fp/temp_sensor') and getBoxType() not in ('gbquad'):
			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%sC\n\n") % (tempinfo.replace('\n', ''), mark)

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
Esempio n. 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.com")
		if getMachineBrand() == 'Vu+':
			self["lab3"] = StaticText(_("Support at") + " www.vuplus-support.com")
		elif getMachineBrand() == 'Xtrend':
			self["lab3"] = StaticText(_("Support at") + " www.xtrend-support.com")
		elif getMachineBrand() == 'Odin':
			self["lab3"] = StaticText(_("Support at") + " www.odin-support.com")

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

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

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

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

		string = getDriverDate()
		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') and getBoxType() not in ('gbquad'):
			f = open('/proc/stb/sensors/temp0/value', 'r')
			tempinfo = f.read()
			f.close()
		elif path.exists('/proc/stb/fp/temp_sensor') and getBoxType() not in ('gbquad'):
			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)
Esempio n. 11
0
	def populate(self):
		self["lab1"] = StaticText(_("ViX4E2PROJECT"))
		self["lab2"] = StaticText(_("By ViX4 Antony"))
		model = None
		AboutText = ""
		self["lab3"] = StaticText(_("www.ViX4.com"))

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

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

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

		AboutText += _("Version:\t%s\n") % getImageVersion()
		AboutText += _("Build:\t%s\n") % getImageBuild()
		
		string = getDriverDate()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers:\t%s\n") % driversdate
		AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString()
		
		AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString().replace("GStreamer ","")
		AboutText += _("Python:\t%s\n") % about.getPythonVersionString()

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

		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') and getBoxType() not in ('gbquad'):
			f = open('/proc/stb/sensors/temp0/value', 'r')
			tempinfo = f.read()
			f.close()
		elif path.exists('/proc/stb/fp/temp_sensor') and getBoxType() not in ('gbquad'):
			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%sC\n\n") % (tempinfo.replace('\n', ''), mark)

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
Esempio n. 12
0
	def populate(self):
		self["lab1"] = StaticText(_("openSWF"))
		self["lab2"] = StaticText(_("Mod Sodo"))
		model = None
		AboutText = ""
		self["lab3"] = StaticText(_("Support at") + " www.star7arab.com")
		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"
                AboutText += _("OpenGL : BroadCom 2.0") + "\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)
Esempio n. 13
0
 def populate(self):
     EGAMIVersion = _('EGAMI %s') % about.getImageVersionString()
     self['lab1'] = Label(EGAMIVersion)
     model = None
     AboutText = ''
     AboutText += _('Model:\t%s %s\n') % (getMachineBrand(), getMachineName())
     if path.exists('/proc/stb/info/chipset'):
         AboutText += _('Chipset:\tBCM%s\n') % about.getChipSetString()
     AboutText += _('CPU:\t%s\n') % about.getCPUString()
     AboutText += _('CPU speed:\t%s\n') % about.getCPUSpeedString()
     AboutText += _('Cores:\t%s\n') % about.getCpuCoresString()
     AboutText += _('Version:\t%s') % EGAMIVersion + '\n'
     AboutText += _('Kernel:\t%s') % about.getKernelVersionString() + '\n'
     AboutText += _('Oe-Core:\tOe-Alliance 3.4') + '\n'
     AboutText += _('Moderator:\tRedouane') + '\n'
     AboutText += _('Image Type:\t%s\n') % getImageType().title()
     AboutText += _('Skin name:\t%s\n') % config.skin.primary_skin.value[0:-9]
     string = getDriverDate()
     year = string[0:4]
     month = string[4:6]
     day = string[6:8]
     driversdate = '-'.join((year, month, day))
     AboutText += _('Drivers:\t%s') % driversdate + '\n'
     fp_version = getFPVersion()
     if fp_version is None:
         fp_version = ''
     elif fp_version != 0:
         fp_version = _('Front panel:\t%s') % str(fp_version)
         AboutText += fp_version + '\n'
     AboutText += _('Python:\t%s\n') % about.getPythonVersionString()
     AboutText += _('GStreamer:\t%s') % about.getGStreamerVersionString().replace('GStreamer', '') + '\n\n'
     tempinfo = ''
     if path.exists('/proc/stb/sensors/temp0/value') and getBoxType() not in 'gbquad':
         f = open('/proc/stb/sensors/temp0/value', 'r')
         tempinfo = f.read()
         f.close()
     elif path.exists('/proc/stb/fp/temp_sensor') and getBoxType() not in 'gbquad':
         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'
     AboutText += _('Installed:\t%s\n') % about.getFlashDateString()
     AboutText += _('Last update:\t%s') % getEnigmaVersionString() + '\n\n'
     AboutText += _('WWW:\t%s') % about.getImageUrlString()
     self['AboutScrollLabel'] = ScrollLabel(AboutText)
     return
Esempio n. 14
0
 def populate(self):
     EGAMIVersion = _("EGAMI %s") % about.getImageVersionString()
     self["lab1"] = Label(EGAMIVersion)
     model = None
     AboutText = ""
     AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName())
     if path.exists("/proc/stb/info/chipset"):
         AboutText += _("Chipset:\tBCM%s\n") % about.getChipSetString()
     AboutText += _("CPU:\t%s\n") % about.getCPUString()
     AboutText += _("CPU Speed:\t%s\n") % about.getCPUSpeedString()
     AboutText += _("Cores:\t%s\n") % about.getCpuCoresString()
     AboutText += _("Version:\t%s") % EGAMIVersion + "\n"
     AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"
     AboutText += _("Oe-Core:\t%s") % about.getEnigmaVersionString() + "\n"
     AboutText += _("Image Type:\t%s\n") % getImageType().title()
     AboutText += _("Image Coder:\tSODO\n")
     string = getDriverDate()
     year = string[0:4]
     month = string[4:6]
     day = string[6:8]
     driversdate = "-".join((year, month, day))
     AboutText += _("Drivers:\t%s") % driversdate + "\n"
     fp_version = getFPVersion()
     if fp_version is None:
         fp_version = ""
     elif fp_version != 0:
         fp_version = _("Front panel:\t%s") % str(fp_version)
         AboutText += fp_version + "\n"
     AboutText += _("Python:\t%s\n") % about.getPythonVersionString()
     AboutText += _("GStreamer:\t%s") % about.getGStreamerVersionString().replace("GStreamer", "") + "\n\n"
     tempinfo = ""
     if path.exists("/proc/stb/sensors/temp0/value") and getBoxType() not in "gbquad":
         f = open("/proc/stb/sensors/temp0/value", "r")
         tempinfo = f.read()
         f.close()
     elif path.exists("/proc/stb/fp/temp_sensor") and getBoxType() not in "gbquad":
         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"
     AboutText += _("Installed:\t%s\n") % about.getFlashDateString()
     AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"
     AboutText += _("WWW:\t%s") % about.getImageUrlString()
     self["AboutScrollLabel"] = ScrollLabel(AboutText)
Esempio n. 15
0
def get_box_info():
    vu = safe_read("/proc/stb/info/vumodel")
    if vu:
        atr_box_info = 'VU+' + vu
    else:
        atr_box_info = safe_read("/proc/stb/info/model")
        if atr_box_info == 'nbox':
            nbox = safe_read("/proc/boxtype")
            if nbox:
                atr_box_info = nbox
    import platform
    p = platform.uname()
    from enigma import getEnigmaVersionString
    atr_box_info = "%s.%s.%s.%s" % (p[4], atr_box_info, p[1], getEnigmaVersionString())
    if atr_box_info == None:
        atr_box_info = 'unknown'
    return atr_box_info 
Esempio n. 16
0
 def populate(self):
     self['lab1'] = StaticText(_('Version:\t%s') % getImageVersion() + _(' %s') % getImageBuild())
     self['lab2'] = StaticText(_('By REDOUANE'))
     model = None
     AboutText = ''
     self['lab3'] = StaticText(_('Support at') + ' www.pkteam.pl')
     AboutText += _('Model:\t%s %s\n') % (getMachineBrand(), getMachineName())
     if path.exists('/proc/stb/info/chipset'):
         AboutText += _('Chipset:\tBCM%s') % about.getChipSetString() + '\n'
     AboutText += _('CPU:\t%s') % about.getCPUString() + '\n'
     AboutText += _('Cores:\t%s') % about.getCpuCoresString() + '\n'
     AboutText += _('Version:\t%s') % getImageVersion() + '\n'
     AboutText += _('Build:\t%s') % getImageBuild() + '\n'
     AboutText += _('Kernel:\t%s') % about.getKernelVersionString() + '\n'
     AboutText += _('OPENGL:\tGLS BroadCom V2.0') + '\n'
     string = getDriverDate()
     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)
Esempio n. 17
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
Esempio n. 18
0
	def populate(self):
		self["lab1"] = StaticText(_("openHDF by HDF Image Team"))
		self["lab2"] = StaticText(_("Support at") + " www.HDFreaks.cc")
		model = None
		AboutText = ""
		self["lab2"] = StaticText(_("Support @") + " www.hdfreaks.cc")
		AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName())

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

		cmd = 'cat /proc/cpuinfo | grep "cpu MHz" -m 1 | awk -F ": " ' + "'{print $2}'"
		cmd2 = 'cat /proc/cpuinfo | grep "BogoMIPS" -m 1 | awk -F ": " ' + "'{print $2}'"
		try:
			res = popen(cmd).read()
			res2 = popen(cmd2).read()
		except:
			res = ""
			res2 = ""
		cpuMHz = ""
		bogoMIPS = ""
		if res:
			cpuMHz = "" + res.replace("\n", "") + " MHz"
		if res2:
			bogoMIPS = "" + res2.replace("\n", "") 
			
		AboutText += _("CPU:\t%s") % about.getCPUString() + "\n"
		AboutText += _("Clock Speed:\t%s") % cpuMHz + "\n"
		AboutText += _("BogoMIPS:\t%s") % bogoMIPS + "\n"
		AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n"

		AboutText += _("HDF Version:\t%s") % getImageVersion() + "\n"
		AboutText += _("HDF Build:\t%s") % getImageBuild() + "\n"
		AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"

		string = getDriverDate()
		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"
		
		AboutText += _("GStreamer:\t%s") % about.getGStreamerVersionString() + "\n"

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		elif fp_version != 0:
			fp_version = _("Frontprocessor version: %s") % 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 Temp:\t%s") % tempinfo.replace('\n', '') + mark + "C\n"
	
		tempinfo = ""
		if path.exists('/proc/stb/fp/temp_sensor_avs'):
			f = open('/proc/stb/fp/temp_sensor_avs', 'r')
			tempinfo = f.read()
			f.close()
		if tempinfo and int(tempinfo.replace('\n', '')) > 0:
			mark = str('\xc2\xb0')
			AboutText += _("Processor Temp:\t%s") % tempinfo.replace('\n', '') + mark + "C\n"
		AboutLcdText = AboutText.replace('\t', ' ')

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
Esempio n. 19
0
def getAboutText():
    AboutText = ""
    AboutText += _("Model:\t\t%s %s\n") % (getMachineBrand(), getMachineName())
    AboutText += _("OEM Model:\t\t%s\n") % getMachineBuild()

    bootloader = ""
    if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
        f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
        bootloader = f.readline().replace('\x00', '').replace('\n', '')
        f.close()
        AboutText += _("Bootloader:\t\t%s\n") % (bootloader)

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

    cpuMHz = ""
    if getMachineBuild() in ('u41', 'u42', 'u43'):
        cpuMHz = "   (1,0 GHz)"
    elif getMachineBuild() in ('vusolo4k', 'vuultimo4k', 'vuzero4k'):
        cpuMHz = "   (1,5 GHz)"
    elif getMachineBuild() in ('formuler1tc', 'formuler1', 'triplex',
                               'tiviaraplus'):
        cpuMHz = "   (1,3 GHz)"
    elif getMachineBuild() in ('gbmv200', 'u51', 'u5', 'u53', 'u52', 'u54',
                               'u55', 'u56', 'u5pvr', 'h9', 'h9combo', 'h10',
                               'cc1', 'sf8008', 'hd60', 'hd61', 'i55plus',
                               'ustym4kpro', 'beyonwizv2', 'viper4k', 'v8plus',
                               'multibox'):
        cpuMHz = "   (1,6 GHz)"
    elif getMachineBuild() in ('vuuno4kse', 'vuuno4k', 'dm900', 'dm920',
                               'gb7252', 'dags7252', 'xc7439', '8100s'):
        cpuMHz = "   (1,7 GHz)"
    elif getMachineBuild() in ('alien5', ):
        cpuMHz = "   (2,0 GHz)"
    elif getMachineBuild() in ('vuduo4k', ):
        cpuMHz = "   (2,1 GHz)"
    elif getMachineBuild() in ('sf5008', 'et13000', 'et1x000', 'hd52', 'hd51',
                               'sf4008', 'vs1500', 'h7', 'osmio4k',
                               'osmio4kplus'):
        try:
            import binascii
            f = open(
                '/sys/firmware/devicetree/base/cpus/cpu@0/clock-frequency',
                'rb')
            clockfrequency = f.read()
            f.close()
            cpuMHz = _("   (%s MHz)") % str(
                round(int(binascii.hexlify(clockfrequency), 16) / 1000000, 1))
        except:
            cpuMHz = _("   (1,7 GHz)")
    else:
        if path.exists('/proc/cpuinfo'):
            f = open('/proc/cpuinfo', 'r')
            temp = f.readlines()
            f.close()
            try:
                for lines in temp:
                    lisp = lines.split(': ')
                    if lisp[0].startswith('cpu MHz'):
                        #cpuMHz = "   (" +  lisp[1].replace('\n', '') + " MHz)"
                        cpuMHz = "   (" + str(
                            int(float(lisp[1].replace('\n', '')))) + " MHz)"
                        break
            except:
                pass

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

    imagestarted = ""
    bootname = ''
    if path.exists('/boot/bootname'):
        f = open('/boot/bootname', 'r')
        bootname = f.readline().split('=')[1]
        f.close()
    if SystemInfo["HasRootSubdir"]:
        image = find_rootfssubdir("STARTUP")
        AboutText += _("Selected Image:\t\t%s") % _(
            "STARTUP_") + image[-1:] + bootname + "\n"
    elif getMachineBuild() in ('gbmv200', 'cc1', 'sf8008', 'ustym4kpro',
                               'beyonwizv2', "viper4k"):
        if path.exists('/boot/STARTUP'):
            f = open('/boot/STARTUP', 'r')
            f.seek(5)
            image = f.read(4)
            if image == "emmc":
                image = "1"
            elif image == "usb0":
                f.seek(13)
                image = f.read(1)
                if image == "1":
                    image = "2"
                elif image == "3":
                    image = "3"
                elif image == "5":
                    image = "4"
                elif image == "7":
                    image = "5"
            f.close()
            if bootname: bootname = "   (%s)" % bootname
            AboutText += _("Selected Image:\t\t%s") % _(
                "STARTUP_") + image + bootname + "\n"
    elif getMachineBuild() in ('osmio4k', 'osmio4kplus'):
        if path.exists('/boot/STARTUP'):
            f = open('/boot/STARTUP', 'r')
            f.seek(38)
            image = f.read(1)
            f.close()
            if bootname: bootname = "   (%s)" % bootname
            AboutText += _("Selected Image:\t\t%s") % _(
                "STARTUP_") + image + bootname + "\n"
    elif path.exists('/boot/STARTUP'):
        f = open('/boot/STARTUP', 'r')
        f.seek(22)
        image = f.read(1)
        f.close()
        if bootname: bootname = "   (%s)" % bootname
        AboutText += _("Selected Image:\t\t%s") % _(
            "STARTUP_") + image + bootname + "\n"
    elif path.exists('/boot/cmdline.txt'):
        f = open('/boot/cmdline.txt', 'r')
        f.seek(38)
        image = f.read(1)
        f.close()
        if bootname: bootname = "   (%s)" % bootname
        AboutText += _("Selected Image:\t\t%s") % _(
            "STARTUP_") + image + bootname + "\n"

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

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

    AboutText += _(
        "GStreamer:\t\t%s") % about.getGStreamerVersionString() + "\n"
    AboutText += _("Python:\t\t%s") % about.getPythonVersionString() + "\n"

    MyFlashDate = about.getFlashDateString()
    if MyFlashDate != _("unknown"):
        AboutText += _("Installed:\t\t%s") % MyFlashDate + "\n"

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

    fp_version = getFPVersion()
    if fp_version is None:
        fp_version = ""
    elif fp_version != 0:
        fp_version = _("Frontprocessor version: %s") % 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()
    elif path.exists('/proc/stb/sensors/temp/value'):
        f = open('/proc/stb/sensors/temp/value', 'r')
        tempinfo = f.read()
        f.close()
    if tempinfo and int(tempinfo.replace('\n', '')) > 0:
        mark = str('\xc2\xb0')
        AboutText += _("System temperature:\t%s") % tempinfo.replace(
            '\n', '').replace(' ', '') + mark + "C\n"

    tempinfo = ""
    if path.exists('/proc/stb/fp/temp_sensor_avs'):
        f = open('/proc/stb/fp/temp_sensor_avs', 'r')
        tempinfo = f.read()
        f.close()
    elif path.exists('/proc/stb/power/avs'):
        f = open('/proc/stb/power/avs', 'r')
        tempinfo = f.read()
        f.close()
    elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'):
        try:
            f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r')
            tempinfo = f.read()
            tempinfo = tempinfo[:-4]
            f.close()
        except:
            tempinfo = ""
    elif path.exists('/proc/hisi/msp/pm_cpu'):
        try:
            for line in open('/proc/hisi/msp/pm_cpu').readlines():
                line = [x.strip() for x in line.strip().split(":")]
                if line[0] in ("Tsensor"):
                    temp = line[1].split("=")
                    temp = line[1].split(" ")
                    tempinfo = temp[2]
        except:
            tempinfo = ""
    if tempinfo and int(tempinfo.replace('\n', '')) > 0:
        mark = str('\xc2\xb0')
        AboutText += _("Processor temperature:\t%s") % tempinfo.replace(
            '\n', '').replace(' ', '') + mark + "C\n"
    AboutLcdText = AboutText.replace('\t', ' ')

    return AboutText, AboutLcdText
Esempio n. 20
0
	def getEnigmaVersionString(self):
		return getEnigmaVersionString()
Esempio n. 21
0
    def populate(self):
        self["lab1"] = StaticText(_("openHDF by HDF Image Team"))
        self["lab2"] = StaticText(_("Support at") + " www.HDFreaks.cc")
        model = None
        AboutText = ""
        self["lab2"] = StaticText(_("Support @") + " www.hdfreaks.cc")
        AboutText += _("Model:\t%s %s - OEM Model: %s\n") % (
            getMachineBrand(), getMachineName(), getBrandOEM())

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

        cmd = 'cat /proc/cpuinfo | grep "cpu MHz" -m 1 | awk -F ": " ' + "'{print $2}'"
        cmd2 = 'cat /proc/cpuinfo | grep "BogoMIPS" -m 1 | awk -F ": " ' + "'{print $2}'"
        try:
            res = popen(cmd).read()
            res2 = popen(cmd2).read()
        except:
            res = ""
            res2 = ""
        cpuMHz = ""

        bootloader = ""
        if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
            f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
            bootloader = f.readline().replace('\x00', '').replace('\n', '')
            f.close()
        BootLoaderVersion = 0
        try:
            if bootloader:
                AboutText += _("Bootloader:\t%s\n") % (bootloader)
                BootLoaderVersion = int(bootloader[1:])
        except:
            BootLoaderVersion = 0

        if getMachineBuild() in ('vusolo4k'):
            cpuMHz = "   (1,5 GHz)"
        elif getMachineBuild() in ('vuuno4k', 'dm900', 'gb7252', 'dags7252'):
            cpuMHz = "   (1,7 GHz)"
        elif getMachineBuild() in ('formuler1tc', 'formuler1', 'triplex'):
            cpuMHz = "   (1,3 GHz)"
        elif getMachineBuild() in ('u5', 'u5pvr'):
            cpuMHz = "   (1,6 GHz)"
        elif getMachineBuild() in ('et1x000', 'hd52', 'hd51', 'sf4008',
                                   'vs1500', 'h7'):
            try:
                import binascii
                f = open(
                    '/sys/firmware/devicetree/base/cpus/cpu@0/clock-frequency',
                    'rb')
                clockfrequency = f.read()
                f.close()
                cpuMHz = "%s MHz" % str(
                    round(
                        int(binascii.hexlify(clockfrequency), 16) / 1000000,
                        1))
            except:
                cpuMHz = "1,7 GHz"
        else:
            if path.exists('/proc/cpuinfo'):
                f = open('/proc/cpuinfo', 'r')
                temp = f.readlines()
                f.close()
                try:
                    for lines in temp:
                        lisp = lines.split(': ')
                        if lisp[0].startswith('cpu MHz'):
                            #cpuMHz = "   (" +  lisp[1].replace('\n', '') + " MHz)"
                            cpuMHz = "   (" + str(
                                int(float(lisp[1].replace('\n',
                                                          '')))) + " MHz)"
                            break
                except:
                    pass

        bogoMIPS = ""
        if res:
            cpuMHz = "" + res.replace("\n", "") + " MHz"
        if res2:
            bogoMIPS = "" + res2.replace("\n", "")

        if getMachineBuild() in ('vusolo4k', 'hd51', 'hd52', 'sf4008', 'dm900',
                                 'h7', 'gb7252'):
            AboutText += _("CPU:\t%s") % about.getCPUString() + cpuMHz + "\n"
        else:
            AboutText += _(
                "CPU:\t%s") % about.getCPUString() + " " + cpuMHz + "\n"
        dMIPS = 0
        if getMachineBuild() in ('vusolo4k'):
            dMIPS = "10.500"
        elif getMachineBuild() in ('hd52', 'hd51', 'sf4008', 'dm900', 'h7',
                                   'gb7252'):
            dMIPS = "12.000"
        if getMachineBuild() in ('vusolo4k', 'hd51', 'hd52', 'sf4008', 'dm900',
                                 'h7', 'gb7252'):
            AboutText += _("DMIPS:\t") + dMIPS + "\n"
        else:
            AboutText += _("BogoMIPS:\t%s") % bogoMIPS + "\n"
        AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n"
        AboutText += _("HDF Version:\tV%s") % getImageVersion(
        ) + " Build #" + getImageBuild() + " based on " + getOEVersion() + "\n"
        AboutText += _("Kernel (Box):\t%s") % about.getKernelVersionString(
        ) + " (" + getBoxType() + ")" + "\n"
        imagestarted = ""
        bootname = ''
        if path.exists('/boot/bootname'):
            f = open('/boot/bootname', 'r')
            bootname = f.readline().split('=')[1]
            f.close()

        if path.exists('/boot/STARTUP'):
            f = open('/boot/STARTUP', 'r')
            f.seek(22)
            image = f.read(1)
            f.close()
            if bootname: bootname = "   (%s)" % bootname
            AboutText += _(
                "Image started:\t%s") % "STARTUP_" + image + bootname + "\n"

        string = getDriverDate()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        gstcmd = 'opkg list-installed | grep "gstreamer1.0 -" | cut -c 16-32'
        gstcmd2 = os.system(gstcmd)
        #return (gstcmd2)
        AboutText += _("Drivers:\t%s") % driversdate + "\n"
        #AboutText += _("GStreamer:\t%s") % gstcmd2 + "\n"
        AboutText += _(
            "GStreamer:\t%s") % about.getGStreamerVersionString() + "\n"
        AboutText += _("Last update:\t%s") % getEnigmaVersionString(
        ) + " to Build #" + getImageBuild() + "\n"
        AboutText += _("Flashed:\t%s\n") % about.getFlashDateString()
        AboutText += _("Python:\t%s\n") % about.getPythonVersionString()
        AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value
        AboutText += _("Network:")
        for x in about.GetIPsFromNetworkInterfaces():
            AboutText += "\t" + x[0] + ": " + x[1] + "\n"

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        elif fp_version != 0:
            fp_version = _("Frontprocessor:\tVersion %s") % 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()
        elif path.exists('/proc/stb/sensors/temp/value'):
            f = open('/proc/stb/sensors/temp/value', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'):
            if getBoxType() in ('mutant51', 'ax51', 'zgemmah7'):
                tempinfo = ""
            else:
                f = open('/sys/devices/virtual/thermal/thermal_zone0/temp',
                         'r')
                tempinfo = f.read()
                tempinfo = tempinfo[:-4]
                f.close()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("System Temp:\t%s") % tempinfo.replace(
                '\n', '').replace(' ', '') + mark + "C\n"

        tempinfo = ""
        if path.exists('/proc/stb/fp/temp_sensor_avs'):
            f = open('/proc/stb/fp/temp_sensor_avs', 'r')
            tempinfo = f.read()
            f.close()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("CPU Temp:\t%s") % tempinfo.replace(
                '\n', '').replace(' ', '') + mark + "C\n"
        AboutLcdText = AboutText.replace('\t', ' ')

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
Esempio n. 22
0
def getInfo():
    # TODO: get webif versione somewhere!
    info = {}

    info['brand'] = getMachineBrand()
    info['model'] = getMachineName()
    info['boxtype'] = getBoxType()
    info['machinebuild'] = getMachineBuild()

    chipset = "unknown"
    if fileExists("/etc/.box"):
        f = open("/etc/.box", 'r')
        model = f.readline().strip().lower()
        f.close()
        if model.startswith("ufs") or model.startswith("ufc"):
            if model in ("ufs910", "ufs922", "ufc960"):
                chipset = "SH4 @266MHz"
            else:
                chipset = "SH4 @450MHz"
        elif model in ("topf", "tf7700hdpvr"):
            chipset = "SH4 @266MHz"
        elif model.startswith("azbox"):
            f = open("/proc/stb/info/model", 'r')
            model = f.readline().strip().lower()
            f.close()
            if model == "me":
                chipset = "SIGMA 8655"
            elif model == "minime":
                chipset = "SIGMA 8653"
            else:
                chipset = "SIGMA 8634"
        elif model.startswith("spark"):
            if model == "spark7162":
                chipset = "SH4 @540MHz"
            else:
                chipset = "SH4 @450MHz"
    elif fileExists("/proc/stb/info/azmodel"):
        f = open("/proc/stb/info/model", 'r')
        model = f.readline().strip().lower()
        f.close()
        if model == "me":
            chipset = "SIGMA 8655"
        elif model == "minime":
            chipset = "SIGMA 8653"
        else:
            chipset = "SIGMA 8634"
    elif fileExists("/proc/stb/info/model"):
        f = open("/proc/stb/info/model", 'r')
        model = f.readline().strip().lower()
        f.close()
        if model == "tf7700hdpvr":
            chipset = "SH4 @266MHz"
        elif model == "nbox":
            chipset = "STi7100 @266MHz"
        elif model == "arivalink200":
            chipset = "STi7109 @266MHz"
        elif model in ("adb2850", "adb2849", "dsi87"):
            chipset = "STi7111 @450MHz"
        elif model in ("sagemcom88", "esi88"):
            chipset = "STi7105 @450MHz"
        elif model.startswith("spark"):
            if model == "spark7162":
                chipset = "STi7162 @540MHz"
            else:
                chipset = "STi7111 @450MHz"

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

    info['chipset'] = chipset

    memFree = 0
    for line in open("/proc/meminfo", 'r'):
        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

    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()
    info['imagedistro'] = getImageDistro()
    info['oever'] = getOEVersion()
    info['imagever'] = getImageVersion() + '.' + getImageBuild()
    info['enigmaver'] = getEnigmaVersionString()
    info['driverdate'] = getDriverDate()
    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")),
            "v4prefix":
            sum([
                bin(int(x)).count('1') for x in formatIp(
                    iNetwork.getAdapterAttribute(iface, "netmask")).split('.')
            ]),
            "gw":
            formatIp(iNetwork.getAdapterAttribute(iface, "gateway")),
            "ipv6":
            getAdapterIPv6(iface)['addr'],
            "firstpublic":
            getAdapterIPv6(iface)['firstpublic']
        })

    info['hdd'] = []
    for hdd in harddiskmanager.hdd:
        dev = hdd.findMount()
        if dev:
            stat = os.statvfs(dev)
            free = int((stat.f_bfree / 1024) * (stat.f_bsize / 1024))
        else:
            free = -1

        if free <= 1024:
            free = "%i MB" % free
        else:
            free = free / 1024.
            free = "%.3f GB" % free

        size = hdd.diskSize() * 1000000 / 1048576.
        if size > 1048576:
            size = "%.2f TB" % (size / 1048576.)
        elif size > 1024:
            size = "%.1f GB" % (size / 1024.)
        else:
            size = "%d MB" % size

        iecsize = hdd.diskSize()
        # Harddisks > 1000 decimal Gigabytes are labelled in TB
        if iecsize > 1000000:
            iecsize = (iecsize + 50000) // float(100000) / 10
            # Omit decimal fraction if it is 0
            if (iecsize % 1 > 0):
                iecsize = "%.1f TB" % iecsize
            else:
                iecsize = "%d TB" % iecsize
        # Round harddisk sizes beyond ~300GB to full tens: 320, 500, 640, 750GB
        elif iecsize > 300000:
            iecsize = "%d GB" % ((iecsize + 5000) // 10000 * 10)
        # ... be more precise for media < ~300GB (Sticks, SSDs, CF, MMC, ...): 1, 2, 4, 8, 16 ... 256GB
        elif iecsize > 1000:
            iecsize = "%d GB" % ((iecsize + 500) // 1000)
        else:
            iecsize = "%d MB" % iecsize

        info['hdd'].append({
            "model": hdd.model(),
            "capacity": size,
            "labelled_capacity": iecsize,
            "free": free
        })

    info['transcoding'] = False
    if (info['model']
            in ("Solo4K", "Solo²", "Duo²", "Solo SE", "Quad", "Quad Plus") or
            info['machinebuild'] in ('inihdp', 'hd2400', 'et10000', 'xpeedlx3',
                                     'ew7356', 'dags3', 'dags4')):
        if os.path.exists(
                eEnv.resolve(
                    '${libdir}/enigma2/python/Plugins/SystemPlugins/TransCodingSetup/plugin.pyo'
                )
        ) or os.path.exists(
                eEnv.resolve(
                    '${libdir}/enigma2/python/Plugins/SystemPlugins/TranscodingSetup/plugin.pyo'
                )
        ) or os.path.exists(
                eEnv.resolve(
                    '${libdir}/enigma2/python/Plugins/SystemPlugins/MultiTransCodingSetup/plugin.pyo'
                )):
            info['transcoding'] = True

    info['kinopoisk'] = False
    lang = ['ru', 'uk', 'lv', 'lt', 'et']
    for l in lang:
        if l in language.getLanguage():
            info['kinopoisk'] = True

    global STATICBOXINFO
    STATICBOXINFO = info
    return info
Esempio n. 23
0
    def imageInfo(self):
        imageInfotext = _("[Full Image Backup]\n")
        imageInfotext += _("By teamBlue Image Team") + "\n"
        imageInfotext += _("Support at") + " http://gigablue-support.com/\n\n"
        imageInfotext += _("[Image Info]\n")
        imageInfotext += _("Model: %s %s\n") % (getMachineBrand(),
                                                getMachineName())
        imageInfotext += _("Backup Date: %s\n") % strftime(
            "%Y-%m-%d", localtime(self.START))

        if path.exists('/proc/stb/info/chipset'):
            imageInfotext += _("Chipset: BCM%s") % about.getChipSetString(
            ).lower().replace('\n', '').replace('bcm', '') + "\n"
        imageInfotext += _(
            "Kernel: %s") % about.getKernelVersionString() + "\n"
        imageInfotext += _("CPU: %s") % about.getCPUString() + "\n"
        imageInfotext += _("Threads: %s") % about.getCpuCoresString() + "\n"
        imageInfotext += _("Enigma2 Version: %s") % getImageVersion() + "\n"
        imageInfotext += _("Enigma2 Build: %s") % getImageBuild() + "\n"

        string = getDriverDate()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        imageInfotext += _("Drivers: %s") % driversdate + "\n"
        imageInfotext += _(
            "Last update: %s") % getEnigmaVersionString() + "\n\n"
        imageInfotext += _("[Enigma2 Settings]\n")
        imageInfotext += commands.getoutput("cat /etc/enigma2/settings")
        imageInfotext += _("\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()
                        imageInfotext += userbouqet.replace('#NAME ', '')
                        f.close()
        except:
            imageInfotext += "Error reading bouquets.tv"

        imageInfotext += _("\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()
                        imageInfotext += userbouqet.replace('#NAME ', '')
                        f.close()
        except:
            imageInfotext += "Error reading bouquets.radio"

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

        return imageInfotext
Esempio n. 24
0
def getAboutText():
	AboutText = ""
	AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName())
	AboutText += _("OEM Model:\t\t%s\n") % getMachineBuild()

	bootloader = ""
	if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
		f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
		bootloader = f.readline().replace('\x00', '').replace('\n', '')
		f.close()
		AboutText += _("Bootloader:\t\t%s\n") % (bootloader)

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

	cpuMHz = ""
	if getMachineBuild() in ('vusolo4k','vuultimo4k','vuzero4k'):
		cpuMHz = "   (1,5 GHz)"
	elif getMachineBuild() in ('formuler1tc','formuler1', 'triplex', 'tiviaraplus'):
		cpuMHz = "   (1,3 GHz)"
	elif getMachineBuild() in ('u5','u5pvr','h9'):
		cpuMHz = "   (1,6 GHz)"
	elif getMachineBuild() in ('vuuno4kse','vuuno4k','dm900','dm920', 'gb7252', 'dags7252','xc7439','8100s'):
		cpuMHz = "   (1,7 GHz)"
	elif getMachineBuild() in ('sf5008','et13000','et1x000','hd52','hd51','sf4008','vs1500','h7'):
		try:
			import binascii
			f = open('/sys/firmware/devicetree/base/cpus/cpu@0/clock-frequency', 'rb')
			clockfrequency = f.read()
			f.close()
			cpuMHz = "   (%s MHz)" % str(round(int(binascii.hexlify(clockfrequency), 16)/1000000,1))
		except:
			cpuMHz = "   (1,7 GHz)"
	else:
		if path.exists('/proc/cpuinfo'):
			f = open('/proc/cpuinfo', 'r')
			temp = f.readlines()
			f.close()
			try:
				for lines in temp:
					lisp = lines.split(': ')
					if lisp[0].startswith('cpu MHz'):
						#cpuMHz = "   (" +  lisp[1].replace('\n', '') + " MHz)"
						cpuMHz = "   (" +  str(int(float(lisp[1].replace('\n', '')))) + " MHz)"
						break
			except:
				pass

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

	imagestarted = ""
	bootname = ''
	if path.exists('/boot/bootname'):
		f = open('/boot/bootname', 'r')
		bootname = f.readline().split('=')[1]
		f.close()

	if path.exists('/boot/STARTUP'):
		f = open('/boot/STARTUP', 'r')
		f.seek(22)
		image = f.read(1) 
		f.close()
		if bootname: bootname = "   (%s)" %bootname 
		AboutText += _("Selected Image:\t%s") % "STARTUP_" + image + bootname + "\n"
	elif path.exists('/boot/cmdline.txt'):
		f = open('/boot/cmdline.txt', 'r')
		f.seek(38)
		image = f.read(1) 
		f.close()
		if bootname: bootname = "   (%s)" %bootname 
		AboutText += _("Selected Image:\t%s") % "STARTUP_" + image + bootname + "\n"

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

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

	AboutText += _("GStreamer:\t%s") % about.getGStreamerVersionString() + "\n"
	AboutText += _("Python:\t%s") % about.getPythonVersionString() + "\n"

	if getMachineBuild() not in ('h9','vuzero4k','sf5008','et13000','et1x000','hd51','hd52','vusolo4k','vuuno4k','vuuno4kse','vuultimo4k','sf4008','dm820','dm7080','dm900','dm920', 'gb7252', 'dags7252', 'vs1500','h7','xc7439','8100s','u5','u5pvr'):
		AboutText += _("Installed:\t%s") % about.getFlashDateString() + "\n"

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

	fp_version = getFPVersion()
	if fp_version is None:
		fp_version = ""
	elif fp_version != 0:
		fp_version = _("Frontprocessor version: %s") % 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()
	elif path.exists('/proc/stb/sensors/temp/value'):
		f = open('/proc/stb/sensors/temp/value', 'r')
		tempinfo = f.read()
		f.close()
	if tempinfo and int(tempinfo.replace('\n', '')) > 0:
		mark = str('\xc2\xb0')
		AboutText += _("System temperature:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n"

	tempinfo = ""
	if path.exists('/proc/stb/fp/temp_sensor_avs'):
		f = open('/proc/stb/fp/temp_sensor_avs', 'r')
		tempinfo = f.read()
		f.close()
	elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'):
		try:
			f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r')
			tempinfo = f.read()
			tempinfo = tempinfo[:-4]
			f.close()
		except:
			tempinfo = ""
	if tempinfo and int(tempinfo.replace('\n', '')) > 0:
		mark = str('\xc2\xb0')
		AboutText += _("Processor temperature:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n"
	AboutLcdText = AboutText.replace('\t', ' ')

	return AboutText, AboutLcdText
Esempio n. 25
0
    def updateInfo(self):
        self.DynamicTimer.start(1000)
        rc = system("df -h > /tmp/syinfo.tmp")
        if config.osd.language.value == 'es_ES':
            self.text = "RECEPTOR\n"
        else:
            self.text = "BOX\n"
        f = open("/proc/stb/info/model", 'r')
        if config.osd.language.value == 'es_ES':
            self.text += "Modelo:\t" + about.getBoxType() + "\n"
        else:
            self.text += "Model:\t" + about.getBoxType() + "\n"
        f.close()
        #f = open("/proc/stb/info/chipset",'r')
        #self.text += "Chipset:\t" + about.getChipSetString() + "\n"
        #f.close()
        cmd = 'cat /proc/cpuinfo | grep "cpu MHz" -m 1 | awk -F ": " ' + "'{print $2}'"
        cmd2 = 'cat /proc/cpuinfo | grep "BogoMIPS" -m 1 | awk -F ": " ' + "'{print $2}'"
        try:
            res = popen(cmd).read()
            res2 = popen(cmd2).read()
        except:
            res = ""
            res2 = ""
        cpuMHz = ""
        bogoMIPS = ""
        if res:
            cpuMHz = "   \t(" + res.replace("\n", "") + " MHz)"
        if res2:
            bogoMIPS = "" + res2.replace("\n", "")
        f = open('/proc/cpuinfo', 'r')
        self.text += "CPU: \t" + about.getCPUString() + cpuMHz + "\n"
        self.text += _("Cores:\t %s") % str(about.getCpuCoresString()) + "\n"
        self.text += "BogoMIPS \t" + bogoMIPS + "\n"
        f.close()
        if config.osd.language.value == 'es_ES':
            self.text += "\nMEMORIA\n"
        else:
            self.text += "\nMEMORY\n"
        memTotal = memFree = swapTotal = swapFree = 0
        for line in open("/proc/meminfo", 'r'):
            parts = line.split(':')
            key = parts[0].strip()
            if key == "MemTotal":
                memTotal = parts[1].strip()
            elif key in ("MemFree"):
                memFree = parts[1].strip()
            elif key == "SwapTotal":
                swapTotal = parts[1].strip()
            elif key == "SwapFree":
                swapFree = parts[1].strip()
        if config.osd.language.value == 'es_ES':
            self.text += "Memoria Total:\t%s\n" % memTotal
        else:
            self.text += "Total memory:\t%s\n" % memTotal
        if config.osd.language.value == 'es_ES':
            self.text += "Memoria Libre:\t%s \n" % memFree
        else:
            self.text += "Free memory:\t%s \n" % memFree
        if config.osd.language.value == 'es_ES':
            self.text += "Memoria Usada:\t%s" % str(
                about.getRAMusageString()) + "\n"
        else:
            self.text += "Memory Usage:\t%s" % str(
                about.getRAMusageString()) + "\n"
        out_lines = file("/proc/meminfo").readlines()
        for lidx in range(len(out_lines) - 1):
            tstLine = out_lines[lidx].split()
            if "Buffers:" in tstLine:
                Buffers = out_lines[lidx].split()
                self.text += _("Buffers:") + "\t" + Buffers[1] + ' kB' "\n"
            if "Cached:" in tstLine:
                Cached = out_lines[lidx].split()
                self.text += _("Cached:") + "\t" + Cached[1] + ' kB' "\n"
        if config.osd.language.value == 'es_ES':
            self.text += "Swap total:\t%s \n" % swapTotal
        else:
            self.text += "Swap total:\t%s \n" % swapTotal
        if config.osd.language.value == 'es_ES':
            self.text += "Swap libre:\t%s \n" % swapFree
        else:
            self.text += "Swap free:\t%s \n" % swapFree
        if config.osd.language.value == 'es_ES':
            self.text += "\nALMACENAMIENTO\n"
        else:
            self.text += "\nSTORAGE\n"
        f = open("/tmp/syinfo.tmp", 'r')
        line = f.readline()
        parts = line.split()
        self.text += parts[0] + "\t" + parts[1].strip() + "      " + parts[
            2].strip() + "    " + parts[3].strip() + "    " + parts[4] + "\n"
        line = f.readline()
        parts = line.split()
        self.text += "Flash" + "\t" + parts[1].strip() + "  " + parts[2].strip(
        ) + "  " + parts[3].strip() + "  " + parts[4] + "\n"
        for line in f.readlines():
            if line.find('/media/') != -1:
                line = line.replace('/media/', '   ')
                parts = line.split()
                if len(parts) == 6:
                    self.text += parts[5] + "\t" + parts[1].strip(
                    ) + "  " + parts[2].strip() + "  " + parts[3].strip(
                    ) + "  " + parts[4] + "\n"
        f.close()
        os_remove("/tmp/syinfo.tmp")

        self.text += "\nSOFTWARE\n"
        openLD = "OpenLD "
        self.text += "Firmware:\t %s" % openLD + str(
            about.getImageVersion()) + "\n"
        self.text += "Kernel: \t " + about.getKernelVersionString() + "\n"
        self.text += _("DVB drivers:\t %s") % str(
            about.getDriverInstalledDate()) + "\n"
        self.text += _("Last update:\t %s") % str(
            getEnigmaVersionString()) + "\n"
        self.text += _("GStreamer:\t%s") % str(
            about.getGStreamerVersionString().replace('GStreamer', '')) + "\n"
        #self.text += _("FFmpeg:\t%s") % str((' 3.1.4')) + "\n"
        self.text += _(
            "Python:\t %s") % about.getPythonVersionString() + "\n\n"

        self["lab1"].setText(self.text)
Esempio n. 26
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)
Esempio n. 27
0
def getAboutText():
    AboutText = ""
    AboutText += _("Model:\t\t%s %s\n") % (getMachineBrand(), getMachineName())
    AboutText += _("OEM Model:\t\t%s\n") % getMachineBuild()

    bootloader = ""
    if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
        f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
        bootloader = f.readline().replace('\x00', '').replace('\n', '')
        f.close()
        AboutText += _("Bootloader:\t\t%s\n") % (bootloader)

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

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

    imagestarted = ""
    bootname = ''
    if path.exists('/boot/bootname'):
        f = open('/boot/bootname', 'r')
        bootname = f.readline().split('=')[1]
        f.close()
    if SystemInfo["canMultiBoot"]:
        slot = image = GetCurrentImage()
        bootmode = ""
        part = _("eMMC slot %s") % slot
        if SystemInfo["canMode12"]:
            bootmode = _(" bootmode = %s") % GetCurrentImageMode()
        if SystemInfo["HasHiSi"] and "sda" in SystemInfo["canMultiBoot"][slot][
                'device']:
            if slot > 4:
                image -= 4
            else:
                image -= 1
            part = "SDcard slot %s (%s) " % (
                image, SystemInfo["canMultiBoot"][slot]['device'])
        AboutText += _("Selected Image:\t\t%s") % _("STARTUP_") + str(
            slot) + "  (" + part + bootmode + ")\n"

    AboutText += _("Version / Build:\t\t%s  (%s)") % (
        getImageVersion(), MyDateConverter(getImageBuild())) + "\n"
    AboutText += _("Kernel:\t\t%s") % about.getKernelVersionString() + "\n"
    AboutText += _("Drivers:\t\t%s") % MyDateConverter(getDriverDate()) + "\n"

    skinWidth = getDesktop(0).size().width()
    skinHeight = getDesktop(0).size().height()

    AboutText += _("Skin:\t\t%s") % config.skin.primary_skin.value.split(
        "/")[0] + _("  (%s x %s)") % (skinWidth, skinHeight) + "\n"

    AboutText += _(
        "GStreamer:\t\t%s") % about.getGStreamerVersionString() + "\n"
    AboutText += _("Python:\t\t%s") % about.getPythonVersionString() + "\n"

    MyFlashDate = about.getFlashDateString()
    if MyFlashDate != _("unknown"):
        AboutText += _("Installed:\t\t%s") % MyDateConverter(
            MyFlashDate) + "\n"

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

    fp_version = getFPVersion()
    if fp_version is None:
        fp_version = ""
    elif fp_version != 0:
        fp_version = _("Frontprocessor version:\t%s") % 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()
    elif path.exists('/proc/stb/sensors/temp/value'):
        f = open('/proc/stb/sensors/temp/value', 'r')
        tempinfo = f.read()
        f.close()
    if tempinfo and int(tempinfo.replace('\n', '')) > 0:
        mark = str('\xc2\xb0')
        AboutText += _("System temperature:\t%s") % tempinfo.replace(
            '\n', '').replace(' ', '') + mark + "C\n"

    tempinfo = ""
    if path.exists('/proc/stb/fp/temp_sensor_avs'):
        f = open('/proc/stb/fp/temp_sensor_avs', 'r')
        tempinfo = f.read()
        f.close()
    elif path.exists('/proc/stb/power/avs'):
        f = open('/proc/stb/power/avs', 'r')
        tempinfo = f.read()
        f.close()
    elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'):
        try:
            f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r')
            tempinfo = f.read()
            tempinfo = tempinfo[:-4]
            f.close()
        except:
            tempinfo = ""
    elif path.exists('/proc/hisi/msp/pm_cpu'):
        try:
            for line in open('/proc/hisi/msp/pm_cpu').readlines():
                line = [x.strip() for x in line.strip().split(":")]
                if line[0] in ("Tsensor"):
                    temp = line[1].split("=")
                    temp = line[1].split(" ")
                    tempinfo = temp[2]
                    if getMachineBuild() in ('u41', 'u42', 'u43'):
                        tempinfo = str(int(tempinfo) - 15)
        except:
            tempinfo = ""
    if tempinfo and int(tempinfo.replace('\n', '')) > 0:
        mark = str('\xc2\xb0')
        AboutText += _("Processor temperature:\t%s") % tempinfo.replace(
            '\n', '').replace(' ', '') + mark + "C\n"
    AboutLcdText = AboutText.replace('\t', ' ')

    return AboutText, AboutLcdText
Esempio n. 28
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)
Esempio n. 29
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)
Esempio n. 30
0
	def populate(self):
		model = None
		AboutText = ""
		AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName())

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

		cpuMHz = ""
		if path.exists('/proc/cpuinfo'):
			f = open('/proc/cpuinfo', 'r')
			temp = f.readlines()
			f.close()
			try:
				for lines in temp:
					lisp = lines.split(': ')
					if lisp[0].startswith('cpu MHz'):
						#cpuMHz = "   (" +  lisp[1].replace('\n', '') + " MHz)"
						cpuMHz = "   (" +  str(int(float(lisp[1].replace('\n', '')))) + " MHz)"
						break
			except:
				pass

		AboutText += _("CPU:\t%s") % about.getCPUString() + cpuMHz + "\n"
		AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n"
		AboutText += _("Version:\t%s") % getImageVersion() + "\n"
		AboutText += _("Front Panel:\t%s") % getMicomVersion() + "\n"
		#AboutText += _("Build:\t%s") % getImageBuild() + "\n"
		AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"
		AboutText += _("Drivers:\t%s") % about.getDriverBuildDateString() + "\n"
		AboutText += _("Bootloader:\t%s") % self.loader + "\n"
		AboutText += _("GStreamer:\t%s") % about.getGStreamerVersionString() + "\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: %s") % 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:\t%s") % tempinfo.replace('\n', '') + mark + "C\n"

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

		self["AboutScrollLabel"].setText(AboutText)
Esempio n. 31
0
def getEnigmaVersionString():
	import enigma
	enigma_version = enigma.getEnigmaVersionString()
	if '-(no branch)' in enigma_version:
		enigma_version = enigma_version[:-12]
	return enigma_version
Esempio n. 32
0
def getInfo():
	# TODO: get webif versione somewhere!
	info = {}

	info['brand'] = getMachineBrand()
	info['model'] = getMachineName()
	info['boxtype'] = getBoxType()
	info['machinebuild'] = getMachineBuild()

	chipset = "unknown"
	if fileExists("/etc/.box"):
		f = open("/etc/.box",'r')
		model = f.readline().strip().lower()
		f.close()
		if model.startswith("ufs") or model.startswith("ufc"):
			if model in ("ufs910", "ufs922", "ufc960"):
				chipset = "SH4 @266MHz"
			else:
				chipset = "SH4 @450MHz"
		elif model in ("topf", "tf7700hdpvr"):
			chipset = "SH4 @266MHz"
		elif model.startswith("azbox"):
			f = open("/proc/stb/info/model",'r')
			model = f.readline().strip().lower()
			f.close()
			if model == "me":
				chipset = "SIGMA 8655"
			elif model == "minime":
				chipset = "SIGMA 8653"
			else:
				chipset = "SIGMA 8634"
		elif model.startswith("spark"):
			if model == "spark7162":
				chipset = "SH4 @540MHz"
			else:
				chipset = "SH4 @450MHz"
	elif fileExists("/proc/stb/info/azmodel"):
		f = open("/proc/stb/info/model",'r')
		model = f.readline().strip().lower()
		f.close()
		if model == "me":
			chipset = "SIGMA 8655"
		elif model == "minime":
			chipset = "SIGMA 8653"
		else:
			chipset = "SIGMA 8634"
	elif fileExists("/proc/stb/info/model"):
		f = open("/proc/stb/info/model",'r')
		model = f.readline().strip().lower()
		f.close()
		if model == "tf7700hdpvr":
			chipset = "SH4 @266MHz"
		elif model == "nbox":
			chipset = "STi7100 @266MHz"
		elif model == "arivalink200":
			chipset = "STi7109 @266MHz"
		elif model in ("adb2850", "adb2849", "dsi87"):
			chipset = "STi7111 @450MHz"
		elif model in ("sagemcom88", "esi88"):
			chipset = "STi7105 @450MHz"
		elif model.startswith("spark"):
			if model == "spark7162":
				chipset = "STi7162 @540MHz"
			else:
				chipset = "STi7111 @450MHz"

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

	info['chipset'] = chipset

	memFree = 0
	for line in open("/proc/meminfo",'r'):
		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

	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()
	info['imagedistro'] = getImageDistro()
	info['oever'] = getOEVersion()
	info['imagever'] = getImageVersion() + '.' + getImageBuild()
	info['enigmaver'] = getEnigmaVersionString()
	info['driverdate'] = getDriverDate()
	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")),
			"v4prefix": sum([bin(int(x)).count('1') for x in formatIp(iNetwork.getAdapterAttribute(iface, "netmask")).split('.')]),
			"gw": formatIp(iNetwork.getAdapterAttribute(iface, "gateway")),
			"ipv6": getAdapterIPv6(iface)['addr'],
			"firstpublic": getAdapterIPv6(iface)['firstpublic']
		})

	info['hdd'] = []
	for hdd in harddiskmanager.hdd:
		dev = hdd.findMount()
		if dev:
			stat = os.statvfs(dev)
			free = int((stat.f_bfree/1024) * (stat.f_bsize/1024))
		else:
			free = -1
		
		if free <= 1024:
			free = "%i MB" % free
		else:
			free = free / 1024.
			free = "%.3f GB" % free

		size = hdd.diskSize() * 1000000 / 1048576.
		if size > 1048576:
			size = "%.2f TB" % (size / 1048576.)
		elif size > 1024:
			size = "%.1f GB" % (size / 1024.)
		else:
			size = "%d MB" % size

		iecsize = hdd.diskSize()
		# Harddisks > 1000 decimal Gigabytes are labelled in TB
		if iecsize > 1000000:
			iecsize = (iecsize + 50000) // float(100000) / 10
			# Omit decimal fraction if it is 0
			if (iecsize % 1 > 0):
				iecsize = "%.1f TB" % iecsize
			else:
				iecsize = "%d TB" % iecsize
		# Round harddisk sizes beyond ~300GB to full tens: 320, 500, 640, 750GB
		elif iecsize > 300000:
			iecsize = "%d GB" % ((iecsize + 5000) // 10000 * 10)
		# ... be more precise for media < ~300GB (Sticks, SSDs, CF, MMC, ...): 1, 2, 4, 8, 16 ... 256GB
		elif iecsize > 1000:
			iecsize = "%d GB" % ((iecsize + 500) // 1000)
		else:
			iecsize = "%d MB" % iecsize

		info['hdd'].append({
			"model": hdd.model(),
			"capacity": size,
			"labelled_capacity": iecsize,
			"free": free
		})

	info['transcoding'] = False
	if (info['model'] in ("Solo4K", "Solo²", "Duo²", "Solo SE", "Quad", "Quad Plus") or info['machinebuild'] in ('inihdp', 'hd2400', 'et10000', 'xpeedlx3', 'ew7356', 'dags3', 'dags4')):
		if os.path.exists(eEnv.resolve('${libdir}/enigma2/python/Plugins/SystemPlugins/TransCodingSetup/plugin.pyo')) or os.path.exists(eEnv.resolve('${libdir}/enigma2/python/Plugins/SystemPlugins/TranscodingSetup/plugin.pyo')) or os.path.exists(eEnv.resolve('${libdir}/enigma2/python/Plugins/SystemPlugins/MultiTransCodingSetup/plugin.pyo')):
			info['transcoding'] = True

	info['kinopoisk'] = False
	lang = ['ru', 'uk', 'lv', 'lt', 'et']
	for l in lang:
		if l in language.getLanguage():
			info['kinopoisk'] = True

	global STATICBOXINFO
	STATICBOXINFO = info
	return info
Esempio n. 33
0
	def getEnigmaVersionString(self):
		return getEnigmaVersionString()
Esempio n. 34
0
def getAboutText():
    AboutText = ""

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

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

    bogoMIPS = ""
    if path.exists('/proc/cpuinfo'):
        f = open('/proc/cpuinfo', 'r')
        temp = f.readlines()
        f.close()
        try:
            for lines in temp:
                lisp = lines.split(': ')
                if lisp[0].startswith('BogoMIPS'):
                    bogoMIPS = "" + str(int(float(lisp[1].replace('\n',
                                                                  '')))) + ""
                    #bogoMIPS = "" + lisp[1].replace('\n','') + ""
                    break
        except:
            pass

    cpuMHz = " - AMLogic AML-8726 MX  (1,5 GHz)"

    gpuMHZ = "Mali MP400 (Dual Core)"

    openLD = "OpenLD "

    AboutText += _("CPU:\t %s") % str(about.getCPUString()) + cpuMHz + "\n"
    AboutText += _("Cores:\t %s") % str(about.getCpuCoresString()) + "\n"
    AboutText += _("BogoMIPS:\t %s") % bogoMIPS + "\n"
    AboutText += _("GPU:\t %s") % gpuMHZ + "\n"
    AboutText += _("Firmware:\t %s") % openLD + str(
        about.getImageVersion()) + "\n"
    #AboutText += _("Build:\t %s") % getImageBuild() + "\n"
    AboutText += _("Kernel:\t %s") % str(about.getKernelVersionString()) + "\n"
    AboutText += _("DVB drivers:\t %s") % str(
        about.getDriverInstalledDate()) + "\n"
    AboutText += _("Last update:\t %s") % str(getEnigmaVersionString()) + "\n"
    AboutText += _("GStreamer:\t%s") % str(
        about.getGStreamerVersionString().replace('GStreamer', '')) + "\n"
    AboutText += _("Python:\t %s") % about.getPythonVersionString() + "\n\n"
    #AboutText += _("CPU Load:\t %s") % str(about.getLoadCPUString()) + "\n"

    #AboutText += _("Installed:\t ") + about.getFlashDateString() + "\n"
    #AboutText += _("Restarts:\t %d ") % config.misc.startCounter.value + "\n\n"

    fp_version = getFPVersion()
    if fp_version is None:
        fp_version = ""
    elif fp_version != 0:
        fp_version = _("Frontprocessor version: %s") % 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:\t%s") % tempinfo.replace(
            '\n', '').replace(' ', '') + mark + "C\n"

    tempinfo = ""
    if path.exists('/proc/stb/fp/temp_sensor_avs'):
        f = open('/proc/stb/fp/temp_sensor_avs', 'r')
        tempinfo = f.read()
        f.close()
    if tempinfo and int(tempinfo.replace('\n', '')) > 0:
        mark = str('\xc2\xb0')
        AboutText += _("Processor temperature:\t%s") % tempinfo.replace(
            '\n', '').replace(' ', '') + mark + "C\n"
    AboutLcdText = AboutText.replace('\t', ' ')

    return AboutText, AboutLcdText
Esempio n. 35
0
    def populate(self):
        self["lab1"] = StaticText(_("Open Black Hole"))
        self["lab2"] = StaticText(_("From the BH Team"))
        model = None
        AboutText = ""
        self["lab3"] = StaticText(
            _("Support at %s") % "www.vuplus-community.net")

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

        if about.getChipSetString() != _("unavailable"):
            if SystemInfo["HasHiSi"]:
                AboutText += _("Chipset:\tHiSilicon %s\n"
                               ) % about.getChipSetString().upper()
            elif about.getIsBroadcom():
                AboutText += _("Chipset:\tBroadcom %s\n"
                               ) % about.getChipSetString().upper()
            else:
                AboutText += _(
                    "Chipset:\t%s\n") % about.getChipSetString().upper()

        AboutText += _("CPU:\t%s %s %s\n") % (about.getCPUArch(),
                                              about.getCPUSpeedString(),
                                              about.getCpuCoresString())
        imageSubBuild = ""
        if getImageType() != 'release':
            imageSubBuild = ".%s" % getImageDevBuild()
        AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion(
        ), getImageBuild(), imageSubBuild, getImageType().title())

        if SystemInfo["HasH9SD"]:
            if "rootfstype=ext4" in open(
                    '/sys/firmware/devicetree/base/chosen/bootargs',
                    'r').read():
                part = "        - SD card in use for Image root \n"
            else:
                part = "        - eMMC slot in use for Image root \n"
            AboutText += _("%s") % part

        if SystemInfo["canMultiBoot"]:
            slot = image = GetCurrentImage()
            part = "eMMC slot %s" % slot
            bootmode = ""
            if SystemInfo["canMode12"]:
                bootmode = "bootmode = %s" % GetCurrentImageMode()
            print "[About] HasHiSi = %s, slot = %s" % (SystemInfo["HasHiSi"],
                                                       slot)
            if SystemInfo["HasHiSi"] and "sda" in SystemInfo["canMultiBoot"][
                    slot]['root']:
                if slot > 4:
                    image -= 4
                else:
                    image -= 1
                part = "SDcard slot %s (%s) " % (
                    image, SystemInfo["canMultiBoot"][slot]['root'])
            AboutText += _("Image Slot:\t%s") % "STARTUP_" + str(
                slot) + "  " + part + " " + bootmode + "\n"

        skinWidth = getDesktop(0).size().width()
        skinHeight = getDesktop(0).size().height()

        string = getDriverDate()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        AboutText += _("Drivers:\t%s\n") % driversdate
        AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString()
        AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString(
        ).replace("GStreamer ", "")
        AboutText += _("Python:\t%s\n") % about.getPythonVersionString()
        AboutText += _("Installed:\t%s\n") % about.getFlashDateString()
        AboutText += _("Last update:\t%s\n") % getEnigmaVersionString()
        AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value
        AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _(
            "  (%s x %s)") % (skinWidth, skinHeight) + "\n"

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

        tempinfo = ""
        if path.exists('/proc/stb/fp/temp_sensor_avs'):
            with open('/proc/stb/fp/temp_sensor_avs', 'r') as f:
                tempinfo = f.read()
        elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'):
            try:
                with open('/sys/devices/virtual/thermal/thermal_zone0/temp',
                          'r') as f:
                    tempinfo = f.read()
                    tempinfo = tempinfo[:-4]
            except:
                tempinfo = ""
        elif path.exists('/proc/hisi/msp/pm_cpu'):
            try:
                tempinfo = search(
                    'temperature = (\d+) degree',
                    open("/proc/hisi/msp/pm_cpu").read()).group(1)
            except:
                tempinfo = ""
        if tempinfo and int(tempinfo) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("Processor temp:\t%s") % tempinfo.replace(
                '\n', '').replace(' ', '') + mark + "C\n"
        AboutLcdText = AboutText.replace('\t', ' ')

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

        bootloader = ""
        if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
            f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
            bootloader = f.readline().replace('\x00', '').replace('\n', '')
            f.close()
            AboutText += _("Bootloader:\t%s\n") % (bootloader)

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
Esempio n. 36
0
def getEnigmaVersionString():
    import enigma

    enigma_version = enigma.getEnigmaVersionString()
    return enigma_version
Esempio n. 37
0
	def populate(self):
		self["lab1"] = StaticText(_("Open Black Hole"))
		self["lab2"] = StaticText(_("From the BH Team"))
		model = None
		AboutText = ""
		self["lab3"] = StaticText(_("Support at %s") % "www.vuplus-community.net")

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

		if about.getChipSetString() != _("unavailable"):
			if SystemInfo["HasHiSi"]:
				AboutText += _("Chipset:\tHiSilicon %s\n") % about.getChipSetString().upper()
			elif about.getIsBroadcom():
				AboutText += _("Chipset:\tBroadcom %s\n") % about.getChipSetString().upper()
			else:
				AboutText += _("Chipset:\t%s\n") % about.getChipSetString().upper()

		AboutText += _("CPU:\t%s %s %s\n") % (about.getCPUArch(), about.getCPUSpeedString(), about.getCpuCoresString())
		imageSubBuild = ""
		if getImageType() != 'release':
			imageSubBuild = ".%s" % getImageDevBuild()
		AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion(), getImageBuild(), imageSubBuild, getImageType().title())

		if SystemInfo["canMultiBoot"]:
			image = GetCurrentImage()
			bootmode = ""
			part = ""
			if SystemInfo["canMode12"]:
				bootmode = "bootmode = %s" %GetCurrentImageMode()
			if SystemInfo["HasHiSi"]:
				if image != 0:
					part = "%s%s" %(SystemInfo["canMultiBoot"][2], image*2)
					image += 1
				else:
					part = "MMC"
					image += 1
			AboutText += _("Image Slot:\t%s") % "STARTUP_" + str(image) + " " + part + " " + bootmode + "\n"

		skinWidth = getDesktop(0).size().width()
		skinHeight = getDesktop(0).size().height()

		string = getDriverDate()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers:\t%s\n") % driversdate
		AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString()
		AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString().replace("GStreamer ","")
		AboutText += _("Python:\t%s\n") % about.getPythonVersionString()
		AboutText += _("Installed:\t%s\n") % about.getFlashDateString()
		AboutText += _("Last update:\t%s\n") % getEnigmaVersionString()
		AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value
		AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _("  (%s x %s)") % (skinWidth, skinHeight) + "\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()
		elif path.exists('/proc/stb/sensors/temp/value'):
			f = open('/proc/stb/sensors/temp/value', 'r')
			tempinfo = f.read()
			f.close()
		if tempinfo and int(tempinfo.replace('\n', '')) > 0:
			mark = str('\xc2\xb0')
			AboutText += _("System temp:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n"

		tempinfo = ""
		if path.exists('/proc/stb/fp/temp_sensor_avs'):
			f = open('/proc/stb/fp/temp_sensor_avs', 'r')
			tempinfo = f.read()
			f.close()
		elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'):
			try:
				f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r')
				tempinfo = f.read()
				tempinfo = tempinfo[:-4]
				f.close()
			except:
				tempinfo = ""
		elif path.exists('/proc/hisi/msp/pm_cpu'):
			try:
				for line in open('/proc/hisi/msp/pm_cpu').readlines():
					line = [x.strip() for x in line.strip().split(":")]
					if line[0] in ("Tsensor"):
						temp = line[1].split("=")
						temp = line[1].split(" ")
						tempinfo = temp[2]
			except:
				tempinfo = ""
		if tempinfo and int(tempinfo.replace('\n', '')) > 0:
			mark = str('\xc2\xb0')
			AboutText += _("Processor temp:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n"
		AboutLcdText = AboutText.replace('\t', ' ')

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

		bootloader = ""
		if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
				f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
				bootloader = f.readline().replace('\x00', '').replace('\n', '')
				f.close()
				AboutText += _("Bootloader:\t%s\n") % (bootloader)

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
Esempio n. 38
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 model == "sogno-8800hd":
			brand = "Sogno"
			model = "Sogno 8800HD"
	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()
		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 == "enfinity":
			brand = "EVO"
			model = "ENfinity"
		elif model == "xp1000":
			brand = "XP-Series"
		elif model == "xp1000s":
			brand = "Octagon"
			model = "SF8 HD"
		elif model == "odinm9":
			brand = "Odin-Series"
		elif model == "odinm7":
			if getImageDistro() == '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 getImageDistro() == '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()
	info['imagedistro'] = getImageDistro()
	info['imagever'] = getImageVersion() + '.' + getImageBuild()
	info['enigmaver'] = 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
Esempio n. 39
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.com")

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

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

		AboutText += _("CPU:\t%s\n") % about.getCPUString().replace('bcm', 'BCM')
		AboutText += _("CPU speed:\t%s\n") % about.getCPUSpeedString()
		AboutText += _("Cores:\t%s\n") % about.getCpuCoresString()
		imageSubBuild = ""
		if getImageType() != 'release':
			imageSubBuild = ".%s" % getImageDevBuild()
		AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion(), getImageBuild(), imageSubBuild, getImageType().title())
		skinWidth = getDesktop(0).size().width()
		skinHeight = getDesktop(0).size().height()

		string = getDriverDate()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers:\t%s\n") % driversdate
		AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString()
		AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString().replace("GStreamer ","")
		AboutText += _("Python:\t%s\n") % about.getPythonVersionString()
		AboutText += _("Installed:\t%s\n") % about.getFlashDateString()
		AboutText += _("Last update:\t%s\n") % getEnigmaVersionString()
		AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value
		AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _("  (%s x %s)") % (skinWidth, skinHeight) + "\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()
		elif path.exists('/proc/stb/sensors/temp/value'):
			f = open('/proc/stb/sensors/temp/value', 'r')
			tempinfo = f.read()
			f.close()
		if tempinfo and int(tempinfo.replace('\n', '')) > 0:
			mark = str('\xc2\xb0')
			AboutText += _("System temp:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n"

		tempinfo = ""
		if path.exists('/proc/stb/fp/temp_sensor_avs'):
			f = open('/proc/stb/fp/temp_sensor_avs', 'r')
			tempinfo = f.read()
			f.close()
		if tempinfo and int(tempinfo.replace('\n', '')) > 0:
			mark = str('\xc2\xb0')
			AboutText += _("Processor temp:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n"
		AboutLcdText = AboutText.replace('\t', ' ')

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

		bootloader = ""
		if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
				f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
				bootloader = f.readline().replace('\x00', '').replace('\n', '')
				f.close()
				AboutText += _("Bootloader:\t\t%s\n") % (bootloader)

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
Esempio n. 40
0
def getInfo(session=None, need_fullinfo=False):
	# TODO: get webif versione somewhere!
	info = {}
	global STATICBOXINFO

	if not (STATICBOXINFO is None or need_fullinfo):
		return STATICBOXINFO

	info['brand'] = getMachineBrand()
	info['model'] = getMachineName()
	info['boxtype'] = getBoxType()
	info['machinebuild'] = getMachineBuild()

	chipset = "unknown"
	if fileExists("/etc/.box"):
		f = open("/etc/.box", 'r')
		model = f.readline().strip().lower()
		f.close()
		if model.startswith("ufs") or model.startswith("ufc"):
			if model in ("ufs910", "ufs922", "ufc960"):
				chipset = "SH4 @266MHz"
			else:
				chipset = "SH4 @450MHz"
		elif model in ("topf", "tf7700hdpvr"):
			chipset = "SH4 @266MHz"
		elif model.startswith("azbox"):
			f = open("/proc/stb/info/model", 'r')
			model = f.readline().strip().lower()
			f.close()
			if model == "me":
				chipset = "SIGMA 8655"
			elif model == "minime":
				chipset = "SIGMA 8653"
			else:
				chipset = "SIGMA 8634"
		elif model.startswith("spark"):
			if model == "spark7162":
				chipset = "SH4 @540MHz"
			else:
				chipset = "SH4 @450MHz"
	elif fileExists("/proc/stb/info/azmodel"):
		f = open("/proc/stb/info/model", 'r')
		model = f.readline().strip().lower()
		f.close()
		if model == "me":
			chipset = "SIGMA 8655"
		elif model == "minime":
			chipset = "SIGMA 8653"
		else:
			chipset = "SIGMA 8634"
	elif fileExists("/proc/stb/info/model"):
		f = open("/proc/stb/info/model", 'r')
		model = f.readline().strip().lower()
		f.close()
		if model == "tf7700hdpvr":
			chipset = "SH4 @266MHz"
		elif model == "nbox":
			chipset = "STi7100 @266MHz"
		elif model == "arivalink200":
			chipset = "STi7109 @266MHz"
		elif model in ("adb2850", "adb2849", "dsi87"):
			chipset = "STi7111 @450MHz"
		elif model in ("sagemcom88", "esi88"):
			chipset = "STi7105 @450MHz"
		elif model.startswith("spark"):
			if model == "spark7162":
				chipset = "STi7162 @540MHz"
			else:
				chipset = "STi7111 @450MHz"
		elif model == "dm800":
			chipset = "bcm7401"
		elif model == "dm800se":
			chipset = "bcm7405"
		elif model == "dm500hd":
			chipset = "bcm7405"
		elif model == "dm7020hd":
			chipset = "bcm7405"
		elif model == "dm8000":
			chipset = "bcm7400"
		elif model == "dm820":
			chipset = "bcm7435"
		elif model == "dm7080":
			chipset = "bcm7435"
		elif model == "dm520":
			chipset = "bcm73625"
		elif model == "dm525":
			chipset = "bcm73625"
		elif model == "dm900":
			chipset = "bcm7252S"
		elif model == "dm920":
			chipset = "bcm7252S"

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

	info['chipset'] = chipset

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

	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:  # noqa: E722
		uptimetext = "?"
	info['uptime'] = uptimetext

	info["webifver"] = OPENWEBIFVER
	info['imagedistro'] = getImageDistro()
	info['friendlyimagedistro'] = getFriendlyImageDistro()
	info['oever'] = getOEVersion()
	info['imagever'] = getImageVersion()
	ib = getImageBuild()
	if ib:
		info['imagever'] = info['imagever'] + "." + ib
	info['enigmaver'] = getEnigmaVersionString()
	info['driverdate'] = getDriverDate()
	info['kernelver'] = about.getKernelVersionString()

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

	try:
		info['fp_version'] = getFPVersion()
	except:  # noqa: E722
		info['fp_version'] = None

	friendlychipsetdescription = _("Chipset")
	friendlychipsettext = info['chipset'].replace("bcm", "Broadcom ")
	if friendlychipsettext in ("7335", "7356", "7362", "73625", "7424", "7425", "7429"):
		friendlychipsettext = "Broadcom " + friendlychipsettext
	if not (info['fp_version'] is None or info['fp_version'] == 0):
		friendlychipsetdescription = friendlychipsetdescription + " (" + _("Frontprocessor Version") + ")"
		friendlychipsettext = friendlychipsettext + " (" + str(info['fp_version']) + ")"

	info['friendlychipsetdescription'] = friendlychipsetdescription
	info['friendlychipsettext'] = friendlychipsettext
	info['tuners'] = []
	for i in range(0, nimmanager.getSlotCount()):
		print "[OpenWebif] -D- tuner '%d' '%s' '%s'" % (i, nimmanager.getNimName(i), nimmanager.getNim(i).getSlotName())
		info['tuners'].append({
			"name": nimmanager.getNim(i).getSlotName(),
			"type": nimmanager.getNimName(i) + " (" + nimmanager.getNim(i).getFriendlyType() + ")",
			"rec": "",
			"live": ""
		})

	info['ifaces'] = []
	ifaces = iNetwork.getConfiguredAdapters()
	for iface in ifaces:
		info['ifaces'].append({
			"name": iNetwork.getAdapterName(iface),
			"friendlynic": getFriendlyNICChipSet(iface),
			"linkspeed": getLinkSpeed(iface),
			"mac": iNetwork.getAdapterAttribute(iface, "mac"),
			"dhcp": iNetwork.getAdapterAttribute(iface, "dhcp"),
			"ipv4method": getIPv4Method(iface),
			"ip": formatIp(iNetwork.getAdapterAttribute(iface, "ip")),
			"mask": formatIp(iNetwork.getAdapterAttribute(iface, "netmask")),
			"v4prefix": sum([bin(int(x)).count('1') for x in formatIp(iNetwork.getAdapterAttribute(iface, "netmask")).split('.')]),
			"gw": formatIp(iNetwork.getAdapterAttribute(iface, "gateway")),
			"ipv6": getAdapterIPv6(iface)['addr'],
			"ipmethod": getIPMethod(iface),
			"firstpublic": getAdapterIPv6(iface)['firstpublic']
		})

	info['hdd'] = []
	for hdd in harddiskmanager.hdd:
		dev = hdd.findMount()
		if dev:
			stat = os.statvfs(dev)
			free = stat.f_bavail * stat.f_frsize / 1048576.
		else:
			free = -1

		if free <= 1024:
			free = "%i %s" % (free, _("MB"))
		else:
			free = free / 1024.
			free = "%.1f %s" % (free, _("GB"))

		size = hdd.diskSize() * 1000000 / 1048576.
		if size > 1048576:
			size = "%.1f %s" % ((size / 1048576.), _("TB"))
		elif size > 1024:
			size = "%.1f %s" % ((size / 1024.), _("GB"))
		else:
			size = "%d %s" % (size, _("MB"))

		iecsize = hdd.diskSize()
		# Harddisks > 1000 decimal Gigabytes are labelled in TB
		if iecsize > 1000000:
			iecsize = (iecsize + 50000) // float(100000) / 10
			# Omit decimal fraction if it is 0
			if (iecsize % 1 > 0):
				iecsize = "%.1f %s" % (iecsize, _("TB"))
			else:
				iecsize = "%d %s" % (iecsize, _("TB"))
		# Round harddisk sizes beyond ~300GB to full tens: 320, 500, 640, 750GB
		elif iecsize > 300000:
			iecsize = "%d %s" % (((iecsize + 5000) // 10000 * 10), _("GB"))
		# ... be more precise for media < ~300GB (Sticks, SSDs, CF, MMC, ...): 1, 2, 4, 8, 16 ... 256GB
		elif iecsize > 1000:
			iecsize = "%d %s" % (((iecsize + 500) // 1000), _("GB"))
		else:
			iecsize = "%d %s" % (iecsize, _("MB"))

		info['hdd'].append({
			"model": hdd.model(),
			"capacity": size,
			"labelled_capacity": iecsize,
			"free": free,
			"mount": dev,
			"friendlycapacity": _("%s free / %s total") % (free, size + ' ("' + iecsize + '")')
		})

	info['shares'] = []
	autofiles = ('/etc/auto.network', '/etc/auto.network_vti')
	for autofs in autofiles:
		if fileExists(autofs):
			method = "autofs"
			for line in file(autofs).readlines():
				if not line.startswith('#'):
					# Replace escaped spaces that can appear inside credentials with underscores
					# Not elegant but we wouldn't want to expose credentials on the OWIF anyways
					tmpline = line.replace("\ ", "_")
					tmp = tmpline.split()
					if not len(tmp) == 3:
						continue
					name = tmp[0].strip()
					type = "unknown"
					if "cifs" in tmp[1]:
						# Linux still defaults to SMBv1
						type = "SMBv1.0"
						settings = tmp[1].split(",")
						for setting in settings:
							if setting.startswith("vers="):
								type = setting.replace("vers=", "SMBv")
					elif "nfs" in tmp[1]:
						type = "NFS"

					# Default is r/w
					mode = _("r/w")
					settings = tmp[1].split(",")
					for setting in settings:
						if setting == "ro":
							mode = _("r/o")

					uri = tmp[2]
					parts = []
					parts = tmp[2].split(':')
					if parts[0] is "":
						server = uri.split('/')[2]
						uri = uri.strip()[1:]
					else:
						server = parts[0]

					ipaddress = None
					if server:
						# Will fail on literal IPs
						try:
							# Try IPv6 first, as will Linux
							if has_ipv6:
								tmpaddress = None
								tmpaddress = getaddrinfo(server, 0, AF_INET6)
								if tmpaddress:
									ipaddress = "[" + list(tmpaddress)[0][4][0] + "]"
							# Use IPv4 if IPv6 fails or is not present
							if ipaddress is None:
								tmpaddress = None
								tmpaddress = getaddrinfo(server, 0, AF_INET)
								if tmpaddress:
									ipaddress = list(tmpaddress)[0][4][0]
						except:  # noqa: E722
							pass

					friendlyaddress = server
					if ipaddress is not None and not ipaddress == server:
						friendlyaddress = server + " (" + ipaddress + ")"
					info['shares'].append({
						"name": name,
						"method": method,
						"type": type,
						"mode": mode,
						"path": uri,
						"host": server,
						"ipaddress": ipaddress,
						"friendlyaddress": friendlyaddress
					})
	# TODO: fstab

	info['transcoding'] = TRANSCODING

	info['kinopoisk'] = KINOPOISK

	info['EX'] = ''

	if session:
		try:
			recs = NavigationInstance.instance.getRecordings()
			if recs:
				# only one stream and only TV
				from Plugins.Extensions.OpenWebif.controllers.stream import streamList
				s_name = ''
				# s_cip = ''

				print "[OpenWebif] -D- streamList count '%d'" % len(streamList)
				if len(streamList) == 1:
					from Screens.ChannelSelection import service_types_tv
					# from enigma import eEPGCache
					# epgcache = eEPGCache.getInstance()
					serviceHandler = eServiceCenter.getInstance()
					services = serviceHandler.list(eServiceReference('%s ORDER BY name' % (service_types_tv)))
					channels = services and services.getContent("SN", True)
					s = streamList[0]
					srefs = s.ref.toString()
					for channel in channels:
						if srefs == channel[0]:
							s_name = channel[1] + ' (' + s.clientIP + ')'
							break
				print "[OpenWebif] -D- s_name '%s'" % s_name

				for stream in streamList:
					srefs = stream.ref.toString()
					print "[OpenWebif] -D- srefs '%s'" % srefs

				sname = ''
				timers = []
				for timer in NavigationInstance.instance.RecordTimer.timer_list:
					if timer.isRunning() and not timer.justplay:
						timers.append(timer.service_ref.getServiceName().replace('\xc2\x86', '').replace('\xc2\x87', ''))
						print "[OpenWebif] -D- timer '%s'" % timer.service_ref.getServiceName()
				# only one recording
				if len(timers) == 1:
					sname = timers[0]

				if sname == '' and s_name != '':
					sname = s_name

				print "[OpenWebif] -D- recs count '%d'" % len(recs)

				for rec in recs:
					feinfo = rec.frontendInfo()
					frontendData = feinfo and feinfo.getAll(True)
					if frontendData is not None:
						cur_info = feinfo.getTransponderData(True)
						if cur_info:
							nr = frontendData['tuner_number']
							info['tuners'][nr]['rec'] = getOrbitalText(cur_info) + ' / ' + sname

			service = session.nav.getCurrentService()
			if service is not None:
				sname = service.info().getName()
				feinfo = service.frontendInfo()
				frontendData = feinfo and feinfo.getAll(True)
				if frontendData is not None:
					cur_info = feinfo.getTransponderData(True)
					if cur_info:
						nr = frontendData['tuner_number']
						info['tuners'][nr]['live'] = getOrbitalText(cur_info) + ' / ' + sname
		except Exception, error:
			info['EX'] = error
Esempio n. 41
0
    def populate(self):
        self["lab1"] = StaticText(_("Opendroid"))
        self["lab2"] = StaticText(_("By Opendroid Image Team"))
        self["lab3"] = StaticText(_("Support at") + " www.droidsat.org")
        model = None
        AboutText = ""
        self["lab3"] = StaticText(_("Support at") + " www.droidsat.org")
        AboutText += _("Model:\t%s %s\n") % (getMachineBrand(),
                                             getMachineName())

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

        cmd = 'cat /proc/cpuinfo | grep "cpu MHz" -m 1 | awk -F ": " ' + "'{print $2}'"
        cmd2 = 'cat /proc/cpuinfo | grep "BogoMIPS" -m 1 | awk -F ": " ' + "'{print $2}'"
        try:
            res = popen(cmd).read()
            res2 = popen(cmd2).read()
        except:
            res = ""
            res2 = ""
        cpuMHz = ""
        bogoMIPS = ""
        if res:
            cpuMHz = "" + res.replace("\n", "") + " MHz"
        if res2:
            bogoMIPS = "" + res2.replace("\n", "")

        AboutText += _("CPU:\t%s") % about.getCPUString() + "\n"
        AboutText += _("Clock Speed:\t%s") % cpuMHz + "\n"
        AboutText += _("BogoMIPS:\t%s") % bogoMIPS + "\n"
        AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n"

        AboutText += _("Opendroid Version:\t%s") % getImageVersion() + "\n"
        AboutText += _("Opendroid Build:\t%s") % getImageBuild() + "\n"
        AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"

        string = getDriverDate()
        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"

        AboutText += _(
            "GStreamer:\t%s") % about.getGStreamerVersionString() + "\n"

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        elif fp_version != 0:
            fp_version = _("Frontprocessor version: %s") % 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 Temp:\t%s") % tempinfo.replace(
                '\n', '') + mark + "C\n"

        tempinfo = ""
        if path.exists('/proc/stb/fp/temp_sensor_avs'):
            f = open('/proc/stb/fp/temp_sensor_avs', 'r')
            tempinfo = f.read()
            f.close()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("Processor Temp:\t%s") % tempinfo.replace(
                '\n', '') + mark + "C\n"
        AboutLcdText = AboutText.replace('\t', ' ')

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
Esempio n. 42
0
def getAboutText():
	AboutText = ""
	AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName())

	bootloader = ""
	if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
		f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
		bootloader = f.readline().replace('\x00', '').replace('\n', '')
		f.close()
		AboutText += _("Bootloader:\t\t%s\n") % (bootloader)

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

	cpuMHz = ""
	if getMachineBuild() in ('vusolo4k','vuultimo4k'):
		cpuMHz = "   (1,5 GHz)"
	elif getMachineBuild() in ('formuler1', 'triplex'):
		cpuMHz = "   (1,3 GHz)"
	elif getMachineBuild() in ('vuuno4k','dm900', 'gb7252', 'dags7252'):
		cpuMHz = "   (1,7 GHz)"
	elif getMachineBuild() in ('et1x000','hd52','hd51','sf4008','vs1500'):
		try:
			import binascii
			f = open('/sys/firmware/devicetree/base/cpus/cpu@0/clock-frequency', 'rb')
			clockfrequency = f.read()
			f.close()
			cpuMHz = "   (%s MHz)" % str(round(int(binascii.hexlify(clockfrequency), 16)/1000000,1))
		except:
			cpuMHz = "   (1,7 GHz)"
	else:
		if path.exists('/proc/cpuinfo'):
			f = open('/proc/cpuinfo', 'r')
			temp = f.readlines()
			f.close()
			try:
				for lines in temp:
					lisp = lines.split(': ')
					if lisp[0].startswith('cpu MHz'):
						#cpuMHz = "   (" +  lisp[1].replace('\n', '') + " MHz)"
						cpuMHz = "   (" +  str(int(float(lisp[1].replace('\n', '')))) + " MHz)"
						break
			except:
				pass

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

	imagestarted = ""
	bootname = ''
	if path.exists('/boot/bootname'):
		f = open('/boot/bootname', 'r')
		bootname = f.readline().split('=')[1]
		f.close()

	if path.exists('/boot/STARTUP'):
		f = open('/boot/STARTUP', 'r')
		f.seek(22)
		image = f.read(1) 
		f.close()
		if bootname: bootname = "   (%s)" %bootname 
		AboutText += _("Selected Image:\t%s") % "STARTUP_" + image + bootname + "\n"

	AboutText += _("Version:\t%s") % getImageVersion() + "\n"
	#AboutText += _("Build:\t%s") % getImageBuild() + "\n"
	AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"

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

	AboutText += _("GStreamer:\t%s") % about.getGStreamerVersionString() + "\n"
	#AboutText += _("Python:\t%s") % about.getPythonVersionString() + "\n"

	#if getMachineBuild() not in ('et1x000','hd51','hd52','vusolo4k','vuuno4k','vuultimo4k','sf4008','dm820','dm7080','dm900', 'gb7252', 'dags7252', 'vs1500'):
	#	AboutText += _("Installed:\t%s") % about.getFlashDateString() + "\n"

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

	fp_version = getFPVersion()
	if fp_version is None:
		fp_version = ""
	elif fp_version != 0:
		fp_version = _("Frontprocessor version: %s") % 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()
	elif path.exists('/proc/stb/sensors/temp/value'):
		f = open('/proc/stb/sensors/temp/value', 'r')
		tempinfo = f.read()
		f.close()
	if tempinfo and int(tempinfo.replace('\n', '')) > 0:
		mark = str('\xc2\xb0')
		#AboutText += _("System temperature:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n"

	tempinfo = ""
	if path.exists('/proc/stb/fp/temp_sensor_avs'):
		f = open('/proc/stb/fp/temp_sensor_avs', 'r')
		tempinfo = f.read()
		f.close()
	if tempinfo and int(tempinfo.replace('\n', '')) > 0:
		mark = str('\xc2\xb0')
		#AboutText += _("Processor temperature:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n"
	AboutLcdText = AboutText.replace('\t', ' ')

	AboutText += "\n" + _("Web:\twww.miraclebox.se") + "\n"
	AboutText += _("E-Mail:\[email protected]") + "\n"
	AboutText += _("Facebook:\twww.facebook.com/themiraclebox") + "\n"
		
	return AboutText, AboutLcdText
Esempio n. 43
0
    def populate(self):
        self["lab1"] = StaticText(_("Open Black Hole Image"))
        self["lab2"] = StaticText(_("By Bh Team"))
        model = None
        AboutText = ""
        self["lab3"] = StaticText(
            _("Support at") + " www.vuplus-community.net")

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

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

        AboutText += _("CPU:\t%s\n") % about.getCPUString().replace(
            'bcm', 'BCM')
        AboutText += _("CPU speed:\t%s\n") % about.getCPUSpeedString()
        AboutText += _("Cores:\t%s\n") % about.getCpuCoresString()
        imageSubBuild = ""
        if getImageType() != 'release':
            imageSubBuild = ".%s" % getImageDevBuild()
        AboutText += _("Build:\t%s.%s%s (%s)\n") % (getImageVersion(
        ), getImageBuild(), imageSubBuild, getImageType().title())
        AboutText += _(
            "Skin name:\t%s\n") % config.skin.primary_skin.value[0:-9]

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

        AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString(
        ).replace("GStreamer ", "")
        AboutText += _("Python:\t%s\n") % about.getPythonVersionString()

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

        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()
        elif path.exists('/proc/stb/sensors/temp/value'):
            f = open('/proc/stb/sensors/temp/value', 'r')
            tempinfo = f.read()
            f.close()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("System temperature:\t%s") % tempinfo.replace(
                '\n', '').replace(' ', '') + mark + "C\n"

        tempinfo = ""
        if path.exists('/proc/stb/fp/temp_sensor_avs'):
            f = open('/proc/stb/fp/temp_sensor_avs', 'r')
            tempinfo = f.read()
            f.close()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("Processor temperature:\t%s") % tempinfo.replace(
                '\n', '').replace(' ', '') + mark + "C\n"
        AboutLcdText = AboutText.replace('\t', ' ')

        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"

        bootloader = ""
        if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
            f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
            bootloader = f.readline().replace('\x00', '').replace('\n', '')
            f.close()
            AboutText += _("Bootloader:\t\t%s\n") % (bootloader)

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
Esempio n. 44
0
def getEnigmaVersionString():
	import enigma
	enigma_version = enigma.getEnigmaVersionString()
	if 'detached' in enigma_version:
		enigma_version = enigma_version[:12] + enigma_version.split('/')[1]
	return enigma_version
Esempio n. 45
0
def getAboutText():
    AboutText = ""
    AboutText += _("Model:\t\t%s %s\n") % (getMachineBrand(), getMachineName())
    AboutText += _("OEM Model:\t\t%s\n") % getMachineBuild()

    bootloader = ""
    if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
        f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
        bootloader = f.readline().replace('\x00', '').replace('\n', '')
        f.close()
        AboutText += _("Bootloader:\t\t%s\n") % (bootloader)

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

    cpuMHz = ""
    if getMachineBuild() in ('u41', 'u42', 'u43'):
        cpuMHz = _("   (1.0 GHz)")
    elif getMachineBuild() in ('dags72604', 'vusolo4k', 'vuultimo4k',
                               'vuzero4k', 'gb72604', 'vuduo4kse'):
        cpuMHz = _("   (1.5 GHz)")
    elif getMachineBuild() in ('formuler1tc', 'formuler1', 'triplex',
                               'tiviaraplus'):
        cpuMHz = _("   (1.3 GHz)")
    elif getMachineBuild() in ('gbmv200', 'u51', 'u5', 'u53', 'u532', 'u533',
                               'u52', 'u54', 'u55', 'u56', 'u57', 'u5pvr',
                               'h9', 'h9se', 'h9combo', 'h9combose', 'h10',
                               'cc1', 'sf8008', 'sf8008m', 'hd60', 'hd61',
                               'i55plus', 'i55se', 'ustym4kpro', 'beyonwizv2',
                               'viper4k', 'v8plus', 'multibox', 'plus'):
        cpuMHz = _("   (1.6 GHz)")
    elif getMachineBuild() in ('vuuno4kse', 'vuuno4k', 'dm900', 'dm920',
                               'gb7252', 'dags7252', 'xc7439', '8100s'):
        cpuMHz = _("   (1.7 GHz)")
    elif getMachineBuild() in ('alien5', 'hzero', 'h8'):
        cpuMHz = _("   (2.0 GHz)")
    elif getMachineBuild() in ('vuduo4k', ):
        cpuMHz = _("   (2.1 GHz)")
    elif getMachineBuild() in ('sf5008', 'et13000', 'et1x000', 'hd52', 'hd51',
                               'sf4008', 'vs1500', 'h7', 'osmio4k',
                               'osmio4kplus', 'osmini4k'):
        try:
            import binascii
            f = open(
                '/sys/firmware/devicetree/base/cpus/cpu@0/clock-frequency',
                'rb')
            clockfrequency = f.read()
            f.close()
            cpuMHz = _("   (%s MHz)") % str(
                round(int(binascii.hexlify(clockfrequency), 16) / 1000000, 1))
        except:
            cpuMHz = _("   (1.7 GHz)")
    else:
        if path.exists('/proc/cpuinfo'):
            f = open('/proc/cpuinfo', 'r')
            temp = f.readlines()
            f.close()
            try:
                for lines in temp:
                    lisp = lines.split(': ')
                    if lisp[0].startswith('cpu MHz'):
                        #cpuMHz = "   (" +  lisp[1].replace('\n', '') + " MHz)"
                        cpuMHz = "   (" + str(
                            int(float(lisp[1].replace('\n', '')))) + " MHz)"
                        break
            except:
                pass

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

    imagestarted = ""
    bootname = ''
    if path.exists('/boot/bootname'):
        f = open('/boot/bootname', 'r')
        bootname = f.readline().split('=')[1]
        f.close()
    if SystemInfo["canMultiBoot"]:
        slot = image = GetCurrentImage()
        bootmode = ""
        part = _("eMMC slot %s") % slot
        if SystemInfo["canMode12"]:
            bootmode = _("bootmode = %s") % GetCurrentImageMode()
        if SystemInfo["HasHiSi"] and "sda" in SystemInfo["canMultiBoot"][slot][
                'device']:
            if slot > 4:
                image -= 4
            else:
                image -= 1
            part = "SDcard slot %s (%s) " % (
                image, SystemInfo["canMultiBoot"][slot]['device'])
        AboutText += _("Selected Image:\t\t%s") % _("STARTUP_") + str(
            slot) + "  " + part + " " + bootmode + "\n"

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

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

    AboutText += _(
        "GStreamer:\t\t%s") % about.getGStreamerVersionString() + "\n"
    AboutText += _("Python:\t\t%s") % about.getPythonVersionString() + "\n"

    MyFlashDate = about.getFlashDateString()
    if MyFlashDate != _("unknown"):
        AboutText += _("Installed:\t\t%s") % MyFlashDate + "\n"

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

    fp_version = getFPVersion()
    if fp_version is None:
        fp_version = ""
    elif fp_version != 0:
        fp_version = _("Frontprocessor version: %s") % 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()
    elif path.exists('/proc/stb/sensors/temp/value'):
        f = open('/proc/stb/sensors/temp/value', 'r')
        tempinfo = f.read()
        f.close()
    if tempinfo and int(tempinfo.replace('\n', '')) > 0:
        mark = str('\xc2\xb0')
        AboutText += _("System temperature:\t%s") % tempinfo.replace(
            '\n', '').replace(' ', '') + mark + "C\n"

    tempinfo = ""
    if path.exists('/proc/stb/fp/temp_sensor_avs'):
        f = open('/proc/stb/fp/temp_sensor_avs', 'r')
        tempinfo = f.read()
        f.close()
    elif path.exists('/proc/stb/power/avs'):
        f = open('/proc/stb/power/avs', 'r')
        tempinfo = f.read()
        f.close()
    elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'):
        try:
            f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r')
            tempinfo = f.read()
            tempinfo = tempinfo[:-4]
            f.close()
        except:
            tempinfo = ""
    elif path.exists('/proc/hisi/msp/pm_cpu'):
        try:
            for line in open('/proc/hisi/msp/pm_cpu').readlines():
                line = [x.strip() for x in line.strip().split(":")]
                if line[0] in ("Tsensor"):
                    temp = line[1].split("=")
                    temp = line[1].split(" ")
                    tempinfo = temp[2]
                    if getMachineBuild() in ('u41', 'u42', 'u43'):
                        tempinfo = str(int(tempinfo) - 15)
        except:
            tempinfo = ""
    if tempinfo and int(tempinfo.replace('\n', '')) > 0:
        mark = str('\xc2\xb0')
        AboutText += _("Processor temperature:\t%s") % tempinfo.replace(
            '\n', '').replace(' ', '') + mark + "C\n"
    AboutLcdText = AboutText.replace('\t', ' ')

    return AboutText, AboutLcdText
Esempio n. 46
0
	def updateInfo(self):
		self.DynamicTimer.start(1000)
		rc = system("df -h > /tmp/syinfo.tmp")
		if config.osd.language.value == 'es_ES':
			self.text = "RECEPTOR\n"
		else:
			self.text = "BOX\n"
		f = open("/proc/stb/info/model",'r')
		if config.osd.language.value == 'es_ES':
			self.text += "Modelo:\t" + about.getBoxType() + "\n"
		else:
			self.text += "Model:\t" + about.getBoxType() + "\n"
		f.close()
		#f = open("/proc/stb/info/chipset",'r')
		#self.text += "Chipset:\t" + about.getChipSetString() + "\n"
		#f.close()
		cmd = 'cat /proc/cpuinfo | grep "cpu MHz" -m 1 | awk -F ": " ' + "'{print $2}'"
		cmd2 = 'cat /proc/cpuinfo | grep "BogoMIPS" -m 1 | awk -F ": " ' + "'{print $2}'"
		try:
			res = popen(cmd).read()
			res2 = popen(cmd2).read()
		except:
			res = ""
			res2 = ""
		cpuMHz = ""
		bogoMIPS = ""
		if res:
			cpuMHz = "   \t(" + res.replace("\n", "") + " MHz)"
		if res2:
			bogoMIPS = "" + res2.replace("\n", "")
		f = open('/proc/cpuinfo', 'r')
		self.text += "CPU: \t" + about.getCPUString() + cpuMHz + "\n"
		self.text += _("Cores:\t %s") % str(about.getCpuCoresString()) + "\n"
		self.text += "BogoMIPS \t" + bogoMIPS + "\n"
		f.close()
		if config.osd.language.value == 'es_ES':
			self.text += "\nMEMORIA\n"
		else:
			self.text += "\nMEMORY\n"
		memTotal = memFree = swapTotal = swapFree = 0
		for line in open("/proc/meminfo",'r'):
			parts = line.split(':')
			key = parts[0].strip()
			if key == "MemTotal":
				memTotal = parts[1].strip()
			elif key in ("MemFree"):
				memFree = parts[1].strip()
			elif key == "SwapTotal":
				swapTotal = parts[1].strip()
			elif key == "SwapFree":
				swapFree = parts[1].strip()
		if config.osd.language.value == 'es_ES':
			self.text += "Memoria Total:\t%s\n" % memTotal
		else:
			self.text += "Total memory:\t%s\n" % memTotal
		if config.osd.language.value == 'es_ES':
			self.text += "Memoria Libre:\t%s \n" % memFree
		else:
			self.text += "Free memory:\t%s \n" % memFree
		if config.osd.language.value == 'es_ES':
			self.text += "Memoria Usada:\t%s" % str(about.getRAMusageString()) + "\n"
		else:
			self.text += "Memory Usage:\t%s" % str(about.getRAMusageString()) + "\n"
		out_lines = file("/proc/meminfo").readlines()
		for lidx in range(len(out_lines) - 1):
			tstLine = out_lines[lidx].split()
			if "Buffers:" in tstLine:
				Buffers = out_lines[lidx].split()
				self.text += _("Buffers:") + "\t" + Buffers[1] + ' kB'"\n"
			if "Cached:" in tstLine:
				Cached = out_lines[lidx].split()
				self.text += _("Cached:") + "\t" + Cached[1] + ' kB'"\n"
		if config.osd.language.value == 'es_ES':
			self.text += "Swap total:\t%s \n" % swapTotal
		else:
			self.text += "Swap total:\t%s \n" % swapTotal
		if config.osd.language.value == 'es_ES':
			self.text += "Swap libre:\t%s \n" % swapFree
		else:
			self.text += "Swap free:\t%s \n" % swapFree
		if config.osd.language.value == 'es_ES':
			self.text += "\nALMACENAMIENTO\n"
		else:
			self.text += "\nSTORAGE\n"
		f = open("/tmp/syinfo.tmp",'r')
		line = f.readline()
		parts = line.split()
		self.text += parts[0] + "\t" + parts[1].strip() + "      " + parts[2].strip() + "    " + parts[3].strip() + "    " + parts[4] + "\n"
		line = f.readline()
		parts = line.split()
		self.text += "Flash" + "\t" + parts[1].strip() + "  " + parts[2].strip()  + "  " +  parts[3].strip()  + "  " +  parts[4] + "\n"
		for line in f.readlines():
			if line.find('/media/') != -1:
				line = line.replace('/media/', '   ')
				parts = line.split()
				if len(parts) == 6:
					self.text += parts[5] + "\t" + parts[1].strip() + "  " + parts[2].strip() + "  " + parts[3].strip() + "  " + parts[4] + "\n"
		f.close()
		os_remove("/tmp/syinfo.tmp")

		self.text += "\nSOFTWARE\n"
		openLD = "OpenLD "
		self.text += "Firmware:\t %s" % openLD + str(about.getImageVersion()) + "\n"
		self.text += "Kernel: \t " + about.getKernelVersionString() + "\n"
		self.text += _("DVB drivers:\t %s") % str(about.getDriverInstalledDate()) + "\n"
		self.text += _("Last update:\t %s") % str(getEnigmaVersionString()) + "\n"
		self.text += _("GStreamer:\t%s") % str(about.getGStreamerVersionString().replace('GStreamer','')) + "\n"
		#self.text += _("FFmpeg:\t%s") % str((' 3.1.4')) + "\n"
		self.text += _("Python:\t %s") % about.getPythonVersionString() + "\n\n"

		self["lab1"].setText(self.text)
Esempio n. 47
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.com")

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

        if about.getChipSetString() != _("unavailable"):
            if about.getIsBroadcom():
                AboutText += _(
                    "Chipset:\tBCM%s\n") % about.getChipSetString().upper()
            else:
                AboutText += _(
                    "Chipset:\t%s\n") % about.getChipSetString().upper()

        AboutText += _("CPU:\t%s %s %s\n") % (about.getCPUArch(),
                                              about.getCPUSpeedString(),
                                              about.getCpuCoresString())
        imageSubBuild = ""
        if getImageType() != 'release':
            imageSubBuild = ".%s" % getImageDevBuild()
        AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion(
        ), getImageBuild(), imageSubBuild, getImageType().title())
        skinWidth = getDesktop(0).size().width()
        skinHeight = getDesktop(0).size().height()

        string = getDriverDate()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        AboutText += _("Drivers:\t%s\n") % driversdate
        AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString()
        AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString(
        ).replace("GStreamer ", "")
        AboutText += _("Python:\t%s\n") % about.getPythonVersionString()
        AboutText += _("Installed:\t%s\n") % about.getFlashDateString()
        AboutText += _("Last update:\t%s\n") % getEnigmaVersionString()
        AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value
        AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _(
            "  (%s x %s)") % (skinWidth, skinHeight) + "\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()
        elif path.exists('/proc/stb/sensors/temp/value'):
            f = open('/proc/stb/sensors/temp/value', 'r')
            tempinfo = f.read()
            f.close()


#		if tempinfo and int(tempinfo.replace('\n', '')) > 0:
#			mark = str('\xc2\xb0')
#			AboutText += _("System temp:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n"

        tempinfo = ""
        if path.exists('/proc/stb/fp/temp_sensor_avs'):
            f = open('/proc/stb/fp/temp_sensor_avs', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'):
            try:
                f = open('/sys/devices/virtual/thermal/thermal_zone0/temp',
                         'r')
                tempinfo = f.read()
                tempinfo = tempinfo[:-4]
                f.close()
            except:
                tempinfo = ""
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("Processor temp:\t%s") % tempinfo.replace(
                '\n', '').replace(' ', '') + mark + "C\n"
        AboutLcdText = AboutText.replace('\t', ' ')

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

        bootloader = ""
        if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
            f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
            bootloader = f.readline().replace('\x00', '').replace('\n', '')
            f.close()
            AboutText += _("Bootloader:\t%s\n") % (bootloader)

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
Esempio n. 48
0
def getAboutText():
    AboutText = ''
    AboutText += _('Model:\t%s %s\n') % (getMachineBrand(), getMachineName())
    if path.exists('/proc/stb/info/chipset'):
        AboutText += _('Chipset:\t%s') % about.getChipSetString() + '\n'
    cpuMHz = ''
    if getBoxType() in 'vusolo4k':
        cpuMHz = '   (1,5 GHz)'
    elif path.exists('/proc/cpuinfo'):
        f = open('/proc/cpuinfo', 'r')
        temp = f.readlines()
        f.close()
        try:
            for lines in temp:
                lisp = lines.split(': ')
                if lisp[0].startswith('cpu MHz'):
                    cpuMHz = '   (' + str(int(float(lisp[1].replace('\n', '')))) + ' MHz)'
                    break

        except:
            pass

    AboutText += _('CPU:\t%s') % about.getCPUString() + cpuMHz + '\n'
    AboutText += _('Cores:\t%s') % about.getCpuCoresString() + '\n'
    AboutText += _('Version:\t%s') % getImageVersion() + '\n'
    AboutText += _('Build:\t%s') % getImageBuild() + '\n'
    AboutText += _('Kernel:\t%s') % about.getKernelVersionString() + '\n'
    string = getDriverDate()
    year = string[0:4]
    month = string[4:6]
    day = string[6:8]
    driversdate = '-'.join((year, month, day))
    AboutText += _('Drivers:\t%s') % driversdate + '\n'
    AboutText += _('GStreamer:\t%s') % about.getGStreamerVersionString() + '\n'
    AboutText += _('Python:\t%s') % about.getPythonVersionString() + '\n'
    AboutText += _('Skin name:\t%s\n') % config.skin.primary_skin.value[0:-9]
    AboutText += _('Installed:\t%s') % about.getFlashDateString() + '\n'
    AboutText += _('Last update:\t%s') % getEnigmaVersionString() + '\n'
    fp_version = getFPVersion()
    if fp_version is None:
        fp_version = ''
    elif fp_version != 0:
        fp_version = _('Frontprocessor version: %s') % 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:\t%s') % tempinfo.replace('\n', '').replace(' ', '') + mark + 'C\n'
    tempinfo = ''
    if path.exists('/proc/stb/fp/temp_sensor_avs'):
        f = open('/proc/stb/fp/temp_sensor_avs', 'r')
        tempinfo = f.read()
        f.close()
    if tempinfo and int(tempinfo.replace('\n', '')) > 0:
        mark = str('\xc2\xb0')
        AboutText += _('Processor temperature:\t%s') % tempinfo.replace('\n', '').replace(' ', '') + mark + 'C\n'
    AboutLcdText = AboutText.replace('\t', ' ')
    return (AboutText, AboutLcdText)
Esempio n. 49
0
def getEnigmaVersionString():
    import enigma
    enigma_version = enigma.getEnigmaVersionString()
    if 'detached' in enigma_version:
        enigma_version = enigma_version[:12] + enigma_version.split('/')[1]
    return enigma_version
Esempio n. 50
0
def getAboutText():
	AboutText = ""
	AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName())

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

	cpuMHz = ""
	if getMachineBuild() in ('vusolo4k', 'hd51'):
		cpuMHz = "   (1,5 GHz)"
	elif getMachineBuild() in ('hd52'):
		cpuMHz = "   (1,7 GHz)"
	else:
		if path.exists('/proc/cpuinfo'):
			f = open('/proc/cpuinfo', 'r')
			temp = f.readlines()
			f.close()
			try:
				for lines in temp:
					lisp = lines.split(': ')
					if lisp[0].startswith('cpu MHz'):
						#cpuMHz = "   (" +  lisp[1].replace('\n', '') + " MHz)"
						cpuMHz = "   (" +  str(int(float(lisp[1].replace('\n', '')))) + " MHz)"
						break
			except:
				pass

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

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

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

	AboutText += _("GStreamer:\t%s") % about.getGStreamerVersionString() + "\n"
	AboutText += _("Python:\t%s") % about.getPythonVersionString() + "\n"

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

	fp_version = getFPVersion()
	if fp_version is None:
		fp_version = ""
	elif fp_version != 0:
		fp_version = _("Frontprocessor version: %s") % 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()
	elif path.exists('/proc/stb/sensors/temp/value'):
		f = open('/proc/stb/sensors/temp/value', 'r')
		tempinfo = f.read()
		f.close()
	if tempinfo and int(tempinfo.replace('\n', '')) > 0:
		mark = str('\xc2\xb0')
		AboutText += _("System temperature:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n"

	tempinfo = ""
	if path.exists('/proc/stb/fp/temp_sensor_avs'):
		f = open('/proc/stb/fp/temp_sensor_avs', 'r')
		tempinfo = f.read()
		f.close()
	if tempinfo and int(tempinfo.replace('\n', '')) > 0:
		mark = str('\xc2\xb0')
		AboutText += _("Processor temperature:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n"
	AboutLcdText = AboutText.replace('\t', ' ')

	return AboutText, AboutLcdText
Esempio n. 51
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.com")

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

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

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

        AboutText += _("Version:\t%s\n") % getImageVersion()
        AboutText += _("Build:\t%s\n") % getImageBuild()
        AboutText += _("Image type:\t%s\n") % getImageType().title()
        AboutText += _(
            "Skin name:\t%s\n") % config.skin.primary_skin.value[0:-9]

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

        AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString(
        ).replace("GStreamer ", "")
        AboutText += _("Python:\t%s\n") % about.getPythonVersionString()

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

        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') and getBoxType(
        ) not in ('gbquad'):
            f = open('/proc/stb/sensors/temp0/value', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/proc/stb/fp/temp_sensor') and getBoxType() not in (
                'gbquad'):
            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%sC\n\n") % (
                tempinfo.replace('\n', ''), mark)

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
Esempio n. 52
0
	def populate(self):
		def netspeed():
			netspeed=""
			for line in popen('ethtool eth0 |grep Speed','r'):
				line = line.strip().split(":")
				line =line[1].replace(' ','')
				netspeed += line
				return str(netspeed)
		def netspeed_eth1():
			netspeed=""
			for line in popen('ethtool eth1 |grep Speed','r'):
				line = line.strip().split(":")
				line =line[1].replace(' ','')
				netspeed += line
				return str(netspeed)
		def netspeed_ra0():
			netspeed=""
			for line in popen('iwconfig ra0 | grep Bit | cut -c 20-30','r'):
				line = line.strip()
				netspeed += line
				return str(netspeed)
		def netspeed_wlan0():
			netspeed=""
			for line in popen('iwconfig wlan0 | grep Bit | cut -c 20-30','r'):
				line = line.strip()
				netspeed += line
				return str(netspeed)
		def netspeed_wlan1():
			netspeed=""
			for line in popen('iwconfig wlan1 | grep Bit | cut -c 20-30','r'):
				line = line.strip()
				netspeed += line
				return str(netspeed)
		def freeflash():
			freeflash=""
			for line in popen("df -mh / | grep -v '^Filesystem' | awk '{print $4}'",'r'):
				line = line.strip()
				freeflash += line
				return str(freeflash)
		self["lab1"] = StaticText(_("openHDF"))
		self["lab2"] = StaticText(_("Support at") + " www.HDFreaks.cc")
		model = None
		AboutText = ""
		self["lab2"] = StaticText(_("Support @") + " www.hdfreaks.cc")
		AboutText += _("Model:\t%s %s - OEM Model: %s\n") % (getMachineBrand(), getMachineName(), getBrandOEM())

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

		cmd = 'cat /proc/cpuinfo | grep "cpu MHz" -m 1 | awk -F ": " ' + "'{print $2}'"
		cmd2 = 'cat /proc/cpuinfo | grep "BogoMIPS" -m 1 | awk -F ": " ' + "'{print $2}'"
		try:
			res = popen(cmd).read()
			res2 = popen(cmd2).read()
		except:
			res = ""
			res2 = ""
		cpuMHz = ""

		bootloader = ""
		if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
			f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
			bootloader = f.readline().replace('\x00', '').replace('\n', '')
			f.close()
		BootLoaderVersion = 0
		try:
			if bootloader:
				AboutText += _("Bootloader:\t%s\n") % (bootloader)
				BootLoaderVersion = int(bootloader[1:])
		except:
			BootLoaderVersion = 0

		if getMachineBuild() in ('vusolo4k','gbx34k'):
			cpuMHz = "   (1,5 GHz)"
		elif getMachineBuild() in ('u41','u42'):
			cpuMHz = "   (1,0 GHz)"
		elif getMachineBuild() in ('vuuno4k','dm900','gb7252','dags7252'):
			cpuMHz = "   (1,7 GHz)"
		elif getMachineBuild() in ('formuler1tc','formuler1','triplex'):
			cpuMHz = "   (1,3 GHz)"
		elif getMachineBuild() in ('u5','u51','u52','u53','u5pvr','h9','sf8008','sf8008s','sf8008t','hd60',"hd61",'i55plus'):
			cpuMHz = "   (1,6 GHz)"
		elif getMachineBuild() in ('sf5008','et13000','et1x000','hd52','hd51','sf4008','vs1500','h7','osmio4k','osmio4kplus','osmini4k'):
			try:
				import binascii
				f = open('/sys/firmware/devicetree/base/cpus/cpu@0/clock-frequency', 'rb')
				clockfrequency = f.read()
				f.close()
				cpuMHz = "%s MHz" % str(round(int(binascii.hexlify(clockfrequency), 16)/1000000,1))
			except:
				cpuMHz = "1,7 GHz"
		else:
			if path.exists('/proc/cpuinfo'):
				f = open('/proc/cpuinfo', 'r')
				temp = f.readlines()
				f.close()
				try:
					for lines in temp:
						lisp = lines.split(': ')
						if lisp[0].startswith('cpu MHz'):
							#cpuMHz = "   (" +  lisp[1].replace('\n', '') + " MHz)"
							cpuMHz = "   (" +  str(int(float(lisp[1].replace('\n', '')))) + " MHz)"
							break
				except:
					pass

		bogoMIPS = ""
		if res:
			cpuMHz = "" + res.replace("\n", "") + " MHz"
		if res2:
			bogoMIPS = "" + res2.replace("\n", "")

		if getMachineBuild() in ('vusolo4k','hd51','hd52','sf4008','dm900','h7','gb7252','8100s'):
			AboutText += _("CPU:\t%s") % about.getCPUString() + cpuMHz + "\n"
		else:
			AboutText += _("CPU:\t%s") % about.getCPUString() + " " + cpuMHz + "\n"
		dMIPS = 0
		if getMachineBuild() in ('vusolo4k'):
			dMIPS = "10.500"
		elif getMachineBuild() in ('hd52','hd51','sf4008','dm900','h7','gb7252','8100s'):
			dMIPS = "12.000"
		if getMachineBuild() in ('vusolo4k','hd51','hd52','sf4008','dm900','h7','gb7252','8100s'):
			AboutText += _("DMIPS:\t") + dMIPS + "\n"
		else:
			AboutText += _("BogoMIPS:\t%s") % bogoMIPS + "\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()
		elif path.exists('/proc/stb/sensors/temp/value'):
			f = open('/proc/stb/sensors/temp/value', 'r')
			tempinfo = f.read()
			f.close()
		elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'):
			if getBoxType() in ('mutant51', 'ax51', 'zgemmah7', 'e4hdultra'):
				tempinfo = ""
			else:
				f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r')
				tempinfo = f.read()
				tempinfo = tempinfo[:-4]
				f.close()
		if tempinfo and int(tempinfo.replace('\n', '')) > 0:
			mark = str('\xc2\xb0')
			AboutText += _("System Temp:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n"

		tempinfo = ""
		if path.exists('/proc/stb/fp/temp_sensor_avs'):
			f = open('/proc/stb/fp/temp_sensor_avs', 'r')
			tempinfo = f.read()
			f.close()
		elif path.exists('/proc/stb/power/avs'):
			f = open('/proc/stb/power/avs', 'r')
			tempinfo = f.read()
			f.close()
		elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'):
			try:
				f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r')
				tempinfo = f.read()
				tempinfo = tempinfo[:-4]
				f.close()
			except:
				tempinfo = ""
		elif path.exists('/proc/hisi/msp/pm_cpu'):
			try:
				for line in open('/proc/hisi/msp/pm_cpu').readlines():
					line = [x.strip() for x in line.strip().split(":")]
					if line[0] in ("Tsensor"):
						temp = line[1].split("=")
						temp = line[1].split(" ")
						tempinfo = temp[2]
			except:
				tempinfo = ""
		if tempinfo and int(tempinfo.replace('\n', '')) > 0:
			mark = str('\xc2\xb0')
			AboutText += _("CPU Temp:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n"

		AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n"
		AboutText += _("HDF Version:\tV%s") % getImageVersion() + " Build #" + getImageBuild() + " based on " + getOEVersion() + "\n"
		AboutText += _("Kernel (Box):\t%s") % about.getKernelVersionString() + " (" + getBoxType() + ")" + "\n"

		if path.isfile("/etc/issue"):
			version = open("/etc/issue").readlines()[-2].upper().strip()[:-6]
			if path.isfile("/etc/image-version"):
				build = self.searchString("/etc/image-version", "^build=")
				version = "%s #%s" % (version,build)
			AboutText += _("Image:\t%s") % version + "\n"

		imagestarted = ""
		bootname = ''
		if path.exists('/boot/bootname'):
			f = open('/boot/bootname', 'r')
			bootname = f.readline().split('=')[1]
			f.close()
		if SystemInfo["HasRootSubdir"]:
			image = find_rootfssubdir("STARTUP")
			AboutText += _("Selected Image:\t%s") % "STARTUP_" + image[-1:] + bootname + "\n"
		elif getMachineBuild() in ('gbmv200','cc1','sf8008','ustym4kpro','beyonwizv2',"viper4k"):
			if path.exists('/boot/STARTUP'):
				f = open('/boot/STARTUP', 'r')
				f.seek(5)
				image = f.read(4)
				if image == "emmc":
					image = "1"
				elif image == "usb0":
					f.seek(13)
					image = f.read(1)
					if image == "1":
						image = "2"
					elif image == "3":
						image = "3"
					elif image == "5":
						image = "4"
					elif image == "7":
						image = "5"
				f.close()
				if bootname: bootname = "   (%s)" %bootname 
				AboutText += _("Partition:\t%s") % "STARTUP_" + image + bootname + "\n"
			else:
				f = open('/boot/STARTUP', 'r')
				f.seek(22)
				image = f.read(1)
				f.close()
				if bootname: bootname = "   (%s)" %bootname
				AboutText += _("Partition:\t%s") % "STARTUP_" + image + bootname + "\n"

		if SystemInfo["HaveMultiBoot"]:
			MyFlashDate = about.getFlashDateString()
			if path.isfile("/etc/filesystems"):
				AboutText += _("Flashed:\t%s") % MyFlashDate + "\n"
				#AboutText += _("Flashed:\tMultiboot active\n")
		else:
			AboutText += _("Flashed:\t%s\n") % about.getFlashDateString()

		string = getDriverDate()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		gstcmd = 'opkg list-installed | grep "gstreamer1.0 -" | cut -c 16-32'
		gstcmd2 = os.system(gstcmd)
		#return (gstcmd2)
		AboutText += _("Drivers:\t%s") % driversdate + "\n"
		AboutText += _("GStreamer:\t%s") % about.getGStreamerVersionString() + "\n"
		AboutText += _("Python:\t%s\n") % about.getPythonVersionString()
		AboutText += _("Free Flash:\t%s\n") % freeflash()
		AboutText += _("Skin:\t%s (%s x %s)\n") % (config.skin.primary_skin.value.split('/')[0], getDesktop(0).size().width(), getDesktop(0).size().height())
		AboutText += _("Last update:\t%s") % getEnigmaVersionString() + " to Build #" + getImageBuild() + "\n"
		AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value
		AboutText += _("Uptime") + ":\t" + about.getBoxUptime() + "\n"
		if SystemInfo["WakeOnLAN"]:
			if fileCheck("/proc/stb/power/wol"):
				WOLmode = open("/proc/stb/power/wol").read()[:-1]
			if fileCheck("/proc/stb/fp/wol"):
				WOLmode = open("/proc/stb/fp/wol").read()[:-1]
			AboutText += _("WakeOnLAN:\t%s\n") % WOLmode
		AboutText += _("Network:")
		eth0 = about.getIfConfig('eth0')
		eth1 = about.getIfConfig('eth1')
		ra0 = about.getIfConfig('ra0')
		wlan0 = about.getIfConfig('wlan0')
		wlan1 = about.getIfConfig('wlan1')
		if eth0.has_key('addr'):
			for x in about.GetIPsFromNetworkInterfaces():
				AboutText += "\t" + x[0] + ": " + x[1] + " (" + netspeed() + ")\n"
		elif eth1.has_key('addr'):
			for x in about.GetIPsFromNetworkInterfaces():
				AboutText += "\t" + x[0] + ": " + x[1] + " (" + netspeed_eth1() + ")\n"
		elif ra0.has_key('addr'):
			for x in about.GetIPsFromNetworkInterfaces():
				AboutText += "\t" + x[0] + ": " + x[1] + " (~" + netspeed_ra0() + ")\n"
		elif wlan0.has_key('addr'):
			for x in about.GetIPsFromNetworkInterfaces():
				AboutText += "\t" + x[0] + ": " + x[1] + " (~" + netspeed_wlan0() + ")\n"
		elif wlan1.has_key('addr'):
			for x in about.GetIPsFromNetworkInterfaces():
				AboutText += "\t" + x[0] + ": " + x[1] + " (~" + netspeed_wlan1() + ")\n"
		else:
			for x in about.GetIPsFromNetworkInterfaces():
				AboutText += "\t" + x[0] + ": " + x[1] + "\n"

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

		AboutLcdText = AboutText.replace('\t', ' ')

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
Esempio n. 53
0
def getInfo(session=None, need_fullinfo=False):
    # TODO: get webif versione somewhere!
    info = {}
    global STATICBOXINFO

    if not (STATICBOXINFO is None or need_fullinfo):
        return STATICBOXINFO

    info['brand'] = getMachineBrand()
    info['model'] = getMachineName()
    info['boxtype'] = getBoxType()
    info['machinebuild'] = getMachineBuild()
    try:
        info['lcd'] = getLcd()
    except:  # temporary due OE-A
        info['lcd'] = 0
    try:
        info['grabpip'] = getGrabPip()
    except:  # temporary due OE-A
        info['grabpip'] = 0

    chipset = "unknown"
    if fileExists("/etc/.box"):
        f = open("/etc/.box", 'r')
        model = f.readline().strip().lower()
        f.close()
        if model.startswith("ufs") or model.startswith("ufc"):
            if model in ("ufs910", "ufs922", "ufc960"):
                chipset = "SH4 @266MHz"
            else:
                chipset = "SH4 @450MHz"
        elif model in ("topf", "tf7700hdpvr"):
            chipset = "SH4 @266MHz"
        elif model.startswith("azbox"):
            f = open("/proc/stb/info/model", 'r')
            model = f.readline().strip().lower()
            f.close()
            if model == "me":
                chipset = "SIGMA 8655"
            elif model == "minime":
                chipset = "SIGMA 8653"
            else:
                chipset = "SIGMA 8634"
        elif model.startswith("spark"):
            if model == "spark7162":
                chipset = "SH4 @540MHz"
            else:
                chipset = "SH4 @450MHz"
    elif fileExists("/proc/stb/info/azmodel"):
        f = open("/proc/stb/info/model", 'r')
        model = f.readline().strip().lower()
        f.close()
        if model == "me":
            chipset = "SIGMA 8655"
        elif model == "minime":
            chipset = "SIGMA 8653"
        else:
            chipset = "SIGMA 8634"
    elif fileExists("/proc/stb/info/model"):
        f = open("/proc/stb/info/model", 'r')
        model = f.readline().strip().lower()
        f.close()
        if model == "tf7700hdpvr":
            chipset = "SH4 @266MHz"
        elif model == "nbox":
            chipset = "STi7100 @266MHz"
        elif model == "arivalink200":
            chipset = "STi7109 @266MHz"
        elif model in ("adb2850", "adb2849", "dsi87"):
            chipset = "STi7111 @450MHz"
        elif model in ("sagemcom88", "esi88"):
            chipset = "STi7105 @450MHz"
        elif model.startswith("spark"):
            if model == "spark7162":
                chipset = "STi7162 @540MHz"
            else:
                chipset = "STi7111 @450MHz"
        elif model == "dm800":
            chipset = "bcm7401"
        elif model == "dm800se":
            chipset = "bcm7405"
        elif model == "dm500hd":
            chipset = "bcm7405"
        elif model == "dm7020hd":
            chipset = "bcm7405"
        elif model == "dm8000":
            chipset = "bcm7400"
        elif model == "dm820":
            chipset = "bcm7435"
        elif model == "dm7080":
            chipset = "bcm7435"
        elif model == "dm520":
            chipset = "bcm73625"
        elif model == "dm525":
            chipset = "bcm73625"
        elif model == "dm900":
            chipset = "bcm7252S"
        elif model == "dm920":
            chipset = "bcm7252S"

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

    info['chipset'] = chipset

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

    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:  # noqa: E722
        uptimetext = "?"
    info['uptime'] = uptimetext

    info["webifver"] = OPENWEBIFVER
    info['imagedistro'] = getImageDistro()
    info['friendlyimagedistro'] = getFriendlyImageDistro()
    info['oever'] = getOEVersion()
    info['imagever'] = getImageVersion()
    ib = getImageBuild()
    if ib:
        info['imagever'] = info['imagever'] + "." + ib
    info['enigmaver'] = getEnigmaVersionString()
    info['driverdate'] = getDriverDate()
    info['kernelver'] = about.getKernelVersionString()

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

    try:
        info['fp_version'] = getFPVersion()
    except:  # noqa: E722
        info['fp_version'] = None

    friendlychipsetdescription = _("Chipset")
    friendlychipsettext = info['chipset'].replace("bcm", "Broadcom ")
    if friendlychipsettext in ("7335", "7356", "7362", "73625", "7424", "7425",
                               "7429"):
        friendlychipsettext = "Broadcom " + friendlychipsettext
    if not (info['fp_version'] is None or info['fp_version'] == 0):
        friendlychipsetdescription = friendlychipsetdescription + " (" + _(
            "Frontprocessor Version") + ")"
        friendlychipsettext = friendlychipsettext + " (" + str(
            info['fp_version']) + ")"

    info['friendlychipsetdescription'] = friendlychipsetdescription
    info['friendlychipsettext'] = friendlychipsettext
    info['tuners'] = []
    for i in range(0, nimmanager.getSlotCount()):
        print "[OpenWebif] -D- tuner '%d' '%s' '%s'" % (
            i, nimmanager.getNimName(i), nimmanager.getNim(i).getSlotName())
        info['tuners'].append({
            "name":
            nimmanager.getNim(i).getSlotName(),
            "type":
            nimmanager.getNimName(i) + " (" +
            nimmanager.getNim(i).getFriendlyType() + ")",
            "rec":
            "",
            "live":
            ""
        })

    info['ifaces'] = []
    ifaces = iNetwork.getConfiguredAdapters()
    for iface in ifaces:
        info['ifaces'].append({
            "name":
            iNetwork.getAdapterName(iface),
            "friendlynic":
            getFriendlyNICChipSet(iface),
            "linkspeed":
            getLinkSpeed(iface),
            "mac":
            iNetwork.getAdapterAttribute(iface, "mac"),
            "dhcp":
            iNetwork.getAdapterAttribute(iface, "dhcp"),
            "ipv4method":
            getIPv4Method(iface),
            "ip":
            formatIp(iNetwork.getAdapterAttribute(iface, "ip")),
            "mask":
            formatIp(iNetwork.getAdapterAttribute(iface, "netmask")),
            "v4prefix":
            sum([
                bin(int(x)).count('1') for x in formatIp(
                    iNetwork.getAdapterAttribute(iface, "netmask")).split('.')
            ]),
            "gw":
            formatIp(iNetwork.getAdapterAttribute(iface, "gateway")),
            "ipv6":
            getAdapterIPv6(iface)['addr'],
            "ipmethod":
            getIPMethod(iface),
            "firstpublic":
            getAdapterIPv6(iface)['firstpublic']
        })

    info['hdd'] = []
    for hdd in harddiskmanager.hdd:
        dev = hdd.findMount()
        if dev:
            stat = os.statvfs(dev)
            free = stat.f_bavail * stat.f_frsize / 1048576.
        else:
            free = -1

        if free <= 1024:
            free = "%i %s" % (free, _("MB"))
        else:
            free = free / 1024.
            free = "%.1f %s" % (free, _("GB"))

        size = hdd.diskSize() * 1000000 / 1048576.
        if size > 1048576:
            size = "%.1f %s" % ((size / 1048576.), _("TB"))
        elif size > 1024:
            size = "%.1f %s" % ((size / 1024.), _("GB"))
        else:
            size = "%d %s" % (size, _("MB"))

        iecsize = hdd.diskSize()
        # Harddisks > 1000 decimal Gigabytes are labelled in TB
        if iecsize > 1000000:
            iecsize = (iecsize + 50000) // float(100000) / 10
            # Omit decimal fraction if it is 0
            if (iecsize % 1 > 0):
                iecsize = "%.1f %s" % (iecsize, _("TB"))
            else:
                iecsize = "%d %s" % (iecsize, _("TB"))
        # Round harddisk sizes beyond ~300GB to full tens: 320, 500, 640, 750GB
        elif iecsize > 300000:
            iecsize = "%d %s" % (((iecsize + 5000) // 10000 * 10), _("GB"))
        # ... be more precise for media < ~300GB (Sticks, SSDs, CF, MMC, ...): 1, 2, 4, 8, 16 ... 256GB
        elif iecsize > 1000:
            iecsize = "%d %s" % (((iecsize + 500) // 1000), _("GB"))
        else:
            iecsize = "%d %s" % (iecsize, _("MB"))

        info['hdd'].append({
            "model":
            hdd.model(),
            "capacity":
            size,
            "labelled_capacity":
            iecsize,
            "free":
            free,
            "mount":
            dev,
            "friendlycapacity":
            _("%s free / %s total") % (free, size + ' ("' + iecsize + '")')
        })

    info['shares'] = []
    autofiles = ('/etc/auto.network', '/etc/auto.network_vti')
    for autofs in autofiles:
        if fileExists(autofs):
            method = "autofs"
            for line in file(autofs).readlines():
                if not line.startswith('#'):
                    # Replace escaped spaces that can appear inside credentials with underscores
                    # Not elegant but we wouldn't want to expose credentials on the OWIF anyways
                    tmpline = line.replace("\ ", "_")
                    tmp = tmpline.split()
                    if not len(tmp) == 3:
                        continue
                    name = tmp[0].strip()
                    type = "unknown"
                    if "cifs" in tmp[1]:
                        # Linux still defaults to SMBv1
                        type = "SMBv1.0"
                        settings = tmp[1].split(",")
                        for setting in settings:
                            if setting.startswith("vers="):
                                type = setting.replace("vers=", "SMBv")
                    elif "nfs" in tmp[1]:
                        type = "NFS"

                    # Default is r/w
                    mode = _("r/w")
                    settings = tmp[1].split(",")
                    for setting in settings:
                        if setting == "ro":
                            mode = _("r/o")

                    uri = tmp[2]
                    parts = []
                    parts = tmp[2].split(':')
                    if parts[0] is "":
                        server = uri.split('/')[2]
                        uri = uri.strip()[1:]
                    else:
                        server = parts[0]

                    ipaddress = None
                    if server:
                        # Will fail on literal IPs
                        try:
                            # Try IPv6 first, as will Linux
                            if has_ipv6:
                                tmpaddress = None
                                tmpaddress = getaddrinfo(server, 0, AF_INET6)
                                if tmpaddress:
                                    ipaddress = "[" + list(
                                        tmpaddress)[0][4][0] + "]"
                            # Use IPv4 if IPv6 fails or is not present
                            if ipaddress is None:
                                tmpaddress = None
                                tmpaddress = getaddrinfo(server, 0, AF_INET)
                                if tmpaddress:
                                    ipaddress = list(tmpaddress)[0][4][0]
                        except:  # noqa: E722
                            pass

                    friendlyaddress = server
                    if ipaddress is not None and not ipaddress == server:
                        friendlyaddress = server + " (" + ipaddress + ")"
                    info['shares'].append({
                        "name": name,
                        "method": method,
                        "type": type,
                        "mode": mode,
                        "path": uri,
                        "host": server,
                        "ipaddress": ipaddress,
                        "friendlyaddress": friendlyaddress
                    })
    # TODO: fstab

    info['transcoding'] = TRANSCODING

    info['EX'] = ''

    if session:
        try:
            # gets all current stream clients for images using eStreamServer
            # TODO: merge eStreamServer and streamList
            # TODO: get tuner info for streams
            # TODO: get recoding/timer info if more than one

            info['streams'] = []
            try:
                streams = []
                from enigma import eStreamServer
                streamServer = eStreamServer.getInstance()
                if streamServer is not None:
                    for x in streamServer.getConnectedClients():
                        servicename = ServiceReference(
                            x[1]).getServiceName() or "(unknown service)"
                        if int(x[2]) == 0:
                            strtype = "S"
                        else:
                            strtype = "T"
                        info['streams'].append({
                            "ref": x[1],
                            "name": servicename,
                            "ip": x[0],
                            "type": strtype
                        })
            except Exception, error:
                print "[OpenWebif] -D- no eStreamServer %s" % error

            recs = NavigationInstance.instance.getRecordings()
            if recs:
                # only one stream and only TV
                from Plugins.Extensions.OpenWebif.controllers.stream import streamList
                s_name = ''
                # s_cip = ''

                print "[OpenWebif] -D- streamList count '%d'" % len(streamList)
                if len(streamList) == 1:
                    from Screens.ChannelSelection import service_types_tv
                    # from enigma import eEPGCache
                    # epgcache = eEPGCache.getInstance()
                    serviceHandler = eServiceCenter.getInstance()
                    services = serviceHandler.list(
                        eServiceReference('%s ORDER BY name' %
                                          (service_types_tv)))
                    channels = services and services.getContent("SN", True)
                    s = streamList[0]
                    srefs = s.ref.toString()
                    for channel in channels:
                        if srefs == channel[0]:
                            s_name = channel[1] + ' (' + s.clientIP + ')'
                            break
                print "[OpenWebif] -D- s_name '%s'" % s_name

                # only for debug
                for stream in streamList:
                    srefs = stream.ref.toString()
                    print "[OpenWebif] -D- srefs '%s'" % srefs

                sname = ''
                timers = []
                for timer in NavigationInstance.instance.RecordTimer.timer_list:
                    if timer.isRunning() and not timer.justplay:
                        timers.append(
                            timer.service_ref.getServiceName().replace(
                                '\xc2\x86', '').replace('\xc2\x87', ''))
                        print "[OpenWebif] -D- timer '%s'" % timer.service_ref.getServiceName(
                        )


# TODO: more than one recording
                if len(timers) == 1:
                    sname = timers[0]

                if sname == '' and s_name != '':
                    sname = s_name

                print "[OpenWebif] -D- recs count '%d'" % len(recs)

                for rec in recs:
                    feinfo = rec.frontendInfo()
                    frontendData = feinfo and feinfo.getAll(True)
                    if frontendData is not None:
                        cur_info = feinfo.getTransponderData(True)
                        if cur_info:
                            nr = frontendData['tuner_number']
                            info['tuners'][nr]['rec'] = getOrbitalText(
                                cur_info) + ' / ' + sname

            service = session.nav.getCurrentService()
            if service is not None:
                sname = service.info().getName()
                feinfo = service.frontendInfo()
                frontendData = feinfo and feinfo.getAll(True)
                if frontendData is not None:
                    cur_info = feinfo.getTransponderData(True)
                    if cur_info:
                        nr = frontendData['tuner_number']
                        info['tuners'][nr]['live'] = getOrbitalText(
                            cur_info) + ' / ' + sname
        except Exception, error:
            info['EX'] = error
Esempio n. 54
0
	def imageInfo(self):
		AboutText = _("Full Image Backup ")
		AboutText += _("By Bh Team") + "\n"
		AboutText += _("Support at") + " www.vuplus-community.net\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") % getImageVersion() + "\n"
		AboutText += _("Build: %s") % getImageBuild() + "\n"
		AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

		string = getDriverDate()
		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
Esempio n. 55
0
def getInfo(session=None, need_fullinfo=False):
    # TODO: get webif versione somewhere!
    info = {}
    global STATICBOXINFO

    if not (STATICBOXINFO is None or need_fullinfo):
        return STATICBOXINFO

    info['brand'] = BoxInfo.getItem("brand")
    info['displaybrand'] = BoxInfo.getItem("displaybrand")
    info['model'] = BoxInfo.getItem("model")
    info['displaymodel'] = BoxInfo.getItem("displaymodel")
    info['platform'] = BoxInfo.getItem("platform")

    try:
        info['procmodel'] = getBoxProc()
    except:  # nosec # noqa: E722
        info['procmodel'] = None

    try:
        info['procmodeltype'] = getBoxProcType()
    except:  # nosec # noqa: E722
        info['procmodeltype'] = None

    try:
        info['lcd'] = getLcd()
    except:  # nosec # noqa: E722
        info['lcd'] = 0

    try:
        info['grabpip'] = getGrabPip()
    except:  # nosec # noqa: E722
        info['grabpip'] = 0

    cpu = about.getCPUInfoString()
    info['chipset'] = cpu
    info['cpubrand'] = about.getCPUBrand()
    info['socfamily'] = BoxInfo.getItem("socfamily")
    info['cpuarch'] = about.getCPUArch()
    if config.OpenWebif.about_benchmark.value is True:
        info['cpubenchmark'] = about.getCPUBenchmark()
    else:
        info['cpubenchmark'] = _("Disabled in configuration")
    info['flashtype'] = about.getFlashType()

    memFree = 0
    for line in open("/proc/meminfo", 'r'):
        parts = line.split(':')
        key = parts[0].strip()
        if key == "MemTotal":
            info['mem1'] = parts[1].strip().replace("kB", _("kB"))
        elif key in ("MemFree", "Buffers", "Cached"):
            memFree += int(parts[1].strip().split(' ', 1)[0])
    info['mem2'] = "%s %s" % (memFree, _("kB"))
    info['mem3'] = _("%s free / %s total") % (info['mem2'], info['mem1'])
    if config.OpenWebif.about_benchmarkram.value is True:
        info['rambenchmark'] = about.getRAMBenchmark()
    else:
        info['rambenchmark'] = _("Disabled in configuration")

    info['uptime'] = about.getBoxUptime()

    info["webifver"] = OPENWEBIFVER
    info['imagedistro'] = BoxInfo.getItem("distro")
    info['oever'] = BoxInfo.getItem("oe")
    info['gccver'] = about.getGccVersion()
    info['glibcver'] = about.getGlibcVersion()
    info['openssl'] = BoxInfo.getItem("OpenSSLVersion")
    info['visionversion'] = BoxInfo.getItem("imgversion")
    info['visionrevision'] = BoxInfo.getItem("imgrevision")
    info['visionmodule'] = about.getVisionModule()

    info['multiboot'] = _("Yes") if BoxInfo.getItem("multiboot",
                                                    False) else _("No")

    info['enigmaver'] = getEnigmaVersionString()
    info['enigmarev'] = getE2Rev()
    info['driverdate'] = about.getDriverInstalledDate()
    info['kernelver'] = BoxInfo.getItem("kernel")
    info['modulelayout'] = BoxInfo.getItem("ModuleLayout")
    info['dvbapitype'] = about.getDVBAPI()
    info['gstreamerversion'] = about.getGStreamerVersionString()
    info['ffmpegversion'] = about.getFFmpegVersionString()
    info['pythonversion'] = about.getPythonVersionString()

    try:
        info['hwserial'] = getHWSerial()
    except:  # nosec # noqa: E722
        info['hwserial'] = None

    if (info['hwserial'] is None or info['hwserial'] == "unknown"):
        info['hwserial'] = about.getCPUSerial()

    try:
        info['boxrctype'] = getBoxRCType()
    except:  # nosec # noqa: E722
        info['boxrctype'] = None

    if (info['boxrctype'] is None or info['boxrctype'] == "unknown"):
        if fileExists("/usr/bin/remotecfg"):
            info['boxrctype'] = _("Amlogic remote")
        elif fileExists("/usr/sbin/lircd"):
            info['boxrctype'] = _("LIRC remote")

    info['ovrctype'] = BoxInfo.getItem("rctype")
    info['ovrcname'] = BoxInfo.getItem("rcname")
    info['ovrcidnum'] = BoxInfo.getItem("rcidnum")

    info['transcoding'] = BoxInfo.getItem("transcoding")
    info['multitranscoding'] = BoxInfo.getItem("multitranscoding")

    info['displaytype'] = BoxInfo.getItem("displaytype")

    info['updatedatestring'] = BoxInfo.getItem("compiledate")
    info['enigmadebuglvl'] = eGetEnigmaDebugLvl()

    info['imagearch'] = BoxInfo.getItem("architecture")
    info['imagefolder'] = BoxInfo.getItem("imagedir")
    info['imagefilesystem'] = BoxInfo.getItem("imagefs")
    info['feedsurl'] = BoxInfo.getItem("feedsurl")
    info['developername'] = BoxInfo.getItem("developername")
    info['builddatestring'] = about.getBuildDateString()
    info['imagefpu'] = BoxInfo.getItem("fpu")
    info['havemultilib'] = BoxInfo.getItem("multilib")

    try:
        info['fp_version'] = getFPVersion()
    except:  # nosec # noqa: E722
        info['fp_version'] = None

    info['tuners'] = []
    for i in list(range(0, nimmanager.getSlotCount())):
        print(
            "[OpenWebif] -D- tuner '%d' '%s' '%s'" %
            (i, nimmanager.getNimName(i), nimmanager.getNim(i).getSlotName()))
        info['tuners'].append({
            "name":
            nimmanager.getNim(i).getSlotName(),
            "type":
            nimmanager.getNimName(i) + " (" +
            nimmanager.getNim(i).getFriendlyType() + ")",
            "rec":
            "",
            "live":
            ""
        })

    info['ifaces'] = []
    ifaces = iNetwork.getConfiguredAdapters()
    for iface in ifaces:
        info['ifaces'].append({
            "name":
            iNetwork.getAdapterName(iface),
            "friendlynic":
            getFriendlyNICChipSet(iface),
            "linkspeed":
            getLinkSpeed(iface),
            "mac":
            iNetwork.getAdapterAttribute(iface, "mac"),
            "dhcp":
            iNetwork.getAdapterAttribute(iface, "dhcp"),
            "ipv4method":
            getIPv4Method(iface),
            "ip":
            formatIp(iNetwork.getAdapterAttribute(iface, "ip")),
            "mask":
            formatIp(iNetwork.getAdapterAttribute(iface, "netmask")),
            "v4prefix":
            sum([
                bin(int(x)).count('1') for x in formatIp(
                    iNetwork.getAdapterAttribute(iface, "netmask")).split('.')
            ]),
            "gw":
            formatIp(iNetwork.getAdapterAttribute(iface, "gateway")),
            "ipv6":
            getAdapterIPv6(iface)['addr'],
            "ipmethod":
            getIPMethod(iface),
            "firstpublic":
            getAdapterIPv6(iface)['firstpublic']
        })

    info['hdd'] = []
    for hdd in harddiskmanager.hdd:
        dev = hdd.findMount()
        if dev:
            stat = os.statvfs(dev)
            free = stat.f_bavail * stat.f_frsize / 1048576.
        else:
            free = -1

        if free <= 1024:
            free = "%i %s" % (free, _("MB"))
        else:
            free = free / 1024.
            free = "%.1f %s" % (free, _("GB"))

        size = hdd.diskSize() * 1000000 / 1048576.
        if size > 1048576:
            size = "%.1f %s" % ((size / 1048576.), _("TB"))
        elif size > 1024:
            size = "%.1f %s" % ((size / 1024.), _("GB"))
        else:
            size = "%d %s" % (size, _("MB"))

        iecsize = hdd.diskSize()
        # Harddisks > 1000 decimal Gigabytes are labelled in TB
        if iecsize > 1000000:
            iecsize = (iecsize + 50000) // float(100000) / 10
            # Omit decimal fraction if it is 0
            if (iecsize % 1 > 0):
                iecsize = "%.1f %s" % (iecsize, _("TB"))
            else:
                iecsize = "%d %s" % (iecsize, _("TB"))
        # Round harddisk sizes beyond ~300GB to full tens: 320, 500, 640, 750GB
        elif iecsize > 300000:
            iecsize = "%d %s" % (((iecsize + 5000) // 10000 * 10), _("GB"))
        # ... be more precise for media < ~300GB (Sticks, SSDs, CF, MMC, ...): 1, 2, 4, 8, 16 ... 256GB
        elif iecsize > 1000:
            iecsize = "%d %s" % (((iecsize + 500) // 1000), _("GB"))
        else:
            iecsize = "%d %s" % (iecsize, _("MB"))

        info['hdd'].append({
            "model":
            hdd.model(),
            "capacity":
            size,
            "labelled_capacity":
            iecsize,
            "free":
            free,
            "mount":
            dev,
            "friendlycapacity":
            _("%s free / %s total") % (free, size + ' ("' + iecsize + '")')
        })

    info['shares'] = []
    autofiles = ('/etc/auto.network', '/etc/auto.network_vti')
    for autofs in autofiles:
        if fileExists(autofs):
            method = "autofs"
            for line in open(autofs).readlines():
                if not line.startswith('#'):
                    # Replace escaped spaces that can appear inside credentials with underscores
                    # Not elegant but we wouldn't want to expose credentials on the OWIF anyways
                    tmpline = line.replace("\ ", "_")
                    tmp = tmpline.split()
                    if not len(tmp) == 3:
                        continue
                    name = tmp[0].strip()
                    type = "unknown"
                    if "cifs" in tmp[1]:
                        # Linux still defaults to SMBv1
                        type = "SMBv1.0"
                        settings = tmp[1].split(",")
                        for setting in settings:
                            if setting.startswith("vers="):
                                type = setting.replace("vers=", "SMBv")
                    elif "nfs" in tmp[1]:
                        type = "NFS"

                    # Default is r/w
                    mode = _("r/w")
                    settings = tmp[1].split(",")
                    for setting in settings:
                        if setting == "ro":
                            mode = _("r/o")

                    uri = tmp[2]
                    parts = []
                    parts = tmp[2].split(':')
                    if parts[0] == "":
                        server = uri.split('/')[2]
                        uri = uri.strip()[1:]
                    else:
                        server = parts[0]

                    ipaddress = None
                    if server:
                        # Will fail on literal IPs
                        try:
                            # Try IPv6 first, as will Linux
                            if has_ipv6:
                                tmpaddress = None
                                tmpaddress = getaddrinfo(server, 0, AF_INET6)
                                if tmpaddress:
                                    ipaddress = "[" + list(
                                        tmpaddress)[0][4][0] + "]"
                            # Use IPv4 if IPv6 fails or is not present
                            if ipaddress is None:
                                tmpaddress = None
                                tmpaddress = getaddrinfo(server, 0, AF_INET)
                                if tmpaddress:
                                    ipaddress = list(tmpaddress)[0][4][0]
                        except:  # nosec # noqa: E722
                            pass

                    friendlyaddress = server
                    if ipaddress is not None and not ipaddress == server:
                        friendlyaddress = server + " (" + ipaddress + ")"
                    info['shares'].append({
                        "name": name,
                        "method": method,
                        "type": type,
                        "mode": mode,
                        "path": uri,
                        "host": server,
                        "ipaddress": ipaddress,
                        "friendlyaddress": friendlyaddress
                    })
    # TODO: fstab

    info['EX'] = ''

    if session:
        try:
            #  gets all current stream clients for images using eStreamServer
            #  TODO: get tuner info for streams
            info['streams'] = GetStreamInfo()

            recs = NavigationInstance.instance.getRecordings()
            if recs:
                #  only one stream
                s_name = ''
                if len(info['streams']) == 1:
                    sinfo = info['streams'][0]
                    s_name = sinfo["name"] + ' (' + sinfo["ip"] + ')'
                    print("[OpenWebif] -D- s_name '%s'" % s_name)

                serviceNames = {}
                for timer in NavigationInstance.instance.RecordTimer.timer_list:
                    if timer.isRunning() and not timer.justplay:
                        timer_rs = timer.record_service
                        feinfo = timer_rs and hasattr(
                            timer_rs,
                            "frontendInfo") and timer_rs.frontendInfo()
                        fedata = feinfo and hasattr(
                            feinfo,
                            "getFrontendData") and feinfo.getFrontendData()
                        tuner_num = fedata and "tuner_number" in fedata and fedata.get(
                            "tuner_number")
                        if tuner_num is not None:
                            if tuner_num in serviceNames:  # this tuner is recording more than one timer
                                serviceNames[tuner_num] += ", " + removeBad(
                                    timer.service_ref.getServiceName())
                            else:
                                serviceNames[tuner_num] = removeBad(
                                    timer.service_ref.getServiceName())
                        print("[OpenWebif] -D- timer '%s'" %
                              timer.service_ref.getServiceName())

                print("[OpenWebif] -D- recs count '%d'" % len(recs))

                for rec in recs:
                    feinfo = rec.frontendInfo()
                    frontendData = feinfo and feinfo.getAll(True)
                    if frontendData is not None:
                        cur_info = feinfo.getTransponderData(True)
                        if cur_info:
                            nr = frontendData['tuner_number']
                            if nr in serviceNames:
                                info['tuners'][nr]['rec'] = getOrbitalText(
                                    cur_info) + ' / ' + serviceNames[nr]
                            else:
                                info['tuners'][nr]['rec'] = getOrbitalText(
                                    cur_info) + ' / ' + s_name

            service = session.nav.getCurrentService()
            if service is not None:
                sname = service.info().getName()
                feinfo = service.frontendInfo()
                frontendData = feinfo and feinfo.getAll(True)
                if frontendData is not None:
                    cur_info = feinfo.getTransponderData(True)
                    if cur_info:
                        nr = frontendData['tuner_number']
                        info['tuners'][nr]['live'] = getOrbitalText(
                            cur_info) + ' / ' + sname
        except Exception as error:
            info['EX'] = error

    info['timerpipzap'] = False
    info['timerautoadjust'] = False

    try:
        timer = RecordTimerEntry(ServiceReference("1:0:1:0:0:0:0:0:0:0"), 0, 0,
                                 '', '', 0)
        if hasattr(timer, "pipzap"):
            info['timerpipzap'] = True
        if hasattr(timer, "autoadjust"):
            info['timerautoadjust'] = True
    except Exception as error:
        print("[OpenWebif] -D- RecordTimerEntry check %s" % error)

    info['textinputsupport'] = TEXTINPUTSUPPORT
    STATICBOXINFO = info
    return info