OpenThread - Cannot convert OpenThread pre-shared commissioner key

Hello guys,

before opening an issue on Github I would like to ask the community whether this issue is already known.
I got curious about the new OpenThread implementation in ESPHome and used this as an excuse to buy another ZBDongle-E to use with the ESP32-H2 I already have.
I flashed the Thread RCP firmware onto the ZBDongle-E and installed the OT Border Router Addon onto my HAOS installatiion.
Everything seems to work fine, the Addon is up and HA has detected the Border Router.
I extracted the Thread network details from HA and configured ESPHome with that.
Unfortunately I keep getting the following error message:

E (809) OPENTHREAD: esp_openthread_auto_start(144): Cannot convert OpenThread pre-shared commissioner key

I already tried to configure the Thread network details via TLV and each detail individually like its described in the documentation.
My ESPHome config is minimal, see below (changed all secrets):

esphome:
  name: "threadtest"
  friendly_name: ThreadTest

esp32:
  board: esp32-h2-devkitm-1
  framework:
    type: esp-idf

network:
  enable_ipv6: true

openthread:
  channel: 15
  network_name: ha-thread-7c63
  network_key: 0xcb3017cd1f04780fe13d9cf09868cf07
  pan_id: 0x7c63
  ext_pan_id: 0xac0c5f513aa872832
  pskc: 0x059830cc6db739dc7f17b14dae895c14
  force_dataset: true

Current versions in use:
ot-rcp-v2.4.5.0-zbdonglee-460800.gbl
HA 2025.6.3 on HAOS 15.2
OT Border Router Addon 2.13.0
ESPHome 2025.6.2 - ESP-IDF 5.3.2

Logs from the ESP:

