Skip to content

Commit 30c72a6

Browse files
committed
Updated Weather API
Changed open weather map from 2.0 to 2.1 so that the weather updates again.
1 parent dd5e27a commit 30c72a6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

com.androidthermostat.server/src/com/androidthermostat/server/data/Conditions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ public void init(Context context)
7272

7373
arduinoTimer = new Timer();
7474
arduinoTimer.schedule(new ConditionsTimerTask(), 5000, 5000);
75+
//arduinoTimer.schedule(new ConditionsTimerTask(), 1000, 1000);
7576

7677
weatherTimer = new Timer();
7778
weatherTimer.schedule(new WeatherTimerTask(), 2000, 900000);
@@ -106,7 +107,7 @@ public void updateWeather()
106107
boolean success=false;
107108

108109

109-
String json = Utils.getUrlContents("http://openweathermap.org/data/2.0/weather/city/" + Settings.getCurrent().getOpenWeatherMapStation() );
110+
String json = Utils.getUrlContents("http://openweathermap.org/data/2.1/weather/city/" + Settings.getCurrent().getOpenWeatherMapStation() );
110111
com.google.gson.Gson gson = new com.google.gson.Gson();
111112
OpenWeatherMapResponse resp = gson.fromJson(json, OpenWeatherMapResponse.class);
112113

446 KB
Binary file not shown.

0 commit comments

Comments
 (0)