esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 36 forks source link

Using remote_receiver component prevents future OTA updates #5832

Open heyitsaustin123 opened 5 months ago

heyitsaustin123 commented 5 months ago

The problem

I am trying to set up a basic IR receiver to record IR codes for a project. I started by flashing the board over USB with https://web.esphome.io/ "Prepare for First Use" in Chrome. Then I uploaded a basic YAML config, tacking

remote_receiver:
  pin:
    number: GPIO32
    inverted: true
  dump: all

on to the default YAML config (I also tried with GPIO4 and GPIO16) and connected a one of these VS1838B IR receivers from Amazon (Pins connected to from L->R GPIO32, GND, 3.3V) This seems to upload fine but is a bit buggy and crashes/reboots sometimes but seems relatively stable when using GPIO32.

The real issue is if I try to upload a new YAML. I get


========================= [SUCCESS] Took 4.10 seconds =========================
INFO Successfully compiled program.
INFO Connecting to 192.168.0.21
INFO Uploading /data/build/my_esp32/.pioenvs/my_esp32/firmware.bin (845680 bytes)
Uploading: [=                                                           ] 1% ERROR Error receiving acknowledge chunk OK: [Errno 104] Connection reset by peer

in HA and

[18:05:05][D][ota:154]: Starting OTA Update from 192.168.0.15...
[18:05:05][W][component:157]: Component ota set Warning flag: unspecified
[18:05:06][D][ota:330]: OTA in progress: 0.1%
[18:05:11]E (199641) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
[18:05:11]E (199641) task_wdt:  - loopTask (CPU 1)
[18:05:11]E (199641) task_wdt: Tasks currently running:
[18:05:11]E (199641) task_wdt: CPU 0: IDLE
[18:05:11]E (199641) task_wdt: CPU 1: IDLE
[18:05:11]E (199641) task_wdt: Aborting.
[18:05:11]
[18:05:11]abort() was called at PC 0x4010040c on core 0
[18:05:11]
[18:05:11]
[18:05:11]Backtrace:0x40083d95:0x3ffbe9dc |<-CORRUPTED
[18:05:11]
[18:05:11]
[18:05:11]
[18:05:11]
[18:05:11]ELF file SHA256: 0000000000000000
[18:05:11]
[18:05:11]Rebooting...
[18:05:11]ets Jul 29 2019 12:21:46
[18:05:11]
[18:05:11]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[18:05:11]configsip: 0, SPIWP:0xee
[18:05:11]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[18:05:11]mode:DIO, clock div:2
[18:05:11]load:0x3fff0030,len:1184
[18:05:11]load:0x40078000,len:13132
[18:05:11]load:0x40080400,len:3036
[18:05:11]entry 0x400805e4

when reading the log over USB via ESPHome Web.

The only way I can get OTA to work again is if I reflash with "Prepare for First Use".

The ESP has good signal strength (I think ~-40dB) and I've tried installing with the ESP ~1m from the AP, same results. I've tried powering via my laptop's USB port and via large Anker battery pack to exclude potentially noisy input power, same results. I used my DMM to measure the current on Vin and Signal of the receiver and it was small enough to not register. <1mA, so not a short loading down the PS.

The above log seems to indicate that the Watchdog Timer is getting triggered for some reason during the OTA but I don't know enough about the ESP32 to parse what the rest means.

I've replicated this on two different types of ESP32-WROOM-32D boards (micro-USB and USB-C with different serial chips) and ESPHome versions 2024.5.0 and 2024.5.1

Which version of ESPHome has the issue?

2024.5.1

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2024.5.4

What platform are you using?

ESP32

Board

No response

Component causing the issue

remote_receiver

Example YAML snippet

remote_receiver:
  pin:
    number: GPIO32
    inverted: true
  dump: all

Anything in the logs that might be useful for us?

See above.

Additional information

No response

jtshs256 commented 5 months ago

Similar issue here with M5Stack Atom Matrix using remote_transmitter component. The issue seems to affect only arduino framework, since esp-idf framework version works flawlessly.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.