BME280 relative humidity wrong?

Hello!
I’ve been using HA for a few months now and i slowly uncover all it’s posibillities, which are almost endless. For the moment i mostly use sonoff RE5V1 modules and BME280 sensors. But, i wonder…is it formula in web page “BME280 environment” really correct for relative air pressure? Namely, currently here is around zero degress (celsius) outside and i find out that relative pressure is correct if temperature is around zero, but increasingly wrong (too high) when outside temperature rises above zero - it shows more and more bigger pressure than the one published in my local official weather station.
I used to have tasmota FW on my sonoffs and pressure was always same as official. Recently i changed to ESPHome FW and this happens…
When i look at the formula, i wonder, is it correct that air temperature is included? Absolute pressure is already temperature compensated internally in sensor itself, so is it needed to include it again? Clearly tasmota was using a different calculation…?
Any suggestions, thoughts,… ?

I suggest you open a new issue with your findings that the pressure was correct when using Tasmota but is not correct when using ESPHome.

Thanks for suggestion, i might do that. I’m waiting for a couple of more sensors to arrive, then i will try one more thing, just to be certain: i’ll program another BME280 and place it inside the house, where temperature is constant. I’m interested to see values there and compare them.
In the meantime i just wondered if i’m only one with such “problem”…
But otherwise this HA stuff is really … big, so congrata to all who stanx behind the project. And ESPhome FW is in my opinion better for HA integration than Tasmota, that’s the reason why i changed.

I had a play with a couple of BME280s ages ago. I found that self heating was a real issue and gave up on them.

If you only want temp and humidity the SHT31 is the way to go. Very accurate.

Well, i need two options: one is temperature, humiditiy and pressure, other is temperature and humidity, in this case i can try SHT31, i guess. I choose BME’s because a few articles says that it’s most accurate among these cheap sensors.
I’m reading BME’s datasheet and nothing specifically is said regarding temperature compensation of pressure - i mean, it’s not clear either if it IS done inside sensor or not…
I just found and connected another BME sensor in my room and at 20 degrees it shows correct relative pressure (i mean the same as official web page). So, i guess that solution is to use inside sensor as relative air pressure information. Pressure is the same inside or outside anyway, right?
In fact, i really don’t know if air pressure is officially measured outside or inside ?

So, you use SHT31? Real one or chinese, from aliexpress, ebay…?

I use a BME280 inside and it’s been pretty consistently accurate relative to nearby weather station pressure readings, for 4 or 5 years now.
Note that there will be differences (obviously) when there’s “interesting” weather outside. Those nearby stations are still far enough away.
Mine is a DIY project so I do have complete control of initialization and reading the sensor. The BME280 datasheet was pretty straight forward (I2C protocol), including calibration.

Regarding the SHT31 and really any other humidity sensor outside: I’ve had less luck with these sensors. Currently I use an Si7021 and I mounted a small PCB 5V fan in the weather station housing near the sensor. This seems to prevent dew or frost from forming, which so far has at least doubled the normal lifetime for mine.
Note that I’m in the Pacific Northwest (US) on the super wet winter and super dry summer side of the Cascades, so it takes a beating – it’s often outside the 20% - 80% operating range.

image
These are within 0.2 degrees of each other connected to the same ESP8266. I have not seen any real problems with the BME myself.
I use Tasmota. Interesting you find ESPHome better as I found that to be garbage with WiFi problems etc that seemed unsolvable. Tasmota is equally as well integrated as ESPHome. I don’t understand why people have a thing about using an MQTT broker (which I have other uses for as well)

David,

  • from my point of view ESPHome is better in a couple of ways: first, it doesn’t need Mosquitto server, because it communicates directly with HA, while tasmota does it via server, so that’s another (needless) load on server if it’s there just for these sensors. That makes ESP slightly faster, too.
  • Problem with tasmotas was server restart, when my tasmotas weren’t always come back, so i had to write startup plugin with SO19 1 command in HA to re-initiate them.
  • ESP have way more possibilities. An example: Sonoff PowR2: on tasmota there’s no chance of connecting BME280, since it doesn’t offer pin configuration at all and if i change model (to generic…) i loose power measuring. On ESP BME280 goes quite well together with power measuring.
  • i’'ve had exactly the same problems with wifi as you, but with tasmotas: it seems that Tasmota has a history of problems with Asus routers which are “unsolvable” (i have three of them in my house), because you can find many articles on that subject, while nothing is done in this way. The answer is always “tasmota is known to have problems with asus”. ESP connects flawlessly and always. I’ve had to re-power tasmotas as many as ten times at occasions to connect…
    Bad side: ESP means more work, since all is manually programmed, but that also means more options. It’s absolutely vital to learn programming of these devices, but that’s also needed for HA, so it’s really not a big deal, since HA is all manually programmed as well (if you wan’t more than just basics, say, custom cards etc…).

