Skip to content
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

Closed
linkedupbits opened this issue Mar 19, 2023 · 119 comments
Closed

Support for ESP32-C6 chipset #2176

linkedupbits opened this issue Mar 19, 2023 · 119 comments

Comments

@linkedupbits
Copy link

linkedupbits commented Mar 19, 2023

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

@Hedda
Copy link

Hedda commented Mar 20, 2023

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

https://espressif-docs.readthedocs-hosted.com/projects/espressif-esp-dev-kits/en/latest/esp32c6/esp32-c6-devkitc-1/index.html

espressif/esp-idf#10423

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/

image

image

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:

  • Wireless module – ESP32-C6-WROOM-1 with
    • ESP32-C6 single-core 32-bit RISC-V clocked up to 160 MHz 320KB ROM, 512KB SRAM, low-power RISC-V core @ up to 20 MHz
    • Wireless – 2.4 GHz WiFi 6, Bluetooth 5.0 LE, 802.15.4 radio for Zigbee 3.0 and Thread. Matter compatible. PCB antenna
      8MB SPI flash
  • USB – 1x USB Type-C host port, 1x USB Type-C port via UART console
  • I/Os – 2x 16-pin headers with GPIO, UART, SPI, ADC, SDIO, USB, I2S, etc…
  • Misc – Reset and BOOT buttons, RGB LED, J5 header/jumper for current measurement
  • Power Supply (mutually exclusive options)
    • 5V via USB-UART port (recommended)
    • 5V and GND pin headers
    • 3V3 and GND pin headers
  • Dimensions – 51.8 x ~20 mm

image

image

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.

@stintel
Copy link

stintel commented Mar 20, 2023

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.

@Hedda
Copy link

Hedda commented Mar 20, 2023

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

https://github.com/espressif/esp-idf/search?q=esp32h2

@stintel
Copy link

stintel commented Mar 20, 2023

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?

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.

@linkedupbits
Copy link
Author

linkedupbits commented Mar 20, 2023

The ESP32-C6 requires ESP-IDF 5.1, which isn't released yet.

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)

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.

@stintel - Should we fork from your branch and submit PRs back to you if we fix anything?

(Thanks for your work.)

@stintel
Copy link

stintel commented Mar 20, 2023

@stintel - Should we fork from your branch and submit PRs back to you if we fix anything?

As I have not yet created a PR here, feel free to just pull from my branch, and open the PR here yourself.

@Hedda
Copy link

Hedda commented Apr 5, 2023

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

image

Again, ESP32-C6 Arduino support will require ESP IDF 5.1 framework which is still under development:

espressif/arduino-esp32#7713

espressif/arduino-esp32#7852

@lboue
Copy link

lboue commented May 25, 2023

@Hedda
@stintel
@linkedupbits

Espressif released ESP-IDF Pre-release v5.1-beta1 recently.
So I think we can start doing some testing to add C6 card support in the beta branch of ESPHome. What do you think?

ESP-IDF doc for ESP32-C6 pre-release v5.1-beta1

image

@platini76
Copy link

I am also interested.. I have one..but not recognized with esphome or web installation.. how can I do?

@lboue
Copy link

lboue commented Jun 13, 2023

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.

@stintel Did you try ESP-IDF Pre-release v5.1-beta1?

@platini76
Copy link

@lboue do you expect it will be possible soon? or late?

@stintel
Copy link

stintel commented Jun 14, 2023

@stintel Did you try ESP-IDF Pre-release v5.1-beta1?

I didn't. Other priorities right now.

@stintel
Copy link

stintel commented Jun 20, 2023

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.

@Hedda
Copy link

Hedda commented Jun 21, 2023

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

https://github.com/espressif/esp-idf/releases

espressif/arduino-esp32#7852

espressif/arduino-esp32#7713

espressif/arduino-esp32#7733

@lboue
Copy link

lboue commented Jul 1, 2023

@Hedda @stintel
ESP-IDF Release v5.1 has been released.

@juanimoni
Copy link

Hi, does this mean the ESP32-c6 is supported now ?

@Hedda
Copy link

Hedda commented Jul 14, 2023

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).

@stintel
Copy link

stintel commented Jul 26, 2023

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?

@stintel
Copy link

stintel commented Aug 3, 2023

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

@enrique
Copy link

enrique commented Aug 3, 2023

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.

@udarntors
Copy link

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.
Actually, it does not get pass this:

$ 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!!

@EmilyNerdGirl
Copy link

Olimex esp32c6-evb

I also have this board and very much hoping to get it to build as well.

@stintel
Copy link

stintel commented Aug 4, 2023

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...
Update 2: Bad timing ... Olimex is closed from 7/08 - 18/08. And by then I'm travelling.

@FutureCow
Copy link

@stintel will you also create a PR so support voor the c6 will be in a future release of esphome?

@stintel
Copy link

stintel commented Aug 4, 2023

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.

@udarntors
Copy link

Once I learned how to change git branches, it worked nicely.
For the first boot up it crashed in a loop, I needed to add the flash size:

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.

