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

BME280 fails when oversampling == NONE #893

Closed
tomlut opened this issue Dec 2, 2019 · 1 comment
Closed

BME280 fails when oversampling == NONE #893

tomlut opened this issue Dec 2, 2019 · 1 comment

Comments

@tomlut
Copy link

tomlut commented Dec 2, 2019

Operating environment/Installation (Hass.io/Docker/pip/etc.):

Hassio NUC image v0.102.3
ESP (ESP32/ESP8266, Board/Sonoff):

platform: ESP8266
board: d1_mini

Affected component:

https://esphome.io/components/sensor/bme280.html

Description of problem:
When the oversampling option is set to NONE ESPhome fails to read the sensor. If oversampling is set to any one of 1X to 16X the sensor is read as expected.

Problem-relevant YAML-configuration entries:

# BAD CONFIG EXAMPLE:
sensor:
  - platform: bme280
    address: 0x77
    update_interval: 15s
    temperature:
      name: "Lounge BME Temperature"
      oversampling: NONE
    pressure:
      name: "Lounge BME Pressure"
      oversampling: NONE
    humidity:
      name: "Lounge BME Humidity"
      oversampling: NONE

# GOOD CONFIG EXAMPLE:
sensor:
  - platform: bme280
    address: 0x77
    update_interval: 15s
    temperature:
      name: "Lounge BME Temperature"
      oversampling: 1X
    pressure:
      name: "Lounge BME Pressure"
      oversampling: 1X
    humidity:
      name: "Lounge BME Humidity"
      oversampling: 1X

Logs (if applicable):

[18:37:17][I][i2c:040]: Found i2c device at address 0x77
[18:37:17][C][logger:175]: Logger:
[18:37:17][C][logger:176]:   Level: DEBUG
[18:37:17][C][logger:177]:   Log Baud Rate: 115200
[18:37:17][C][logger:178]:   Hardware UART: UART0
[18:37:17][C][status:034]: Status Binary Sensor 'Lounge Room DHT Status'
[18:37:17][C][status:034]:   Device Class: 'connectivity'
[18:37:17][C][dht:017]: DHT:
[18:37:17][C][dht:018]:   Pin: GPIO14 (Mode: INPUT)
[18:37:17][C][dht:024]:   Model: DHT22 (or equivalent)
[18:37:17][C][dht:027]:   Update Interval: 15.0s
[18:37:17][C][dht:029]:   Temperature 'Lounge Room Temperature'
[18:37:17][C][dht:029]:     Unit of Measurement: '°C'
[18:37:17][C][dht:029]:     Accuracy Decimals: 1
[18:37:17][C][dht:029]:     Icon: 'mdi:thermometer'
[18:37:17][C][dht:030]:   Humidity 'Lounge Room Humidity'
[18:37:17][C][dht:030]:     Unit of Measurement: '%'
[18:37:17][C][dht:030]:     Accuracy Decimals: 0
[18:37:17][C][dht:030]:     Icon: 'mdi:water-percent'
[18:37:17][C][bme280.sensor:142]: BME280:
[18:37:17][C][bme280.sensor:143]:   Address: 0x77
[18:37:17][C][bme280.sensor:155]:   IIR Filter: OFF
[18:37:17][C][bme280.sensor:156]:   Update Interval: 15.0s
[18:37:17][C][bme280.sensor:158]:   Temperature 'Lounge BME Temperature'
[18:37:17][C][bme280.sensor:158]:     Unit of Measurement: '°C'
[18:37:17][C][bme280.sensor:158]:     Accuracy Decimals: 1
[18:37:17][C][bme280.sensor:158]:     Icon: 'mdi:thermometer'
[18:37:17][C][bme280.sensor:159]:     Oversampling: None
[18:37:17][C][bme280.sensor:160]:   Pressure 'Lounge BME Pressure'
[18:37:17][C][bme280.sensor:160]:     Unit of Measurement: 'hPa'
[18:37:17][C][bme280.sensor:160]:     Accuracy Decimals: 1
[18:37:17][C][bme280.sensor:160]:     Icon: 'mdi:gauge'
[18:37:17][C][bme280.sensor:161]:     Oversampling: None
[18:37:17][C][bme280.sensor:162]:   Humidity 'Lounge BME Humidity'
[18:37:17][C][bme280.sensor:162]:     Unit of Measurement: '%'
[18:37:17](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[18:37:17](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[18:37:17][C][restart:021]: Restart Switch 'Lounge Room DHT Restart'
[18:37:17][C][restart:021]:   Icon: 'mdi:restart'
[18:37:17][C][ota:029]: Over-The-Air Updates:
[18:37:17][C][ota:030]:   Address: 10.1.1.75:8266
[18:37:17][C][ota:032]:   Using Password.
[18:37:17][C][api:095]: API Server:
[18:37:17][C][api:096]:   Address: 10.1.1.75:6053
[18:37:17][C][wifi_signal.sensor:009]: WiFi Signal 'Lounge Room DHT WiFi Signal'
[18:37:17][C][wifi_signal.sensor:009]:   Unit of Measurement: 'dB'
[18:37:17][C][wifi_signal.sensor:009]:   Accuracy Decimals: 0
[18:37:17][C][wifi_signal.sensor:009]:   Icon: 'mdi:wifi'
[18:37:18][D][dht:048]: Got Temperature=18.6°C Humidity=54.5%
[18:37:31][W][bme280.sensor:190]: Invalid temperature, cannot read pressure & humidity values.
[18:37:33][D][dht:048]: Got Temperature=18.5°C Humidity=55.3%
[18:37:40][D][api.connection:583]: Client 'ESPHome v1.14.3 (10.1.1.100)' connected successfully!
[18:37:46][W][bme280.sensor:190]: Invalid temperature, cannot read pressure & humidity values.
[18:37:48][D][dht:048]: Got Temperature=18.5°C Humidity=55.3%

Additional information and things you've tried:

@OttoWinter
Copy link
Member

Ah ok, re-read the datasheet and oversampling NONE means that the value is skipped (http://www.embeddedadventures.com/datasheets/BME280.pdf page 26). Oversampling 1X is equivalent of using one measurement.

@lock lock bot locked and limited conversation to collaborators Dec 11, 2019
gmasse pushed a commit to gmasse/esphome-docs that referenced this issue Jan 12, 2020
kbx81 pushed a commit to kbx81/esphome-docs that referenced this issue May 14, 2020
kbx81 pushed a commit to kbx81/esphome-docs that referenced this issue Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants