neptune2 / esp8266-weather-station-oled-DST

Customized version of Squix78 ESP8266 OLED Weather Station w/ Auto Daylight Saving Time Adjust and other mods using SSD1306 OLED. See https://github.com/squix78/esp8266-weather-station for original code and library
61 stars 17 forks source link

Not updating weather information #6

Closed charonofssi closed 7 years ago

charonofssi commented 7 years ago

I have created this cool little station, I used the original version and it worked with no issues. But this version everything works when you plug it in, It will connect to the wifi, it will update everything. But it will not update again, until after I unplug it and plug it back in. My room sensor works, it will update as the room temp changes. That is just reading from the sensor not over the network. Can you please tell me what I might check or change to get this working, I love it. I have made a custom enclosure for it, It looks great and sits on my table. I do now I can still see the esp8266 is connected to wifi, Again, I did not have this issue with the original version. Any and all help is greatly appreciated. One other thing, I would like to remove the thingspeak from displaying, is there a setting to turn it off? - TY Char

neptune2 commented 7 years ago

Thank-you for pointing this out. It is a bug. I will be updating this repository.

Note that this code has also been added to the squix78 esp8266-weather-station library as an example https://github.com/squix78/esp8266-weather-station/tree/master/examples/WeatherStationDemoExtendedDST I will also need to fix this enhanced version.

To fix the bug in the interim, change the following lines: Line 81: (not actually a bug - but better staggered timing) const int UPDATE_INTERVAL_SECS = 30 + (10 * 60); // Update every 10.5 minutes

Line 199: Ticker ticker1, ticker2;

Lines 316 and 317:

ticker1.attach(UPDATE_INTERVAL_SECS, setReadyForWeatherUpdate);
ticker2.attach(60, setReadyForDHTUpdate);

To disable the thingspeak display and updates, change the following lines: Line 221 and 222:

FrameCallback frames[] = { drawDateTime, drawCurrentWeather, drawIndoor, drawForecast, drawForecast2  };
int numberOfFrames = 5;

Lines 380 and 381:

  // drawProgress(display, 90, "Updating thingspeak...");
  // thingspeak.getLastChannelItem(THINGSPEAK_CHANNEL_ID, THINGSPEAK_API_READ_KEY);

Please confirm that this works for you.

charonofssi commented 7 years ago

Thank you very much for such a fast response and fix. It is updating. And I figured out to remove the thingspeak, but thank you again for the instructions to do it.

Char