esp8266-projects icon indicating copy to clipboard operation
esp8266-projects copied to clipboard

call to forecast.io.php

Open consolacion opened this issue 7 years ago • 0 comments

the weather.php makes a call to lib/forecast.io.php I presume that file should be on the same server as weather.php, but it is nowhere to be found. maybe thats the reason why a call to http://serverIP/weather.php?apiKey=APIKEY&lat=40.71&lon=-74&units=us

gives what looks is a shorter json (as compared to what is coming from darksky.net, but without any values: getCurrentConditions($latParam, $lonParam); echo "CURRENT_TEMP=".round($condition->getTemperature())."\n"; echo "CURRENT_HUMIDITY=".($condition->getHumidity()*100)."\n"; echo "CURRENT_ICON=".($condition->getIcon())."\n"; echo "CURRENT_SUMMARY=".$condition->getSummary()."\n"; $conditions_week = $forecast->getForecastWeek($latParam, $lonParam); echo "MAX_TEMP_TODAY=".round($conditions_week[0]->getMaxTemperature()) . "\n"; echo "MIN_TEMP_TODAY=".round($conditions_week[0]->getMinTemperature()) . "\n"; echo "ICON_TODAY=".$conditions_week[0]->getIcon()."\n"; echo "SUMMARY_TODAY=".$conditions_week[0]->getSummary()."\n"; echo "MAX_TEMP_TOMORROW=" . round($conditions_week[1]->getMaxTemperature()) . "\n"; echo "ICON_TOMORROW=".$conditions_week[1]->getIcon()."\n"; echo "MIN_TEMP_TOMORROW=".round($conditions_week[1]->getMinTemperature()) . "\n"; echo "SUMMARY_TODAY=".$conditions_week[1]->getSummary()."\n"; ?>

consolacion avatar Mar 20 '17 15:03 consolacion