Hello @alI,
I have a problem with updating over the air. Everything works well and there are no errors, but the configuration of the ESP32 has not changed after updating.
Steps:
- I edit the sensor configuration:
Example for my home-manager:
esphome:
name: home-manager
platform: ESP32
board: esp32doit-devkit-v1
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "605536c6230043de38d83d82f0eb2467"
wifi:
ssid: "asdf"
password: "1234567890"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Home-Manager Fallback Hotspot"
password: "GxSBcv0amqbl"
captive_portal:
binary_sensor:
# Schalter BĂźro
- platform: gpio
pin:
number: 17
mode:
input: true
pullup: true
inverted: true
name: "Schalter BĂźro 1"
device_class: plug
filters:
- delayed_on_off: 20ms
on_press:
then:
- switch.toggle: buero_licht
- platform: gpio
pin:
number: 18
mode:
input: true
pullup: true
inverted: true
name: "Schalter BĂźro 2"
device_class: plug
filters:
- delayed_on_off: 20ms
on_press:
then:
- switch.toggle: buero_licht
# Switches aka relais
switch:
- platform: gpio
pin:
number: 12
inverted: true
mode:
output: true
open_drain: true
name: "Licht BĂźro"
restore_mode: RESTORE_DEFAULT_ON
id: buero_licht
- I click on validate and everything is okay:
INFO Reading configuration /config/esphome/home-manager.yaml...
WARNING GPIO12 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Configuration is valid!
esphome:
name: home-manager
build_path: .esphome/build/home-manager
platformio_options: {}
includes: []
libraries: []
name_add_mac_suffix: false
esp32:
board: esp32doit-devkit-v1
framework:
version: 1.0.6
source: ~3.10006.0
platform_version: platformio/espressif32 @ 3.3.2
type: arduino
variant: ESP32
logger:
baud_rate: 115200
tx_buffer_size: 512
deassert_rts_dtr: false
hardware_uart: UART0
level: DEBUG
logs: {}
api:
port: 6053
password: ''
reboot_timeout: 15min
ota:
password: 605536c6230043de38d83d82f0eb2467
safe_mode: true
port: 3232
reboot_timeout: 5min
num_attempts: 10
wifi:
ap:
ssid: Home-Manager Fallback Hotspot
password: GxSBcv0amqbl
ap_timeout: 1min
domain: .local
reboot_timeout: 15min
power_save_mode: LIGHT
fast_connect: false
networks:
- ssid: asdf
password: '1234567890'
priority: 0.0
use_address: home-manager.local
captive_portal: {}
binary_sensor:
- platform: gpio
pin:
number: 17
mode:
input: true
pullup: true
output: false
open_drain: false
pulldown: false
inverted: true
name: Schalter BĂźro 1
device_class: plug
filters:
- delayed_on_off: 20ms
on_press:
- then:
- switch.toggle:
id: buero_licht
disabled_by_default: false
- platform: gpio
pin:
number: 18
mode:
input: true
pullup: true
output: false
open_drain: false
pulldown: false
inverted: true
name: Schalter BĂźro 2
device_class: plug
filters:
- delayed_on_off: 20ms
on_press:
- then:
- switch.toggle:
id: buero_licht
disabled_by_default: false
switch:
- platform: gpio
pin:
number: 12
inverted: true
mode:
output: true
open_drain: true
input: false
pullup: false
pulldown: false
name: Licht BĂźro
restore_mode: RESTORE_DEFAULT_ON
id: buero_licht
disabled_by_default: false
interlock_wait_time: 0ms
- I choose install and flash over the air and everything works well, but as you can see in the log here, there are many other switches and binary sensors, that I deleted before. I deleted them to test if anything changes. It is the same for the whole configuration. I tried also changing GPIO pins etc, but changes have no effect.
INFO Reading configuration /config/esphome/home-manager.yaml...
WARNING GPIO12 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app...
Processing home-manager (board: esp32doit-devkit-v1; framework: arduino; platform: platformio/espressif32 @ 3.3.2)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- <AsyncTCP-esphome> 1.2.2
|-- <WiFi> 1.0
|-- <FS> 1.0
|-- <Update> 1.0
|-- <ESPAsyncWebServer-esphome> 2.1.0
| |-- <AsyncTCP-esphome> 1.2.2
|-- <DNSServer> 1.1.0
|-- <ESPmDNS> 1.0
RAM: [= ] 12.7% (used 41748 bytes from 327680 bytes)
Flash: [===== ] 49.3% (used 905442 bytes from 1835008 bytes)
========================= [SUCCESS] Took 5.37 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of home-manager.local
INFO -> 192.168.188.37
INFO Uploading /data/home-manager/.pioenvs/home-manager/firmware.bin (905552 bytes)
Uploading: [============================================================] 100% Done...
INFO Waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from home-manager.local using esphome API
WARNING Can't connect to ESPHome API for home-manager.local: Error resolving IP address: [Errno -2] Name or service not known
INFO Trying to reconnect to home-manager.local in the background
INFO Successfully connected to home-manager.local
[11:17:33][I][app:099]: ESPHome version 2021.11.4 compiled on Jan 28 2022, 15:29:35
[11:17:33][C][wifi:488]: WiFi:
[11:17:33][C][wifi:350]: Local MAC: 94:B9:7E:D4:F7:9C
[11:17:33][C][wifi:351]: SSID: [redacted]
[11:17:33][C][wifi:352]: IP Address: 192.168.188.37
[11:17:33][C][wifi:354]: BSSID: [redacted]
[11:17:33][C][wifi:355]: Hostname: 'home-manager'
[11:17:33][C][wifi:357]: Signal strength: -36 dB ââââ
[11:17:33][C][wifi:361]: Channel: 6
[11:17:33][C][wifi:362]: Subnet: 255.255.255.0
[11:17:33][C][wifi:363]: Gateway: 192.168.188.1
[11:17:33][C][wifi:364]: DNS1: 192.168.188.1
[11:17:33][C][wifi:365]: DNS2: 0.0.0.0
[11:17:33][C][logger:233]: Logger:
[11:17:33][C][logger:234]: Level: DEBUG
[11:17:33][C][logger:235]: Log Baud Rate: 115200
[11:17:33][C][logger:236]: Hardware UART: UART0
[11:17:33][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Schalter KĂźche Eingang 1'
[11:17:33][C][gpio.binary_sensor:015]: Device Class: 'plug'
[11:17:33][C][gpio.binary_sensor:016]: Pin: GPIO13
[11:17:33][D][api:098]: Accepted 192.168.188.85
[11:17:33][D][api.connection:747]: Home Assistant 2021.12.10 (192.168.188.85): Connected successfully
[11:17:33][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Schalter KĂźche Eingang 2'
[11:17:33][C][gpio.binary_sensor:015]: Device Class: 'plug'
[11:17:33][C][gpio.binary_sensor:016]: Pin: GPIO14
[11:17:33][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Schalter KĂźche Ecke WZ 1'
[11:17:33][C][gpio.binary_sensor:015]: Device Class: 'plug'
[11:17:33][C][gpio.binary_sensor:016]: Pin: GPIO15
[11:17:33][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Schalter KĂźche Ecke WZ 2'
[11:17:33][C][gpio.binary_sensor:015]: Device Class: 'plug'
[11:17:33][C][gpio.binary_sensor:016]: Pin: GPIO16
[11:17:33][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Schalter BĂźro 1'
[11:17:33][C][gpio.binary_sensor:015]: Device Class: 'plug'
[11:17:33][C][gpio.binary_sensor:016]: Pin: GPIO17
[11:17:33][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Schalter BĂźro 2'
[11:17:33][C][gpio.binary_sensor:015]: Device Class: 'plug'
[11:17:33][C][gpio.binary_sensor:016]: Pin: GPIO18
[11:17:33][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Schalter Schlafzimmer 1'
[11:17:33][C][gpio.binary_sensor:015]: Device Class: 'plug'
[11:17:33][C][gpio.binary_sensor:016]: Pin: GPIO19
[11:17:33][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Schalter Schlafzimmer 2'
[11:17:33][C][gpio.binary_sensor:015]: Device Class: 'plug'
[11:17:33][C][gpio.binary_sensor:016]: Pin: GPIO21
[11:17:34][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Schalter WZ Ecke BĂźro 1'
[11:17:34][C][gpio.binary_sensor:015]: Device Class: 'plug'
[11:17:34][C][gpio.binary_sensor:016]: Pin: GPIO22
[11:17:34][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Schalter WZ Ecke BĂźro 2'
[11:17:34][C][gpio.binary_sensor:015]: Device Class: 'plug'
[11:17:34][C][gpio.binary_sensor:016]: Pin: GPIO23
[11:17:34][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Schalter WZ Ecke Badezimmer 1'
[11:17:34][C][gpio.binary_sensor:015]: Device Class: 'plug'
[11:17:34][C][gpio.binary_sensor:016]: Pin: GPIO25
[11:17:34][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Schalter WZ Ecke Badezimmer 2'
[11:17:34][C][gpio.binary_sensor:015]: Device Class: 'plug'
[11:17:34][C][gpio.binary_sensor:016]: Pin: GPIO26
[11:17:34][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Schalter WZ Ecke KĂźche 1'
[11:17:34][C][gpio.binary_sensor:015]: Device Class: 'plug'
[11:17:34][C][gpio.binary_sensor:016]: Pin: GPIO4
[11:17:34][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Schalter WZ Ecke KĂźche 2'
[11:17:34][C][gpio.binary_sensor:015]: Device Class: 'plug'
[11:17:34][C][gpio.binary_sensor:016]: Pin: GPIO5
[11:17:34][C][switch.gpio:048]: GPIO Switch 'LĂźftung Badezimmer'
[11:17:34][C][switch.gpio:049]: Pin: GPIO32
[11:17:34][C][switch.gpio:071]: Restore Mode: Restore (Defaults to OFF)
[11:17:34][C][switch.gpio:048]: GPIO Switch 'Licht Badezimmer'
[11:17:34][C][switch.gpio:049]: Pin: GPIO27
[11:17:34][C][switch.gpio:071]: Restore Mode: Restore (Defaults to OFF)
[11:17:34][C][switch.gpio:048]: GPIO Switch 'Licht KĂźche'
[11:17:34][C][switch.gpio:049]: Pin: GPIO33
[11:17:34][C][switch.gpio:071]: Restore Mode: Restore (Defaults to OFF)
[11:17:34][C][switch.gpio:048]: GPIO Switch 'Licht BĂźro'
[11:17:34][C][switch.gpio:049]: Pin: GPIO12
[11:17:34][C][switch.gpio:071]: Restore Mode: Restore (Defaults to OFF)
[11:17:34][C][captive_portal:151]: Captive Portal:
[11:17:34][C][ota:082]: Over-The-Air Updates:
[11:17:34][C][ota:083]: Address: home-manager.local:3232
[11:17:34][C][ota:086]: Using Password.
[11:17:34][W][ota:092]: Last Boot was an unhandled reset, will proceed to safe mode in 6 restarts
[11:17:34][C][api:134]: API Server:
[11:17:34][C][api:135]: Address: home-manager.local:6053
[11:17:34][C][api:139]: Using noise encryption: NO
[11:17:34][C][mdns:084]: mDNS:
[11:17:34][C][mdns:085]: Hostname: home-manager
I have also checked the home-manager.yaml file. The file is writable and saved correctly. Does someone have an idea whatâs going wrong here?