esphome / esphome/issues

BME680 via BSEC on ESP8266 when Text sensor used, no Wifi

Open
#4,655 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
313
Forks
40
PR merge metrics
No merged PRs in 30d

Description

### The problem

Ok, the title is kinda bad, but there are so many different points needed.

Everything works, but as soon as I add ONE of the text_sensors below, the esp fails to connect to the wifi, with different reasons, listed in the log below. The wifi-textsensor works without problems. It also works, if the text_sensor doesn't have any children.

### Which version of ESPHome has the issue?

2023.6.4

### What type of installation are you using?

Home Assistant Add-on

### Which version of Home Assistant has the issue?

2023.6.3

### What platform are you using?

ESP8266

### Board

(Fake?) NodeMCU

### Component causing the issue

bme680_bsec, text_sensor

### Example YAML snippet

```yaml
esphome:
name: luftsensor
friendly_name: Luftsensor

esp8266:
board: nodemcu

# Enable logging
logger:

# Enable Home Assistant API
api:
encryption:
key: "lKBy2llot9bW0u7PF0uQndLRltd6DR2cPznfXIndhY8="

ota:
password: "99e1209d7535inc34c73ed98b49fa504"

wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
fast_connect: True

# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Luftsensor Fallback Hotspot"
password: "ZE3OXwggZhNi"

captive_portal:

i2c:
sda: D6
scl: D7
id: i2c_bus

bme680_bsec:
address: 0x77
i2c_id: i2c_bus
sample_rate: ULP

sensor:
- platform: bme680_bsec
temperature:
name: "Temperatur"

pressure:
name: "Luftdruck"
humidity:
name: "Feuchtigkeit"
iaq:
name: "BME680 IAQ"
id: iaq
co2_equivalent:
name: "BME680 CO2 Equivalent"
breath_voc_equivalent:
name: "BME680 Breath VOC Equivalent"

text_sensor:
# If one or both of the following is activated, it won't connect to wifi
- platform: bme680_bsec
iaq_accuracy:
name: "BME680 IAQ Accuracy"

- platform: template
name: "BME680 IAQ Classification"
icon: "mdi:checkbox-marked-circle-outline"
lambda: |-
if ( int(id(iaq).state) <= 50) {
return {"Excellent"};
}
else if (int(id(iaq).state) >= 51 && int(id(iaq).state) <= 100) {
return {"Good"};
}
else if (int(id(iaq).state) >= 101 && int(id(iaq).state) <= 150) {
return {"Lightly polluted"};
}
else if (int(id(iaq).state) >= 151 && int(id(iaq).state) <= 200) {
return {"Moderately polluted"};
}
else if (int(id(iaq).state) >= 201 && int(id(iaq).state) <= 250) {
return {"Heavily polluted"};
}
else if (int(id(iaq).state) >= 251 && int(id(iaq).state) <= 350) {
return {"Severely polluted"};
}
else if (int(id(iaq).state) >= 351) {
return {"Extremely polluted"};
}
else {
return {"error"};
}
## But if only this is in, it works flawlessly.
- platform: wifi_info
ip_address:
name: ESP IP Address
ssid:
name: ESP Connected SSID
bssid:
name: ESP Connected BSSID
mac_address:
name: ESP Mac Wifi Address
scan_results:
name: ESP Latest Scan Results
dns_address:
name: ESP DNS Address
```

### Anything in the logs that might be useful for us?

```txt
[W][wifi_esp8266:479]: Event: Disconnected ssid='WIFI_SSID' reason='Probe Request Unsuccessful'
[W][wifi:588]: Error while connecting to network.
[W][wifi:624]: Restarting WiFi adapter...
[I][wifi:274]: WiFi Connecting to 'NotSoSmart'...
[W][wifi_esp8266:482]: Event: Disconnected ssid='WIFI_SSID' bssid=BSSID reason='Association Expired'
[W][wifi:588]: Error while connecting to network.
[W][wifi:624]: Restarting WiFi adapter...
[I][wifi:274]: WiFi Connecting to 'NotSoSmart'...
[W][wifi_esp8266:482]: Event: Disconnected ssid='WIFI_SSID' bssid=BSSIDreason='Association Expired'
[W][wifi:588]: Error while connecting to network.
```

### Additional information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.