Skip to content

BME280 temperature, humidity and pressure sensor~

This feature is included only in tasmota-sensors and tasmota32 binaries

When compiling your build add the following to user_config_override.h:

#ifndef USE_BMP
#define USE_BMP     // [I2cDriver10] Enable BMP085/BMP180/BMP280/BME280 sensors (I2C addresses 0x76 and 0x77) (+4k4 code)
#endif

BME280 sensor, an environmental sensor with temperature, barometric pressure and humidity" See BME280 Temperature, Humidity and Pressure Sensor for more information.

BME280 driver also supports BMP085, BMP180 and BMP280 pressure sensors.

Configuration~

Wiring~

BME280 ESP
GND GND
VCC 3.3V
SDA GPIOx
SCL GPIOy

Tasmota Settings~

In the Configuration -> Configure Module page assign:

  1. GPIOx to I2C SDA
  2. GPIOy to I2C SCL

Note

If you are using breakout boards which break out pins CSB please ensure that you connect this pin to VCC to ensure that the chip stays in I2C mode. This is due to some manufacturers of breakout boards add pull-up resistors to allow for SPI compatibility (some would default to SPI, others to I2C)_ Connect the SDO pin to GND or VCC to ensure required I2C address is used by the chip - Again some manufacturers add resistors to provide external bias but due to them wanting to retain SPI compatibility such pulldown resistors may not be sufficient to ensure that the pin levels are at the correct transition during power-up / reset state._ Since the chip supports both SPI and I2C, but in Tasmota only I2C is supported you want to make sure that the chip is in I2C mode during reset/power-on and remain in that state during operation otherwise unexpected behaviour may result when the Tasmota firmware polls the chip for sensor data.

Sonoff Basic wiring

After a reboot the driver will detect BME280 automatically and display temperature, humidity and pressure measured.

Sensor sends a tele/%topic%/SENSOR JSON response:

{
  "Time": "2019-11-03T19:34:28",
  "BME280": {
    "Temperature": 21.7,
    "Humidity": 66.6,
    "Pressure": 988.6
  },
  "PressureUnit": "hPa",
  "TempUnit": "C"
}

From v6.1.2.20 you can use multiple BMP Sensors (#4195)

Limit is 2 sensors and you have to change the address of one sensor.
Than connect your sensor SCL and SDA parallel to the device.

BME280 address change example:

Commands~

TempOffset can be used for calibrating the measured temperature. This setting affects all temperature sensors on the device.

Breakout boards~

Do NOT buy Breakout boards which supports 5V too. The onboard vreg will heat the PCB and you get false too high readings