[21:09:06]ESP-ROM:esp32h2-20221101
[21:09:06]Build:Nov  1 2022
[21:09:06]rst:0xc (SW_CPU),boot:0xc (SPI_FAST_FLASH_BOOT)
[21:09:06]Saved PC:0x400031b6
[21:09:06]SPIWP:0xee
[21:09:06]mode:DIO, clock div:1
[21:09:06]load:0x408460e0,len:0x1894
[21:09:06]load:0x4083cad0,len:0xf20
[21:09:06]load:0x4083efd0,len:0x2dc0
[21:09:06]entry 0x4083cad0
[21:09:06]I (27) boot: ESP-IDF 5.3.2 2nd stage bootloader
[21:09:06]I (27) boot: compile time Jun 29 2025 19:03:17
[21:09:06]I (29) boot: chip revision: v0.1
[21:09:06]I (30) boot: efuse block revision: v0.2
[21:09:06]I (34) boot.esp32h2: SPI Speed      : 64MHz
[21:09:06]I (39) boot.esp32h2: SPI Mode       : DIO
[21:09:06]I (44) boot.esp32h2: SPI Flash Size : 4MB
[21:09:06]I (48) boot: Enabling RNG early entropy source...
[21:09:06]I (54) boot: Partition Table:
[21:09:06]I (57) boot: ## Label            Usage          Type ST Offset   Length
[21:09:06]I (65) boot:  0 otadata          OTA data         01 00 00009000 00002000
[21:09:06]I (72) boot:  1 phy_init         RF data          01 01 0000b000 00001000
[21:09:06]I (80) boot:  2 app0             OTA app          00 10 00010000 001c0000
[21:09:06]I (87) boot:  3 app1             OTA app          00 11 001d0000 001c0000
[21:09:06]I (94) boot:  4 nvs              WiFi data        01 02 00390000 0006d000
[21:09:06]I (102) boot: End of partition table
[21:09:06]I (107) esp_image: segment 0: paddr=00010020 vaddr=420b0020 size=24aa4h (150180) map
[21:09:06]I (176) esp_image: segment 1: paddr=00034acc vaddr=40800000 size=0b54ch ( 46412) load
[21:09:06]I (200) esp_image: segment 2: paddr=00040020 vaddr=42000020 size=a3558h (669016) map
[21:09:06]I (473) esp_image: segment 3: paddr=000e3580 vaddr=4080b54c size=00fb0h (  4016) load
[21:09:06]I (477) esp_image: segment 4: paddr=000e4538 vaddr=4080c500 size=01b80h (  7040) load
[21:09:06]I (490) boot: Loaded app from partition at offset 0x10000
[21:09:06]I (491) boot: Disabling RNG early entropy source...
[21:09:06]I (503) cpu_start: Unicore app
[21:09:06]I (512) cpu_start: Pro cpu start user code
[21:09:06]I (512) cpu_start: cpu freq: 96000000 Hz
[21:09:06]I (513) app_init: Application information:
[21:09:06]I (515) app_init: Project name:     threadtest
[21:09:06]I (520) app_init: App version:      2025.6.2
[21:09:06]I (525) app_init: Compile time:     Jun 29 2025 18:59:57
[21:09:06]I (531) app_init: ELF file SHA256:  6b9f3a14a...
[21:09:06]I (536) app_init: ESP-IDF:          5.3.2
[21:09:06]I (541) efuse_init: Min chip rev:     v0.0
[21:09:06]I (546) efuse_init: Max chip rev:     v0.99 
[21:09:06]I (551) efuse_init: Chip rev:         v0.1
[21:09:06]I (555) heap_init: Initializing. RAM available for dynamic allocation:
[21:09:06]I (563) heap_init: At 40816A20 len 00036960 (218 KiB): RAM
[21:09:06]I (569) heap_init: At 4084D380 len 00002B60 (10 KiB): RAM
[21:09:06]I (576) spi_flash: detected chip: generic
[21:09:06]I (580) spi_flash: flash io: dio
[21:09:06]I (584) sleep: Configure to isolate all GPIO pins in sleep state
[21:09:06]I (590) sleep: Enable automatic switching of GPIO sleep configuration
[21:09:06]I (598) main_task: Started on CPU0
[21:09:06]I (625) main_task: Calling app_main()
[21:09:06]I (747) main_task: Returned from app_main()
[21:09:06]I (757) OPENTHREAD: Host connection mode none
[21:09:06]I (768) phy: phy_version: 310,2, 463a420, Aug 15 2024, 18:52:11
[21:09:06]I (769) phy: libbtbb version: a024da6, Aug 15 2024, 18:52:23
[21:09:06]I(778) OPENTHREAD:[I] CslTxScheduler: Bus TX Time: 0 usec, Latency: 0 usec. Calculated CSL Frame Request Ahead: 20000 usec
[21:09:06]I(783) OPENTHREAD:[I] ChildSupervsn-: Timeout: 0 -> 190
[21:09:06]I (789) OPENTHREAD: OpenThread attached to netif
[21:09:06]E (796) OPENTHREAD: esp_openthread_auto_start(144): Cannot convert OpenThread pre-shared commissioner key
[21:09:06]ESP_ERROR_CHECK failed: esp_err_t 0xffffffff (ESP_FAIL) at 0x42008fb0
[21:09:06]file: "src/esphome/components/openthread/openthread_esp.cpp" line 120
[21:09:06]func: void esphome::openthread::OpenThreadComponent::ot_main()
[21:09:06]expression: esp_openthread_auto_start((error == OT_ERROR_NONE) ? &dataset : NULL)
[21:09:06]
[21:09:06]abort() was called at PC 0x40805f31 on core 0

Any ideas?
Thanks in advance!

Just passing along that this community forum user copied the TLV from the Thread Integration. The TLV has all the Thread data/parameters embedded.

 openthread:
   tlv: yourTLVfromStep0

I think the TLV should contain the same data that you have, but I have not tried out ESPHome for the H2.

Unfortunately I tried the TLV as well but the issue is the same.

I have some issues with my ESP32-C6 as well, therefore I ordered some additional C6 Devkits to test with.

The exat same problem here, I have switched to the dev and it did work

As you also mentioned, the dev branch does work for me as well.

This was the original issue from github which finally contained the required information:

Seems like there is something broken in the current release.