Wunderground
Posted: Tue Sep 13, 2016 3:52 am
Can anyone help me to figure out how to parse the JSON information from Wunderground please?
I can do it using the ESP8266 from Openweather but the output from Wunderground is different and I've no idea how to parse it
I want to get the info from THIS section "current_observation":
I "Tried" this code but it fails
it sits waiting for the query to return
Her's where the debug says it got as far as
I can do it using the ESP8266 from Openweather but the output from Wunderground is different and I've no idea how to parse it
I want to get the info from THIS section "current_observation":
I "Tried" this code but it fails
it sits waiting for the query to return
Code: Select all
timesetup(1)
print time()
delay 1000
print time()
timer 15 * 1000, [RUNPROGRAM]
wait
[RUNPROGRAM]
serialflush
cls
let query="api.wunderground.com/api/API-KEY-HERE/geolookup/conditions/q/UK/Denton.json"
delay 500
let ret = wget(query)
let temp = json(ret,"current_observation.temp_c")
let press = json(ret,"pressure_mb" )
let humid = json(ret,"relative_humidity")
let speed = json(ret,"wind_mph")
'speed1 = int(speed + 0.5)
let dir = json(ret,"wind_degrees")
let icon = json(ret,"icon")
let desc = json(ret,"weather")
print "Today," & desc & "," & icon & "," & temp & "," & press &"," & speed & "," & dir & "," & humid
[return]
Her's where the debug says it got as far as