-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for ESP32-C6 chipset #2176
Comments
Copy from #1397 and #1430 for reference: You may be interested in this fork. @stintel managed to flash a C6. https://github.com/stintel/esphome/tree/esp32c6 ESP32-C6 SoC, module and development board has now been launched with WiFi 6, BLE 5.0, and 802.15.4, ink. OpenThread and Zigbee! ...so think these could be perfect for ESPHome as either a Thread Board Router (for Matter) or as a Zigbee Router device. https://www.espressif.com.cn/en/news/ESP32-C6_Available Espressif launched the ESP32-C6 WiFi 6, Bluetooth 5.0 LE, and 802.15.4 IoT microcontroller by making the ESP32-C6-WROOM-1 module: https://www.cnx-software.com/2021/04/11/esp32-c6-wifi-6-and-bluetooth-le-risc-v-soc-for-iot-devices/ Espressif Systems has finally launched the ESP32-C6 WiFi 6, Bluetooth 5.0 LE, and 802.15.4 IoT microcontroller by making the ESP32-C6-WROOM-1 module available on Aliexpress for $14.25 for a pack of 5 modules as well as the ESP32-C6-DevKitC-1 development board that’s out of stock on the official store at the time of writing. but somehow listed in another store for $16.22 plus shipping. Besides the availability announcement, another surprise is the 802.15.4 radio for Zigbee and Thread that was not part of the original ESP32-C6 announcement in April 2021. The ESP32-C6-DevKitC-1 development board comes with a module with 8MB flash, exposes most of the I/O’s from the ESP32-C3, and comes with two USB-C ports, two buttons, and an RGB LED. ESP32-C6-DevKitC-1 development board specifications:
The new ESP32-C6 module and development board work with the ESP-IDF v5.1, currently under development (see progress report), and some basic documentation can be found on read the docs. If you can’t purchase an ESP32-C6 module or board just yet due to limited supplies, don’t despair as more are coming very soon as Espressif tells us to expect more products on Adafruit, Akizuki, Digikey, and Mouser. |
The ESP32-C6 requires ESP-IDF 5.1, which isn't released yet. However, I was able to build a working esphome firmware for the C6 using ESP-IDF master, and esphome dev + esphome/esphome#4364 and esphome/esphome#4377. Meanwhile I cleaned up esphome/esphome#4364 and I believe it is ready for merging. Would be nice if some people could review or test that and give feedback. Same goes for platformio/platform-espressif32#1054. These things needs to happen first, without them supporting ESP32-C6 isn't possible. If you use my branch, make sure to read the commit messages. I'll try to clean up the instructions in stintel/esphome@fbb2dfe after work, as some things are no longer needed. |
Any chance you would also be willing to look at adding support for ESP32-H2 (ESP32-H2-MINI-1 / ESP32-H2-DevKitM-1) as well? At least on paper, the ESP32-H2 looks to need the same config ESP32-C6 but the ESP32-H2 SoC is without Wi-Fi radio support: https://www.espressif.com/en/products/socs/esp32-h2 https://www.espressif.com/en/news/ESP32_H2 https://media.digikey.com/pdf/Data%20Sheets/Espressif%20PDFs/ESP32-H2_MINI_1_Prelim_v0.2_EN.pdf |
If that was directed at me: I don't own a H2, and due to lack of Wi-Fi radio on the H2 and lack of Thread/Zigbee support in ESPHome, I have no use for it either. |
I have just set up a new esp-idf dev environment using VSCode (on windows) and just added the esp-idf extension (v1.6) but this seems to have pulled in esp-idf v5.1 (based on file names in the ~/.espressif folder - is there an canonical way to tell?) Maybe 5.1 is released? (I have built and installed the sample Zigbee projects for the ESP32-C6 using vscode)
@stintel - Should we fork from your branch and submit PRs back to you if we fix anything? (Thanks for your work.) |
As I have not yet created a PR here, feel free to just pull from my branch, and open the PR here yourself. |
FYI, 01Space is sell a tiny ESP32-C6 IoT dev board based on ESP32-C6-WROOM-1 wireless module with two 10-pin headers + USB-C for power: https://www.aliexpress.us/item/3256805225446433.html Again, ESP32-C6 Arduino support will require ESP IDF 5.1 framework which is still under development: |
Espressif released ESP-IDF Pre-release v5.1-beta1 recently. |
I am also interested.. I have one..but not recognized with esphome or web installation.. how can I do? |
@stintel Did you try ESP-IDF Pre-release v5.1-beta1? |
@lboue do you expect it will be possible soon? or late? |
I didn't. Other priorities right now. |
Unfortunately it's not possible to specify 5.1-rc1 in the YAML file like below, so using 5.1-rc1 still requires the same hack as documented in stintel/esphome@f369b9e: esp32:
board: esp32-c6-devkitc-1
framework:
platform_version: https://github.com/stintel/platform-espressif32#esp32-c6-test
type: esp-idf
version: 5.1-rc1 It does seem the platformio registry now has GCC 12.2.0, so that hack is no longer necessary. We can just point to do this in: esphome:
name: "esp32c6-test2"
platformio_options:
platform_packages:
- espressif/toolchain-riscv32-esp @ 12.2.0+20230208 My esp32c6 C6 branch is rebased on current dev. Unfortunately the other issues in the commit message are still there. |
Based on Espressif's previous release history believe assume it should not be very long before ESP-IDF v5.1 GA release is released: https://github.com/espressif/esp-idf/tags |
@Hedda @stintel |
Hi, does this mean the ESP32-c6 is supported now ? |
No, it just means that ESP32-C6 is supported in the upsteam ESP-IDF SDK/libraries which ESPHome is dependent on. Instead keep an eye on esphome/esphome#4377 which should bring initial ESP32-C6 support in ESPHome (which does not include Zigbee or Thread support). |
I have just pushed a change to https://github.com/stintel/platform-espressif32/tree/esp32-c6-test that fixes the linker error I've been hunting for months when using ESP-IDF 5.1. I've also updated https://github.com/stintel/esphome/tree/esp32c6 and the commit message. With the info in there it should be fairly easy to build ESPHome for the ESP32-C6. Does anyone know who to poke to get ESP-IDF 5.1 added to the PlatformIO registry? |
ESP-IDF 5.1 was published on the PlatformIO registry: https://registry.platformio.org/tools/platformio/framework-espidf/versions Will update https://github.com/stintel/platform-espressif32/tree/esp32-c6-test and https://github.com/stintel/esphome/tree/esp32c6 EDIT: done. The snippet below is enough to build for ESP32-C6, using my esp32c6 branch. ---
esphome:
name: "esp32c6-test2"
esp32:
board: esp32-c6-devkitc-1
framework:
platform_version: https://github.com/stintel/platform-espressif32#esp32-c6-test
type: esp-idf
version: 5.1.0 |
Removed extra period at the end from branch URL. |
With the risk of sounding stupid, I would really like to try this build on my Olimex esp32c6-evb boards, but I can't make it compile. $ esphome compile test.yaml
INFO ESPHome 2023.8.0-dev
INFO Reading configuration test.yaml...
WARNING The selected ESP-IDF framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
Failed config
esp32: [source test.yaml:6]
This board is unknown, please set the variant manually.
board: esp32-c6-devkitc-1
framework:
platform_version: https://github.com/stintel/platform-espressif32#esp32-c6-test
type: esp-idf
version: 5.1.0 Thanks anyway for your time and effort!! |
I also have this board and very much hoping to get it to build as well. |
You need to run ESPHome built from my esp32c6 branch. Update: Also, esp32-c6-devkitc-1 might not be compatible with Olimex esp32c6-evb. I'll order a couple of them to test... |
@stintel will you also create a PR so support voor the c6 will be in a future release of esphome? |
I will. I've already created a few related PRs:
Will create a few more small PRs to fix some incompatibilities with ESP-IDF 5.1, cleanup my branch a bit, and finally create a PR for ESP32-C6 support. |
Once I learned how to change git branches, it worked nicely. esphome:
name: "esp32c6-170"
platformio_options:
board_upload.flash_size: 4MB I tried to compile some switch options, but it gives an error and does not compile.
In any case, it gives hope. 👍 |
@udarntors click the 3 dots, Clean Build Files, and retry. |
Thank you !!! I do not know if you mentioned it, but OTA works like a charm! I have however another problem, the boards have 4 optocouplers, trying to configure them as binary sensors fails.
I did try the |
Try this:
|
Still issues with ADC. src/esphome/components/adc/adc_sensor.h:70:3: error: 'esp_adc_cal_characteristics_t' does not name a type |
I personally resolved my compilation issues by removing ESPHome from Home Assistant and reinstalling ESPHome development version. After that, the compilation simply produced no errors, and I've been able to use my ESP32-C6 just like a regular ESP for various sensors and GPIOs up to now. |
@KazadorFR mind sharing your yaml? |
Do you have any Analog Sensors ? My issue is with the Analog Component |
Here is a code to manage a relay for a garage door, along with a DHT22 temperature and humidity sensor. The updates via WiFi work without errors, and everything is controlled from Home Assistant.
|
I will try with an MQ35 to see if I can read the data. |
Super thanks @KazadorFR. I was wondering if you meant just GIO or the whole YAML file, but I see you are still using the stintel branch. |
I have the same problem as everyone else with ADCs, my numerous searches have yielded nothing. I see that an update of the frameworks is in progress, some in beta version but I have not managed to use them, I lack knowledge in this area to succeed |
This is mine. It works fine if I remove the ADC part. ( platform: adc) esphome: esp32: external_components:
#esp32: board: esp32-c6-devkitc-1framework:type: arduinoEnable logginglogger: Enable Home Assistant APIapi: ota: wifi: Enable fallback hotspot (captive portal) in case wifi connection failsap: captive_portal: globals:
sensor:
|
I have purchased 2 Esp32C6 kits and installed them with EspHome, using this configuration: esphome: esp32: logger: api: ote: Wifi: web_server: Light:
output:
I have been able to compile both Esp32C6, however the Wifi does not work, nor does the RGB Led I have seen that #2176 (comment), comments that the WiFi and, supposedly, the RGB LED do work. what am I doing wrong? |
@JoseAntonioMG For wifi, try the following: esp32:
board: esp32-c6-devkitc-1
variant: esp32c6
framework:
type: esp-idf
version: 5.1.2
platform_version: 6.5.0
sdkconfig_options:
CONFIG_OPENTHREAD_ENABLED: n
CONFIG_ENABLE_WIFI_STATION: y
CONFIG_USE_MINIMAL_MDNS: y |
@krnhotwings I have tried what you tell me and it doesn't work. I have the following yaml code:
I have compiled everything correctly and uploaded it to the Esp32c6 via USB, without problems.
|
@JoseAntonioMG I can't comment on the wifi issues (as I have no problems here - everything builds fine once I give it some flash size options, wifi works and OTA is fine) however this is the yaml I use for my ESP32-C6-WROOM-1-N8 boards, that could help with the onboard LED
|
I compiled and uploaded the yaml file through esphome command CLI and it worked, then I was able to use the yaml through esphome in homeassistant and I can OTA update. |
@felipejfc I made a PR to fix deep sleep |
Hello friends of esp32 C6 Although there are some warnings and a not running logger (known problem so far today) everything else is running fine. Warnings to be ignored?!:
here is the config: esp32: Enable logging#logger: (known issue, sadly does not work in the moment) Enable Home Assistant APIapi: ota: wifi: Enable fallback hotspot (captive portal) in case wifi connection failsap: captive_portal: web_server: switch: Set relays as switches
binary_sensor: Opto inputs as GPIOopen -> Pin is high -> inverted: true
######################################### Wifi Signalsensor:
Kind regards |
@MYG63 I made a fork to search a solution for the logger, and committed some changes. If you want to try it look here |
I just compiled esphome for my new WT0132C6 module (ESP32-C6 mini compatible with 4MB flash). The config posted by @MYG63 also works on this module. @MYG63: You probably have to add @ferrets6: I tried to compile your fork, however when I enable the logger, I get the following error. Did you set any special
|
@chbmuc nope, the only difference I see is the board: I'll try with this config to see if I can solve the issue |
I used the below configuration but the device is always offline in home assistant. Tho I can see the AP on my phone WIFI so as I understand the device is flashed correctly. I also tried I'm flashing from within esphome inside home assistant web interface over USB.
|
Hello all together,
I get the following errors when linking is done: The rest of the board is running - only LEDc is not. Please see my complete yaml above in an earlier post. |
@MYG63 - try clearing your build files, that worked for me. |
I can provide a working configuration for a ESP32-C6-WROOM-1-N8 DevKit Board (Waveshare, 160 MHz, 8 MB) compiled with platform 6.6.0 and esp-idf 5.2.1, I am using it as a Bluetooth proxy for ESPHome. Works really well. kind regards
|
it works, thanks |
Here's the properly formatted config of the below:
Original:
|
Got everything working, See my solution here: esphome/issues#5938 (comment) |
Describe the problem you have/What new integration you would like
Provide ability to compile and flash ESPHome firmware to the new ESP32-C6 chipsets. In particular the ESP32-c6-DevKitC-1 is available now. This model contains native support for 802.14.4, and has esp-idf library support for ZigBee / Thread communication.
Please describe your use case for this integration and alternatives you've tried:
Build and deploy firmware to this model of chipset. This is also a first step to be able to support ZIgBee / Thread on this device (but that would be a separate project). This is just support existing ESPHome components via native build/flash.
Additional context
The text was updated successfully, but these errors were encountered: