Wemos D1 Mini and BME280 Temperature, Humidity and Pressure Sensor - FengtianGu/Sonoff-Tasmota GitHub Wiki

BME280 Temperature, Humidity and Pressure Sensor (I2C)

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

Note: before the BME280 can be used with Tasmota, make sure it's enabled. To enable it, remove the forward slashes before this line before you compile and upload tasmota to your Wemos device.

#define USE_BMP   // Add I2C code for BMP085/BMP180/BMP280/BME280 sensor (+4k code)

Since 2018-10-29 v6.1.2.20 you can use multiple BMP Sensors (9d981d8)

Limit is 2 BMP 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:


Connecting the BME280 to a Wemos Mini D1

Wemos BME280
GND GND
3.3V VCC
D3 (gpio0) SDA
D4 (gpio2) SCL

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)

Also 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.

Tasmota Configuration

In the Configuration -> Configure Module page, select the following:

  1. Module Type : 18 Generic
  2. D3 GPIO0 : 06 I2C SDA
  3. D4 GPIO2 : 05 I2C SCL

Tasmota Main

After reboot of the device the displays temperature, humidity and pressure measured by the BME280.