Skip to content

Persistent OTA Error 132 / End error: 3 on Athom Smart Plug (ESP32-C3) due to CSE7766 Serial Interference #144

@michael-m52

Description

@michael-m52

The device: Athom Smart Plug (ESP32-C3 variant)
Framework: ESP-IDF (also tested on Arduino)
Version: ESPHome 2024.x - 2026.1.0
Description of the Problem
OTA updates consistently fail on the Athom Smart Plug (ESP32-C3). The logs show a fatal Error ending update! error_code: 132 and End error: 3. This occurs simultaneously with Invalid checksum warnings from the cse7766 component.
It appears the non-polling CSE7766 sensor floods the UART bus (GPIO20) during the flash-commit phase, causing a buffer overrun/MD5 mismatch that prevents the update from finalizing.
Logs
text
09:47:07 [E] [ota.arduino_esp32:062] End error: 3
09:47:07 [W] [esphome.ota:321] Error ending update! error_code: 132
09:47:07 [W] [cse7766:062] Invalid checksum from CSE7766: 0x6C != 0x1C
09:47:07 [E] [component:286] esphome.ota set Error flag: unspecified

Attempted Fixes (All Failed)
Minimal YAML: Attempted flashing a "bare-bones" config (WiFi, OTA, API only). The device rolls back to the previous firmware, so the sensor remains active.
Framework Migration: Switched between arduino and esp-idf frameworks. ESP-IDF produces a smaller binary (~1.2MB), but the "End error: 3" persists.
Component Control via Lambdas:
Tried id(my_sensor).stop_poller(); (Compiler error: no member named stop_poller).
Tried id(my_sensor).set_update_interval(); (Compiler error: cse7766 is non-polling).
Tried id(uart_bus).disable(); (Compiler error: IDFUARTComponent has no member named disable).
UART Pin-Swap: Attempted to redirect rx_pin to a dummy GPIO (GPIO10) to silence the noise wirelessly, but the update still fails to finalize.
Safe Mode: Attempted to trigger Safe Mode via 10+ rapid power cycles. The device does not enter safe mode and continues loading the original firmware.
Physical Power Cycles: Multiple "cold boots" (30+ seconds unplugged) performed to clear flash-write locks.
Manual Binary Upload: Compiled and downloaded .bin (OTA format) for manual upload via Web Server. The upload begins but returns "Update Failed!" at the end of the transfer.
Observations
The device is not out of flash space (using ~67% of 1.8MB partition).
The failure is likely a hardware/interrupt conflict between the ESP32-C3 UART and the CSE7766 data stream during the flash "handshake."
Since the device is a sealed smart plug, physical serial flashing (USB) is not an option for many users.
Request
Is there a way to programmatically "kill" the UART bus or ignore RX interrupts during the OTA process for non-polling sensors like the cse7766 to prevent MD5 corruption?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions