Skip to content

Commit 07096bd

Browse files
committed
Try and debug why data is weird
1 parent 496b031 commit 07096bd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

WeatherStationCoreLink/main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def reboot():
6363
else:
6464
log("[INFO] Quitting")
6565
ser.readline() #Read the /r character that follows but ignore it
66+
ser.write(bytes(str("BAUD 19200"), "utf8"))
67+
log(ser.readline())
6668

6769
log("[INFO] Connecting to Pusher")
6870
pusher_client = pusher.Pusher(
@@ -121,6 +123,10 @@ def looprequest():
121123
#print(str(chr(response[1])) + str(chr(response[2])) + str(chr(response[3]))) #Should be LOO
122124

123125
if data["windSpeed"] > 80 or data["temperatureC"] > 50 or data["humidity"] > 100 or data["windDirection"] > 360:
126+
log(data["windSpeed"])
127+
log(data['temperatureC'])
128+
log(data['humidity'])
129+
log(data['windDirection'])
124130
log("[INFO] Ignoring data because it's a bit wierd")
125131
return False
126132
elif data["windSpeed"] == 0 and data["windDirection"] == 0: #This indicates it's struggling for data so ignore

0 commit comments

Comments
 (0)