Git Product home page Git Product logo

esp8266-weather-station's People

Contributors

a1rb4ck avatar ahnolds avatar ak-unitb avatar c-klinger avatar cogliano avatar count023 avatar driver55 avatar fabiobatsilva avatar fowlerk avatar foxalex85 avatar gschora avatar ivankravets avatar jgromes avatar jon-young-us avatar lorol avatar luebbe avatar marcelstoer avatar mwick83 avatar neptune2 avatar njh avatar per1234 avatar squix78 avatar stony2k avatar timrosskamp avatar vlastahajek avatar will675 avatar yuri-didww avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp8266-weather-station's Issues

WUndergroud response JSON parsing

Any idea why I get no response for current conditions? Same URL in the browser yields a good looking JSON. Maybe the parser is failing to parse the JSON? Any hints on what I can do to debug this?

...
Begin NTPClient
Start udp connection on port: 1337
Requesting URL: /api/f6de27ca88e5dbde/conditions/q/CA/San_Francisco.json
start document
0: Weather Underground
Requesting URL: /api/f6de27ca88e5dbde/forecast10day/q/CA/San_Francisco.json
start document
0: rain:forecastday
0: Sunday
1: nt_rain:pop
1: Sunday Night
2: chancerain:pop
2: Monday
3: nt_rain:pop
3: Monday Night
4: chancetstorms:pop
4: Tuesday
5: nt_rain:pop
5: Tuesday Night
6: tstorms:pop
6: Wednesday
1: 13
2: 13
3: 13
4: 12

Problem with the Ticker updates in WeatherStationDemoExtendedDST.ino

Hi,

I found that WeatherStationDemoExtendedDST.ino is not properly working on my esp.
The problem was that only setReadyForDHTUpdate was scheduled by the Ticker.
But in setup function we have ticker for both:
ticker.attach(UPDATE_INTERVAL_SECS, setReadyForWeatherUpdate);
ticker.attach(60, setReadyForDHTUpdate);
I've defined another variable for Ticker and that solved my issue.
Example:
Ticker ticker;
Ticker weathertick;
and
ticker.attach(60, setReadyForDHTUpdate);
weathertick.attach(UPDATE_INTERVAL_SECS, setReadyForWeatherUpdate);

Cannot flip screen (solved)

display.flipScreenVertically() only affects the first screen ("Connecting to WiFi").
After that the screen is not flipped anymore.

Solved by also adding display.flipScreenVertically() in drawProgress() as well.

I'm also wondering if there is a bold version of the included Arial font used. Or what would be the name of that font in your font generator page.

Terrific work. Thanks, John

esp8266 Huzzah crashed when city name contains special character

When pull up condition for http://api.wunderground.com/api/<my_api_______>/conditions/q/UA/Dnipropetrovs'k.json
response contains city: "Dnipropetrovs\u0027k" and esp8266 crashes.
But if city does not contain character < ' > everything works.

