Habe mal das Script für die Coretemp. übermittlung zum SHC auf VZ umgebaut.
für Raspi
Alles anzeigen
für Banana Pi / Pro
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.
für Raspi
Quellcode: localtemp-vz.py
- import urllib
- #Konstanten
- ip = '192.168.0.1' # IP des VZ
- uuid = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
- fobj = open("/sys/class/thermal/thermal_zone0/temp", "r")
- for line in fobj:
- x = line
- fobj.close()
- temp = str(float(x)/1000)
- result = urllib.urlopen('http://' + ip + '/volkszaehler/htdocs/middleware.php/data/' + uuid + '.json?operation=add&value=' + temp )
für Banana Pi / Pro
Quellcode: localtemp-vz.py
- import urllib
- #Konstanten
- ip = '192.168.0.1' # IP des VZ
- uuid = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
- fobj = open("/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input", "r")
- for line in fobj:
- x = line
- fobj.close()
- temp = str(float(x)/1000)
- result = urllib.urlopen('http://' + ip + '/volkszaehler/htdocs/middleware.php/data/' + uuid + '.json?operation=add&value=' + temp )
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 ()