Folgende Warnungen sind aufgetreten:
Warning [2] Undefined variable $unreadreports - Line: 34 - File: global.php(961) : eval()'d code PHP 8.2.2 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/global.php(961) : eval()'d code 34 errorHandler->error_callback
/global.php 961 eval
/showthread.php 28 require_once
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 43 - File: showthread.php(1621) : eval()'d code PHP 8.2.2 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1621) : eval()'d code 43 errorHandler->error_callback
/showthread.php 1621 eval




Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
USV PIco Status Anzeige.
#4
Code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import os
import xbmc


def set_kodi_prop(property, value, id=10000):
    xbmc.executebuiltin('SetProperty(%s,%s,%s)' % (property, value, id))


def main():
    os.system("sudo service piupsmon status > piupsmon_status.txt")

    with open('piupsmon_status.txt') as f:
        value = f.readlines()
        words = value[2].split()
        status = words[1]
        set_kodi_prop('piupsmonstatus', status)


if __name__ == '__main__':
    main()

kombiniert das einfach, ohne zwischenschritt über txt.
und gebt die werte in einer liste aus, dann is keine skin notwendig.

hier mein angefangenes addon


Angehängte Dateien
.zip   service.ups_pico_beta.zip (Größe: 41,06 KB / Downloads: 12)
Zitieren


Nachrichten in diesem Thema
USV PIco Status Anzeige. - von Skorpionbird - 11.05.2016, 10:37
RE: USV PIco Status Anzeige. - von cbrauweiler - 11.05.2016, 12:48
RE: USV PIco Status Anzeige. - von Skorpionbird - 11.05.2016, 19:19
RE: USV PIco Status Anzeige. - von harryberlin - 11.05.2016, 20:50
RE: USV PIco Status Anzeige. - von Skorpionbird - 12.05.2016, 10:06
RE: USV PIco Status Anzeige. - von harryberlin - 12.05.2016, 11:25
RE: USV PIco Status Anzeige. - von Skorpionbird - 12.05.2016, 11:26
RE: USV PIco Status Anzeige. - von Skorpionbird - 17.05.2016, 11:41
RE: USV PIco Status Anzeige. - von cbrauweiler - 17.05.2016, 12:37
RE: USV PIco Status Anzeige. - von harryberlin - 18.05.2016, 21:18
RE: USV PIco Status Anzeige. - von Skorpionbird - 19.05.2016, 08:29
RE: USV PIco Status Anzeige. - von harryberlin - 19.05.2016, 11:47

Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 2 Gast/Gäste
RasPiCarProjekt