response is
{
"response": {
"version":"0.1",
"termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
"features": {
"conditions": 1
}
}
, "current_observation": {
"image": {
"url":"http://icons.wxug.com/graphics/wu2/logo_130x80.png",
"title":"Weather Underground",
"link":"http://www.wunderground.com"
},
"display_location": {
"full":"Dnipropetrovs\u0027k, Ukraine",
"city":"Dnipropetrovs\u0027k",
"state":"",
"state_name":"Ukraine",
"country":"UR",
"country_iso3166":"UA",
"zip":"00000",
"magic":"1",
"wmo":"34504",
"latitude":"48.36999893",
"longitude":"35.08000183",
"elevation":"141.00000000"
},
"observation_location": {
"full":"Dnipropetrovs\u0027k, ",
"city":"Dnipropetrovs\u0027k",
"state":"",

esp8266 exception:

Decoding 40 results
0x40204f6e: ClientContext::read() at C:\Users\dell e5540\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src/WiFiClient.cpp:150
(inlined by) WiFiClient::read() at C:\Users\dell e5540\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src/WiFiClient.cpp:225
0x402046ce: WundergroundClient::doUpdate(String) at C:\Users\dell e5540\Documents\Arduino\libraries\esp8266-weather-station-master/WundergroundClient.cpp:76
0x40217d87: pp_attach at ??:?
0x40217dd2: pp_attach at ??:?
0x40217ec4: pp_attach at ??:?
0x40103f97: pp_post at ??:?
0x4021731c: ppTxPkt at ??:?
0x40224ac7: ieee80211_output_pbuf at ??:?
0x40217d87: pp_attach at ??:?
0x40217dd2: pp_attach at ??:?
0x40217ec4: pp_attach at ??:?
0x40217d87: pp_attach at ??:?
0x40217dd2: pp_attach at ??:?
0x40103f97: pp_post at ??:?
0x40103823: lmacRxDone at ??:?
0x40103f97: pp_post at ??:?
0x40104b81: trc_NeedRTS at ??:?
0x40104d10: trc_NeedRTS at ??:?
0x4010512a: wDev_ProcessFiq at ??:?
0x4020ff91: etharp_output_to_arp_index at /Users/igrokhotkov/projects/esp8266/esp_iot_sdk_v1.3.0_15_08_08/esp_iot_sdk_v1.3.0/app/lwip/netif/etharp.c:886
0x401015a9: ets_timer_disarm at ??:?
0x4000050c: ?? ??:0
0x402101ec: etharp_output at /Users/igrokhotkov/projects/esp8266/esp_iot_sdk_v1.3.0_15_08_08/esp_iot_sdk_v1.3.0/app/lwip/netif/etharp.c:991
0x4020136b: twi_write_bit at C:\Users\dell e5540\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/core_esp8266_si2c.c:74
0x4020136b: twi_write_bit at C:\Users\dell e5540\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/core_esp8266_si2c.c:74
0x4010695e: malloc at C:\Users\dell e5540\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/libc_replacements.c:212
0x40207e32: String::changeBuffer(unsigned int) at C:\Users\dell e5540\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/WString.cpp:162
0x40207e66: String::reserve(unsigned int) at C:\Users\dell e5540\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/WString.cpp:146
0x40208231: String::concat(char const_, unsigned int) at C:\Users\dell e5540\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/WString.cpp:272
0x40106970: free at C:\Users\dell e5540\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/libc_replacements.c:212
0x402082b0: String::concat(char) at C:\Users\dell e5540\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/WString.cpp:290
0x40207fbc: String::String(String const&) at C:\Users\dell e5540\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/WString.cpp:46
0x40204786: WundergroundClient::updateConditions(String, String, String) at C:\Users\dell e5540\Documents\Arduino\libraries\esp8266-weather-station-master/WundergroundClient.cpp:38
0x40207f98: String::operator=(String const&) at C:\Users\dell e5540\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/WString.cpp:220
0x40202845: updateData(SSD1306_) at C:\Arduino\My_projects\esp_wheather\MyWeatherStationDemo/MyWeatherStationDemo.ino:192
0x40230aac: aes_wrap at ??:?
0x402074c4: Print::println() at C:\Users\dell e5540\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/Print.cpp:131
0x40202abc: Ticker::attach(float, void (*)()) at C:\Users\dell

ESP IOT net

hi @squix78 , and thanks for sharing the codes , sorry to make issue for my question , I was wondering if you could help me to my idea about IOT project, The idea is using async webserver on AP ESP module and other ESP station enabled sensor devices can send the data and receive the commands from server, the rate of data logging wont be rather than 1 request per second
what do you think about how strategy should I use ? sync or async
what header type? TCP or MQTT
I might add, the ESP AP server host the webpage , which is user can login and watch data or activities
also on net configuration when we intend to add new node to this net , how ESP client introduce itself to ESP AP server and send its information such as IP address, Number of sensor attached , type of sensor,...so after user can configure the sensor on the web page

icon files throwing 404

Hi - I’ve got a customer trying to get Adafruit’s weather clock project going. It’s based on code developed by squix and it depends on icon files downloaded from squix.org.

Some icon downloads throw a 404. For instance, this one:
http://www.squix.org/blog/wunderground/moonphase_L18.bmp

Adafruit project tutorial is here:
https://learn.adafruit.com/wifi-weather-station-with-tft-display/software?view=all

Forum support thread is here:
https://forums.adafruit.com/viewtopic.php?f=57&t=109761&p=587372#p587372

Please let me know if there have been some changes since the tutorial was written, and we’ll update it.

502 Proxy Error: oleddisplay.squix.ch

Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.
Reason: Error reading from remote server
Apache/2.2.15 (Red Hat) Server at oleddisplay.squix.ch Port 80


Is there any alternate server available to be changed in the WorldClockClient.cpp?!

const char host[] = "oleddisplay.squix.ch";
String url = "/rest/time";

Some questions about esp8266-weather-station

Hello, I try to build your project, but there has been compiling these contents

Arduino:1.6.5 (Windows 8.1), 板:"Generic ESP8266 Module, Serial, 80 MHz, 40MHz, DIO, 115200, 512K (64K SPIFFS), ck"

WeatherStationDemo.ino:33:33: warning: extra tokens at end of #include directive [enabled by default]
WeatherStationDemo.ino:34:34: warning: extra tokens at end of #include directive [enabled by default]
WeatherStationDemo:50: error: 'D3' was not declared in this scope
WeatherStationDemo:51: error: 'D4' was not declared in this scope
'D3' was not declared in this scope

Exception (28) crash

Exception (28):
epc1=0x4000df60 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont
sp: 3fff0230 end: 3fff0920 offset: 01a0

stack>>>
3fff03d0: 3ffef164 00000004 3fff096c 402075ba
3fff03e0: 3fff25d0 00000001 3ffef338 40207612
3fff03f0: 40106788 3ffef154 3ffef338 40207642
3fff0400: 3ffef164 3fff0470 3ffef338 40207744
3fff0410: 3fff25d0 3fff0470 3ffef154 402038cd
3fff0420: 3fff2928 0000000f 00000004 3fff2908
3fff0430: 0000000f 00000001 3fff0470 40207642
3fff0440: 40203698 00000004 3fff0470 40207690
3fff0450: 3fff050d 0000000f 00000000 3fff08b0
3fff0460: 40203698 3ffef154 3fff04b0 40204353
3fff0470: 3fff25d0 0000000f 00000001 40204591
3fff0480: 3fff0870 ffffffdf 3fff04b0 402046b1
3fff0490: 0000002c ffffffdf 00000022 4020512e
3fff04a0: 0000002c 3fff096c 00000001 402041bc
3fff04b0: 00000005 00000000 00000000 00000000
3fff04c0: 00000001 00000000 00000000 00000003
3fff04d0: 00000003 00000000 00000000 00000000
3fff04e0: 00000000 00000000 00000000 00000000
3fff04f0: 00000000 00000000 00000000 00000000
3fff0500: 4010248a 00000006 3ffef154 6c003600
3fff0510: 73756973 00746900 74006863 65636500
3fff0520: 7265626d 2c303120 31303220 69670035
3fff0530: 64750066 69672e79 6c630066 7964756f
3fff0540: 74616c20 4c202e65 3320776f 57202e43
3fff0550: 73646e69 67696c20 61207468 7620646e
3fff0560: 61697261 2e656c62 202e0000 6e616843
3fff0570: 6f206563 61722066 34206e69 002e2530
3fff0580: 43202e00 636e6168 666f2065 69617220
3fff0590: 3033206e 00002e25 0000007f 3ffece10
3fff05a0: 3fff12a8 3fff2858 3fff168f 00000030
3fff05b0: 40217670 3ffecdc0 3fff12a8 3ffecdc0
3fff05c0: 00000002 00000000 00000020 40103afb
3fff05d0: 00000005 00000000 0000000a 00000000
3fff05e0: 00000005 00000000 0000000a 00000000
3fff05f0: 00000001 00000000 0000000a 00000000
3fff0600: 00000001 00000000 0000000a 00000000
3fff0610: 00005000 00000000 00005000 0000a000
3fff0620: 00000000 a0000000 00000000 0000001c
3fff0630: 00001000 3ffece10 00001000 0000a000
3fff0640: 40217670 00000000 00001000 3fff0693
3fff0650: 0000a000 00000005 00000020 40001e4b
3fff0660: 3fff0692 00000000 40001e65 3fff06b1
3fff0670: 3fff0730 00000001 3fff2858 40001e4b
3fff0680: 3fff06b0 00000000 00000000 00000000
3fff0690: 40353037 3fff2892 3fff2858 3fff1660
3fff06a0: 3fff26a8 3fff166c 3fff1660 00000002
3fff06b0: 3fff0e31 00000003 3fff1660 4020f73d
3fff06c0: 000000c0 0002e8e2 0000a8c0 402095c8
3fff06d0: 3fff1660 00000000 00000000 3fff2858
3fff06e0: 3fffd83c 40002394 00000007 ffffffff
3fff06f0: 40001da0 00000064 00000000 0000000a
3fff0700: 3fffd83c 40002394 00000004 00000000
3fff0710: 00000001 00000064 00000000 0000000a
3fff0720: 40001f46 00000006 000000ff 00000006
3fff0730: 00000031 00000000 3fff26a8 4020963c
3fff0740: 3fff1660 3fff2808 00000000 000000ff
3fff0750: 00000000 3fff07c0 3fff07c0 3ffe8b17
3fff0760: 40002514 3fffdd3c 3fff0820 0000000a
3fff0770: 00000000 3fff07e0 3fff07e0 3ffe8ace
3fff0780: 40002514 3fffdd3c 00000000 3ffef110
3fff0790: 00006270 00000000 00000008 00000000
3fff07a0: 00000000 00000001 00000000 3fff0731
3fff07b0: 00000000 40106776 3fff0838 00000006
3fff07c0: 3fff07e0 3fff07e0 00000004 40204e9b
3fff07d0: 3fff1760 00000007 40205df0 3ffef900
3fff07e0: 40205d68 3fff1760 3ffef7a0 3fff2778
3fff07f0: 40106788 3fff087c 3fff087c 00000001
3fff0800: 3fff2518 40106776 3fff0870 00000034
3fff0810: 00000034 00000001 00000000 0000290f
3fff0820: 00000000 3ffe8b60 00000000 000003e8
3fff0830: 00000000 00000000 3fff2578 3fff28b0
3fff0840: 0000007f 00000074 3fff25b0 0000000f
3fff0850: 00000004 3fff08c8 3ffef154 40207768
3fff0860: 3fff08bc 3fff08c8 3ffef154 402042ca
3fff0870: 3fff2528 0000003f 00000034 3fff2228
3fff0880: 0000003f 00000034 3fff08b0 40207744
3fff0890: 00000000 00000000 3ffef154 3ffef104
3fff08a0: 3ffef0f8 3ffef0ec 3ffef154 402028ab
3fff08b0: 3fff2138 0000000f 00000006 3fff1938
3fff08c0: 0000000f 00000002 3fff1760 0000001f
3fff08d0: 00000010 00000000 00000000 40202b89
3fff08e0: 00000000 00000000 00000016 3ffef8f0
3fff08f0: 3fffdc20 00000000 3ffef32c 40202a1b
3fff0900: 3fffdc20 00000000 3ffef8e8 40205e39
3fff0910: 00000000 00000000 3ffef900 40100114
<<<stack<<<

ets Jan 8 2013,rst cause:2, boot mode:(1,6)

ets Jan 8 2013,rst cause:4, boot mode:(1,6)

wdt reset

Exception 28 means LoadProhibitedCause

Does not compile, 'drawFrame1' was not declared in this scope

Using http://arduino.esp8266.com/staging/package_esp8266com_index.json I get:

"/home/me/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -w -x c++ -M -MG -MP -DF_CPU=80000000L -DARDUINO=10606 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266  -DESP8266 "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/cores/esp8266" "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/variants/nodemcu" "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/libraries/Ticker" "-I/home/me/Arduino/libraries/Json_Streaming_Parser" "-I/home/me/Arduino/libraries/ESP8266_Oled_Driver_for_SSD1306_display" "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/libraries/Wire" "-I/home/me/Arduino/libraries/ESP8266_Weather_Station" "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/libraries/ESP8266WiFi/src" "/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/libraries/ESP8266WiFi/src/WiFiUdp.cpp"
"/home/me/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -w -x c++ -M -MG -MP -DF_CPU=80000000L -DARDUINO=10606 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266  -DESP8266 "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/cores/esp8266" "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/variants/nodemcu" "-I/home/me/Arduino/libraries/ESP8266_Oled_Driver_for_SSD1306_display" "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/libraries/Wire" "-I/home/me/Arduino/libraries/ESP8266_Weather_Station" "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/libraries/ESP8266WiFi/src" "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/libraries/Ticker" "-I/home/me/Arduino/libraries/Json_Streaming_Parser" "/tmp/build89cfb3cfd606bb8f03e8a898a188fb99.tmp/sketch/WorldClockDemo.ino.cpp"
"/home/me/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DARDUINO=10606 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266  -DESP8266       "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/cores/esp8266" "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/variants/nodemcu" "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/libraries/Ticker" "-I/home/me/Arduino/libraries/Json_Streaming_Parser" "-I/home/me/Arduino/libraries/ESP8266_Oled_Driver_for_SSD1306_display" "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/libraries/Wire" "-I/home/me/Arduino/libraries/ESP8266_Weather_Station" "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/libraries/ESP8266WiFi/src" "/tmp/build89cfb3cfd606bb8f03e8a898a188fb99.tmp/sketch/WorldClockDemo.ino.cpp"
"/tmp/.mount_gA6Uxy/tools-builder/ctags/5.8-arduino2/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns "/tmp/build89cfb3cfd606bb8f03e8a898a188fb99.tmp/preproc/ctags_target.cpp"
"/tmp/.mount_gA6Uxy/tools-builder/ctags/5.8-arduino2/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns "/tmp/build89cfb3cfd606bb8f03e8a898a188fb99.tmp/preproc/ctags_target.cpp"
"/home/me/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L   -DARDUINO=10606 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266  -DESP8266 "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/cores/esp8266" "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/variants/nodemcu" "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/libraries/Ticker" "-I/home/me/Arduino/libraries/Json_Streaming_Parser" "-I/home/me/Arduino/libraries/ESP8266_Oled_Driver_for_SSD1306_display" "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/libraries/Wire" "-I/home/me/Arduino/libraries/ESP8266_Weather_Station" "-I/home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/libraries/ESP8266WiFi/src" "/tmp/build89cfb3cfd606bb8f03e8a898a188fb99.tmp/sketch/WorldClockDemo.ino.cpp" -o "/tmp/build89cfb3cfd606bb8f03e8a898a188fb99.tmp/sketch/WorldClockDemo.ino.cpp.o"
WorldClockDemo:70: error: 'drawFrame1' was not declared in this scope
 bool (*frames[])(SSD1306 *display, SSD1306UiState* state, int x, int y) = { drawFrame1, drawFrame2, drawFrame3, drawFrame4};
                                                                             ^
WorldClockDemo:70: error: 'drawFrame2' was not declared in this scope
 bool (*frames[])(SSD1306 *display, SSD1306UiState* state, int x, int y) = { drawFrame1, drawFrame2, drawFrame3, drawFrame4};
                                                                                         ^
WorldClockDemo:70: error: 'drawFrame3' was not declared in this scope
 bool (*frames[])(SSD1306 *display, SSD1306UiState* state, int x, int y) = { drawFrame1, drawFrame2, drawFrame3, drawFrame4};
                                                                                                     ^
WorldClockDemo:70: error: 'drawFrame4' was not declared in this scope
 bool (*frames[])(SSD1306 *display, SSD1306UiState* state, int x, int y) = { drawFrame1, drawFrame2, drawFrame3, drawFrame4};
                                                                                                                 ^
/tmp/arduino_89cfb3cfd606bb8f03e8a898a188fb99/WorldClockDemo.ino: In function 'void setup()':
WorldClockDemo:135: error: 'updateData' was not declared in this scope
   updateData(&display);
                      ^
WorldClockDemo:137: error: 'setReadyForWeatherUpdate' was not declared in this scope
   ticker.attach(UPDATE_INTERVAL_SECS, setReadyForWeatherUpdate);
                                       ^
/tmp/arduino_89cfb3cfd606bb8f03e8a898a188fb99/WorldClockDemo.ino: In function 'void loop()':
WorldClockDemo:144: error: 'updateData' was not declared in this scope
     updateData(&display);
                        ^
/tmp/arduino_89cfb3cfd606bb8f03e8a898a188fb99/WorldClockDemo.ino: In function 'void updateData(SSD1306*)':
WorldClockDemo:159: error: 'drawProgress' was not declared in this scope
   drawProgress(display, 50, "Updating Time...");
                                               ^
Using library Ticker at version 1.0 in folder: /home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/libraries/Ticker 
Using library Json_Streaming_Parser at version 1.0.2 in folder: /home/me/Arduino/libraries/Json_Streaming_Parser 
Using library ESP8266_Oled_Driver_for_SSD1306_display at version 2.0.0 in folder: /home/me/Arduino/libraries/ESP8266_Oled_Driver_for_SSD1306_display 
Using library Wire at version 1.0 in folder: /home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/libraries/Wire 
Using library ESP8266_Weather_Station at version 1.0.3 in folder: /home/me/Arduino/libraries/ESP8266_Weather_Station 
Using library ESP8266WiFi at version 1.0 in folder: /home/me/.arduino15/packages/esp8266/hardware/esp8266/2.1.0-rc1/libraries/ESP8266WiFi 
exit status 1
'drawFrame1' was not declared in this scope

WorldClock Time tracking issue when UTC crosses days

There appears to be an issue when calculating times for timezones whose local time are behind UTC such that the local time is a different day than UTC.
For example, when London crossover to the next day, the time in New York is suddenly wrong.
The hour will be 12 hours ahead of London and the minute will be 3 minutes ahead of London.
Once NewYork crosses into the same day as London, it clears backup to the proper local time until London crosses over into the next day.
The really strange part is the minutes being off.

Deutsch

Wie stellt man es vollständig auf Deutsch um? Datum ist Englisch und Wetteranzeige auch. Die anderen Dinge sind im Code änderbar.

const String WUNDERGRROUND_LANGUAGE = "DE"; //EN
hat keine Auswirkungen und es bleibt englisch. Genau so wenn man nur D, GE, GER, Germany, Deutschland, DEU, Deutsch einträgt.


Ortschaften mit Leerzeichen im Namen werden als NA angezeigt obwohl es bei dieser wunderground den Ort genau so geschrieben gibt. Gibt es die Möglichkeit alternativ andere Aliase zu verwenden wie Postleitzahl oder Stationsname?

support for SH1106 OLED Displays (1.3" and i2C)

Hi squix78,
I'm searching for (and haven't found yet) a way to get your Code running with those 1.3" I2C OLED Displays sold from chinese sellers on eBay.
They are slightly larger and better to read then the 0.96" Displays.

The only problem is that most of them are sold with an SH1106-Chip which is a little different to the SSD1306 (although they say, it's compatible).
When i connect it, i get an initialized display, but the screen is flickering and there's no readable output.

as far as i know the difference is that SH1106 controller has an internal RAM of 132x64 pixel. The SSD1306 only has 128x64 pixel. First problem for standard 128x64 OLEDs with SH1106 controller is: How is the 128x64 window mapped into the 132x64 RAM? It seems, that the 128x64 OLED is centered in most cases within the 132x64 area, that means pixel (2,0) in ram is pixel (0,0) on the display.

Has anybody managed to get the weatherstattion-code working on sh1106 displays?

maybe would you improve your code to Support SH1106-displays? they seem to be common...

Thanks a lot!

ESP resets when trying to update Thingspeak

Hello, I got the weather station to work with Wunderground at my local city, and now I want to get the outdoor temperature function working. I was able to have it retrieve YOUR outdoor temp from thingspeak using your Channel number and API Read Key (67284 and L2VIW20QVNZJBLAK, respectively). So I programmed another ESP with your thingspeak data logger code and got it talking to thingspeak with 3 fields (Field 1= temp, Field 2= humidity and Field 3= voltage). My ESP's channel is 76390 and the Read API Key is AIWWCIDPR543BZ49. The weather station now resets every time it displays "Updating Thingspeak". On the Arduino IDE COM port, it dumps the stack and then says: ets Jan 8 2013,rst cause:2, boot mode:(3,6) I looked at some other forums and tried to match rst cause:2 with a description, and somebody said it was a "watchdog timer".
Question:
Is there a specific way I need to set up my thingspeak channel to make it compatible with the weather station? I tried looking at your channel as an example (number 67284) but it is not public.
Thanks,
Garrett

Arduino IDE Keeps requesting ESP8266 Weather Station updates, but already updated

Hi Daniel,
If you use the Arduino IDE you will get a constant request to update your library from 1.1.1 to 1.1.2 and when you do update to 1.1.2 it still keeps requesting an update. It looks like something has not been set correctly in the IDE or Library Update process to signal that once the update has been completed there is no further update required.
esp8266-weather-sta

draw frame

drawframe1
drawframe2
drawframe3
drawframe4
they are not defined
image

Use wunderground for (outdoor) climate information

Hi Dani,
nice project! What about uploading outdoor sensor data to wunderground directly instead of tingspeak?
Then you could read and display your own data from wunderground (const String WUNDERGROUND_CITY = "pws:YOUR_WEATHERSTATION_ID";)
Would this work?

ntpclient.h old

I had to overwrite the ntpclient .h and .cpp files from the ntpclient lib to compile with other ntp code present in sketch

Add option for 12hr time format (instead of 24 hour)?

First of all - this is a VERY slick library. Well done!

Just curious whether it would be possible in the future to add an option in the code for 12 hour time format (ie 1:03 PM rather than 13:03 ). I wouldn't even mind if the AM/PM was omitted!

Thanks!

Fix time to handle big utc offsets (by Matt M). Submitted on blog

String TimeClient::getHours() {
if (localEpoc == 0) {
return "--";
}
int hours = (getCurrentEpoch() % 86400L) / 3600 + myUtcOffset;
if (hours > 23) {
return String(hours - 24);
}
else
{
if (hours < 10) {
return "0" + String(hours);
}
return String(hours); // print the hour (86400 equals secs per day)
}
}

missing wunderground graphics

Hi,
Trying to do something similar for V-day present.. stumbled on your project to speed things along :) . Thanks for the great work btw.
I'm planning on using a DHT22 attached directly and using ip location to get zip or country automatically. I don't mind uploading after if it helps you.
I'm attaching a video of what I have and have a few things that don't seem to work.
video (sorry dark): https://www.dropbox.com/s/75ltowtzgdfr1e2/2016-02-11%2021.37.54.mov?dl=0

  • Frame 1: is blank right now. With UTC 5 i'm off by 3hrs and am on east cost of US. Normal UTC time breaks reading.
  • Frame 2: Seems to be get temp from wunderground, hard coded for oC (shows NA for me). Also this seems to get a weather icon? wunderground.getTodayIcon(); There is an array of weather name to letter in the WeatherUnderground.cpp but I can't seem to find any bmp or array version corresponding to each of the icons (a..k... on ). I'm not getting any graphics drawn but that could be that i'm missing a file or some arrays?
  • Frame 3: probably same reason for the rest not getting temp/humidity/weather.
  • Frame 4: actually this might be drawing graphics.. though nothing more then "/ / /" on it.
  • Frame 5 is always C no matter what I set for isMetric (will check in the am) It's probably showing your c or some defaults and I'll change this to DHT22 ..

Sorry to bug for some of this but I have put my Wunderground Keys. and copied the exact country city values from : http://api.wunderground.com/api/mykey/conditions/q/zip.json

Planning to use this to get the zip from ip, then add zip value to get weather but I'd like to understand what's wrong before breaking anything new ...

Thanks,

Some additions to enable a PWS and pull wind speed in m/s

HI

I added the following to your lib locally

To pull data from PWS:

void WundergroundClient::updateConditionsPWS(String apiKey, String pws, String city) {
  isForecast = false;
  doUpdate("/api/" + apiKey + "/conditions/q/pws:" + pws + ".json");
}

To pull windspeed in m/s in void WundergroundClient::value(String value):

  if (currentKey == "wind_kph" && isMetric) {
  wind = String(value.toFloat()/3.6,0) + " m/s"; 
}

  if (currentKey == "wind_gust_kph" && isMetric) {
  wind_gust = String(value.toFloat()/3.6,0) + "m/s";
}

and

String WundergroundClient::getWind() {
  return wind;
}

String WundergroundClient::getWind_gust() {
  return wind_gust;
}

You can add them if you like.

I would prefer to add the unit manually or by option as it is not given that it is wanted.

Would like to add alerts

The weather station works fine for me
HOWEVER
I would like to add 'alerts' because i would like to add an alarm when there is bad weather nearby. I added alerts and it started to load but crashed when it got to the field "message". Perhaps because it is too large.

Can you help?
Oldmicroguy

enhancement request: make localization for other languages

Hello,

nice widget/library!
Is it possible to make it with localization for other countries?
Currently some strings are hardcoded in english.
Suggestion: Do it with include files & ProgMem:

include in main file (.ino)

// Valid values:
// - "language_EN.h" for (English)
//

define LANGUAGE_FILE "language_DE.h"

And language files like this:

// Messages list
const prog_char PROGMEM MSG_LANGUAGE_CODE[] = "EN";
const prog_char PROGMEM MSG_HUMINITY[] = "Huminity"

Best regards
Dirk

TimeClient.updateTime() failing

Dani, thank you for sharing your awesome weather station!
I built it yesterday and it was working great. Today it stopped working. :-(
I pinpointed it down to TimeClient.updateTime() failing.

As you know, updateTime() GETs www.google.com and parse out the DATE.
For some reason, Google is sending TONs of stuff overloading the poor ESP8266. I saw crash report on the serial.

I was able to solve it by adding User-Agent: Lynx (textmode) to the GET header (just after Host: www.google.com). Google sends bare minimum HTML that made the ESP much happier.
All is well again. :-)

UTC_OFFSET cannot be dynamicaly changed

Hello,

firstly thanks for your efforts. really good work.

I have a slight problem with the TimeClient. I want to be able to change the UTC_OFFSET with a MQTT Topic. I have managed to do that, however even though UTC_OFFSET is updated via MQTT, when I call the TimeClient again with :

TimeClient timeClient(UTC_OFFSET);
timeClient.updateTime();
timeClient.getFormattedTime();

I still get the Time with the original set UTC_Offset in the Setup part of the code.

dht22 example

The blog goes on to add a DHT22 sensor and additional frames but none of the libraries or sketches seem similar to this. It would be nice is you included an example sketch for the DHT22 frame to be displayed in the library.

Got stuck at Done... frame

Hi, I'm using your weather station on a project which reads the room temperature from a dht22, reads the data from 2 gas sensors and displays it on a lcd screen. I modified the code so that it will display only the forecast frame on oled display, but sometimes it works good, sometimes after update or after reset it get stuck on Done... frame and instead of passing at forecast frame i got stuck here.
After a couple of resets its working fine, but from time to time it get stuck at that Done frame. I will insert my code maybe i did something wrong.
I need to display on oled display only the frame with forecast, no motion, no others frames.
Thank you !

#include <ESP8266WiFi.h>
#include <Ticker.h>
#include <JsonListener.h>
#include "SSD1306Wire.h"
#include "OLEDDisplayUi.h"
#include "Wire.h"
#include "WundergroundClient.h"
#include "WeatherStationFonts.h"
#include "WeatherStationImages.h"
#include "TimeClient.h"
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
#include <DHT.h>

String apiKey = "TCZ4EQGE8XE5U4BE";
const char* ssid     = "Livebox-7EB4";
const char* password = "94F161F21A36FA54A943917E27";
const char* server = "api.thingspeak.com";


WiFiClient client;
float h;
float t;

LiquidCrystal_I2C lcd(0x27,20,4); 

int mq = 0;
#define DHTPIN 2 // what pin we’re connected to
#define DHTTYPE DHT22   // DHT 22  (AM2302) 
#define entreeAnalogique A0
#define pinS2 13
#define pinS1 12
#define pinS0 14
DHT dht(DHTPIN, DHTTYPE);
/***************************
 * Begin Settings
 **************************/
// Please read http://blog.squix.org/weatherstation-getting-code-adapting-it
// for setup instructions

// WIFI
//const char* WIFI_SSID = "Livebox-7EB4";
//const char* WIFI_PWD = "94F161F21A36FA54A943917E27";


// Setup
const int UPDATE_INTERVAL_SECS = 10 * 60; // Update every 10 minutes

// Display Settings
const int I2C_DISPLAY_ADDRESS = 0x3c;
const int SDA_PIN = 4;
const int SDC_PIN = 5;

// TimeClient settings
const float UTC_OFFSET = 2;

// Wunderground Settings
const boolean IS_METRIC = true;
const String WUNDERGRROUND_API_KEY = "b6860a09d0439999";
const String WUNDERGRROUND_LANGUAGE = "FR";
const String WUNDERGROUND_COUNTRY = "FR";
const String WUNDERGROUND_CITY = "Grasse";

//Thingspeak Settings
//const String THINGSPEAK_CHANNEL_ID = "67284";
//const String THINGSPEAK_API_READ_KEY = "L2VIW20QVNZJBLAK";

// Initialize the oled display for address 0x3c
// sda-pin=14 and sdc-pin=12
SSD1306Wire     display(I2C_DISPLAY_ADDRESS, SDA_PIN, SDC_PIN);
OLEDDisplayUi   ui( &display );

/***************************
 * End Settings
 **************************/

TimeClient timeClient(UTC_OFFSET);

// Set to false, if you prefere imperial/inches, Fahrenheit
WundergroundClient wunderground(IS_METRIC);

//ThingspeakClient thingspeak;

// flag changed in the ticker function every 10 minutes
bool readyForWeatherUpdate = false;

String lastUpdate = "--";

Ticker ticker;

//declaring prototypes
void drawProgress(OLEDDisplay *display, int percentage, String label);
void updateData(OLEDDisplay *display);
//void drawDateTime(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y);
//void drawCurrentWeather(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y);
void drawForecast(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y);
//void drawThingspeak(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y);
void drawForecastDetails(OLEDDisplay *display, int x, int y, int dayIndex);
void drawHeaderOverlay(OLEDDisplay *display, OLEDDisplayUiState* state);
void setReadyForWeatherUpdate();


// Add frames
// this array keeps function pointers to all frames
// frames are the single views that slide from right to left
FrameCallback frames[] = { /*drawDateTime, drawCurrentWeather,*/ drawForecast/*, drawThingspeak*/ };
int numberOfFrames = 1;

OverlayCallback overlays[] = { drawHeaderOverlay };
int numberOfOverlays = 1;

void setup() {
  Serial.begin(115200);
  Serial.println();
  Serial.println();

pinMode(16, OUTPUT); //pin buzzer
lcd.begin();                     
lcd.backlight();

Serial.begin(115200);
delay(10);
dht.begin();

//WiFi.begin(ssid, password);

Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);

//WiFi.begin(ssid, password);

  // initialize dispaly
  display.init();
  display.flipScreenVertically();
  display.clear();
  display.display();


  display.setFont(ArialMT_Plain_10);
  display.setTextAlignment(TEXT_ALIGN_CENTER);
  display.setContrast(255);

  WiFi.begin(ssid, password);

  int counter = 0;
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
    display.clear();
    display.drawString(64, 10, "Connecting to WiFi");
    display.drawXbm(46, 30, 8, 8, counter % 3 == 0 ? activeSymbole : inactiveSymbole);
    display.drawXbm(60, 30, 8, 8, counter % 3 == 1 ? activeSymbole : inactiveSymbole);
    display.drawXbm(74, 30, 8, 8, counter % 3 == 2 ? activeSymbole : inactiveSymbole);
    display.display();
    counter++;
      }

pinMode(pinS2, OUTPUT);
pinMode(pinS1, OUTPUT);
pinMode(pinS0, OUTPUT);

  ui.disableAutoTransition();
  ui.disableIndicator();
  ui.setTargetFPS(30);

  ui.setActiveSymbol(activeSymbole);
  ui.setInactiveSymbol(inactiveSymbole);

  // You can change this to
  // TOP, LEFT, BOTTOM, RIGHT
  ui.setIndicatorPosition(BOTTOM);

  // Defines where the first frame is located in the bar.
  ui.setIndicatorDirection(LEFT_RIGHT);

  // You can change the transition that is used
  // SLIDE_LEFT, SLIDE_RIGHT, SLIDE_TOP, SLIDE_DOWN
  ui.setFrameAnimation(SLIDE_LEFT);

  ui.setFrames(frames, numberOfFrames);

  ui.setOverlays(overlays, numberOfOverlays);

  // Inital UI takes care of initalising the display too.
  ui.init();

  Serial.println("");

  updateData(&display);

  ticker.attach(UPDATE_INTERVAL_SECS, setReadyForWeatherUpdate);


}

void loop() {

  if (readyForWeatherUpdate && ui.getUiState()->frameState == FIXED) {
    updateData(&display);
  }

  int remainingTimeBudget = ui.update();

  if (remainingTimeBudget > 0) {
    // You can do some work here
    // Don't do stuff if you are below your
    // time budget.
    delay(remainingTimeBudget);



digitalWrite(pinS2, LOW);
  digitalWrite(pinS1, LOW);
  digitalWrite(pinS0, LOW);
  delay(500);

 // lecture du capteur relié a l'entrée Y4 du CD4051
  digitalWrite(pinS2, HIGH);
  digitalWrite(pinS1, LOW);
  digitalWrite(pinS0, LOW);
  delay(500);
  mq = analogRead(A0);
  float mq135 = mq;
  Serial.print(analogRead(entreeAnalogique));
  Serial.println("  "); 
  Serial.println(mq135);
  delay(500);

  // lecture du capteur relié a l'entrée Y6 du CD4051
  digitalWrite(pinS2, HIGH);
  digitalWrite(pinS1, HIGH);
  digitalWrite(pinS0, LOW);
  delay(500);
  mq = analogRead(A0);
  float mq7 = mq - 40; //* (1.0 / 1023.0);
  Serial.print(analogRead(entreeAnalogique));
  Serial.println("  "); 
  Serial.println(mq7);
  delay(500);

h = dht.readHumidity();
t = dht.readTemperature();

lcd.setCursor(0,0);
lcd.print("Temp: ");
lcd.print(t);
lcd.print(" C");
lcd.setCursor(0,1);
lcd.print("Humidity: ");
lcd.print(h);
lcd.print(" % ");
lcd.setCursor(0,2);
lcd.print("MQ7 CO: ");
lcd.print(mq7);
lcd.setCursor(0,3);
lcd.print("MQ135: ");
lcd.print(mq135);

if (isnan(h) || isnan(t)) {
Serial.println("Failed to read from DHT sensor!");
return;
}

if (client.connect(server,80)) { // "184.106.153.149" or api.thingspeak.com
    String postStr = apiKey;
    postStr +="&field1=";
    postStr += String(t);
    postStr +="&field2=";
    postStr += String(h);
    postStr +="&field3=";
    postStr += String(mq7);
    postStr +="&field4=";
    postStr += String(mq135);
    postStr += "\r\n\r\n";

    client.print("POST /update HTTP/1.1\n");
    client.print("Host: api.thingspeak.com\n");
    client.print("Connection: close\n");
    client.print("X-THINGSPEAKAPIKEY: "+apiKey+"\n");
    client.print("Content-Type: application/x-www-form-urlencoded\n");
    client.print("Content-Length: ");
    client.print(postStr.length());
    client.print("\n\n");
    client.print(postStr);

    Serial.print("MQ7: ");
    Serial.println(mq7);
    Serial.print("MQ135: ");
    Serial.println(mq135);
    Serial.print("Temperature: ");
    Serial.print(t);
    Serial.print(" degrees Celcius Humidity: ");
    Serial.print(h);
    Serial.println("% send to Thingspeak");
     }
    else {
      digitalWrite(16, HIGH);   
      delay(250);              
      digitalWrite(16, LOW);
        }
client.stop();

Serial.println("Waiting...");
// thingspeak needs minimum 15 sec delay between updates
delay(300000);

}
}

void drawProgress(OLEDDisplay *display, int percentage, String label) {
  display->clear();
  display->flipScreenVertically();
  display->setTextAlignment(TEXT_ALIGN_CENTER);
  display->setFont(ArialMT_Plain_10);
  display->drawString(64, 10, label);
  display->drawProgressBar(2, 28, 124, 10, percentage);
  display->display();
}

void updateData(OLEDDisplay *display) {
  drawProgress(display, 10, "Updating time...");
  timeClient.updateTime();
  drawProgress(display, 30, "Updating conditions...");
  wunderground.updateConditions(WUNDERGRROUND_API_KEY, WUNDERGRROUND_LANGUAGE, WUNDERGROUND_COUNTRY, WUNDERGROUND_CITY);
  drawProgress(display, 50, "Updating forecasts...");
  wunderground.updateForecast(WUNDERGRROUND_API_KEY, WUNDERGRROUND_LANGUAGE, WUNDERGROUND_COUNTRY, WUNDERGROUND_CITY);
  drawProgress(display, 80, "Updating thingspeak...");
//  thingspeak.getLastChannelItem(THINGSPEAK_CHANNEL_ID, THINGSPEAK_API_READ_KEY);
  lastUpdate = timeClient.getFormattedTime();
  readyForWeatherUpdate = false;
  drawProgress(display, 100, "Done...");
  delay(1000);
}



/*void drawDateTime(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y) {
  display->setTextAlignment(TEXT_ALIGN_CENTER);
  display->setFont(ArialMT_Plain_10);
  String date = wunderground.getDate();
  int textWidth = display->getStringWidth(date);
  display->drawString(64 + x, 5 + y, date);
  display->setFont(ArialMT_Plain_24);
  String time = timeClient.getFormattedTime();
  textWidth = display->getStringWidth(time);
  display->drawString(64 + x, 15 + y, time);
  display->setTextAlignment(TEXT_ALIGN_LEFT);
}

void drawCurrentWeather(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y) {
  display->setFont(ArialMT_Plain_10);
  display->setTextAlignment(TEXT_ALIGN_LEFT);
  display->drawString(60 + x, 5 + y, wunderground.getWeatherText());

  display->setFont(ArialMT_Plain_24);
  String temp = wunderground.getCurrentTemp() + "°C";
  display->drawString(60 + x, 15 + y, temp);
  int tempWidth = display->getStringWidth(temp);

  display->setFont(Meteocons_Plain_42);
  String weatherIcon = wunderground.getTodayIcon();
  int weatherIconWidth = display->getStringWidth(weatherIcon);
  display->drawString(32 + x - weatherIconWidth / 2, 05 + y, weatherIcon);
}
*/

void drawForecast(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y) {
  drawForecastDetails(display, x, y, 0);
  drawForecastDetails(display, x + 44, y, 2);
  drawForecastDetails(display, x + 88, y, 4);
}

/*void drawThingspeak(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y) {
  display->setTextAlignment(TEXT_ALIGN_CENTER);
  display->setFont(ArialMT_Plain_10);
  display->drawString(64 + x, 0 + y, "Outdoor");
  display->setFont(ArialMT_Plain_16);
  display->drawString(64 + x, 10 + y, thingspeak.getFieldValue(0) + "°C");
  display->drawString(64 + x, 30 + y, thingspeak.getFieldValue(1) + "%");
}
*/
void drawForecastDetails(OLEDDisplay *display, int x, int y, int dayIndex) {
  display->setTextAlignment(TEXT_ALIGN_CENTER);
  display->setFont(ArialMT_Plain_10);
  String day = wunderground.getForecastTitle(dayIndex).substring(0, 3);
  day.toUpperCase();
  display->drawString(x + 20, y, day);

  display->setFont(Meteocons_Plain_21);
  display->drawString(x + 20, y + 12, wunderground.getForecastIcon(dayIndex));

  display->setFont(ArialMT_Plain_10);
  display->drawString(x + 20, y + 34, wunderground.getForecastLowTemp(dayIndex) + "|" + wunderground.getForecastHighTemp(dayIndex));
  display->setTextAlignment(TEXT_ALIGN_LEFT);
}

void drawHeaderOverlay(OLEDDisplay *display, OLEDDisplayUiState* state) {
  display->setColor(WHITE);
  display->setFont(ArialMT_Plain_10);
  String time = timeClient.getFormattedTime().substring(0, 5);
  display->setTextAlignment(TEXT_ALIGN_LEFT);
  display->drawString(50, 54, time);
  /*display->setTextAlignment(TEXT_ALIGN_RIGHT);
  String temp = wunderground.getCurrentTemp() + "°C";
  display->drawString(128, 54, temp);*/
  display->drawHorizontalLine(0, 52, 128);
}

void setReadyForWeatherUpdate() {
  Serial.println("Setting readyForUpdate to true");
  readyForWeatherUpdate = true;
} 

Please include DHT sensor in examples

Besides weather data from Weather Underground it would be nice to have local temperature and humimdity shown on the display. I've already tried to add a DHT sensor to your code but I'm fairly new at coding and did not succeed. You might want to take a look?

/**The MIT License (MIT)

Copyright (c) 2016 by Daniel Eichhorn

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

See more at http://blog.squix.org
*/

#include <ESP8266WiFi.h>
#include <Ticker.h>
#include <JsonListener.h>
#include <ArduinoOTA.h>
#include <ESP8266mDNS.h>

#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>

#include "SSD1306Wire.h"
#include "OLEDDisplayUi.h"
#include "Wire.h"
#include "WundergroundClient.h"
#include "WeatherStationFonts.h"
#include "WeatherStationImages.h"
#include "TimeClient.h"

#include "DHT.h"

/***************************
 * Begin Settings
 **************************/
// Please read http://blog.squix.org/weatherstation-getting-code-adapting-it
// for setup instructions.
// In addition to the "normal" libraries you also need to install the WifiManager fro tzapu

#define HOSTNAME "ESP8266-OTA-"

// Setup
const int UPDATE_INTERVAL_SECS = 10 * 60; // Update every 10 minutes

// Display Settings
const int I2C_DISPLAY_ADDRESS = 0x3c;
const int SDA_PIN = D3;
const int SDC_PIN = D5;

// TimeClient settings
const float UTC_OFFSET = 2;

// Wunderground Settings
const boolean IS_METRIC = true;
const String WUNDERGRROUND_API_KEY = "API_KEY";
const String WUNDERGRROUND_LANGUAGE = "EN";
const String WUNDERGROUND_COUNTRY = "CH";
const String WUNDERGROUND_CITY = "Zurich";

// Initialize the oled display for address 0x3c
// sda-pin=14 and sdc-pin=12
SSD1306Wire     display(I2C_DISPLAY_ADDRESS, SDA_PIN, SDC_PIN);
OLEDDisplayUi   ui( &display );

// DHT sensor settings
#define DHT_PIN D2
#define DHT_TYPE DHT11
char FormattedTemperature[10];
char FormattedHumidity[10];

/***************************
 * End Settings
 **************************/

TimeClient timeClient(UTC_OFFSET);

// Set to false, if you prefere imperial/inches, Fahrenheit
WundergroundClient wunderground(IS_METRIC);

// Initialize the temperature/ humidity sensor
DHT dht(DHT_PIN, DHT_TYPE);
float humidity = 0.0;
float temperature = 0.0;

// flag changed in the ticker function every 10 minutes
bool readyForWeatherUpdate = false;
bool readyForDHTUpdate = false;

String lastUpdate = "--";

Ticker ticker;

//declaring prototypes
void configModeCallback (WiFiManager *myWiFiManager);
void drawProgress(OLEDDisplay *display, int percentage, String label);
void drawOtaProgress(unsigned int, unsigned int);
void updateData(OLEDDisplay *display);
void drawDateTime(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y);
void drawCurrentWeather(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y);
void drawForecast(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y);
void drawForecastDetails(OLEDDisplay *display, int x, int y, int dayIndex);
void drawIndoor(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y);
void drawHeaderOverlay(OLEDDisplay *display, OLEDDisplayUiState* state);
void setReadyForWeatherUpdate();
void setReadyForDHTUpdate();
int8_t getWifiQuality();


// Add frames
// this array keeps function pointers to all frames
// frames are the single views that slide from right to left

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

OverlayCallback overlays[] = { drawHeaderOverlay };
int numberOfOverlays = 1;

void setup() {
  //Turn On VCC
  //pinMode(D4, OUTPUT);
  //digitalWrite(D4, HIGH);
  Serial.begin(115200);

  // initialize display
  display.init();
  display.clear();
  display.display();

  display.flipScreenVertically();
  display.setFont(ArialMT_Plain_10);
  display.setTextAlignment(TEXT_ALIGN_CENTER);
  display.setContrast(255);

  // initialize DHT sensor
  dht.begin();

  //WiFiManager
  //Local intialization. Once its business is done, there is no need to keep it around
  WiFiManager wifiManager;
  //Uncomment for testing wifi manager
  //wifiManager.resetSettings();
  wifiManager.setAPCallback(configModeCallback);

  //or use this for auto generated name ESP + ChipID
  wifiManager.autoConnect();

  //Manual Wifi
  //WiFi.begin(WIFI_SSID, WIFI_PWD);
  String hostname(HOSTNAME);
  hostname += String(ESP.getChipId(), HEX);
  WiFi.hostname(hostname);


  int counter = 0;
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
    display.clear();
    display.drawString(64, 10, "Connecting to WiFi");
    display.drawXbm(46, 30, 8, 8, counter % 3 == 0 ? activeSymbol : inactiveSymbol);
    display.drawXbm(60, 30, 8, 8, counter % 3 == 1 ? activeSymbol : inactiveSymbol);
    display.drawXbm(74, 30, 8, 8, counter % 3 == 2 ? activeSymbol : inactiveSymbol);
    display.display();

    counter++;
  }

  ui.setTargetFPS(30);

  //Hack until disableIndicator works:
  //Set an empty symbol
  ui.setActiveSymbol(emptySymbol);
  ui.setInactiveSymbol(emptySymbol);

  ui.disableIndicator();

  // You can change the transition that is used
  // SLIDE_LEFT, SLIDE_RIGHT, SLIDE_TOP, SLIDE_DOWN
  ui.setFrameAnimation(SLIDE_LEFT);

  ui.setFrames(frames, numberOfFrames);

  ui.setOverlays(overlays, numberOfOverlays);

  // Inital UI takes care of initalising the display too.
  ui.init();

  // Setup OTA
  Serial.println("Hostname: " + hostname);
  ArduinoOTA.setHostname((const char *)hostname.c_str());
  ArduinoOTA.onProgress(drawOtaProgress);
  ArduinoOTA.begin();

  updateData(&display);

  ticker.attach(UPDATE_INTERVAL_SECS, setReadyForWeatherUpdate);

}

