A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By squix78
#18361 Wow, looks cool - and wet! I'll bet you will get rid of the junk too.

After comparing the responses from openweathermap now for a few day I realized that the values are not 100% accurate. What is your opinion? The service also has some forecast API which I haven't tried out yet... Might be worth a try...

Curious about modifications;-)
User avatar
By Mikejstb
#18365 yes, now that you mention it the humidity number is way off.

I use another weather forecast service in my Node Red setup for weather condition predictions, it's called
the Dark Sky Forecast api - https://developer.forecast.io/docs/v2
it looks as though they also have suggested icons to go with their forecasts although the icon names are a bit different.

I've been logging my results from Dark Sky for a couple of months now, to a MySQL db. I'm going to go back and have a look at what I recorded, see how close it came to actual weather, etc.

I'll post here what I discover.
User avatar
By eriksl
#18406 I am making something similar, a tad different though. I have several locations inside and outside that have hardware to collect environmental data, the data is collected every minute by a server which processes it and sends it (amongst others) to a few displays.

Currently I have one display on esp8266 and one data collector on esp8266, the others are either usb connected or connected using enc28j60 (wired ethernet mac/phy).

The actual data collection takes place on an atmel atmega328p (which has excellent documentation and good hardware support), the esp8266 is only used as completely transparent uart bridge.

The software for both the atmel's and the esp8266 is completely written from scratch by me (and available on github, in case somebody might want to have a look). No frameworks, no arduino, no nodemcu, no "at" interface firmware, no rtos and no copy&paste from other's. That's how I like it :-)
User avatar
By Mikejstb
#18462 Warning - long and rambling post follows - LOL!

After looking at my weather history DB and various online weather api products I have to agree that the openweather.org data is the most inaccurate that I've found.
The odd thing is that the data retrieved from their api is even different from what's returned from their web browser interface! Neither one is correct, but their web interface returns slightly closer data in my area.

The temperature is slightly off, the humidity is totally wrong, and the barometric pressure is also totally wrong.
I tried retrieving data from other nearby areas but it just never is very accurate. Surprising.

The best that I've found is the forecastIO/Dark Sky api.
It has similar icon recommendations but uses names like "cloudy" or "sunny" instead of the number scheme.
Another nice thing about it is it returns some previous history as well so it should be possible to for instance look at what the trend in the barometric pressure is - rising or falling,etc.

As I mentioned earlier I am already retrieving, processing, and storing data from dark sky in my Node Red setup running on a Raspberry Pi. So it was pretty simple to play with parsing out everything that I'd like to show on the little oled display and then sending that out in an mqtt message whenever my display asks for it. It requests new data with another mqtt message...

Back to the little display...
At first I thought it might be fairly easy to just use the Dark Sky api instead of openweather, but I'm not at all savvy with doing the tcp type of requests to get the info from the api, like you do in your example.

Then I got thinking that maybe the much larger data that gets returned might be too much to parse in Lua on the ESP?

Then I thought I'd just try to make a Lua mqtt listener, get the data from my Node Red, and display that on the oled using your u8g icon display code. But the simplest little example I could try was too big to compile in Lua. So I don't think that'll work either. As I mentioned before I am very impressed with how much functionality you were able to get into the limited Lua memory space!

What I liked the best of your example are the pretty icons - and those turn out to be about the only accurate data that I get from openweather - so I still have my little display, now mounted in a little plastic box, sitting on my desk, showing the nice weather icons you made!