(Novice with HA, ESPHome)
I have just received a Seeed Xiao ESP32S3 Sense board and I’m trying to use ESPHome to access it from my HA running with the latest updates on a Rpi4.
When I edit the .yaml file with the:
esp32:
board: seeed_xiao_esp32s3
I get a red underline. Following that link to the list of boards, I can see both that and the ESP32C3 options. The seeed_xiao_esp32c3 name is recognised but the seeed_xiao_esp32s3 name is not.
What am I missing here?
(BTW I got here because I first just used the ESP32S3 name and it automatically selected the devkitc-1 board. That worked but I got a error message that the PSRAM ID was wrong when the board booted up. Therefore I’m trying to find the correct board definition.)
Susan
The valid board names are here PlatformIO Registry
The board you want:
https://docs.platformio.org/en/latest/boards/espressif32/seeed_xiao_esp32s3.html
Thanks Nick. But this is what I get:
The error I get is:
INFO ESPHome 2023.6.3
INFO Reading configuration /config/esphome/backyard.yaml...
Failed config
esp32: [source /config/esphome/backyard.yaml:6]
This board is unknown, please set the variant manually.
board: seeed_xaio_esp32s3
framework:
type: arduino
The yaml file is:
esphome:
name: backyard
friendly_name: Backyard
esp32:
board: seeed_xaio_esp32s3
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "uC6BVQRqG9EDFh0nN/PYBC0nPg6NjoqeM1xRq3vypxE="
ota:
password: "474ac60effc519502bce2b83f3d91976"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Backyard Fallback Hotspot"
password: "9fwgM0Yrh5CD"
captive_portal:
esp32_camera:
name: Backyard
external_clock:
pin: GPIO10
frequency: 20MHz
i2c_pins:
sda: GPIO40
scl: GPIO39
data_pins: [GPIO15, GPIO17, GPIO18, GPIO16, GPIO14, GPIO12, GPIO11, GPIO48]
vsync_pin: GPIO38
href_pin: GPIO47
pixel_clock_pin: GPIO13
Susan
Version of esphome? oops its there.
I believe it is a platformio version issue. Current version in esphome is 6.1.7 and the version on the platformio website is 6.3.2.
Perhaps try platformio_version
I tried various combinations of ‘version’ and ‘platform _version’ but still the same error.
I then tried setting the framework to ‘esp-idf’’ and ‘platform_version’ to 6.3.2 and got:
INFO ESPHome 2023.6.3
INFO Reading configuration /config/esphome/backyard.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing backyard (board: seeed_xaio_esp32s3; framework: espidf; platform: platformio/[email protected])
--------------------------------------------------------------------------------
Platform Manager: Installing platformio/espressif32 @ 6.3.2
INFO Installing platformio/espressif32 @ 6.3.2
Downloading [####################################] 100%
Unpacking [####################################] 100%
Platform Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Error: Unknown board ID 'seeed_xaio_esp32s3'
Even switching back to the Arduino framework I still get:
INFO ESPHome 2023.6.3
INFO Reading configuration /config/esphome/backyard.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing backyard (board: seeed_xaio_esp32s3; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
Error: Unknown board ID 'seeed_xaio_esp32s3'
The top part of my yaml file is currently:
esphome:
name: backyard
friendly_name: Backyard
esp32:
framework:
type: arduino
platform_version: 6.3.2
variant: esp32s3
board: seeed_xaio_esp32s3
# Enable logging
logger:
The rest is unchanged (except that the 'captive_portal: line gives an error wth the esp-idf framework so I’ve commented that out for that framework.
Have I understood your comment correctly?
Susan
I’d take this to the esphome GitHub issues.
Hold, check your spelling. xiao vs xaio
And the great man says “Doh”. I’m sure I had that right, and that I had also used the ‘copy-paste’ function from the boards list. Sigh.
Anyway - one step forward but not all they way there:
INFO ESPHome 2023.6.3
INFO Reading configuration /config/esphome/backyard.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing backyard (board: seeed_xiao_esp32s3; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
- toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
- toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 1.2.2
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 2.1.0
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
Compiling /data/backyard/.pioenvs/backyard/src/esphome/components/api/api_connection.cpp.o
Compiling /data/backyard/.pioenvs/backyard/src/esphome/components/api/api_frame_helper.cpp.o
Compiling /data/backyard/.pioenvs/backyard/src/esphome/components/api/api_pb2.cpp.o
Compiling /data/backyard/.pioenvs/backyard/src/esphome/components/api/api_pb2_service.cpp.o
Compiling /data/backyard/.pioenvs/backyard/src/esphome/components/api/api_server.cpp.o
Compiling /data/backyard/.pioenvs/backyard/src/esphome/components/api/list_entities.cpp.o
In file included from /data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal.h:79,
from /data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.h:51,
from src/esphome/components/logger/logger.h:12,
from src/esphome/components/api/api_server.cpp:13:
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.h:29:10: fatal error: pins_arduino.h: No such file or directory
**********************************************************************
* Looking for pins_arduino.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:pins_arduino.h"
* Web > https://registry.platformio.org/search?q=header:pins_arduino.h
*
**********************************************************************
#include "pins_arduino.h"
^~~~~~~~~~~~~~~~
compilation terminated.
*** [/data/backyard/.pioenvs/backyard/src/esphome/components/api/api_server.cpp.o] Error 1
========================= [FAILED] Took 21.66 seconds =======================
The start of the yaml file now reads:
esp32:
framework:
type: arduino
platform_version: 6.3.2
variant: esp32s3
board: seeed_xiao_esp32s3
Susan
OK - I’ve found a solution (at least for my setup). It turns out that the espressif32 framework V5.3.0 does not have the ‘seeed_xiao_esp32s3’ board file (but it does have the ‘seeed_xiao_esp32c3’ one). I found the required ‘.json’ file and added it the set of boards file, edited the ‘boards.py’ file and the board is now recognised buy EspHome.
Note that the following does require playing within the docker file for EspHome - if you are not happy doing that then wait for the problem to be fixed.
I used the ‘Advanced SSH and Web Terminal’ add-on and then turned off the ‘protection’ mode. That dave me access to the ‘docker’ command. I used the ‘docker -t -i /bin/bash’ command (with whatever the EspHome docker name is on your system) to get access to the docker container.
I found the required ‘.json’ file using the ‘find / -iname “seeed_xiao_esp32s3.json” ’ command - for me it was in /data/cache/platformio/platforms/espressif32/boards/seee_xiao_esp32s3.json’.
However the file was missing from the ‘…[email protected]/boards’ folder so I copied the file to there. (to do this I ‘cd’ to the [email protected]/boards folder and used ‘cp …/…/…espressif32/boards/seeed_xiao_esp32s3.json .’ command).
I also needed to edit the file at ‘/esphome/esphome/components/esp32/boards.py’ so I ‘cd’ to that directory and used the ‘nano’ editor (I actually needed to install that via the ‘apt install’ command but any editor will do), found the ‘seeed_xiao_esp32c3’ entry and duplicated it replacing the ‘c3’ with ‘s3’.
Back in the main ‘EspHome’ window I could then edit my project file to use the ‘seeed_xioa_esp32s3’ board and it worked perfectly.
(BTW while in the docker container, I tried to find another board that had the same processor, ram, flash and psram configuration but couldn’t - there may be such a file but I could not find it.)
I hope this helps others until the Seeed Xiao ESP32S3 is properly incorporated into the EspHome system.
Susan
Thanks for the details.
I just received an S3 and was starting a project and have run into the same issue.
I couldn’t quite get your fix to work, first hang up being with Advance SSH loading. But none the less. Thank you for your effort. Hopefully I can figure it out or patiently wait.
Edit: Figured out my SSH issues. But once in, and diving down into the ESPHome Docker, I found nothing related to any seeed file names.
Edit2: Figured out I was diving into a deprecated EspHome Docker.
Edit3: Stumbled through it. mostly, however, for the .json, I followed these directions. Adding a custom board config possibility · esphome/esphome · Discussion #4302 · GitHub
Edit4: I am able to validate, but not upload, receiving this error.
My guess is that you have not changed something to refence the ESP32S3 (and not the ESP32C3).
Susan
Came across this thread since having similar issues.
I am still getting the “fatal error: pins_arduino.h: No such file or directory” error even though I added the .json and edited the boards.py.
My yaml:
esp32:
framework:
type: arduino
version: latest
variant: esp32s3
board: seeed_xiao_esp32s3
And boards.py contains:
"seeed_xiao_esp32s3": {
"name": "Seeed Studio XIAO ESP32S3",
"variant": VARIANT_ESP32S3,
},
I should be on the right tracks? If this works I could make the github issue + pull request. Full error:
Summary
INFO ESPHome 2023.7.0-dev
INFO Reading configuration /config/esp-air-plain.yaml...
WARNING The selected Arduino framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
WARNING The selected Arduino framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
INFO Generating C++ source...
INFO Compiling app...
Processing esp-air-plain (board: seeed_xiao_esp32s3; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
- toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
- toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- WiFi @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- Update @ 2.0.0
Compiling .pioenvs/esp-air-plain/src/esphome/components/esp32/core.cpp.o
Compiling .pioenvs/esp-air-plain/src/esphome/components/esp32/gpio.cpp.o
Compiling .pioenvs/esp-air-plain/src/esphome/components/esp32/preferences.cpp.o
Compiling .pioenvs/esp-air-plain/src/esphome/components/light/addressable_light.cpp.o
Compiling .pioenvs/esp-air-plain/src/esphome/components/light/automation.cpp.o
Compiling .pioenvs/esp-air-plain/src/esphome/components/light/esp_color_correction.cpp.o
Compiling .pioenvs/esp-air-plain/src/esphome/components/light/esp_hsv_color.cpp.o
Compiling .pioenvs/esp-air-plain/src/esphome/components/light/esp_range_view.cpp.o
Compiling .pioenvs/esp-air-plain/src/esphome/components/light/light_call.cpp.o
In file included from /config/.esphome/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal.h:79,
from src/esphome/components/esp32/core.cpp:18:
/config/.esphome/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.h:29:10: fatal error: pins_arduino.h: No such file or directory
**********************************************************************
* Looking for pins_arduino.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:pins_arduino.h"
* Web > https://registry.platformio.org/search?q=header:pins_arduino.h
*
**********************************************************************
#include "pins_arduino.h"
^~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pioenvs/esp-air-plain/src/esphome/components/light/light_json_schema.cpp.o
Compiling .pioenvs/esp-air-plain/src/esphome/components/light/light_output.cpp.o
Compiling .pioenvs/esp-air-plain/src/esphome/components/light/light_state.cpp.o
Compiling .pioenvs/esp-air-plain/src/esphome/components/logger/logger.cpp.o
Compiling .pioenvs/esp-air-plain/src/esphome/components/md5/md5.cpp.o
Compiling .pioenvs/esp-air-plain/src/esphome/components/mdns/mdns_component.cpp.o
Compiling .pioenvs/esp-air-plain/src/esphome/components/mdns/mdns_esp32.cpp.o
*** [.pioenvs/esp-air-plain/src/esphome/components/esp32/core.cpp.o] Error 1
In file included from /config/.esphome/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal.h:79,
from /config/.esphome/platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.h:51,
from src/esphome/components/logger/logger.h:12,
from src/esphome/components/logger/logger.cpp:1:
/config/.esphome/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.h:29:10: fatal error: pins_arduino.h: No such file or directory
**********************************************************************
* Looking for pins_arduino.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:pins_arduino.h"
* Web > https://registry.platformio.org/search?q=header:pins_arduino.h
*
**********************************************************************
#include "pins_arduino.h"
^~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/esp-air-plain/src/esphome/components/logger/logger.cpp.o] Error 1
========================== [FAILED] Took 1.92 seconds ==========================
EDIT:
I got it compiling with these parameters:
esp32:
board: seeed_xiao_esp32s3
variant: esp32s3
framework:
type: arduino
version: latest
platform_version: 6.3.2
Strange, testing more tomorrow. Thanks Susan for the instructions!
The top part of my yaml file is:
esp32:
board: seeed_xiao_esp32s3
framework:
type: arduino
As I understand it, adding in the ‘variant’ line stops the checks for the ‘board’.
Also ESPHome was updated yesterday and I found that it failed to update the camera. Looks like it went back to the old ‘boards.py’ file and the update for the camera went well after I re-edited that file.
Susan
It was something residual from that sketch/build. Created a new one from scratch and eliminated that issue.
Ended up shelving the S3 for now and moved over to a normal node mcu 32 for the project I am doing. Hopefully I can come back to this when things are updated more.
I managed to install and validate it using the following settings:
esphome:
name: seeed-studio-xiao-esp32s3-sense
friendly_name: Seeed Studio XIAO ESP32S3 Sense
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "Lus+K......."
ota:
password: "f1e3....."
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Seeed-Studio-Xiao-Esp32S3-Sense"
password: "bFs...."
captive_portal:
esp32_camera:
name: Backyard
external_clock:
pin: GPIO10
frequency: 20MHz
i2c_pins:
sda: GPIO40
scl: GPIO39
data_pins: [GPIO15, GPIO17, GPIO18, GPIO16, GPIO14, GPIO12, GPIO11, GPIO48]
vsync_pin: GPIO38
href_pin: GPIO47
pixel_clock_pin: GPIO13
Yes, settling the board type to ‘esp32-s3-devkitc-1’ allowed me to get the card registered in ESP home and on the network., however, I was unable to configure it. Errors on uploading a new config. I’m assuming because there are less physical pins available.
Impossible to say without the errors.
Any luck yet with this. I just started trying to deploy to a Seeed S3 device and no luck so far. Followed your method by modifying the boards.py, I had to use framework ESP-IDF because Arduino would not compile complaining about a PINS header of some sort, sorry forgot the exact error.
With ESP-IDF it compiles and flashes. However after it restarts with just a simple config file. Just connect to my wifi and turn logging debug on.
It does not connect and does not get past initial boot it seems.
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x2b (SPI_FAST_FLASH_BOOT)
Saved PC:0x4037b29e
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3810,len:0x1648
load:0x403c9700,len:0xbe0
load:0x403cc700,len:0x2ef8
entry 0x403c9900
I (24) boot: ESP-IDF 5.0.1 2nd stage bootloader
I (25) boot: compile time 23:39:08
I (25) boot: chip revision: v0.1
I (26) boot.esp32s3: Boot SPI Speed : 80MHz
I (31) boot.esp32s3: SPI Mode : DIO
I (36) boot.esp32s3: SPI Flash Size : 8MB
I (41) boot: Enabling RNG early entropy source...
I (46) boot: Partition Table:
I (50) boot: ## Label Usage Type ST Offset Length
I (57) boot: 0 otadata OTA data 01 00 00009000 00002000
I (64) boot: 1 phy_init RF data 01 01 0000b000 00001000
I (72) boot: 2 app0 OTA app 00 10 00010000 001c0000
I (79) boot: 3 app1 OTA app 00 11 001d0000 001c0000
I (87) boot: 4 nvs WiFi data 01 02 00390000 0006d000
I (94) boot: End of partition table
I (99) esp_image: segment 0: paddr=00010020 vaddr=3c080020 size=21918h (137496) map
I (132) esp_image: segment 1: paddr=00031940 vaddr=3fc95b00 size=03d54h ( 15700) load
I (135) esp_image: segment 2: paddr=0003569c vaddr=40374000 size=0a97ch ( 43388) load
I (147) esp_image: segment 3: paddr=00040020 vaddr=42000020 size=793ech (496620) map
I (237) esp_image: segment 4: paddr=000b9414 vaddr=4037e97c size=07108h ( 28936) load
I (251) boot: Loaded app from partition at offset 0x10000
I (251) boot: Disabling RNG early entropy source...
I (262) cpu_start: Pro cpu up.
I (262) cpu_start: Starting app cpu, entry point is 0x40375be0
I (0) cpu_start: App cpu up.
I (277) cpu_start: Pro cpu start user code
I (277) cpu_start: cpu freq: 160000000 Hz
I (277) cpu_start: Application information:
I (280) cpu_start: Project name: test
I (284) cpu_start: App version: 2023.7.0
I (289) cpu_start: Compile time: Jul 25 2023 23:38:40
I (296) cpu_start: ELF file SHA256: 643c602bdd2cc342...
I (302) cpu_start: ESP-IDF: 5.0.1
I (306) cpu_start: Min chip rev: v0.0
I (311) cpu_start: Max chip rev: v0.99
I (316) cpu_start: Chip rev: v0.1
I (321) heap_init: Initializing. RAM available for dynamic allocation:
I (328) heap_init: At 3FC9D4F8 len 0004C218 (304 KiB): D/IRAM
I (334) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM
I (341) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (347) heap_init: At 600FE010 len 00001FF0 (7 KiB): RTCRAM
I (354) spi_flash: detected chip: gd
I (358) spi_flash: flash io: dio
I (362) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
No. I’m sticking to my SparkFun ESP32ThingPlus boards. They have proven to be very reliable. it’s disappointing as I had a great application for the XAIO. I need a single flow sensor on one of my water tanks. Having something that could run off a battery and sleep 99% of the time would’ve been great.