/Users/radu/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32c6-170/src/esphome/components/api/api_connection.o: in function `esphome::api::APIConnection::switch_command(esphome::api::SwitchCommandRequest const&)':
/Users/radu/wk/.esphome/build/esp32c6-170/src/esphome/components/api/api_connection.cpp:489: undefined reference to `esphome::switch_::Switch::turn_on()'
/Users/radu/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /Users/radu/wk/.esphome/build/esp32c6-170/src/esphome/components/api/api_connection.cpp:489: undefined reference to `esphome::switch_::Switch::turn_off()'
/Users/radu/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32c6-170/src/esphome/core/controller.o: in function `esphome::Controller::setup_controller(bool)':
/Users/radu/wk/.esphome/build/esp32c6-170/src/esphome/core/controller.cpp:35: undefined reference to `esphome::switch_::Switch::add_on_state_callback(std::function<void (bool)>&&)'
/Users/radu/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32c6-170/src/main.o: in function `setup()':
/Users/radu/wk/.esphome/build/esp32c6-170/src/main.cpp:123: undefined reference to `esphome::switch_::Switch::Switch()'
/Users/radu/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32c6-170/src/main.o: in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()':
/Users/radu/.platformio/packages/toolchain-riscv32-esp/riscv32-esp-elf/include/c++/12.2.0/bits/basic_string.h:795: undefined reference to `vtable for esphome::gpio::GPIOSwitch'
/Users/radu/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /Users/radu/.platformio/packages/toolchain-riscv32-esp/riscv32-esp-elf/include/c++/12.2.0/bits/basic_string.h:795: undefined reference to `vtable for esphome::gpio::GPIOSwitch'
/Users/radu/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32c6-170/src/main.o: in function `setup()':
/Users/radu/wk/.esphome/build/esp32c6-170/src/main.cpp:124: undefined reference to `vtable for esphome::gpio::GPIOSwitch'
/Users/radu/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /Users/radu/wk/.esphome/build/esp32c6-170/src/main.cpp:124: undefined reference to `vtable for esphome::gpio::GPIOSwitch'
collect2: error: ld returned 1 exit status
*** [.pioenvs/esp32c6-170/firmware.elf] Error 1
======================================================= [FAILED] Took 15.41 seconds =======================================================

In any case, it gives hope. 👍

@stintel
Copy link

stintel commented Aug 4, 2023

@udarntors click the 3 dots, Clean Build Files, and retry.

@udarntors
Copy link

@udarntors click the 3 dots, Clean Build Files, and retry.

Thank you !!!
After cleaning the build files, it did compile.

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.

In file included from src/esphome/components/binary_sensor/automation.cpp:2:
src/esphome/components/binary_sensor/automation.cpp: In member function 'void esphome::binary_sensor::MultiClickTrigger::on_state_(bool)':
src/esphome/components/binary_sensor/automation.cpp:25:21: error: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
   25 |       ESP_LOGV(TAG, "START min=%u max=%u", evt.min_length, evt.max_length);
      |                     ^~~~~~~~~~~~~~~~~~~~~
src/esphome/core/log.h:69:36: note: in definition of macro 'ESPHOME_LOG_FORMAT'
   69 | #define ESPHOME_LOG_FORMAT(format) format
      |                                    ^~~~~~
src/esphome/core/log.h:151:28: note: in expansion of macro 'esph_log_v'
  151 | #define ESP_LOGV(tag, ...) esph_log_v(tag, __VA_ARGS__)
      |                            ^~~~~~~~~~
src/esphome/components/binary_sensor/automation.cpp:25:7: note: in expansion of macro 'ESP_LOGV'
   25 |       ESP_LOGV(TAG, "START min=%u max=%u", evt.min_length, evt.max_length);
      |       ^~~~~~~~
src/esphome/components/binary_sensor/automation.cpp:25:33: note: format string is defined here
   25 |       ESP_LOGV(TAG, "START min=%u max=%u", evt.min_length, evt.max_length);
      |                                ~^
      |                                 |
      |                                 unsigned int
      |                                %lu
src/esphome/components/binary_sensor/automation.cpp:25:21: error: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
   25 |       ESP_LOGV(TAG, "START min=%u max=%u", evt.min_length, evt.max_length);
      |                     ^~~~~~~~~~~~~~~~~~~~~
src/esphome/core/log.h:69:36: note: in definition of macro 'ESPHOME_LOG_FORMAT'
   69 | #define ESPHOME_LOG_FORMAT(format) format
      |                                    ^~~~~~
src/esphome/core/log.h:151:28: note: in expansion of macro 'esph_log_v'
  151 | #define ESP_LOGV(tag, ...) esph_log_v(tag, __VA_ARGS__)
      |                            ^~~~~~~~~~
src/esphome/components/binary_sensor/automation.cpp:25:7: note: in expansion of macro 'ESP_LOGV'
   25 |       ESP_LOGV(TAG, "START min=%u max=%u", evt.min_length, evt.max_length);
      |       ^~~~~~~~
src/esphome/components/binary_sensor/automation.cpp:25:40: note: format string is defined here
   25 |       ESP_LOGV(TAG, "START min=%u max=%u", evt.min_length, evt.max_length);
      |                                       ~^
      |                                        |
      |                                        unsigned int
      |                                       %lu
src/esphome/components/binary_sensor/automation.cpp:54:19: error: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
   54 |     ESP_LOGV(TAG, "A i=%u min=%u max=%u", *this->at_index_, evt.min_length, evt.max_length);  // NOLINT
      |                   ^~~~~~~~~~~~~~~~~~~~~~
src/esphome/core/log.h:69:36: note: in definition of macro 'ESPHOME_LOG_FORMAT'
   69 | #define ESPHOME_LOG_FORMAT(format) format
      |                                    ^~~~~~
src/esphome/core/log.h:151:28: note: in expansion of macro 'esph_log_v'
  151 | #define ESP_LOGV(tag, ...) esph_log_v(tag, __VA_ARGS__)
      |                            ^~~~~~~~~~
src/esphome/components/binary_sensor/automation.cpp:54:5: note: in expansion of macro 'ESP_LOGV'
   54 |     ESP_LOGV(TAG, "A i=%u min=%u max=%u", *this->at_index_, evt.min_length, evt.max_length);  // NOLINT
      |     ^~~~~~~~
src/esphome/components/binary_sensor/automation.cpp:54:32: note: format string is defined here
   54 |     ESP_LOGV(TAG, "A i=%u min=%u max=%u", *this->at_index_, evt.min_length, evt.max_length);  // NOLINT
      |                               ~^
      |                                |
      |                                unsigned int
      |                               %lu
src/esphome/components/binary_sensor/automation.cpp:54:19: error: format '%u' expects argument of type 'unsigned int', but argument 7 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
   54 |     ESP_LOGV(TAG, "A i=%u min=%u max=%u", *this->at_index_, evt.min_length, evt.max_length);  // NOLINT
      |                   ^~~~~~~~~~~~~~~~~~~~~~
