@sermayoral , thanks a lot!
I couldn’t find anything in your remaining configuration files what could’ve cured the trouble on my end.
However, finally I was able to get a working firmware with the ewan fork as well as with the standard firmware (see below). IMPORTANT: One should disable mDNS in any case (even though it would compile just fine with mDNS enabled), but mDNS is sooo terribly resource intensive that the ESP32C2 becomes quite unreliable and laggy.
Depending on the respective network setup it then may be important to apply the wifi.use_address option (in my case necessary anyways due to a multi-subnet setup and certainly I’m not reflecting all multicast traffic from one subnet to another
)
The following configuration worked like charm for me with ESPHome 2025.11.0:
(controller is the ESP32-C2 with 2MB flash and 26 MHz XTAL)
# ESP32-C2 Considerations:
# - disable mDNS - too resource heavy for 1C CPU
# - disable WiFi power save mode
# - use custom partition for larger app-images
esphome:
name: somfyio
friendly_name: SomfyIO
esp32:
board: esp32-c2-devkitm-1
variant: esp32c2
flash_size: 2MB
partitions: "/config/esphome/part_2MB_ota.csv"
framework:
type: esp-idf
sdkconfig_options:
CONFIG_XTAL_FREQ_26: y
mdns:
disabled: true
logger:
# Enable Home Assistant API
api:
encryption:
key: !secret api_key_espc2
ota:
- platform: esphome
password: !secret ota_pw_espc2
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
use_address: somfyio.lan
power_save_mode: none # added for higher stability
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "SomfyIO-AP"
password: !secret ap_pw_espc2
captive_portal:
# ESPHome program code to follow below
# .
# .
By tinkering around with the partitions table I could crank up the app size to 983,040 bytes (960 kB) whilst keeping the OTA functioning on a 2MB flash (certainly some space is needed for the bootloader and other non-volatile stuff).
part_2MB_ota.csv:
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, , 0x3000,
otadata, data, ota, , 0x2000,
phy_init, data, phy, , 0x1000,
app0, app, ota_0, , 0xF0000,
app1, app, ota_1, , 0xF0000,