Coretemperaturerfassung im VZ

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • Coretemperaturerfassung im VZ

      Habe mal das Script für die Coretemp. übermittlung zum SHC auf VZ umgebaut.

      für Raspi

      Quellcode: localtemp-vz.py

      1. import urllib
      2. #Konstanten
      3. ip = '192.168.0.1' # IP des VZ
      4. uuid = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
      5. fobj = open("/sys/class/thermal/thermal_zone0/temp", "r")
      6. for line in fobj:
      7. x = line
      8. fobj.close()
      9. temp = str(float(x)/1000)
      10. result = urllib.urlopen('http://' + ip + '/volkszaehler/htdocs/middleware.php/data/' + uuid + '.json?operation=add&value=' + temp )
      Alles anzeigen

      für Banana Pi / Pro

      Quellcode: localtemp-vz.py

      1. import urllib
      2. #Konstanten
      3. ip = '192.168.0.1' # IP des VZ
      4. uuid = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
      5. fobj = open("/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input", "r")
      6. for line in fobj:
      7. x = line
      8. fobj.close()
      9. temp = str(float(x)/1000)
      10. result = urllib.urlopen('http://' + ip + '/volkszaehler/htdocs/middleware.php/data/' + uuid + '.json?operation=add&value=' + temp )
      Alles anzeigen

      IP und uuid anpassen.

      crontab:

      */2 * * * * root /usr/bin/python /root/localtemp-vz.py


      So hat man eine Aufzeichnung der Werte solange der SHC das noch nicht kann.
      habe SHC aufgegeben.

      Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von bin dann weg ()