[SOLVED] Tasmota - I2C and OH2

I have a RPi 2B+ running OH 2.4.X
After many attempts, I finally got OH up and running. After a lot of searching, I got MQTT working and have added a relay to control a light. A major accomplishment for me.

The next project I’m working on is adding the BMP280 temp, humidity & pressure sensor to OH2
I am using the latest tasmota software installed on an ESP8266 board and have the sensor working using the I2C interface. I can see the readings on the device web page, 192.168.X.X, but I don’t know how to get the data to put into OH2. I have been searching the web to see if anyone shows how to do this. Lots of references to I2C and Tasmota but nothing I can put my finger on how-to.

Could anyone provide links, how-to’s or RTFM on how to get the data from the ESP so I can send it to OH2.

Here is a line of data from the Tasmota console from the sensor:

tele/BME280-1/SENSOR = {"Time":"2019-01-18T14:53:18","ANALOG":{"A0":146},"BME280":{"Temperature":75.5,"Humidity":36.1,"Pressure":995.7},"PressureUnit":"hPa","TempUnit":"F"}


What mqtt binding version are you using?

I have a few BMP280 sensors but I use EspEasy firmware not tasmota.

Here is my mqtt version 1.x config for the sensors.

Number Esp2_BMP_Temp "Esp8266 Temp [%.1f °F]" <temperature> (gTemp)
	{ mqtt="<[pibroker:/Esp2/BMP/Temp:state:default]" }

Number Esp2_BMP_Humid "Esp8266 Humid [%.1f %%]" <humidity> 
	{ mqtt="<[pibroker:/Esp2/BMP/Humid:state:default]" }	

Number Esp2_BMP_Pressure "Esp8266 Pressure [%.1f mbar]" <pressure> 

Create a Number channel in your MQTT thing
The state topic should be:

Then click SHOW MORE
and put this in the incoming value transformation:

You should also ensure that the JSONPATH transformation service is installed in the paperUI

1 Like

I started out using mqtt 1.X and I got everything working. I had my light switch and 3 sensors connected using ESPEasy but something happened after 3 weeks running that knocked out my router and my 8266 boards and my RPi. The router was just a factory reset then set up for my home but the 3 8266 boards had to be totally erased and the OP system reloaded. I had trouble getting ESPEasy to load properly so I switched over to Tasmota and it was up and working in minutes.

When I got OH2 up and working on the RPi, I just uploaded the new MQTT thinking everything would just work. After lots of searching, I finally found the right instructions to get the switch to work. Now I’m working on the sensors.
Thanks for the code! I’m sure it will point me in the right direction!!

Thank you Vincent. I did install the JSONPATH transformation as it was mentioned in one of the posts I was reading. I’ll give this a try and see what happens.


Anytime I swap firmware I use esptool to do a complete erase of the chip. The command is easy > esptool.py erase_flash

Something that might help with the new mqtt binding.

Thanks again Vincent. Followed your instructions and managed to get the Temperature, Humidity and Pressure displaying properly