sparkfun / Inventors_Kit_For_Photon_Experiments

Source code for all 11, 2-part experiments in SparkFun's Inventor's Kit for Photon.

Home Page:https://www.sparkfun.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

weather.daily(LATITUDE, LONGITUDE, 2) does not work as prescribed

mrsoltys opened this issue · comments

In theory, this should parse out tomorrow's forecast, however, it does not work correctly.

an example call on 12/01/2015 returns:
weatherdata>
location>
name>Lafayette
type>
country>US
timezone>
location altitude="0" latitude="39.993599" longitude="-105.089706" geobase="geonames" geobaseid="5427771">

credit>
meta>
lastupdate>
calctime>0.0236
nextupdate>

sun rise="2015-12-02T14:04:00" set="2015-12-02T23:35:28">
forecast>
time day="2015-12-01">
symbol number="801" name="few clouds" var="02n">
precipitation>
windDirection deg="302" code="WNW" name="West-northwest">
windSpeed mps="7.84" name="Moderate breeze">
temperature day="17.73" min="6.4" max="17.73" night="6.4" eve="17.73" morn="17.73">
pressure unit="hPa" value="839.37">
humidity value="63" unit="%">
clouds value="few clouds" all="

Note, forecast is for today, not tomorrow.

an example full call can be seen at:
http://api.openweathermap.org/data/2.5/forecast/daily?lat=39.99&lon=-105.11&cnt=2&mode=xml&appid=2de143494c0b295cca9337e1e96b00e0