I was able to flash the esphome firemware successfully when hardwired, but when I unplug the xiao and plug into simply a usb power source, I can no longer connect to the device via esphome. While testing, I setup an LED on D0 and when the board is unresponsive, this pin is actually blinking high/low every 3 seconds or so, which is strange.
Below is the error when trying to connect from esphome logs:
INFO Starting log output from esp32-c3-test1.local using esphome API
WARNING Can't connect to ESPHome API for esp32-c3-test1.local: Error resolving IP address: [Errno -5] No address associated with hostname
INFO Trying to reconnect to esp32-c3-test1.local in the background
The xiao connects to the wifi correctly during that initial flash. I can send an ota update via wifi just fine. Its just when I unplug power to the board and then plug back in does it seem be wiped somehow and cannot connect at all
The XIAO-ESP23C3 only seems to be started while connected to a pc and start a serial terminal. In my case “picocom /dev/ttyACM0 -b115200” on my Linux pc.
Only then, I can see the divice connects wifi by simply pinging its fixed IP address. I also see all the start and run messages in the terminal.
After exiting picocom the device is still running fine. Both pinging and control by HomeAssistant keeps working. But after a reset by the button on the device or by cycling usb-power it stays unreachable.
So I guess this is just some boot issue. Probably done by control of RTS/DTR when using serial communication.
Does anybody know the secret?
I will attach the esphome yaml file I use for this test:
esphome:
name: xiaoesp32c3
# platformio_options:
# board_build.flash_mode: dio
esp32:
board: seeed_xiao_esp32c3
variant: esp32c3
framework:
type: arduino
version: 2.0.5
platform_version: 5.2.0
# Enable logging
logger:
# Enable Home Assistant API
api:
password: ""
ota:
password: ""
wifi:
ssid: "MySSID"
password: "MyWPA"
use_address: 10.0.0.119
manual_ip:
# Set this to the IP of the ESP
static_ip: 10.0.0.119
# Set this to the IP address of the router. Often ends with .1
gateway: 10.0.0.254
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "HomelabFallbackHotspot"
password: "anything123"
captive_portal:
#
switch:
- platform: gpio
name: "Living Room119 LED"
pin: GPIO5
#
sensor:
- platform: adc
pin: 3
name: "Living Room119 Temperature"
update_interval: 60s
Thanks, @Diego_VL, I didn’t try that combo. I would still like to see Xiao address the original issue, but your solution works for now.
Also take a look at this related to the web portal and others. I haven’t gotten this to work with the ESPHome Addon in Home assistant but maybe others will have more luck:
Thank you Diego_VL. I got it working.
This esp-idf does te trick. Me, as a noob, I don’t even know what it means yet.
It came out that I need some of the newest esphome build environments. 2022.9.4 on my laptop is too old to know esp-idf.
I own the S3 variant of the seeed_xiao_esp32c3 board, I am also facing same boot/reconnect problems after power cycle.
any idea wich is the right config (board, variant, framework, version and platform_version) for esphome with the S3 variant?
I was facing the same Problem with starting the Seeed ESPC3 only while connected to my PC with serial terminal. With the current Framework this Problem seems to be solved!