void loop() {

  if (readyForWeatherUpdate && ui.getUiState()->frameState == FIXED) {
    updateData(&display);
  }
  if (readyForDHTUpdate && ui.getUiState()->frameState == FIXED) {
    updateDHT();
  }
  int remainingTimeBudget = ui.update();

  if (remainingTimeBudget > 0) {
    // You can do some work here
    // Don't do stuff if you are below your
    // time budget.
    ArduinoOTA.handle();
    delay(remainingTimeBudget);
  }

}

void configModeCallback (WiFiManager *myWiFiManager) {
  Serial.println("Entered config mode");
  Serial.println(WiFi.softAPIP());
  //if you used auto generated SSID, print it
  Serial.println(myWiFiManager->getConfigPortalSSID());
  display.clear();
  display.setTextAlignment(TEXT_ALIGN_CENTER);
  display.setFont(ArialMT_Plain_10);
  display.drawString(64, 10, "Wifi Manager");
  display.drawString(64, 20, "Please connect to AP");
  display.drawString(64, 30, myWiFiManager->getConfigPortalSSID());
  display.drawString(64, 40, "To setup Wifi Configuration");
  display.display();
}

void drawProgress(OLEDDisplay *display, int percentage, String label) {
  display->clear();
  display->setTextAlignment(TEXT_ALIGN_CENTER);
  display->setFont(ArialMT_Plain_10);
  display->drawString(64, 10, label);
  display->drawProgressBar(2, 28, 124, 10, percentage);
  display->display();
}

