The BME280 is one of the sensors that I use in almost all of my projects. With this sensor one can not only measure the temperature. The air humidity and air pressure can also be measured with it.
The BME280 is the perfect sensor if you want to measure the climate data of a room (or the outside air) with little effort.
The BMP280 is almost identical to the BME280. This can be used to measure the temperature and air pressure.
Thanks to the appropriate plug-in, both the BME280 and the BMP280 can be configured as sensors in ESPEasy with just a few clicks. Everything you have to do is described in the following article.
- 1 Safety instructions
- 2 Affiliate links / advertising links
- 3 Requirements
- 4 Connect the BME280 / BMP280 to the ESP8266
- 5 Configuration of the BME280 / BMP280 in ESPEasy
- 6 Display the measured values of the BME280
- 7 Send sensor data via MQTT
- 8 Additional sensors for connection to the ESP8266 / ESP32
I know the following hints are always a bit annoying and seem unnecessary. But unfortunately, many people who knew it "better" from carelessness lost their eyes, fingers or other things or hurt themselves. In comparison, a loss of data is almost not worth mentioning, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Even the coolest project is worth no injury or other annoyance. https://www.nerdiy.de/en/sicherheitshinweise/
The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and shop via this link, Nerdiy.de receives a commission from the online shop or provider concerned. The price doesn't change for you. If you do your purchases via these links, you will support Nerdiy.de in being able to offer further useful projects in the future. 🙂
You can find additional tips on ESPEasy in the following articles.
- ESPEasy – Execute commands and actions via HTTP, MQTT, UDP and directly
- ESPEasy – Compile firmware, flash it and configure WiFi access data
- Category – ESPEasy
Connect the BME280 / BMP280 to the ESP8266
The BME280 is connected to the ESP8266 or Wemos D1 Mini via the I2C bus.
If the I2C bus is configured as standard, you can use the shown circuit diagram.
Configuration of the BME280 / BMP280 in ESPEasy
So that the BME280 can be configured in ESPEasy, the ESPEasy firmware should already be installed on the ESP8266 and accessible. You can find information about this in the article ESPEasy – Compiling, flashing and configuring WLAN access data.
First open the configuration website of your ESP8266 programmed with ESPEasy by entering its IP address in your web browser. Information on how to find out the IP address is also summarized in the article Displaying / Finding out the IP address of the devices in the network.
As soon as you have opened the configuration website, you have to switch to the “Devices” tab. To do this, click on the “Devices” button.
In the “Devices” tab you now have to click the “Add” button in one of the empty lines.
You will then be automatically redirected to the view shown and can select here which device you want to create.
Select the entry “Environment – BMx280”.
This will redirect you to an overview page.
Here you can make all settings regarding the BME280 or BMP280.
It is important that you configure the correct “I2C Address”. In most cases the default address should work. To do this, select the value “0x76 (118) – (default)”.
You can use the “Altitude” and “Temperature offset” options to calibrate the temperature and altitude measurements.
At “Altitude” you should enter the height (measured from sea level) of the sensor location.
If the measured temperature value should deviate from the actual one, you can enter the deviation under “Temperature offset” and compensate it.
As soon as the sensor has been configured, you can save this by clicking on “Submit”.
Display the measured values of the BME280
After you have configured the BME280 you can test it directly.
To do this, click again on the “Devices” tab.
In the overview of the configured devices, the measured values can be seen in the row of the BME280 on the right-hand side.
These are updated every 60 seconds at the latest. This interval can be set in the configuration of the BME280 in the “Interval” section.
Send sensor data via MQTT
You can now also send the collected sensor data to your SmartHome via MQTT and process it there if necessary. What you have to configure is described in the following article.
Additional sensors for connection to the ESP8266 / ESP32
You can find an overview of other articles for connecting sensors and actuators to ESPEasy in the following category.
I hope everything worked as described. If not or you have any other questions or suggestions, please let me know in the comments. Also, ideas for new projects are always welcome. 🙂
P.S. Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you appreciate it that I share these information with you, I would be happy about a small donation to the coffee box. 🙂