OpenMQTTGateway
OpenMQTTGateway copied to clipboard
BME/BMP280: Don't publish data if no sensor is present & hotplugging
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.