src/esphome/core/log.h:69:36: note: in definition of macro 'ESPHOME_LOG_FORMAT'
   69 | #define ESPHOME_LOG_FORMAT(format) format
      |                                    ^~~~~~
src/esphome/core/log.h:151:28: note: in expansion of macro 'esph_log_v'
  151 | #define ESP_LOGV(tag, ...) esph_log_v(tag, __VA_ARGS__)
      |                            ^~~~~~~~~~
src/esphome/components/binary_sensor/automation.cpp:54:5: note: in expansion of macro 'ESP_LOGV'
   54 |     ESP_LOGV(TAG, "A i=%u min=%u max=%u", *this->at_index_, evt.min_length, evt.max_length);  // NOLINT
      |     ^~~~~~~~
src/esphome/components/binary_sensor/automation.cpp:54:39: note: format string is defined here
   54 |     ESP_LOGV(TAG, "A i=%u min=%u max=%u", *this->at_index_, evt.min_length, evt.max_length);  // NOLINT
      |                                      ~^
      |                                       |
      |                                       unsigned int
      |                                      %lu
src/esphome/components/binary_sensor/automation.cpp:58:19: error: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
   58 |     ESP_LOGV(TAG, "B i=%u min=%u", *this->at_index_, evt.min_length);  // NOLINT
      |                   ^~~~~~~~~~~~~~~
src/esphome/core/log.h:69:36: note: in definition of macro 'ESPHOME_LOG_FORMAT'
   69 | #define ESPHOME_LOG_FORMAT(format) format
      |                                    ^~~~~~
src/esphome/core/log.h:151:28: note: in expansion of macro 'esph_log_v'
  151 | #define ESP_LOGV(tag, ...) esph_log_v(tag, __VA_ARGS__)
      |                            ^~~~~~~~~~
src/esphome/components/binary_sensor/automation.cpp:58:5: note: in expansion of macro 'ESP_LOGV'
   58 |     ESP_LOGV(TAG, "B i=%u min=%u", *this->at_index_, evt.min_length);  // NOLINT
      |     ^~~~~~~~
src/esphome/components/binary_sensor/automation.cpp:58:32: note: format string is defined here
   58 |     ESP_LOGV(TAG, "B i=%u min=%u", *this->at_index_, evt.min_length);  // NOLINT
      |                               ~^
      |                                |
      |                                unsigned int
      |                               %lu
src/esphome/components/binary_sensor/automation.cpp:62:19: error: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
   62 |     ESP_LOGV(TAG, "C i=%u min=%u", *this->at_index_, evt.min_length);  // NOLINT
      |                   ^~~~~~~~~~~~~~~
src/esphome/core/log.h:69:36: note: in definition of macro 'ESPHOME_LOG_FORMAT'
   69 | #define ESPHOME_LOG_FORMAT(format) format
      |                                    ^~~~~~
src/esphome/core/log.h:151:28: note: in expansion of macro 'esph_log_v'
  151 | #define ESP_LOGV(tag, ...) esph_log_v(tag, __VA_ARGS__)
      |                            ^~~~~~~~~~
src/esphome/components/binary_sensor/automation.cpp:62:5: note: in expansion of macro 'ESP_LOGV'
   62 |     ESP_LOGV(TAG, "C i=%u min=%u", *this->at_index_, evt.min_length);  // NOLINT
      |     ^~~~~~~~
src/esphome/components/binary_sensor/automation.cpp:62:32: note: format string is defined here
   62 |     ESP_LOGV(TAG, "C i=%u min=%u", *this->at_index_, evt.min_length);  // NOLINT
      |                               ~^
      |                                |
      |                                unsigned int
      |                               %lu
src/esphome/components/binary_sensor/automation.cpp: In member function 'void esphome::binary_sensor::MultiClickTrigger::schedule_cooldown_()':
src/esphome/components/binary_sensor/automation.cpp:71:17: error: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
   71 |   ESP_LOGV(TAG, "Multi Click: Invalid length of press, starting cooldown of %u ms...", this->invalid_cooldown_);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/core/log.h:69:36: note: in definition of macro 'ESPHOME_LOG_FORMAT'
   69 | #define ESPHOME_LOG_FORMAT(format) format
      |                                    ^~~~~~
src/esphome/core/log.h:151:28: note: in expansion of macro 'esph_log_v'
  151 | #define ESP_LOGV(tag, ...) esph_log_v(tag, __VA_ARGS__)
      |                            ^~~~~~~~~~
src/esphome/components/binary_sensor/automation.cpp:71:3: note: in expansion of macro 'ESP_LOGV'
   71 |   ESP_LOGV(TAG, "Multi Click: Invalid length of press, starting cooldown of %u ms...", this->invalid_cooldown_);
      |   ^~~~~~~~
src/esphome/components/binary_sensor/automation.cpp:71:78: note: format string is defined here
   71 |   ESP_LOGV(TAG, "Multi Click: Invalid length of press, starting cooldown of %u ms...", this->invalid_cooldown_);
      |                                                                             ~^
      |                                                                              |
      |                                                                              unsigned int
      |                                                                             %lu
Compiling .pioenvs/esp32c6-170/src/esphome/components/gpio/binary_sensor/gpio_binary_sensor.o
In file included from src/esphome/components/esp32/core.cpp:14:
src/esphome/components/esp32/core.cpp: In function 'uint32_t esphome::arch_get_cpu_cycle_count()':
/Users/radu/.platformio/packages/framework-espidf/components/esp_hw_support/include/hal/cpu_hal.h:49:63: warning: 'uint32_t cpu_ll_get_cycle_count()' is deprecated [-Wdeprecated-declarations]
   49 | #define cpu_hal_get_cycle_count()       cpu_ll_get_cycle_count()
      |                                         ~~~~~~~~~~~~~~~~~~~~~~^~
src/esphome/components/esp32/core.cpp:60:10: note: in expansion of macro 'cpu_hal_get_cycle_count'
   60 |   return cpu_hal_get_cycle_count();
      |          ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/radu/.platformio/packages/framework-espidf/components/esp_hw_support/include/hal/cpu_hal.h:16:
