Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BME/BMP280: Don't publish data if no sensor is present & hotplugging #2069

Open
chris-heo opened this issue Sep 28, 2024 · 0 comments
Open

Comments

@chris-heo
Copy link

chris-heo commented Sep 28, 2024

Is your feature request related to a problem? Please describe.
Currently, when no BME/BMP280 is attached, each report cycle temperatures/humidity/pressure being 0 are published to MQTT

Describe the solution you'd like
Only report, if data is actually available, init sensor when it's hot plugged and make the sensor address selectable via compiler flag

Describe alternatives you've considered
I implemented it but am not as used to clone chungus repos & post pull requests, so find a patch attached :)
BME280.diff.txt

Additional context
Compiler flag in environment.ini e.g. '-DBME280_ADDR=0x77' can be used
Limitation: if sensor are swapped in between reads (without an unsuccessful read), calibration data is not updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant