Since I learned how to create pictures and display them on these wonderful OLED displays I wanted to build something useful with it. Once you know about all the pieces, putting them together is quite easy.
The icon, temperature and humidity are updated every 10 minutes from http://openweathermap.org/, then parsed into a JSON object.
The icon, temperature and humidity are updated every 10 minutes from http://openweathermap.org/, then parsed into a JSON object.
SSD1306 128×64 with the web based weather station. The data is fetched from openweatherchannel.com. It also displays the last update time. |
Very nice project!
Hi Dani,
Just wanted to say "thank you" for sharing such good information on your blog and at the ESP8266 community.
Mike J
Hi Dani
Thanks for this nice little project and yes I agree with Mike great blog.
Wiring up this project I had two problems I couldn't fix myself perhaps you can help:
– The IP of the api.openweathermap.org is a fixed no in the script and not as a domain. This require always to change when they change there IP – Which had obviously happened since you published this project
– The time runs over 24 and shows 24:xx:yy isntead of 00:xx:yy
some hints would be warmly welcome
Stefan
Hello
Is it possible to program the OLED to display Fahrenheit rather than Celsius? This looks like a really neat project!
Samuel
Hi Samuel
Sure, just change these two parts in weatherStation.lua: "units=metric" to "units=imperial" and replace the "C" charachter with an "F" in the display function
Hi Dani
Thanks for helping me! Also, when I tried to download ESPlorer, an error popped up saying that the file is invalid, and I cannot open it. Do you know how to work around this?
Thanks, Samuel
Hi,
bin absoluter Anfänger, wollte das ganze aber mal probieren.
Ich hänge jetzt allerdings bei "Save to ESP". Der Button ist bei mir ausgegraut. ESP ist per USB angeschlossen. Fehlt da ein Treiber?
Das ist möglich, dass ein Treiber fehlt. Hast Du auf der rechten Seite einen Com-Port aus der Drop-Down-Liste ausgewählt und danach "Open" gedrückt? Du musst Dich zuerst mit dem Device via Serielle Schnittstelle verbinden…
Hello,
I was working on the project today, and I got init.lua loaded to the NodeMCU, but I cannot get it to upload the .MONO and weatherStation.lua files. It prints out,
PANIC: unprotected error in call to Lua API (cannot open weatherstation.lc)
PANIC: unprotected error in call to Lua API (attempt to call a string value)
And when I try to upload the .MONO and weatherStation.lua files, it says
Waiting answer from ESP – Timeout reached. Command aborted
Can anyone help?
Thanks, Samuel
I think the problem may be the order you are loading files into the ESP..
You want to load init.lua last, so it doesn't start trying to run things that aren't there yet. Load all the .mono files first. Then I would probably rename init.lua to something like test .lua and load it. Then run test.lua to make sure everything works. Once your are sure then load init.lua
I did that and it seems to kind of be working, but the OLED has a bunch of tiny white dots all over it. Is there a problem with my OLED or something?
Thanks, Samuel
Hi.
That's a very good idea you had.
I thought that for me, a weather forecast would be more useful, so I implemented it.
It has an AP mode for configuration and scrolls the forecasts on the OLED 3 at a time.
You can find the code and Eagle schematics at https://github.com/DonJuanito99/ESP8266/tree/master/MeteoESP
I had to use a custom build of NodeMCU to free enough heap.
I borrowed most of the icons (converted to 30×30) and some of your code. I hope you don't mind 😉
Thanks again for your idea and code…
– Juan –
Hi.
That's a very good idea you had.
I thought that for me, a weather forecast would be more useful, so I implemented it.
It has an AP mode for configuration and scrolls the forecasts on the OLED 3 at a time.
You can find the code and Eagle schematics at https://github.com/DonJuanito99/ESP8266/tree/master/MeteoESP
I had to use a custom build of NodeMCU to free enough heap.
I borrowed most of the icons (converted to 30×30) and some of your code. I hope you don't mind 😉
Thanks again for your idea and code…
– Juan –
I tried to upload this code but I cannot make this to work.
On ESPlorer it stucks at "Updating weather" and on the screen I see that:
http://i60.tinypic.com/33vewec.jpg
Dear Dani: I have implemented your code on the nodemcu esp8266 dev. board. However I can't get back to your link https://github.com/squix78/esp8266-projects/tree/master/weather-station as it seems to have been moved or removed.
One of my icons is corrupted and I need to download them again.
I know you have moved to the Arduino IDE, but I don't know how to translate those icons back to .MONO.
Regards
Thank you
Try https://github.com/squix78/esp8266-projects/tree/master/lua/weather-station
Got it. Thanks
Mine displays upside down. IF I enable display.flipScreenVertically(); it only works for " display.drawString(64, 10, "Connecting to WiFi");" after that, it flips back
Nevemind. I figured out I also needed to add it to drawProgress()
Hi Dani,
Thank you for your great work! I havn’t seen anything even close to what you have done on oled display.
Just one question: is it possible to hide or remove the Indecator?
Best regards
Hi buhuo
Yes, that is possible. I think the currently released version has a bug but you can work around it as I did on the advanced version of the Weather Station (https://github.com/squix78/esp8266-weather-station/blob/master/examples/WeatherStationDemoExtended/WeatherStationDemoExtended.ino#L175) by setting an empty icon. The current unreleased version will fix this bug
Dani