Joel: a fan is a good idea, thanks, i might just do that, too. My winters are also quite “humid”, when weather is cloudy and in general “bad” there is 100% humiditiy for days. I bet that this situation shortens sensor’s life…

Do you guys use original sensors or cheap “chinese ones”? For now i only have chinese ones, but they seem to work … well, “pretty well”… :laughing:

I don’t see any disadvantages to using a broker… particularly when it actually works as opposed to ESP Home that won’t even connect to WiFi at all after an esp home update. Also as I said I am using MQTT to get data in from another system as well so I need the broker anyway…
I will agree there are way more options with ESP Home… if only it would connect to wifi…

Just cheap Chinese sensors here. I only use these with an illumination sensor as well with an esp8266 and they do all I need them to do. I did get an esp32 working with an LED screen but I used esphome for that (as per your point 3 above). I was using an esp8266 with it till I updgaded the esphome software and it wouldn’t connect anymore. Lucky I could try an esp32!!!

Well, broker or no-broker in any case wasn’t my decision point to switch from Tasmota to ESP, but, as i said, wifi problems, so i know exactly what kind of problems you’ve had… It’s interesting, though, that you’ve had exactly similar problems on ESP…

For now my HA is still pretty basic - i measure a few temperature’s, humidity, i open garage door, control alarm (mostly view status, not turning off). I must yet to see what else i can (will) include in HA automation…
ESP32 is not in my inventory yet. This is on my “still to come” list…

Regarding different sensor accuracy:

These tests are compared to the average of all SHT85 sensors (which previous tests with saturated salt solutions proved to be the most accurate). Unfortunately ESPHome does not support the SHT85.

More tests here if you are interested: https://wiki.liutyi.info/display/ARDUINO/Test+i2c+humidity+sensors

3 Likes

Interesting Tom. I’ve heard some people complaining about the Temp with the BME in fact I think that was my motivation in adding the AM one originally. Have not seen any significant issue here…

Yeah, look at the temperature scale on that graph, even the worst sensors are within 1°C.

It’s the humidity sensors that sort the wheat from the chaff. Even then, most of them are within +/- 5%, and the worst +/-10%.

Yep. 0.3 degrees right now. I’m not using it for anything important or to trigger any automations etc…

Just checked and humidity is within 3%

Heck I’ve been using DHT22’s without out issue for 3 years. I know which ones read slightly high (+0.5C, 5-10% RH) and compensate for it, but I will try the SHT31s when I get home in a few months.

I might get an SHT31 to have a play…

1 Like

You’re using Tasmota right?

If it supports the SHT85, go with that instead.

It’s weird you had wifi issues with ESPHome. I’ve not seen that. I did have awful trouble with v6.something of Tasmota which caused me to switch to ESPHome.

There was a horrible wifi issue with one of those Tasmota versions. The wifi issue with esphome - so many complaints about the same issue on Github… Already ordered some 31’s lol

SHT85 over $100 with postage!!! (EBay lol)

David, SHT85 sensors are in a range of 20 USD on aliexpress, as i see. But, comparing with BME280 they are still expensive.
Regarding accuray: in my case accuracy expectation is not exactly in my highest range. Since i’m using chinese sensors, too, i’m quite happy with a “pretty good approximate” value. So, temperature up to 1 degree false is still “ok” by me, while in humidity range i’m even more loose. I have an old house and humidity monitoring is a good idea to prevent mold. So, my “needed info” is if it’s 70%+ or under 50-60%, that’s all. I trigger dehumidifier with that info.

The reason i started this thread is more of curiosity than need of precision, since i wonder if i’m the onlyone with that “problem”. It’s interesting phenomenon that i didn’t have such temperature-dependant deviation on tasmota. When i get more sensors from china i will put tastmota on one of them again and do some testing with heating/cooling the sensor and observe pressure change. Then i’ll do the same with ESP. I like to monitor pressure. The reason is that i’m a motorist and i go with a bike to work when weather is good. Pressure curve history of last day/two is a pretty good indication to know if it’s gonna rain heavy or not today.
Regarding wifi problems: i’ve had them since tasmota version 8, when i started my HA project. I thought that v.9 will address it, but it didn’t.

But does anyone knows of any good airpressure sensor beside BME280? And does ESP accepts SHT85?

Hahaha We got a bit lost in the weeds eh?
I am finding little difference between BME sensors with pressure but luckily we don’t see many zero degree days here… Our local weather station doesn’t publish pressure. I have a desk weather station that seems to track pretty well with the BME though. 2 BME’s in different areas of the house are very similar pressures. I don’t know how accurate the desk one is but it agrees with the BME…
If you’re seeing a difference between Tasmota and esphome with the same sensor then I’d be looking if there is some kind of configuration option missing… pressure is highly correlated with height above sea level so maybe look there? Probably the trend is what you are looking at rather than absolutes though?