Dear community,
I have build a little sensor with ESPHome and a ESP32 board.
The ESP32 pulls data via Bluetooth from an old Airthings Wave Plus Sensor, it has its own BME680 and there are some calculations in the yaml.
The sensor is constantly running on +80°C.
I have another ESP32 doing the same thing - not having a BME680 connected to it. This one is running at <45°C.
Is there something in my code causing the high temperature in my first ESP32?
# sources:
# https://esphome.io/components/sensor/airthings_ble
# https://esphome.io/components/sensor/bme68x_bsec2.html
# Variablen
substitutions:
device_name: "esphome-wohnzimmer2"
friendly_name: "Wohnzimmer2"
node_name: "esphome_wohnzimmer2"
device_description: "Sensor liest den Airthings Wave Plus Sensor im Keller via Bluetooth aus und liefert Daten über den BME680"
# ESPHome Core Configuration
esphome:
name: '${device_name}'
friendly_name: '${friendly_name}'
comment: '${device_description}'
esp32:
board: esp32dev
framework:
type: esp-idf
# Enable logging
logger:
level: DEBUG
# Airthings Wave Plus finden
esp32_ble_tracker:
# airthings_ble:
# Enable Home Assistant API
api:
encryption:
key: "jUtVnnbFyUy/m0="
ota:
- platform: esphome
password: "e760e7e15d1c"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
min_auth_mode: WPA2
manual_ip:
# Set this to the IP of the ESP
static_ip: 192.168.30.26
# Set this to the IP address of the router. Often ends with .1
gateway: 192.168.30.1
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.255.0
dns1: 192.168.0.5
dns2: 192.168.30.1
use_address: ${device_name}.internal
domain: .internal
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: '${device_name}'
password: !secret ap_password
ap_timeout: 5min # AP schaltet sich nach 5 Minuten ab
captive_portal:
# Zeit von HomeAssistant abfragen -> für Last Boot nötig
time:
- platform: homeassistant
id: homeassistant_time
on_time_sync:
then:
- lambda: |-
auto now = id(homeassistant_time).now();
auto uptime = (int) id(${node_name}_uptime_seconds).state;
ESP_LOGD("last_boot", "Zeit synchronisiert. Aktuelle Zeit: %d, Uptime: %d", now.timestamp, uptime);
if (!now.is_valid()) {
ESP_LOGE("last_boot", "Fehler: Zeit ist ungültig.");
return;
}
if (uptime <= 0) {
ESP_LOGW("last_boot", "Warnung: Uptime ist noch 0 Sekunden.");
return;
}
id(${node_name}_last_boot_time).publish_state(now.timestamp - uptime);
ESP_LOGI("last_boot", "Last Boot wurde erfolgreich gesetzt.");
switch:
- platform: restart
name: "ESPHome '${friendly_name}' neu starten"
# Airthings Wave Plus einbinden
ble_client:
- mac_address: A4:DA:32:B9:5A:A5
id: awp_Keller
# i2c-config für BME680-Sensor
i2c:
sda: GPIO21
scl: GPIO22
scan: false
id: bus_a
# external_components:
# - source: github://pr#7728
# components: [ bme68x_bsec2 ]
bme68x_bsec2_i2c:
address: 0x77
model: bme680
operating_age: 28d
sample_rate: ULP
supply_voltage: 3.3V
temperature_offset: 1.1 # dieser Wert wird abgezogen
state_save_interval: 6h
sensor:
# Airthings Wave Plus Keller
- platform: airthings_wave_plus
ble_client_id: awp_Keller
update_interval: 5min # default
battery_update_interval: 24h # default
temperature:
name: "Keller Temperatur"
id: awp_Keller_temp
accuracy_decimals: 1
radon:
name: "Keller Radon"
id: awp_Keller_Radon
radon_long_term:
name: "Keller Radon Long Term"
id: awp_Keller_Radon_long
pressure:
name: "Keller Luftdruck"
id: awp_Keller_pressure
humidity:
name: "Keller Feuchtigkeit"
id: awp_Keller_humidity
co2:
name: "Keller CO2"
id: awp_Keller_co2
tvoc:
name: "Keller VOC"
id: awp_Keller_voc
illuminance:
name: "Keller ambient light"
id: awp_Keller_light
battery_voltage:
name: "Keller Batterie Spannung"
id: awp_Keller_volt
# Airthings Wave Plus Keller: Batterieanzeige in %
- platform: copy
source_id: awp_Keller_volt
name: 'Keller Battery Level'
id: awp_Keller_battery
unit_of_measurement: "%"
device_class: battery
accuracy_decimals: 0
filters:
- calibrate_linear:
- 2.2 -> 0
- 3.1 -> 100
# Airthings Wave Plus Keller: Taupunkt berechnen
- platform: template
name: "Keller Taupunkt"
lambda: |-
return (243.5*(log(id(awp_Keller_humidity).state/100)+((17.67*id(awp_Keller_temp).state)/
(243.5+id(awp_Keller_temp).state)))/(17.67-log(id(awp_Keller_humidity).state/100)-
((17.67*id(awp_Keller_temp).state)/(243.5+id(awp_Keller_temp).state))));
device_class: temperature
state_class: measurement
unit_of_measurement: °C
update_interval: 5min
icon: 'mdi:thermometer-water'
# Konfiguration für BME680 Sensor
- platform: bme68x_bsec2
temperature:
name: "BME680 Temperature"
id: bme680_temp
# filters:
# - offset: -0.9
pressure:
name: "BME680 Pressure"
accuracy_decimals: 0
humidity:
name: "BME680 Humidity"
id: bme680_humidity
accuracy_decimals: 0
filters:
- offset: -5
iaq:
name: "BME680 IAQ"
id: iaq
co2_equivalent:
name: "BME680 CO2 Equivalent"
accuracy_decimals: 0
breath_voc_equivalent:
name: "BME680 Breath VOC Equivalent original"
id: voc_source
internal: false
- platform: template
name: "BME680 Breath VOC Equivalent"
id: BME680_voc_calc
lambda: |-
return ( (id(voc_source).state) * 1000) ;
device_class: volatile_organic_compounds_parts
state_class: measurement
unit_of_measurement: ppb
accuracy_decimals: 0
update_interval: 5min
icon: 'mdi:molecule'
# BME680 Wohnzimmer: Taupunkt berechnen
- platform: template
name: "BME680 Taupunkt"
lambda: |-
return (243.5*(log(id(bme680_humidity).state/100)+((17.67*id(bme680_temp).state)/
(243.5+id(bme680_temp).state)))/(17.67-log(id(bme680_humidity).state/100)-
((17.67*id(bme680_temp).state)/(243.5+id(bme680_temp).state))));
device_class: temperature
state_class: measurement
unit_of_measurement: °C
update_interval: 5min
icon: 'mdi:thermometer-water'
# Last Boot Sensor definieren (Berechnung findet einmalig beim Boot statt)
- platform: uptime
id: ${node_name}_uptime_seconds
name: "Uptime Sekunden"
internal: true
- platform: template
name: "Last Boot"
id: ${node_name}_last_boot_time
device_class: timestamp
entity_category: diagnostic
accuracy_decimals: 0
update_interval: never # Kein regelmäßiges Update nötig
- platform: internal_temperature
name: "interne Temperatur"
text_sensor:
- platform: bme68x_bsec2
iaq_accuracy:
name: "BME680 IAQ Accuracy"
# Air Quality-Angaben
- platform: template
name: "BME680 IAQ Classification"
update_interval: 5min
lambda: |-
if ( int(id(iaq).state) <= 50) {
return {"extrem gut"};
}
else if (int(id(iaq).state) >= 51 && int(id(iaq).state) <= 100) {
return {"sehr gut"};
}
else if (int(id(iaq).state) >= 101 && int(id(iaq).state) <= 150) {
return {"gut"};
}
else if (int(id(iaq).state) >= 151 && int(id(iaq).state) <= 200) {
return {"mittelmässig"};
}
else if (int(id(iaq).state) >= 201 && int(id(iaq).state) <= 250) {
return {"schlecht"};
}
else if (int(id(iaq).state) >= 251 && int(id(iaq).state) <= 350) {
return {"sehr schlecht"};
}
else if (int(id(iaq).state) >= 351) {
return {"extrem schlecht"};
}
else {
return {"Fehler"};
}
# Send IP Address of ESP-device
- platform: wifi_info
ip_address:
name: IP Address
Any help is very much appreciated!