void drawOtaProgress(unsigned int progress, unsigned int total) {
  display.clear();
  display.setTextAlignment(TEXT_ALIGN_CENTER);
  display.setFont(ArialMT_Plain_10);
  display.drawString(64, 10, "OTA Update");
  display.drawProgressBar(2, 28, 124, 10, progress / (total / 100));
  display.display();
}

void updateData(OLEDDisplay *display) {
  drawProgress(display, 20, "Updating time...");
  timeClient.updateTime();
  drawProgress(display, 40, "Updating conditions...");
  wunderground.updateConditions(WUNDERGRROUND_API_KEY, WUNDERGRROUND_LANGUAGE, WUNDERGROUND_COUNTRY, WUNDERGROUND_CITY);
  drawProgress(display, 60, "Updating forecasts...");
  wunderground.updateForecast(WUNDERGRROUND_API_KEY, WUNDERGRROUND_LANGUAGE, WUNDERGROUND_COUNTRY, WUNDERGROUND_CITY);
  lastUpdate = timeClient.getFormattedTime();
  drawProgress(display, 80, "Reading DHT Sensor");
  humidity = dht.readHumidity();
  temperature = dht.readTemperature(!IS_METRIC);
  drawProgress(display, 100, "Done...");
  readyForWeatherUpdate = false;
  delay(1000);
}