/Users/radu/.platformio/packages/framework-espidf/components/esp_hw_support/include/hal/cpu_ll.h:28:56: note: declared here
   28 | FORCE_INLINE_ATTR __attribute__((deprecated)) uint32_t cpu_ll_get_cycle_count(void)
      |                                                        ^~~~~~~~~~~~~~~~~~~~~~
Compiling .pioenvs/esp32c6-170/src/esphome/components/gpio/switch/gpio_switch.o
Compiling .pioenvs/esp32c6-170/src/esphome/components/logger/logger.o
cc1plus: some warnings being treated as errors
*** [.pioenvs/esp32c6-170/src/esphome/components/binary_sensor/automation.o] Error 1
======================================================= [FAILED] Took 17.86 seconds =======================================================

I did try the clean build files trick, does not work on this one.

@stintel
Copy link

stintel commented Aug 5, 2023

Try this:

esphome:
  name: "esp32c6-170"
  platformio_options:
    board_upload.flash_size: 4MB
    build_flags:
      - -Wno-format

@poldim
Copy link
Contributor

poldim commented Feb 4, 2024

@poldim it has been supported in the IDF for quite a while now, back to 5.1 even. The issue is that it is not yet supported in the Arduino core yet. So unfortunately we're not off the hook yet

Gotcha. I was just going off of what @TRusselo said above:
image

@gvargas9
Copy link

gvargas9 commented Feb 6, 2024

Still issues with ADC.

