• Stars
    star
    1,031
  • Rank 43,303 (Top 0.9 %)
  • Language
    C++
  • License
    MIT License
  • Created over 8 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ESP8266 Weather Station library supporting OpenWeatherMap, Aeris and other sources

ThingPulse ESP8266 Weather Station

PlatformIO Registry PlatformIO CI

This code works best with the NodeMCU V2 ESP8266 module and an 0.96" OLED display. To get you up and running in no time we created a kit which contains all the necessary parts: https://thingpulse.com/product/esp8266-iot-electronics-starter-kit-weatherstation-planespotter-worldclock/

By buying this and other kits from us you are funding maintenance and development of this library. Thank you!

ThingPulse ESP8266 WeatherStation Classic Kit

Service level promise

This is a ThingPulse prime project. See our open-source commitment declaration for what this means.

Install and configure Arduino IDE

Make sure you use a version of the Arduino IDE which is supported by the ESP8266 platform. Follow the tutorial on our documentation platform.

Install libraries in Arduino IDE

Install the following libraries with your Arduino Library Manager in Sketch > Include Library > Manage Libraries...

  • ESP8266 Weather Station
  • JSON Streaming Parser by Daniel Eichhorn
  • ESP8266 OLED Driver for SSD1306 display by Daniel Eichhorn. Use Version 3.0.0 or higher!

Prepare the software

  • Create an API Key for OpenWeatherMap
  • In the Arduino IDE go to File > Examples > ESP8266 Weather Station > Weather Station Demo
  • Enter the OpenWeatherMap API Key
  • Enter your WiFi credentials
  • Adjust the location according to OpenWeatherMap API, e.g. Zurich, CH
  • Adjust UTC offset

Setup for PlatformIO

If you are using the PlatformIO environment for building

  • choose one of the available IDE integration or the Atom based IDE
  • install libraries 561, 562 and 563 with "platformio lib install"
  • adapt the WeatherStationDemo.ino file to your needs (see details above)

Available Modules

  • Time Client: simple class which uses the header date and time to set the clock
  • NTP Client: a NTP based time class written by Fabrice Weinberg
  • OpenWeatherMap Client: A REST client for the OpenWeatherMap.com service, providing weather information
  • Aeris Client: Client for the service provided by aerisweather.com. Fully functional initial version. After the Wunderground incident (see upgrade notes) we first targeted Aeris before we settled with OpenWeatherMap. This code is unmaintained but will remain part of this library for the time being.
  • Thingspeak Client: fetches data from Thingspeak which you might have collected with another sensor node and posted there.
  • Astronomy: algorithms to calculate current lunar phase and illumination.
  • SunMoonCalc: a calculator for sun and moon properties for a given date & time and location. This implementation is port of a Java class by T. Alonso Albi from OAN (Spain).

Why Weather Station as a library?

I realized that more and more the Weather Station was becoming a general framework for displaying data over WiFi to one of these pretty displays. But everyone would have different ways or sources for data and having the important part of the library would rather be the classes which fetch the data then the main class. So if you write data fetchers which might be of interest to others please contact me to integrate them here or offer your code as extension library yourself and call it something like esp8266-weather-station-. We will gladly list it here as third party library...

Upgrade Notes

Version 2, January 2020, removes WU support, see below

Replace Wunderground with OpenWeatherMap as weather data provider

The weather information provider we used so far (Wunderground) recently stopped their free tier without previous notice on May 15, 2018. This release adds support for a new provider with a free tier for weather information: OpenWeatherMap.com. The basic demo (WeatherStationDemo) has been adapted to use this new API through the OpenWeatherMapCurrent and OpenWeatherMapForecast REST clients.

Sadly OpenWeatherMap provides less information than Wunderground did (or still does). If you are missing attributes in the response documents then please contact the OpenWeatherMap team.

ESP8266 OLED Library upgrade