// Called every 1 minute
void updateDHT() {
  humidity = dht.readHumidity();
  temperature = dht.readTemperature(!IS_METRIC);
  readyForDHTUpdate = false;
}

void drawDateTime(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y) {
  display->setTextAlignment(TEXT_ALIGN_CENTER);
  display->setFont(ArialMT_Plain_10);
  String date = wunderground.getDate();
  int textWidth = display->getStringWidth(date);
  display->drawString(64 + x, 5 + y, date);
  display->setFont(ArialMT_Plain_24);
  String time = timeClient.getFormattedTime();
  textWidth = display->getStringWidth(time);
  display->drawString(64 + x, 15 + y, time);
  display->setTextAlignment(TEXT_ALIGN_LEFT);
}


void drawCurrentWeather(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y) {
  display->setFont(ArialMT_Plain_10);
  display->setTextAlignment(TEXT_ALIGN_LEFT);
  //display->drawString(60 + x, 5 + y, wunderground.getWeatherText());
  display->drawString(60 + x, 5 + y, WUNDERGROUND_CITY);

  display->setFont(ArialMT_Plain_24);
  String temp = wunderground.getCurrentTemp() + "°C";
  display->drawString(60 + x, 15 + y, temp);
  int tempWidth = display->getStringWidth(temp);

  display->setFont(Meteocons_Plain_42);
  String weatherIcon = wunderground.getTodayIcon();
  int weatherIconWidth = display->getStringWidth(weatherIcon);
  display->drawString(32 + x - weatherIconWidth / 2, 05 + y, weatherIcon);
}


