Hi Stekolos,
Thanks for sharing how you could make it work. Unfortunately I am still facing the issue of my ESP32 not willing to connect to HA, even though it connects to Wifi and I can ping it.
This is the warning I am getting, sometimes it has a different content, but basically it shows as offline in HA.
OTA updates are feasible and the moment I change the YAML file back to the original content which it had when I set it up for first use from within HA, it hooks up to HA perfectly fine.
I have realized, that when I take out the “baud_rate: 0” command, that it seems to at least show some signs of life and I can read out the log file from the web appplication, but still it won’t show as online in HA.
I would appreciate any input from someone who faced the same issues.
My ESP is from AZ-Delivery (KitC V2 ESP32-WROOM-32)
WARNING Can't connect to ESPHome API for wr3223-lueftungsanlage @ 192.168.178.56: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.178.56', port=6053))]: [Errno 111] Connect call failed ('192.168.178.56', 6053) (SocketAPIError)
INFO Trying to connect to wr3223-lueftungsanlage @ 192.168.178.56 in the background
Here is some part of the logging which I was able to do while it was hooked up to my PC using web.esphome.io
(I cannot flash the ESP from within HA as I don’t use https to show the dashboard).
What I realize is, that is takes 10 boot loops before it actually connects to Wifi. Then, after about 5 minutes, the whole boot loop starts again.
[22:51:07][C][esphome.ota:073]: Over-The-Air updates:
[22:51:07][C][esphome.ota:074]: Address: 192.168.178.56:3232
[22:51:07][C][esphome.ota:075]: Version: 2
[22:51:07][C][safe_mode:018]: Safe Mode:
[22:51:07][C][safe_mode:020]: Boot considered successful after 60 seconds
[22:51:07][C][safe_mode:021]: Invoke after 10 boot attempts
[22:51:07][C][safe_mode:023]: Remain in safe mode for 300 seconds
[22:51:07][W][safe_mode:031]: SAFE MODE IS ACTIVE
[22:51:54][I][safe_mode:041]: Boot seems successful; resetting boot loop counter
[22:51:54][D][esp32.preferences:114]: Saving 1 preferences to flash...
[22:51:54][D][esp32.preferences:143]: Saving 1 preferences to flash: 1 cached, 0 written, 0 failed
[22:55:54][W][safe_mode:091]: Safe mode enable time has elapsed -- restarting
[22:55:54][I][app:125]: Forcing a reboot...
[22:55:54][W][wifi_esp32:537][arduino_events]: Event: Disconnected ssid='FRITZ!Box Fon WLAN 7270-B' bssid=[redacted] reason='Association Leave'
[22:55:54]ets Jul 29 2019 12:21:46
[22:55:54]
[22:55:54]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[22:55:54]configsip: 0, SPIWP:0xee
[22:55:54]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[22:55:54]mode:DIO, clock div:2
[22:55:54]load:0x3fff0030,len:1184
[22:55:54]load:0x40078000,len:13132
[22:55:54]load:0x40080400,len:3036
[22:55:54]entry 0x400805e4
[22:55:54][I][logger:156]: Log initialized
[22:55:54][C][safe_mode:079]: There have been 0 suspected unsuccessful boot attempts
[22:55:54][D][esp32.preferences:114]: Saving 1 preferences to flash...
[22:55:54][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[22:55:54][W][app:022]: Component custom_component already registered! (0x3ffb2a84)
[22:55:55][I][app:029]: Running through setup()...
[22:55:55][C][uart.arduino_esp32:077]: Setting up UART...
[22:55:55][D][template.switch:046]: Restored state OFF
[22:55:55][D][switch:016]: 'Zusatzheizung' Turning OFF.
[22:55:55][D][template.switch:046]: Restored state OFF
[22:55:55][D][switch:016]: 'Wärmepumpe' Turning OFF.
[22:55:55][D][template.switch:046]: Restored state OFF
[22:55:55][D][switch:016]: 'Kühlung' Turning OFF.
[22:55:55][E][WRITER:248]: WRITE: 33
[22:55:55][E][WRITER:249]: Data Length: 2
[22:55:55][E][WRITER:250]: COMMAND: SW
[22:55:55][E][WRITER:275]: Data to Write: :04:30:30:31:31:02:53:57:33:33:03:07
[22:55:55][E][WRITER:280]: Bedienteil ist aktiv, kein schreiben möglich
[22:55:55][C][wifi:048]: Setting up WiFi...
[22:55:55][C][wifi:061]: Starting WiFi...
[22:55:56][C][wifi:062]: Local MAC: E0:5A:1B:E4:DE:0C
[22:55:56][D][wifi:482]: Starting scan...
[22:55:56][D][MODUS:205]: Get_Modus: 0
[22:55:56][D][select:015]: 'Betriebsmodus': Sending state AUS (index 0)
[22:55:56][D][number:012]: 'Update Interval': Sending state 10.000000
[22:55:56][I][START:385]: Command: LS
[22:55:56][D][Reader:044]: Warte auf Antwort von WR3223. Timeout in 5000ms.
[22:55:56][D][Reader:044]: Warte auf Antwort von WR3223. Timeout in 4799ms.
[22:55:56][D][Reader:044]: Warte auf Antwort von WR3223. Timeout in 4699ms.
[22:55:56][D][Reader:044]: Warte auf Antwort von WR3223. Timeout in 4599ms.
[22:55:56][D][Reader:044]: Warte auf Antwort von WR3223. Timeout in 4499ms.
[22:55:56][D][Reader:044]: Warte auf Antwort von WR3223. Timeout in 4399ms.