geerlingguy / airgradient-prometheus

AirGradient Prometheus exporter.
MIT License
174 stars 59 forks source link

[Improvement Suggestion] replace SHT31 with BME280 #18

Closed Thelvaen closed 2 years ago

Thelvaen commented 2 years ago

I've tinkered a bit with the code to replace the SHT30/SHT31 with a BME280 (I prefer those sensors as they are a bit more reliable, and also because they provide atmospheric pressure data along with the Temperature/Humidity).

BME280 can work on I²C bus, hence it's almost a drop in replacement for the SHT30/SHT31 in terms of wiring, but as the board is a bit bigger, an external enclosure will be needed for said sensor (it's almost perfect as it also brings the temperature sensor away from the PM2.5/CO² sensor that do generate a couple of °C of heat, making the temp reading false.

My code is available at https://github.com/Thelvaen/airgradient-prometheus/tree/BME280 for those interested in :)

stale[bot] commented 2 years ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] commented 2 years ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

henkiejan1 commented 2 years ago

I've tinkered a bit with the code to replace the SHT30/SHT31 with a BME280 (I prefer those sensors as they are a bit more reliable, and also because they provide atmospheric pressure data along with the Temperature/Humidity).

BME280 can work on I²C bus, hence it's almost a drop in replacement for the SHT30/SHT31 in terms of wiring, but as the board is a bit bigger, an external enclosure will be needed for said sensor (it's almost perfect as it also brings the temperature sensor away from the PM2.5/CO² sensor that do generate a couple of °C of heat, making the temp reading false.

My code is available at https://github.com/Thelvaen/airgradient-prometheus/tree/BME280 for those interested in :)

I tried your code and works almost with a BME280. But the temperature didn´t show up. It says: NaNC. any ideas what goes wrong?