void drawForecast(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y) {
  drawForecastDetails(display, x, y, 0);
  drawForecastDetails(display, x + 44, y, 2);
  drawForecastDetails(display, x + 88, y, 4);
}


void drawForecastDetails(OLEDDisplay *display, int x, int y, int dayIndex) {
  display->setTextAlignment(TEXT_ALIGN_CENTER);
  display->setFont(ArialMT_Plain_10);
  String day = wunderground.getForecastTitle(dayIndex).substring(0, 3);
  day.toUpperCase();
  display->drawString(x + 20, y, day);

  display->setFont(Meteocons_Plain_21);
  display->drawString(x + 20, y + 12, wunderground.getForecastIcon(dayIndex));

  display->setFont(ArialMT_Plain_10);
  display->drawString(x + 20, y + 34, wunderground.getForecastLowTemp(dayIndex) + "|" + wunderground.getForecastHighTemp(dayIndex));
  display->setTextAlignment(TEXT_ALIGN_LEFT);
}

void drawHeaderOverlay(OLEDDisplay *display, OLEDDisplayUiState* state) {
  display->setColor(WHITE);
  display->setFont(ArialMT_Plain_10);
  display->setTextAlignment(TEXT_ALIGN_LEFT);
  display->drawString(0, 54, String(state->currentFrame + 1) + "/" + String(numberOfFrames));

  String time = timeClient.getFormattedTime().substring(0, 5);
  display->setTextAlignment(TEXT_ALIGN_CENTER);
  display->drawString(38, 54, time);

  display->setTextAlignment(TEXT_ALIGN_CENTER);
  String temp = wunderground.getCurrentTemp() + "°C";
  display->drawString(90, 54, temp);

  int8_t quality = getWifiQuality();
  for (int8_t i = 0; i < 4; i++) {
    for (int8_t j = 0; j < 2 * (i + 1); j++) {
      if (quality > i * 25 || j == 0) {
        display->setPixel(120 + 2 * i, 63 - j);
      }
    }
  }


  display->setTextAlignment(TEXT_ALIGN_CENTER);
  display->setFont(Meteocons_Plain_10);
  String weatherIcon = wunderground.getTodayIcon();
  int weatherIconWidth = display->getStringWidth(weatherIcon);
  display->drawString(64, 55, weatherIcon);

  display->drawHorizontalLine(0, 52, 128);

}

