Open JamiePhonic opened 3 years ago
Update: I can confirm this exact same yaml config runs without issues on the ESP-Wroom-32 (Just updating the platform and board)
I also have similar problems on nodemcu v3 On ESP-Wroom-32 it runs ok.
I can confirm this bug, here is my configure:
esphome:
name: $device_name
platform: ESP8266
board: $board_model
build_path: build/$device_name
# esp8266_restore_from_flash: yes
substitutions:
board_model: nodemcuv2
device_name: helloworld
wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password
wifi_fast_connect: "true"
wifi_reboot_timeout: 600s
ota_password: !secret ota_password
api_reboot_timeout: 600s
wifi:
ssid: $wifi_ssid
password: $wifi_password
# manual_ip:
# static_ip: 192.168.178.230
# gateway: 192.168.178.1
# subnet: 255.255.255.0
# dns1: 1.1.1.1
# dns2: 1.2.2.1
#----------------------------------------------------
domain: .local
reboot_timeout: $wifi_reboot_timeout
power_save_mode: none
fast_connect: $wifi_fast_connect
ap:
ssid: $device_name
password: $wifi_password
ap_timeout: 30s
captive_portal:
#--------------------------------------------
web_server:
port: 80
css_url: https://esphome.io/_static/webserver-v1.min.css
js_url: https://esphome.io/_static/webserver-v1.min.js
#----------------------------------------------------
# Enable logging
logger:
# hardware_uart: UART0
level: DEBUG
baud_rate: 115200
status_led:
pin:
number: GPIO2
inverted: True
api:
password: $ota_password
ota:
password: $ota_password
spi:
clk_pin: D5
mosi_pin: D6
# miso_pin: D6
display:
- platform: st7735
cs_pin: D8
dc_pin: D7
reset_pin: D3
model: "INITR_18BLACKTAB"
device_width: 128
device_height: 160
col_start: 0
row_start: 0
eight_bit_color: true
lambda: |-
it.fill(Color::BLACK);
it.rectangle(0, 0, it.get_width()/2, it.get_height()/2, id(my_red));
color:
- id: my_red
red: 100%
green: 3%
blue: 5%
Same behaviour with ESP8266 nodemcu which does not connect if an amg8833 sensor is connected of a VL53L0X or any other sensor using SDA SCL pins. The same code works if the hardware is not connected. The example config for every hardware (without ESPHome that is) work just fine to the same wifi setup.
Just duplicated this same issue. Using a Wemos D1 Mini and once I add the config for the ST7735, I start seeing wifi connection timeouts.
I believe I have the same (or exceptionally similar) issue.
In my case I am trying to connect a 20x4 LCD display using ESPHome. I have tried both an ESP8266 D1 Mini and an ESP8266 NodeMCU. I intend to connect the display is connected through a PCF8474 module.
My YAML file is as follows (set up for the NodeMCU test case)
esphome:
name: sprinkler
platform: ESP8266
# board: d1_mini
board: nodemcuv2
substitutions:
devicename: sprinkler
friendly_name: sprinkler
wifi:
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "AP_${devicename}"
# Enable the captive portal for inital WiFi setup
captive_portal:
# Enable logging
logger:
level: VERY_VERBOSE
# level: VERBOSE
# Enable Home Assistant API
api:
# Enable OTA upgrade
ota:
password: !secret ESPHome_OTA_password
time:
- platform: homeassistant
id: homeassistant_time
binary_sensor:
- platform: status
name: "${friendly_name} Status"
i2c:
sda: D2
scl: D1
display:
- platform: lcd_pcf8574
dimensions: 20x4
address: 0x27
lambda: |-
it.strftime(2,0, "%H:%M:%S", id(homeassistant_time).now());
I have the exact same problem,
It looks like screens / I2C devices mess up with the WiFi connexion.
Some logs ;
[23:41:52][W][wifi:572]: Restarting WiFi adapter... [23:41:53][I][wifi:248]: WiFi Connecting to 'mine'... [23:41:55][W][wifi_esp8266:482]: Event: Disconnected ssid='mine' bssid=MAC reason='Auth Expired' [23:41:55][W][wifi:536]: Error while connecting to network. [23:41:55][W][wifi:572]: Restarting WiFi adapter... [23:42:00][D][wifi:373]: Starting scan... [23:42:07][D][wifi:388]: Found networks: [23:42:07][I][wifi:431]: - ... WiFi networks list [23:42:07][I][wifi:248]: WiFi Connecting to 'mine'... [23:42:09][W][wifi_esp8266:482]: Event: Disconnected ssid='mine' bssid=MAC reason='Auth Expired' [23:42:09][W][wifi:536]: Error while connecting to network. [23:42:09][W][wifi:572]: Restarting WiFi adapter... [23:42:10][I][wifi:248]: WiFi Connecting to 'mine'...
Board ; ESP8266 (Nodemcu) Configuration ; the one in this cookbook, exactly the same (delta fonts used and sensors names) : https://esphome.io/cookbook/display_time_temp_oled.html
I have other similar boards with and without using I2C, they are running fine. The most complex of them exploit I2C to use an Arduino Nano as a GPIO expander, so I guess the underlying problem is in I2C + OLED / TFT.
Try changing your display's update_interval
.
Setting this to 2s enabled my device to connect to my WiFi.
Try increasing the i2c frequency. That has been a common solution.
Same issue for me -- Wemos D1 with a 4x20 display via lcd_pcf8574
gives the auth error on WiFi.
Can confirm that increasing the i2c bus speed from the default 50kHz ixes the issue:
i2c:
sda: GPIO4
scl: GPIO5
frequency: 100kHz
Seeing something similar in #5890 Tried increasing i2c frequency and display's update_interval but did not solve the issue
Operating environment/Installation (Hass.io/Docker/pip/etc.):
Hass.io 2021.6.4 ESP8266 (NodeMCU v3 & Wemos B1 Mini)
Lolin NodeMCU v3
Chip Info:
ESPHome V1.19.4 (Stable)
Affected component:
ST7735: https://www.esphome.io/components/display/st7735.html
Description of problem: I cant quite figure out why, but when using (essentially) the same YAML config with the ST7735 display and with a PCF8574, the code will comple just fine on both, and will run on the ESP8266, however the one using the ST7735 will constantly fail to connect to Wi-Fi with:
reason='Auth Expired'
The Lambda code isnt exactly "pretty" but it does work just fine with the PCF8574. (i've added comments to explain what it's doing) It "runs" with the ST7735 (the time and date will show on the TFT and update as expected) but the device will never connect to Wi-Fi
Problem-relevant YAML-configuration entries:
Logs (if applicable):
Additional information and things you've tried: Changing wifi details to connect to other AP's (Mobile hostspot) without success.