WeatherStation Code published & New Shop available

Do you like this post? A regular project like the PlaneSpotter Color takes many hours of my free time to develop and maintain. Would you offer me a beer for my hard work if I was your neighbour? Modern technology called teleportation makes it easy to send me a beer. Just click here. Thank you!

Several ESP8266 hackers contacted me to finally publish the new WeatherStation code. Here it is:
https://github.com/squix78/esp8266-weather-station

It is not yet working as smoothly as I want it to work but maybe some of you can help me getting rid of the nasty issues that were bugging me for the last few weeks. The README on github contains basic setup instructions and also the currently known issues. Please feel free to fix them and create pull requests to let them flow into the master branch.

I’d also like to point out that there is a new show where you can order the components for the WeatherStation Kit: https://blog.squix.org/shop. The new shop allows me to process your orders much quicker and with the added benefit of automatic tracking updates sent to your email address for major milestones during your shipment.
By now several dozens of happy hackers received a WeatherStation Kit through my shop. I hope to get a lot more of you started in IoT hacking!

Stay tuned, I have a lot more ideas to be coded;-)!

Posted by squix78

20 comments

  1. Thanks Dani,

    It's working well.

    I modified your code slightly to make sure the hours wouldn't exceed 24 when large UTC offsets are applied.

    Cheers,
    Matt

    • Hi Dani,

      I'll give you just the time component because I've been fiddling with other parts of the code to show a few more things.

      In TimeClient.ccp replace the following part of the code:

      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)
      }
      }

      Cheers,
      Matt

    • Hi

      Are you using Arduino IDE 1.6.6? There are currently problems of the ESP8266 platform with that version. If you use 1.6.5 the message should go away

      Cheers,
      Daniel

  2. Hello Dani,

    my neighbour has his personal weatherstation (PWS) on wunderground.
    I want to build your Weatherdisplay.
    Is it possible to get his data to the display?
    What i need to do?

    Regards
    Marco

    • Not exactly sure what you are asking. Does your neighbours PWS send data to Wunderground? I have to check, I'm currently something similar but with Thingspeak, where another ESP8266 combined with a DHT22 sends temperature and humidity to thingspeak and the weather station will fetch that data and display it on screen.

      Is that your usecase?

      Kind regards,
      Daniel

    • Yes, his Station sends Data to Wunderground. With http://api.wunderground.com/api/c596b7af83bae426/conditions/q/DE/pws:IBADBOLL4.json i get the Data from his Station to the Browser.

      In the esp8266-weather-station.ino there are only "String country = "CH";
      String city = "Zurich"" to declare.
      I think it will work when i put "String city = "pws:IBADBOLL4";"

      To build a project with DHT22/ESP8266 to thingspeak and fetching that data to a Display would be great.

      Will you present this project on your blog?

      Best regards
      Marco

    • Hi Marco
      Yes, I think that should work, Bear in mind that the WundergroundClient class calls several Wunderground services. But my quick test showed that you get a result even for city=pws:*. So you can try that
      About the thingspeak thing: yes, I will share that, of course!

  3. Hi Dani! I very much liked the project of weather station. I had a problem, a mistake at compilation of WiFi.begin (ssid, pass); 'WiFi' wasn't declared in this scope. Help me please, thanks.

    • Hi Sergey
      I see from the screenshot that you sent me that you are using Arduino IDE 1.6.6. This version is known to have some issues with the ESP8266 integration. Did any of the ESP8266* examples compile? Save choice would be to use 1.6.5 until all the issues with 1.6.6 are resolved

  4. Hi Dani,
    I had already set up ESP8266 logging DH22 to thingspeak and displaying on SSD1306 but your project looks great and is more developed than mine so I would like to try your code.

    The SSD1306Demo works fine but I can't compile the weather station sketch – it gives errors such as 'class SSD1306' has no member named 'setFrameCallbacks'. It may be something simple like a missing library but I've spent quite a while looking through and if you could give me some pointers it would help I'm sure.

    Thanks,

    Sam

Leave a Reply