The ESP8266 OLED Library changed a lot with the latest release of version 3.0.0. We fixed many bugs and improved performance and changed the API a little bit. This means that you might have to adapt your Weather Station Code if you created it using the older 2.x.x version of the library. Either compare your code to the updated WeatherStationDemo or read through the upgrade guide

Deprecation notes

Announcement Module Removal
2018-06-13 all Wunderground related code, see our blog for details January 2020, version 2.0.0

More Repositories

1

esp8266-oled-ssd1306

Driver for the SSD1306 and SH1106 based 128x64, 128x32, 64x48 pixel OLED display running on ESP8266/ESP32
C++
1,963
star
2

esp8266-weather-station-color

ESP8266 Weather Station in Color using ILI9341 TFT 240x320 display
C
546
star
3

esp8266-spotify-remote

Control your Spotify player from a ESP8266 with color touch display
C
244
star
4

minigrafx

ESP8266 graphics library
C++
216
star
5

espaper-weatherstation

WeatherStation for the 2.9" ESPaper modules
C
87
star
6

esp8266-plane-spotter-color

Color version of the ESP8266 Plane Spotter
C
73
star
7

esp32-icon64-a2dp

Stock firmware for the Icon64. Bluetooth speaker with graphical spectrum analyzer
C
66
star
8

espaper-client

ESP8266 Arduino client to fetch and display data from ThingPulse ESPaper server
C
33
star
9

esp8266-plane-spotter

C++
24
star
10

ESP8266PowerMonitor

Code to monitor the power consumption of embedded devices
C++
19
star
11

esp32-espnow-gateway

Project for the ThingPulse ESPNow Gateway
C
13
star
12

esp32-weather-station-touch

Sample application for the ThingPulse ESP32 Color Kit Grande
C
9
star
13

esp32-espgateway-demo

Simple demo code to show communication between the two ESPs and the RGB LEDs
C++
6
star
14

MAX17055-fuel-gauge

Arduino compatible library for the MAX17055 fuel gauge chip
C++
5
star
15

esp32-ble-gateway

Project for the ThingPulse ESPGateway to track BLE devices
C
5
star
16

docs

5
star
17

esp32-s3-pulse-eco-box

Sample Project for the Pulse.Eco Box
C
4
star
18

esp32-icon64-co2

Measure CO2 with either the Winsen MH-Z19C or the Sensirion SCD41 sensor and display the values on the Icon64
C
3
star
19

icon64-word-clock

Word clock code for the Icon64 device
C
3
star
20

thingpulse-devices

Technical Documentation for ThingPulse devices
3
star
21

esp32-epulse-feather-testbed

Firmware to test the ThingPulse ePulse Feather
C++
3
star
22

espaper-7in5-esp32

Demo for the 7.5 espaper module
C
2
star
23

fritzing-parts

Fritzing parts for ThingPulse devices
2
star
24

esp32-spotify-remote

C
2
star
25

iotworkshop2019

Repository for the Open CH Workshoptage course 2019
C++
2
star
26

esp32-cubo

Sample project for the Cubo
C
2
star
27

esp32-icon64-toothfairy

ThingPulse Icon64 app that renders a visual countdown for brushing your teeth while playing webradio through its internal speaker.
C++
2
star
28

esp32-icon64-speaking-dice

Repository for the Icon64 speaking dice tutorial
C++
1
star
29

esp32-icon64-test

Example code for the ThingPulse Icon64
C++
1
star
30

esp-iot-flasher

TypeScript
1
star
31

epulse-feather-c6

Landing Page for epulse Feather C6
CSS
1
star
32

esp32-gateway-paxcounter

PAX Counter project for the ThingPulse ESPGateway Ethernet device
C
1
star
33

esp32-s3-pulse-eco-box-client

Example project to send data to pulse.eco by http request
C
1
star
34

esp32-ckg-lvgl-demo

Demo to run LVGL on the Color Kit Grande
C
1
star