Weather U. Fehler ausgebessert
This commit is contained in:
parent
15fac547e6
commit
9c8384b498
1 changed files with 2 additions and 1 deletions
|
@ -22,10 +22,11 @@ gertemp2 = 9.0/5.0 * gertemp2_c + 32
|
|||
lufttemp = 9.0/5.0 * lufttemp_c + 32
|
||||
aussentemp = 9.0/5.0 * aussentemp_c + 32
|
||||
processor = 9.0/5.0 * processor_c + 32
|
||||
druck_hg = druck * 0.02961339710085
|
||||
druck_hg = druck * 0.02956
|
||||
zeit=datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S')
|
||||
pfad="http://rtupdate.wunderground.com/weatherstation/updateweatherstation.php?ID=" + wu_id + "&PASSWORD=" + password + "&dateutc=" + zeit + "&tempf=" + str(aussentemp) + "&temp2f=" + str(bodentemp) + "&temp2f=" + str(lufttemp) + "&baromin=" + str(druck_hg) + "&humidity=" + str(luftfeucht) + "&indoortempf=" + str(innentemp) + "&softwaretype=raspberry_pi&action=updateraw&realtime=1&rtfreq=30"
|
||||
r = requests.get(pfad)
|
||||
if (r.text == "success\n") & (r.status_code == 200):
|
||||
print("ok")
|
||||
else:
|
||||
print("Ein Fehler ist aufgetreten: " + r.text)
|
||||
|
|
Reference in a new issue