// converts the dBm to a range between 0 and 100%
int8_t getWifiQuality() {
  int32_t dbm = WiFi.RSSI();
  if(dbm <= -100) {
      return 0;
  } else if(dbm >= -50) {
      return 100;
  } else {
      return 2 * (dbm + 100);
  }
}

void drawIndoor(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y) {
  display->setTextAlignment(TEXT_ALIGN_CENTER);
  display->setFont(ArialMT_Plain_10);
  display->drawString(64 + x, 0, "DHT11 Indoor Sensor");
  display->setFont(ArialMT_Plain_10);
  dtostrf(temperature,4, 1, FormattedTemperature);
  display->drawString(64+x, 12, "Temp: " + String(FormattedTemperature) + (IS_METRIC ? "°C": "°F"));
  dtostrf(humidity,4, 1, FormattedHumidity);
  display->drawString(64+x, 30, "Humidity: " + String(FormattedHumidity) + "%");
}

void setReadyForWeatherUpdate() {
  Serial.println("Setting readyForUpdate to true");
  readyForWeatherUpdate = true;
}

void setReadyForDHTUpdate() {
  Serial.println("Setting readyForDHTUpdate to true");
  readyForDHTUpdate = true;
}

errors in compilation

Hi, great project, thank you. I'm using arduino 1.6.5 ide. I notice that the following library has changed name ssd1306_i2c.h to ssd1306

I tried to download the previous version before the name change here https://github.com/squix78/esp8266-oled-ssd1306/releases/tag/1.0.1

but get the following compilation errors

Arduino: 1.6.5 (Windows 8.1), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Serial, 115200, 4M (3M SPIFFS)"

