And we're alive!
That was quite straightforward, I found a MicroPython library for the BME280 (https://github.com/robert-hh/BME280) and updated my sensor code (https://github.com/VirtualWolf/esp32-sensor-reader-mqtt) so it can use either the DHT22 or the BME280. And as a fun additional point, the BME280 library also calculates the dew point based on the current temperature and relative humidity!
I don't have it running "in production" yet, I've just got it hooked up to a spare ESP32 and it's sending its data to an MQTT broker running on our Mac mini so I can keep an eye on it for a while, but it's very interesting comparing the values between the two sensors... right now the DHT22 says it's 20.2˚C and 94% humidity outside, the BME280 says 19.9˚C but only 71% humidity. I also want to get a better enclosure for the whole setup as well, I'll think I'll ask a friend who has a 3D printer to print me out one of the multitude of Stevenson screens that seem to be out there.
Tonight I did a bit of soldering for the first time in a while!
My shiny new BME280 temperature sensors have this very handy relatively standard four-pin connector on them for use with I2C, but ESP32 boards I'm using (the HUZZAH32 from Adafruit) don't have it and only have standard bare headers. So I took one of the cables with the new connector on both ends, chopped it in half, chopped four of the separate female "DuPont" connectors I already had in half as well, and soldered them together, and bam, easy connection!
I did a bunch more hacking on my ESP32 sensor reader code today, deployed the new BME280 into "production" outside, and got my Grafana dashboards updated! And I was able to do it completely successfully without needing to actually plug the ESP32s into my computer to update anything, the remote-updating code worked a treat.
The new sensor is remarkably close to what the Bureau of Meteorology is reporting: the sensor says it's 17.5˚C, 95% humidity, dew point of 16.6˚C and atmospheric pressure of 1017hPa, versus the BoM that says the temperature is 17.8˚C, 94% humidity, dew point of 16.8˚C, and atmospheric pressure of 1019hPa.