Load ESPHome firmware with ESPTool?

Hi

I have an e-ink device (Inkplate 6) that I have loaded with ESPHome to be able to use it like a general status display for HA. Unhappy firmware fills 91% of Flash so no way to do OTA. It is kind of boring as it means I have to physically plug it back on HA host in closet each time I want to update layout or whatever in it !
I wanted to load the firmware from my computer downloading it from ESPHome dasboard and loading it with ESPTool in command line. I have done that in past with some Sonoff devices without any problems. But it looks like the fw is kind of working in a different way. When it’s flashed by ESPHome it flashes multiple different files or part of firmware not sure but when I flash it with ESPTool it’s loading it in one time like always and when ESP reboots it doesn’t work properly !
Any ideas there ? Have done a little of research about that but could not find anything about it :frowning:

Thanks

Vincèn

Pretty sure it only complies the one file. What makes you think it is multiple?

The way it flashes it on the ESP, as it’s doing it in multiple steps not like basic sketches where it loads only one time and done ! I was thinking it might be multiple files or it downloads different chunks of it at some specific adresses but not sure how to get esptool to take care of that… no indication in esptool of such situations…
Was just exploring the directory created by ESPHome for each sketch created in it. I found a specific file in the directory of the eink display ffirmware named partitions.csv that contains that:

nvs, data, nvs, 0x009000, 0x005000,
otadata, data, ota, 0x00e000, 0x002000,
app0, app, ota_0, 0x010000, 0x1C0000,
app1, app, ota_1, 0x1D0000, 0x1C0000,
eeprom, data, 0x99, 0x390000, 0x001000,
spiffs, data, spiffs, 0x391000, 0x00F000

Have to find out now how or if it can be used with ESPTool :confused:

Just use a local esphome pip install with your yaml or use the esphome-flasher with your bin.

1 Like

Ah yep thanks for suggestion for esphome-flasher :wink: completely forgot ESPHome had its own flasher now !
With ESPHome-Flasher it looks to load in similar way than ESPHome dashboard but after successful flash ESP goes in boot loop :frowning: and that firmware is working when loaded from ESPHome straight… Will check back by plugging it on the HA pi and see if it does the same !

Using ‘/dev/ttyUSB1’ as serial port.
Connecting…[18:21:14]ets Jun 8 2016 00:22:57
[18:21:14]
[18:21:14]rst:0x1 (POWERON_RESET),boot:0x22 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_FEO_V2))
[18:21:14]waiting for download
…Serial port closed!
.___
Detecting chip type… ESP32
Connecting…

Chip Info:

  • Chip Family: ESP32
  • Chip Model: ESP32D0WDQ6 (revision 1)
  • Number of Cores: 2
  • Max CPU Frequency: 240MHz
  • Has Bluetooth: YES
  • Has Embedded Flash: NO
  • Has Factory-Calibrated ADC: YES
  • MAC Address: FC:F5:C4:10:12:90
    Uploading stub…
    Running stub…
    Stub running…
    Changing baud rate to 460800
    Changed.
  • Flash Size: 4MB
  • Flash Mode: dio
  • Flash Frequency: 40MHz
    Erasing flash (this may take a while)…
    Chip erase completed successfully in 6.6s
    Compressed 15872 bytes to 10319…
    Writing at 0x00001000… (100 %)Wrote 15872 bytes (10319 compressed) at 0x00001000 in 0.2 seconds (effective 542.4 kbit/s)…
    Hash of data verified.
    Compressed 3072 bytes to 143…
    Writing at 0x00008000… (100 %)Wrote 3072 bytes (143 compressed) at 0x00008000 in 0.0 seconds (effective 3731.5 kbit/s)…
    Hash of data verified.
    Compressed 8192 bytes to 47…
    Writing at 0x0000e000… (100 %)Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 13623.3 kbit/s)…
    Hash of data verified.
    Compressed 1714848 bytes to 959258…
    Writing at 0x000f8000… (100 %)Wrote 1714848 bytes (959258 compressed) at 0x00010000 in 22.4 seconds (effective 612.7 kbit/s)…
    Hash of data verified.

Leaving…
Hard Resetting…
Done! Flashing is complete!

Showing logs:
[18:21:53]ets Jun 8 2016 00:22:57
[18:21:53]
[18:21:53]rst:0x10 (RTCWDT_RTC_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
[18:21:53]configsip: 0, SPIWP:0xee
[18:21:53]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[18:21:53]mode:DIO, clock div:2
[18:21:53]load:0x3fff0018,len:4
[18:21:53]load:0x3fff001c,len:1044
[18:21:53]load:0x40078000,len:8896
[18:21:53]load:0x40080400,len:5828
[18:21:53]entry 0x400806ac
[18:21:54]ets Jun 8 2016 00:22:57
[18:21:54]
[18:21:54]rst:0x3 (SW_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
[18:21:54]configsip: 0, SPIWP:0xee
[18:21:54]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[18:21:54]mode:DIO, clock div:2
[18:21:54]load:0x3fff0018,len:4
[18:21:54]load:0x3fff001c,len:1044
[18:21:54]load:0x40078000,len:8896
[18:21:54]load:0x40080400,len:5828
[18:21:54]entry 0x400806ac
[18:21:55]ets Jun 8 2016 00:22:57
[18:21:55]
[18:21:55]rst:0x3 (SW_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
[18:21:55]configsip: 0, SPIWP:0xee
[18:21:55]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[18:21:55]mode:DIO, clock div:2
[18:21:55]load:0x3fff0018,len:4
[18:21:55]load:0x3fff001c,len:1044
[18:21:55]load:0x40078000,len:8896
[18:21:55]load:0x40080400,len:5828
[18:21:55]entry 0x400806ac
[18:21:55]ets Jun 8 2016 00:22:57
[18:21:55]
[18:21:55]rst:0x3 (SW_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
[18:21:55]configsip: 0, SPIWP:0xee
[18:21:55]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[18:21:55]mode:DIO, clock div:2
[18:21:55]load:0x3fff0018,len:4
[18:21:55]load:0x3fff001c,len:1044
[18:21:55]load:0x40078000,len:8896
[18:21:55]load:0x40080400,len:5828
[18:21:55]entry 0x400806ac
[18:21:56]ets Jun 8 2016 00:22:57
[18:21:56]
[18:21:56]rst:0x3 (SW_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
[18:21:56]configsip: 0, SPIWP:0xee
[18:21:56]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[18:21:56]mode:DIO, clock div:2
[18:21:56]load:0x3fff0018,len:4
[18:21:56]load:0x3fff001c,len:1044
[18:21:56]load:0x40078000,len:8896
[18:21:56]load:0x40080400,len:5828
[18:21:56]entry 0x400806ac
[18:21:57]ets Jun 8 2016 00:22:57
[18:21:57]
[18:21:57]rst:0x3 (SW_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
[18:21:57]configsip: 0, SPIWP:0xee
[18:21:57]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[18:21:57]mode:DIO, clock div:2
[18:21:57]load:0x3fff0018,len:4
[18:21:57]load:0x3fff001c,len:1044
[18:21:57]load:0x40078000,len:8896
[18:21:57]load:0x40080400,len:5828
[18:21:57]entry 0x400806ac
[18:21:57]ets Jun 8 2016 00:22:57

Made a clean rebuild of fw in ESPHome on my HA system, and reflashed the eink display on my laptop with ESPHome-Flasher and now everything working fine :+1: