Hi, has anyone got any ideas on how I can overcome sporadic high or low readings in temperature output.
Im using ESPhome with a BME680.
At first I was getting these spikes in readings every day until I added a couple of 4k7ohm pullup resistors one on the sda and another on the scl lines, I thought that had stopped it, but after testing for longer it had only reduced the frequency from every day to around once or twice a week.
My code is:
esphome:
name: thermostat-lounge
platform: ESP32
board: esp32doit-devkit-v1
wifi:
ssid: "ssid"
password: "password"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
i2c:
sda: 21
scl: 22
# Individual sensors
sensor:
- platform: bme680
temperature:
name: "L Temperature"
id: l_temperature
pressure:
name: "L Pressure"
id: l_pressure
humidity:
name: "L Humidity"
id: l_humidity
gas_resistance:
name: "L Gas Resistance"
id: l_gas
It seems that these spikes hit the same point each time i.e. if its a positive spike it will go to around 200°C until the next reading, if its negative it will go to around -50°C until the next reading when it will return to normal.
The other readings are effected too but at present I’m only monitoring the temperature.
I have swopped over the BME680 but that didn’t help so feel the only way to go now is with some sort of ‘if then’ statement, something like if reading is higher or lower than a set amount than false an update? Not sure if that can be done in ESPhome.
Open to suggestions.