esp8266-weather-station.ino:33:19: warning: extra tokens at end of #include directive [enabled by default]
In file included from C:\Users\waldy\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/esp8266_peri.h:24:0,
from C:\Users\waldy\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/Arduino.h:38,
from C:\Users\waldy\Documents\Arduino\libraries\json-streaming-parser-master/JsonListener.h:28,
from esp8266-weather-station.ino:29:
C:\Users\waldy\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/sdk/include/c_types.h:71:66: error: redefinition of 'const char ArialMT_Plain_10 []'
#define ICACHE_RODATA_ATTR attribute((section(".irom.text")))
^
C:\Users\waldy\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/pgmspace.h:15:21: note: in expansion of macro 'ICACHE_RODATA_ATTR'
#define PROGMEM ICACHE_RODATA_ATTR
^
C:\Users\waldy\Documents\Arduino\libraries\esp8266-oled-ssd1306-1.0.1/SSD1306Fonts.h:26:31: note: in expansion of macro 'PROGMEM'
const char ArialMT_Plain_10[] PROGMEM = {
^
In file included from esp8266-weather-station.ino:36:0:
C:\Users\waldy\Documents\Arduino\libraries\esp8266-oled-ssd1306-1.0.1/SSD1306Fonts.h:26:12: error: 'const char ArialMT_Plain_10 [2596]' previously defined here
const char ArialMT_Plain_10[] PROGMEM = {
^
In file included from C:\Users\waldy\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/esp8266_peri.h:24:0,
from C:\Users\waldy\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/Arduino.h:38,
from C:\Users\waldy\Documents\Arduino\libraries\json-streaming-parser-master/JsonListener.h:28,
from esp8266-weather-station.ino:29:
C:\Users\waldy\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/sdk/include/c_types.h:71:66: error: redefinition of 'const char ArialMT_Plain_16 []'
#define ICACHE_RODATA_ATTR attribute((section(".irom.text")))
^
C:\Users\waldy\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/pgmspace.h:15:21: note: in expansion of macro 'ICACHE_RODATA_ATTR'
#define PROGMEM ICACHE_RODATA_ATTR
^
C:\Users\waldy\Documents\Arduino\libraries\esp8266-oled-ssd1306-1.0.1/SSD1306Fonts.h:484:31: note: in expansion of macro 'PROGMEM'
const char ArialMT_Plain_16[] PROGMEM = {
^
In file included from esp8266-weather-station.ino:36:0:
C:\Users\waldy\Documents\Arduino\libraries\esp8266-oled-ssd1306-1.0.1/SSD1306Fonts.h:484:12: error: 'const char ArialMT_Plain_16 [5550]' previously defined here
const char ArialMT_Plain_16[] PROGMEM = {
^
In file included from C:\Users\waldy\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/esp8266_peri.h:24:0,
from C:\Users\waldy\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/Arduino.h:38,
from C:\Users\waldy\Documents\Arduino\libraries\json-streaming-parser-master/JsonListener.h:28,
from esp8266-weather-station.ino:29:
C:\Users\waldy\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0/tools/sdk/include/c_types.h:71:66: error: redefinition of 'const char ArialMT_Plain_24 []'
#define ICACHE_RODATA_ATTR attribute((section(".irom.text")))
^
C:\Users\waldy\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/pgmspace.h:15:21: note: in expansion of macro 'ICACHE_RODATA_ATTR'
#define PROGMEM ICACHE_RODATA_ATTR
^
C:\Users\waldy\Documents\Arduino\libraries\esp8266-oled-ssd1306-1.0.1/SSD1306Fonts.h:942:31: note: in expansion of macro 'PROGMEM'
const char ArialMT_Plain_24[] PROGMEM = {
^
In file included from esp8266-weather-station.ino:36:0:
C:\Users\waldy\Documents\Arduino\libraries\esp8266-oled-ssd1306-1.0.1/SSD1306Fonts.h:942:12: error: 'const char ArialMT_Plain_24 [11797]' previously defined here
const char ArialMT_Plain_24[] PROGMEM = {
^
Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

TimeClient did not pick up change to Daylight saving / summertime

Hi all,

I'm using the Weatherstation that Dani made.
At 27th of march Daylight Saving Time started and since then the weather station shows 1 hour too early. I looked if I could resolve this but I could not and actually I dont understand why it fails. Because the time and date come from google right? So shouldn't that be uptodate?

Best regards
Dennis van Elteren

How to compile WS for ESP-01? (SOLVED)

Hi Daniel,

I tried compile WS for ESP-01 I've got some compile errors regarding declared GPIOs. for I2C:

Build options changed, rebuilding all
WeatherStationDemoKatowice:50: error: 'D0' was not declared in this scope
WeatherStationDemoKatowice:51: error: 'D2' was not declared in this scope
'D0' was not declared in this scope

Could you please provide me correct values for ESP-01?

Thanks,

Update:
By trial and errors I found solution:

Use '0' and '2' instead 'D3' and 'D4' into code.

Add Web configuration UI

  • Add WifiManager (for SSID and PW selection)
  • Add Timezone selector
  • Add location selector for weather
  • Add module selector (which frames

Use of your library

@squix78 Daniel I have tested your Weather Station with a WeMos D1 Mini and an OLED and it is fine. I have tried to use your library just for Serial Monitor use and if I call wunderground.updateForecast(WUNDERGRROUND_API_KEY, WUNDERGROUND_COUNTRY, WUNDERGROUND_CITY); it provides the following details:

Requesting URL: ..................................json
start document
0: clear:forecastday
0: Thursday
1: nt_clear:pop
1: Thursday Night
2: clear:pop
2: Friday
3: nt_clear:pop
3: Friday Night
4: partlycloudy:pop
4: Saturday
5: nt_clear:pop
5: Saturday Night
6: clear:pop
6: Sunday
1: 27
2: 27
3: 28
4: 29

What I really want to do is pick up the high and low forecast temperature so I have tried:

String fclow = wunderground.getForecastLowTemp(1);

For the low forecast temperature for period 1 but it doesn't return anything. Is there something I am missing?

Time (seconds in frame1) standing still and only get updated when frame changes

Hello Daniel,

first thanks for this amazing project! I have found a bug: i´ve installed all librarys etc. as you discriped in your post. All works fine, but the time in frame1 is not ticking sec. by sec. it shows xx seconds an for the frame time (5s) nothing happends. The time (seconds) ist standing still. But when the frame changes to frame2 the time is updating and shows the actuall seconds to the time.

i have arduino 1.6.5, with nodeMCU v1.0 and the ssd1306 display.

Any idea? How can i debug this issue?

I already open a ticket on github for this issues.

Thanks and greetigs

Thomas

wunderground API usage alert

I was just chastised by wunderground for high API usage.

I've been loading and rebooting the weather station app a lot today which might account for my high usage, but it got me to thinking .... will running the app 24 hours a days stay within the wunderground allocation of API calls for free accounts, or are we pushing the limit?

Localize date information

Add the language parameter in functions:
void updateConditions(String apiKey, String language, String country, String city);
void updateConditions(String apiKey, String language, String zmwCode);
void updateForecast(String apiKey, String language, String country, String city);
void updateAstronomy(String apiKey, String language, String country, String city);
void updateAlerts(String apiKey, String language, String country, String city);
converts the weather forecast language but the getdate function has no parameter language and the date is always in English.
It would be nice to have the date in the same language as the weather forcast.

finnish letters äö showing incorrectly

This really isn't the first time i see "errors" like this but is there any way to correct this issue, when ssd1306 display shows "selkeää" as "selk&auml" -something.

maybe the problem is with the font file being used?

Add second overlay to acknowledge button press?

Hello, I noticed that there is a place to add more overlays. I'd like to add overlay number 2 that shows a "mode" message for one second when a button is pressed, then switches back to the normal overlay (number 1). Is this possible?
Here's what I am thinking:

`OverlayCallback overlays[ ] = { drawHeaderOverlay, MoonMode };

int numberOfOverlays = 2;

void MoonMode(OLEDDisplay *display, String label) {
display->clear();
display->setTextAlignment(TEXT_ALIGN_CENTER);
display->setFont(ArialMT_Plain_10);
display->drawString(2, 52, "Moon Mode:");
display->drawString(64, 52, label);
display->display();
}`

jsonlistener.h issue

When compiling the scetch, it alwasy says

C:\Users\xxxxxxx\Desktop\esp8266-weather-station-master\examples\WeatherStationDemo\WeatherStationDemo.ino:28:26: fatal error: JsonListener.h: No such file or directory

#include <JsonListener.h>

                      ^

compilation terminated.

exit status 1

I searched your folder but the file is missing.

How can we fix this ?

Contribution: PHP convert images to raw ILI9341 bitstream (image proxy)

Please find attached my attempt to make a PHP "image proxy" for the ILI9341.

Basically the php-script takes any url as parameter gets and convert the image to a RGB565 raw format suitable for the ILI9341. simple file-caching included.

the first 16-bit = width of image, next 16-bit = height of image. the remaining bit are raw bitstream in RGR 565 format directly for the display.

Inside the php-script is a function to but into ESP8266 to directly stream the image from the imageproxy onto the ILI9341-based display.

espimages.php.zip

enhancement request: make WIFI configurable

Hello,

nice widget/library!
Is it possible to enhance weather widget to select WIFI station and password at runtime?
Currently you have to hardcode at design-/compiletime.

Maybe with WifiManager?
Or with a rotary encoder + button to edit station/password directly on screen? So smart like on AppleTV?

Best regards
Dirk

Added sun, moon, and local time

Just an FYI / suggestion.

I added "Astronomy" to updateData and made frames for sunrise / sunset times and phase of the moon.

The bonus is that the astronomy record also provides the local time - adjusted to DST and TZ. This eliminates the need to use TimeClient and do the conversions.

I'd be happy to share the changes to the current version of WundergroundClient.cpp and .h if you are interested.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.