src/esphome/components/adc/adc_sensor.h:70:3: error: 'esp_adc_cal_characteristics_t' does not name a type
70 | esp_adc_cal_characteristics_t cal_characteristics_[SOC_ADC_ATTEN_NUM] = {};
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/adc/adc_sensor.cpp: In member function 'virtual void esphome::adc::ADCSensor::setup()':
src/esphome/components/adc/adc_sensor.cpp:75:48: error: 'cal_characteristics_' was not declared in this scope
75 | &cal_characteristics_[i]);
| ^~~~~~~~~~~~~~~~~~~~
src/esphome/components/adc/adc_sensor.cpp:73:22: error: 'esp_adc_cal_characterize' was not declared in this scope
73 | auto cal_value = esp_adc_cal_characterize(adc_unit, (adc_atten_t) i, ADC_WIDTH_MAX_SOC_BITS,
| ^~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/adc/adc_sensor.cpp:77:12: error: 'ESP_ADC_CAL_VAL_EFUSE_VREF' was not declared in this scope
77 | case ESP_ADC_CAL_VAL_EFUSE_VREF:
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/components/adc/adc_sensor.cpp:80:12: error: 'ESP_ADC_CAL_VAL_EFUSE_TP' was not declared in this scope
80 | case ESP_ADC_CAL_VAL_EFUSE_TP:

@KazadorFR
Copy link

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.

@rotilho
Copy link

rotilho commented Feb 10, 2024

@KazadorFR mind sharing your yaml?

@gvargas9
Copy link

Do you have any Analog Sensors ? My issue is with the Analog Component

@KazadorFR
Copy link

KazadorFR commented Feb 10, 2024

@KazadorFRça vous dérange de partager votre yaml ?

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.

esphome:
  name: garage-relay
  friendly_name: Garage-relay

esp32:
  board: esp32-c6-devkitc-1
  variant: esp32c6
  framework:
    type: esp-idf
    version: "5.1.2"
    platform_version: https://github.com/stintel/platform-espressif32#esp32-c6-test

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "your encryption key"

ota:
  password: "your password"

switch:
  - platform: gpio
    pin: 13
    inverted: true
    id: garage_relay
    restore_mode: ALWAYS_OFF
  - platform: template
    name: "Garage Door"
    turn_on_action:
      - switch.turn_on: garage_relay
      - delay: 500ms
      - switch.turn_off: garage_relay
    turn_off_action:
      - switch.turn_off: garage_relay

sensor:
  - platform: dht
    pin: 12
    temperature:
      name: "Garage Temperature"
    humidity:
      name: "Garage Humidity"
    update_interval: 60s

captive_portal:


@KazadorFR
Copy link

Do you have any Analog Sensors ? My issue is with the Analog Component

I will try with an MQ35 to see if I can read the data.

@rotilho
Copy link

rotilho commented Feb 10, 2024

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.

@KazadorFR
Copy link

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

@gvargas9
Copy link

This is mine. It works fine if I remove the ADC part. ( platform: adc)

esphome:
name: esp32c6-hidrophonics
friendly_name: ESP32_Hidrophonics

esp32:
board: esp32-c6-devkitc-1
variant: esp32c6
framework:
type: esp-idf
version: 5.1.2
platform_version: 6.5.0

external_components:

#esp32:

board: esp32-c6-devkitc-1

framework:

type: arduino

Enable logging

logger:
level: VERBOSE

Enable Home Assistant API

api:
encryption:
key: "Lit2JVZRacMBKVu6Zmq/BJI+yQanlKjg2p5vnR/jRbc="

ota:
password: "c7bc3814c5b1f875b7ef652992af52ca"

wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password

Enable fallback hotspot (captive portal) in case wifi connection fails

ap:
ssid: "Esp32-Hidrophonics"
password: "1wMAJYrwkx2Y"

captive_portal:

globals:

  • id: maxdelay
    type: int
    restore_value: no
    initial_value: '60' #Default Initial Value 1 hour

sensor:

  • name: "ADC 1"
    platform: adc
    pin: GPIO0
    update_interval: 5s
    raw: true

@JoseAntonioMG
Copy link

I have purchased 2 Esp32C6 kits and installed them with EspHome, using this configuration:

esphome:
name: esp32-c6
friendly_name: ESP32-C6
on_boot:
priority: 600
then:
- output.turn_on: bh1750_dvi_pin

esp32:
board: esp32-c6-devkitc-1
variant: esp32c6
framework:
platform_version: https://github.com/stintel/platform-espressif32#esp32-c6-test
version: 5.1.2
type: esp-idf

logger:

api:
encryption:
key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

ote:
password: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Wifi:
ssid: "xxxxxxxxx"
password: "xxxxxxxxxxxx"
manual_ip:
static_ip: 192.168.0.108
gateway: 192.168.0.1
subnet: 255.255.255.0

web_server:
port: 80

Light:

  • platform: rgb
    id: rgb_led
    name: rgb_led
    network: red_led
    green: green_led
    blue: blue_led

output:

  • platform: ledc
    pin:
    number: 1
    inverted: true
    id: blue_led
  • platform: ledc
    pin:
    number: 5
    inverted: true
    id: red_led
  • platform: ledc
    pin:
    number: 0
    inverted: true
    id: green_led
  • platform: gpio
    pin: 4
    id: bh1750_dvi_pin

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?

@krnhotwings
Copy link

@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

@JoseAntonioMG
Copy link

@krnhotwings I have tried what you tell me and it doesn't work.

I have the following yaml code:

esphome:
  name: esp32-c6
  friendly_name: ESP32-C6

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

logger:

api:
  encryption:
    key: "o8lxN0Ir83U1He6TfS3PvLwiELcNGQzgDUU/mSN5bps="

ota:
  password: "bbb3996f4c3cc754988261369bcf689b"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: 192.168.0.108
    gateway: 192.168.0.1
    subnet: 255.255.255.0

web_server:
  port: 80

captive_portal:

I have compiled everything correctly and uploaded it to the Esp32c6 via USB, without problems.
I have tried viewing the logs over USB and it shows:

ESP-ROM:esp32c6-20220919
Build:Sep 19 2022
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:2
load:0x4086c410,len:0xc24
load:0x4086e610,len:0x2708
load:0x40875728,len:0x594
entry 0x4086c410

@jeromehettich
Copy link

@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

esphome:
  name: esp32-c6-board-1
  friendly_name: Pillar LED - Fence

esp32:
  board: esp32-c6-devkitc-1
  variant: esp32c6
  flash_size: 8MB
  framework:
    type: esp-idf
    version: 5.1.2
    platform_version: 6.5.0
    sdkconfig_options:
      CONFIG_ESPTOOLPY_FLASHSIZE_8MB: y

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: xxxxx

ota:
  password: !secret ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: Esp32-C6-Board-1
    password: !secret ap_password

light:
  - platform: esp32_rmt_led_strip
    rmt_channel: 0
    chipset: WS2812
    rgb_order: GRB
    pin: GPIO8
    num_leds: 1
    name: "Status LED"
    id: internal_led
    icon: mdi:led-outline

@JoseAntonioMG
Copy link

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.
thank you

@ferrets6
Copy link

@felipejfc I made a PR to fix deep sleep

@MYG63
Copy link

MYG63 commented Mar 22, 2024

esp32-c6-test.yaml.txt

Hello friends of esp32 C6
I want to commit a running OLIMEX ESP32-C6-EVB board here. Thank you for all these efforts.
You can check out this very nice open source hardware here: https://www.olimex.com/Products/IoT/ESP32-C6/ESP32-C6-EVB/open-source-hardware

Although there are some warnings and a not running logger (known problem so far today) everything else is running fine.
I'd like to share the config here. Tested so far is webserver, wifi, gpio out and input and ota. Also flashing via usb cable was possbile from chrome in a windows machine.
I use esphome web from docker in the version from yesterday: 2024.3.0

Warnings to be ignored?!:

  • WARNING The selected ESP-IDF framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
  • WARNING GPIO8 is a strapping PIN and should only be used for I/O with care.
  • WARNING GPIO15 is a strapping PIN and should only be used for I/O with care.
  • Warning! Flash memory size mismatch detected. Expected 4MB, found 2MB! (I know this chip has 4MB - its a little confusing)

here is the config:
esphome:
name: esp32-c6-test
friendly_name: esp32_c6_test

esp32:
board: esp32-c6-devkitm-1
variant: esp32c6
flash_size: 4MB
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

Enable logging

#logger: (known issue, sadly does not work in the moment)

Enable Home Assistant API

api:
encryption:
key: "XxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxmM="

ota:
password: "xxxxxxxxxxxxxxxxxxxxa1"

wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password

Enable fallback hotspot (captive portal) in case wifi connection fails

ap:
ssid: "Esp32-C6-Test Fallback Hotspot"
password: "testtest"

captive_portal:

web_server:
auth:
username: admin
password: xxxxxx

switch:

Set relays as switches

  • id: relay_1
    platform: gpio
    pin: 10
    name: "Relais 1"

  • id: relay_2
    platform: gpio
    pin: 11
    name: "Relais 2"

  • id: relay_3
    platform: gpio
    pin: 22
    name: "Relais 3"

  • id: relay_4
    platform: gpio
    pin: 23
    name: "Relais 4"

  • id: gpio_8_led
    platform: gpio
    pin: 8
    inverted: true
    name: "GPIO_8_LED"

binary_sensor:

Opto inputs as GPIO

open -> Pin is high -> inverted: true

  • platform: gpio
    name: "Eingang 1"
    pin:
    number: 1
    inverted: true
    mode:
    input: true
    filters:

    • delayed_on: 10ms
    • delayed_off: 10ms
  • platform: gpio
    name: "Eingang 2"
    pin:
    number: 2
    inverted: true
    mode:
    input: true
    filters:

    • delayed_on: 10ms
    • delayed_off: 10ms
  • platform: gpio
    name: "Eingang 3"
    pin:
    number: 3
    inverted: true
    mode:
    input: true
    filters:

    • delayed_on: 10ms
    • delayed_off: 10ms
  • platform: gpio
    name: "Eingang 4"
    pin:
    number: 15
    inverted: true
    mode:
    input: true
    filters:

    • delayed_on: 10ms
    • delayed_off: 10ms

#########################################

Wifi Signal

sensor:

  • platform: wifi_signal
    name: "WiFi Signal"
    update_interval: 120s

Kind regards
Martin from Germany

@ferrets6
Copy link

ferrets6 commented Mar 22, 2024

Although there are some warnings and a not running logger (known problem so far today) everything else is running fine. I'd like to share the config here.

@MYG63 I made a fork to search a solution for the logger, and committed some changes.
It works well on my board esp32-c6-devkitc-1

If you want to try it look here

@chbmuc
Copy link

chbmuc commented Mar 26, 2024

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 CONFIG_ESPTOOLPY_FLASHSIZE_4MB: y under the sdkconfig_options, to resolve the flash size issues.

@ferrets6: I tried to compile your fork, however when I enable the logger, I get the following error. Did you set any special CONFIG_ESP_CONSOLE_... options?

.platformio/packages/framework-espidf/components/esp_hw_support/sleep_modes.c:152:61: error: 'CONFIG_ESP_CONSOLE_UART_BAUDRATE' undeclared (first use in this function); did you mean 'CONFIG_ESP_CONSOLE_UART_NUM'?

@ferrets6
Copy link

@ferrets6: I tried to compile your fork, however when I enable the logger, I get the following error. Did you set any special CONFIG_ESP_CONSOLE_... options?

.platformio/packages/framework-espidf/components/esp_hw_support/sleep_modes.c:152:61: error: 'CONFIG_ESP_CONSOLE_UART_BAUDRATE' undeclared (first use in this function); did you mean 'CONFIG_ESP_CONSOLE_UART_NUM'?

@chbmuc nope, the only difference I see is the board:
@MYG63 used esp32-c6-devkitm-1, but mine is esp32-c6-devkitc-1

I'll try with this config to see if I can solve the issue

@rgnyldz
Copy link

rgnyldz commented Apr 8, 2024

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 board: esp32-c6-devkitc-1 with no luck.

I'm flashing from within esphome inside home assistant web interface over USB.

esphome:
  name: motionsensor-2
  friendly_name: MotionSensor 2

esp32:
  board: esp32-c6-devkitm-1
  variant: esp32c6
  flash_size: 4MB
  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

logger:

api:
  encryption:
    key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

ota:
  password: "XXXXXXXXXXXXXXXXXXXXXXXXX"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  ap:
    ssid: "Motionsensor-2 Fallback Hotspot"
    password: "XXXXXXXXXX"

captive_portal:

sensor:
  - platform: wifi_signal
    name: "WiFi Signal"
    update_interval: 3s

@MYG63
Copy link

MYG63 commented Apr 17, 2024

Hello all together,
I'm back with a new issue for ESP32 C6 on esphome. I'm using esphome in a docker with version 2024.4.0
I want to use ledc for controlling a LED output. If I use ledc with the following yaml:
light:

  • platform: monochromatic
    gamma_correct: 0
    output: gpio_5
    name: "Lamp control PWM"
    output:
  • platform: ledc
    pin: GPIO5
    id: gpio_5
    frequency: "400Hz"

I get the following errors when linking is done:
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/esphome/components/api/api_connection.o: in function esphome::Application::get_light_by_key(unsigned long, bool)': /config/.esphome/build/esp32-c6-test/src/esphome/core/application.h:283: undefined reference to esphome::light::LightState::make_call()'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/esphome/components/api/api_connection.o: in function esphome::api::APIConnection::light_command(esphome::api::LightCommandRequest const&)': /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:424: undefined reference to esphome::light::LightCall::set_state(bool)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:426: undefined reference to esphome::light::LightCall::set_brightness(float)' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:428: undefined reference to esphome::light::LightCall::set_color_mode(esphome::light::ColorMode)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:430: undefined reference to esphome::light::LightCall::set_color_brightness(float)' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:432: undefined reference to esphome::light::LightCall::set_red(float)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:433: undefined reference to esphome::light::LightCall::set_green(float)' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:434: undefined reference to esphome::light::LightCall::set_blue(float)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:437: undefined reference to esphome::light::LightCall::set_white(float)' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:439: undefined reference to esphome::light::LightCall::set_color_temperature(float)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:441: undefined reference to esphome::light::LightCall::set_cold_white(float)' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:443: undefined reference to esphome::light::LightCall::set_warm_white(float)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:445: undefined reference to esphome::light::LightCall::set_transition_length(unsigned long)' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:447: undefined reference to esphome::light::LightCall::set_flash_length(unsigned long)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:449: undefined reference to esphome::light::LightCall::set_effect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:450: undefined reference to esphome::light::LightCall::perform()'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/esphome/components/api/api_connection.o: in function esphome::api::APIConnection::send_light_state(esphome::light::LightState*)': /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:362: undefined reference to esphome::light::LightState::get_traits()'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:377: undefined reference to esphome::light::LightState::supports_effects()' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:380: undefined reference to esphome::light::LightState::get_effect_nameabi:cxx11'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/esphome/components/api/api_connection.o: in function esphome::api::APIConnection::send_light_info(esphome::light::LightState*)': /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:384: undefined reference to esphome::light::LightState::get_traits()'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/api/api_connection.cpp:403: undefined reference to esphome::light::LightState::supports_effects()' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/esphome/components/api/api_connection.o: in function esphome::api::enums::ColorMode& std::vector<esphome::api::enums::ColorMode, std::allocatoresphome::api::enums::ColorMode >::emplace_backesphome::api::enums::ColorMode(esphome::api::enums::ColorMode&&)':
/config/.esphome/platformio/packages/toolchain-riscv32-esp/riscv32-esp-elf/include/c++/12.2.0/bits/vector.tcc:114: undefined reference to esphome::light::LightState::get_effects() const' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/esphome/components/web_server/web_server.o: in function .LVL32':
/config/.esphome/build/esp32-c6-test/src/esphome/components/web_server_idf/web_server_idf.h:47: undefined reference to esphome::light::LightCall::perform()' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/esphome/components/web_server/web_server.o: in function .LVL35':
/config/.esphome/build/esp32-c6-test/src/esphome/components/web_server/web_server.cpp:718: undefined reference to esphome::light::LightCall::perform()' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/esphome/components/web_server/web_server.o: in function std::__new_allocator::allocate(unsigned int, void const*)':
/config/.esphome/platformio/packages/toolchain-riscv32-esp/riscv32-esp-elf/include/c++/12.2.0/bits/new_allocator.h:137: undefined reference to esphome::light::LightState::toggle()' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/esphome/components/web_server/web_server.o: in function .L0 ':
/config/.esphome/build/esp32-c6-test/src/esphome/components/web_server/web_server.cpp:651: undefined reference to esphome::light::LightCall::perform()' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/esphome/components/web_server/web_server.o: in function esphome::web_server::WebServer::handle_light_request(esphome::web_server_idf::AsyncWebServerRequest*, esphome::web_server::UrlMatch const&)':
/config/.esphome/build/esp32-c6-test/src/esphome/components/web_server/web_server.cpp:726: undefined reference to esphome::light::LightState::turn_on()' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/web_server/web_server.cpp:656: undefined reference to esphome::light::LightCall::set_brightness(float)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/web_server/web_server.cpp:661: undefined reference to esphome::light::LightCall::set_red(float)' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/web_server/web_server.cpp:664: undefined reference to esphome::light::LightCall::set_green(float)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/esphome/components/web_server/web_server.o: in function std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()': /config/.esphome/platformio/packages/toolchain-riscv32-esp/riscv32-esp-elf/include/c++/12.2.0/bits/basic_string.h:795: undefined reference to esphome::light::LightCall::set_blue(float)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/esphome/components/web_server/web_server.o: in function esphome::web_server::WebServer::handle_light_request(esphome::web_server_idf::AsyncWebServerRequest*, esphome::web_server::UrlMatch const&)': /config/.esphome/build/esp32-c6-test/src/esphome/components/web_server/web_server.cpp:674: undefined reference to esphome::light::LightCall::set_white(float)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/web_server/web_server.cpp:679: undefined reference to esphome::light::LightCall::set_color_temperature(float)' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/web_server/web_server.cpp:682: undefined reference to esphome::light::LightCall::set_flash_length(unsigned long)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/web_server/web_server.cpp:686: undefined reference to esphome::light::LightCall::set_transition_length(unsigned long)' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/esphome/components/web_server/web_server.o: in function std::__cxx11::basic_string<char, std::char_traits, std::allocator >::~basic_string()':
/config/.esphome/platformio/packages/toolchain-riscv32-esp/riscv32-esp-elf/include/c++/12.2.0/bits/basic_string.h:795: undefined reference to esphome::light::LightCall::set_effect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/esphome/components/web_server/web_server.o: in function esphome::web_server::WebServer::handle_light_request(esphome::web_server_idf::AsyncWebServerRequest*, esphome::web_server::UrlMatch const&)':
/config/.esphome/build/esp32-c6-test/src/esphome/components/web_server/web_server.cpp:698: undefined reference to esphome::light::LightState::turn_off()' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/web_server/web_server.cpp:703: undefined reference to esphome::light::LightCall::set_transition_length(unsigned long)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/esphome/components/web_server/web_server.o: in function ArduinoJson6185_71::VariantRef ArduinoJson6185_71::ObjectRef::getOrAddMember<char const>(char const*) const': /config/.esphome/build/esp32-c6-test/.piolibdeps/esp32-c6-test/ArduinoJson/src/ArduinoJson/Object/ObjectRef.hpp:207: undefined reference to esphome::light::LightJSONSchema::dump_json(esphome::light::LightState&, ArduinoJson6185_71::ObjectRef)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/esphome/components/web_server/web_server.o: in function .L0 ': /config/.esphome/build/esp32-c6-test/src/esphome/components/web_server/web_server.cpp:732: undefined reference to esphome::light::LightState::get_effects() const'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/esphome/core/controller.o: in function esphome::Controller::setup_controller(bool)': /config/.esphome/build/esp32-c6-test/src/esphome/core/controller.cpp:22: undefined reference to esphome::light::LightState::add_new_remote_values_callback(std::function<void ()>&&)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/main.o: in function esphome::monochromatic::MonochromaticLightOutput::write_state(esphome::light::LightState*)': /config/.esphome/build/esp32-c6-test/src/esphome/components/monochromatic/monochromatic_light_output.h:20: undefined reference to esphome::light::LightState::current_values_as_brightness(float*)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/esphome/components/monochromatic/monochromatic_light_output.h:21: undefined reference to esphome::output::FloatOutput::set_level(float)' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/main.o: in function esphome::gpio::GPIOBinarySensor* esphome::Application::register_componentesphome::gpio::GPIOBinarySensor(esphome::gpio::GPIOBinarySensor*)':
/config/.esphome/build/esp32-c6-test/src/esphome/core/application.h:163: undefined reference to esphome::light::LightState::LightState(esphome::light::LightOutput*)' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/main.o: in function esphome::Application::register_binary_sensor(esphome::binary_sensor::BinarySensor*)':
/config/.esphome/build/esp32-c6-test/src/esphome/core/application.h:90: undefined reference to esphome::light::LightState::set_restore_mode(esphome::light::LightRestoreMode)' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/main.o: in function setup()':
/config/.esphome/build/esp32-c6-test/src/main.cpp:536: undefined reference to esphome::light::LightState::set_default_transition_length(unsigned long)' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/main.cpp:537: undefined reference to esphome::light::LightState::set_flash_transition_length(unsigned long)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/main.cpp:537: undefined reference to esphome::light::LightState::set_gamma_correct(float)' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/main.cpp:539: undefined reference to esphome::light::LightState::add_effects(std::vector<esphome::light::LightEffect*, std::allocatoresphome::light::LightEffect* > const&)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/main.cpp:543: undefined reference to esphome::ledc::next_ledc_channel' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/main.cpp:543: undefined reference to vtable for esphome::ledc::LEDCOutput'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/main.cpp:543: undefined reference to vtable for esphome::ledc::LEDCOutput' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/main.cpp:543: undefined reference to vtable for esphome::ledc::LEDCOutput'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/main.cpp:543: undefined reference to vtable for esphome::ledc::LEDCOutput' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/main.o: in function esphome::binary_sensor::DelayedOffFilter* esphome::Application::register_componentesphome::binary_sensor::DelayedOffFilter(esphome::binary_sensor::DelayedOffFilter*)':
/config/.esphome/build/esp32-c6-test/src/esphome/core/application.h:163: undefined reference to esphome::ledc::next_ledc_channel' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/main.o: in function setup()':
/config/.esphome/build/esp32-c6-test/src/main.cpp:547: undefined reference to esphome::ledc::next_ledc_channel' /config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /config/.esphome/build/esp32-c6-test/src/main.cpp:547: undefined reference to esphome::output::FloatOutput::set_zero_means_zero(bool)'
/config/.esphome/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/esp32-c6-test/src/main.o:(.rodata._ZTVN7esphome13monochromatic24MonochromaticLightOutputE[_ZTVN7esphome13monochromatic24MonochromaticLightOutputE]+0xc): undefined reference to `esphome::light::LightOutput::create_default_transition()'
collect2: error: ld returned 1 exit status
*** [.pioenvs/esp32-c6-test/firmware.elf] Error 1

The rest of the board is running - only LEDc is not. Please see my complete yaml above in an earlier post.
anyone any ideas?

@Somerley
Copy link

@MYG63 - try clearing your build files, that worked for me.

@GLSSoftware
Copy link

GLSSoftware commented May 14, 2024

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

esphome:
  name: esp32-c6
  friendly_name: ESP32-C6

esp32:
  board: esp32-c6-devkitc-1
  flash_size: 8MB
  variant: esp32c6
  framework:
    type: esp-idf
    version: "5.2.1"
    platform_version: 6.6.0
    sdkconfig_options:
      CONFIG_OPENTHREAD_ENABLED: n
      CONFIG_ENABLE_WIFI_STATION: y
      CONFIG_USE_MINIMAL_MDNS: y
      CONFIG_ESPTOOLPY_FLASHSIZE_8MB: y

# fix for logger from luar123 (thanks!)
external_components:
    - source: github://luar123/esphome@fix_logger
      components: [ logger ]
      refresh: never

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

ota:
  password: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32-C6 Hotspot"
    password: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

captive_portal:

bluetooth_proxy:
  active: true

@Simon-Leung
Copy link

This is mine. It works fine if I remove the ADC part. ( platform: adc)

esphome: name: esp32c6-hidrophonics friendly_name: ESP32_Hidrophonics

esp32: board: esp32-c6-devkitc-1 variant: esp32c6 framework: type: esp-idf version: 5.1.2 platform_version: 6.5.0

external_components:

#esp32:

board: esp32-c6-devkitc-1

framework:

type: arduino

Enable logging

logger: level: VERBOSE

Enable Home Assistant API

api: encryption: key: "Lit2JVZRacMBKVu6Zmq/BJI+yQanlKjg2p5vnR/jRbc="

ota: password: "c7bc3814c5b1f875b7ef652992af52ca"

wifi: ssid: !secret wifi_ssid password: !secret wifi_password

Enable fallback hotspot (captive portal) in case wifi connection fails

ap: ssid: "Esp32-Hidrophonics" password: "1wMAJYrwkx2Y"

captive_portal:

globals:

  • id: maxdelay
    type: int
    restore_value: no
    initial_value: '60' #Default Initial Value 1 hour

sensor:

  • name: "ADC 1"
    platform: adc
    pin: GPIO0
    update_interval: 5s
    raw: true

it works, thanks

@jrhodnik
Copy link

Here's the properly formatted config of the below:

esphome:
  name: esp32c6-hidrophonics
  friendly_name: ESP32_Hidrophonics
  
esp32:
  board: esp32-c6-devkitc-1
  variant: esp32c6
  framework:
    type: esp-idf
    version: 5.1.2
    platform_version: 6.5.0

external_components:
  - source:
      type: git
      url: https://github.com/ssieb/esphome
      ref: adc
    components: [ adc ]
    refresh: 1min


#esp32:
#  board: esp32-c6-devkitc-1
#  framework:
#    type: arduino

# Enable logging
logger:
  level: VERBOSE

# Enable Home Assistant API
api:
  encryption:
    key: "Lit2JVZRacMBKVu6Zmq/BJI+yQanlKjg2p5vnR/jRbc="

ota:
  password: "c7bc3814c5b1f875b7ef652992af52ca"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32-Hidrophonics"
    password: "1wMAJYrwkx2Y"

captive_portal:

globals:
   - id: maxdelay
     type: int
     restore_value: no
     initial_value: '60'    #Default Initial Value 1 hour




sensor:
  - name: "ADC 1"
    platform: adc
    pin: GPIO0
    update_interval: 5s
    raw: true

Original:

This is mine. It works fine if I remove the ADC part. ( platform: adc)

esphome: name: esp32c6-hidrophonics friendly_name: ESP32_Hidrophonics

esp32: board: esp32-c6-devkitc-1 variant: esp32c6 framework: type: esp-idf version: 5.1.2 platform_version: 6.5.0

external_components:

* source:
  type: git
  url: https://github.com/ssieb/esphome
  ref: adc
  components: [ adc ]
  refresh: 1min

#esp32:

board: esp32-c6-devkitc-1

framework:

type: arduino

Enable logging

logger: level: VERBOSE

Enable Home Assistant API

api: encryption: key: "Lit2JVZRacMBKVu6Zmq/BJI+yQanlKjg2p5vnR/jRbc="

ota: password: "c7bc3814c5b1f875b7ef652992af52ca"

wifi: ssid: !secret wifi_ssid password: !secret wifi_password

Enable fallback hotspot (captive portal) in case wifi connection fails

ap: ssid: "Esp32-Hidrophonics" password: "1wMAJYrwkx2Y"

captive_portal:

globals:

* id: maxdelay
  type: int
  restore_value: no
  initial_value: '60'    #Default Initial Value 1 hour

sensor:

* name: "ADC 1"
  platform: adc
  pin: GPIO0
  update_interval: 5s
  raw: true

@Luis-Sarabando
Copy link

Got everything working, See my solution here: esphome/issues#5938 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.