ESP8266, BMP280, MQTT Weather Station

Introduction: ESP8266, BMP280, MQTT Weather Station

This will guide you trough making a simple weather station with good accuracy.

Here we use a ESP8266 WIFI development board to connect the sensor to the internet to save the data. A lot of flavorous exist and will work and I will use the one I have at home: Homefixer ESP8266

There are many different sensors, but according to the BME280 delivers the best results out of common low-cost hygrometers. (Due to the seller sending me the wrong part, this guide will be using BMP280 but the steps are similar.

The sending of data will be trough MQTT.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Connection

First we need to connect the BMP280 to the ESP8266.

Connect it like this:

BME280	| ESP8266(NodeMCU) 
VCC	| 3.3V

Step 2: Install the Software

You can also follow this guide:

  1. Download ESPEasy:
  2. Unpack
  3. Run flash.cmd
  4. Answer the questions: Comport can be found in the Devicemanager, Flash Size depends on module: my module is 4096, Build: 120 or newer
  5. Wait
  6. Power off/on or reset the module
  7. Follow this guide to set up WiFi:

Step 3: Set Up BMP280

  1. Connect to the modules website as showed in the wifi setup
  2. Change i2c ports to SDA=GPIO0 and SCL= GPIO2 or as you connected it
  3. Add the BMP280 under devices, remember to set IDX to non-zero value

Step 4: Set Up MQTT

Under the config tab you can set the MQTT broker settings. I'm using openHAB protocol after recommendation from here:

Temperature will now be published under:


and Pressure:


I'm using node-red to display it as shown in the last picture.

Now the weather station is done hurray

Be the First to Share


    • Finish It Already Speed Challenge

      Finish It Already Speed Challenge
    • Arduino Contest 2020

      Arduino Contest 2020
    • First Time Author Contest

      First Time Author Contest


    DIY Hacks and How Tos

    Cool. It would be great to set up a whole network of these.