Coder Social home page Coder Social logo

esphome / esphome-flasher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marcelstoer/nodemcu-pyflasher

838.0 33.0 131.0 2.38 MB

Simple GUI tool to flash ESPs over USB

Home Page: https://esphome.io/

License: MIT License

Python 100.00%
python wxpython esp8266 esp32

esphome-flasher's Introduction

Deprecated

This project is deprecated in favour of browser based flashing with ESP Web Tools. For example: https://web.esphome.io

ESPHome-Flasher

ESPHome-Flasher is a utility app for the ESPHome framework and is designed to make flashing ESPs with ESPHome as simple as possible by:

  • Having pre-built binaries for most operating systems.
  • Hiding all non-essential options for flashing. All necessary options for flashing (bootloader, flash mode) are automatically extracted from the binary.

This project was originally intended to be a simple command-line tool, but then I decided that a GUI would be nice. As I don't like writing graphical front end code, the GUI largely is based on the NodeMCU PyFlasher project.

The flashing process is done using the esptool library by espressif.

Installation

It doesn't have to be installed, just double-click it and it'll start. Check the releases section for downloads for your platform.

Installation Using pip

If you want to install this application from pip:

  • Install Python 3.x
  • Install wxPython 4.x manually or run pip3 install wxpython (see also linux notes below)
  • Install this project using pip3 install esphomeflasher
  • Start the GUI using esphomeflasher. Alternatively, you can use the command line interface ( type esphomeflasher -h for info)

Build it yourself

If you want to build this application yourself you need to:

  • Install Python 3.x
  • Install wxPython 4.x manually or run pip3 install wxpython
  • Download this project and run pip3 install -e . in the project's root.
  • Start the GUI using esphomeflasher. Alternatively, you can use the command line interface ( type esphomeflasher -h for info)

Linux Notes

Installing wxpython for linux can be a bit challenging (especially when you don't want to install from source). You can use the following command to install a wxpython suitable with your OS:

# Go to https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ and select the correct OS type
# here, we assume ubuntu 18.03 bionic
pip3 install -U \
    -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 \
    wxPython

License

MIT © Marcel Stör, Otto Winter

esphome-flasher's People

Contributors

alexyao2015 avatar cbialobos avatar dependabot[bot] avatar fabaff avatar glmnet avatar gordon-zhao avatar jesserockz avatar mechazawa avatar ottowinter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esphome-flasher's Issues

1.3.1 not available via pip

Due to the baud rate not falling back to a speed that works in 1.3.0 I need to use 1.3.1, had to compile it locally on my mac. Would be nice if 1.3.1 was in pip. 1.0.0, 1.0.1, 1.0.2, 1.1.0, 1.2.0, 1.3.0 are the only versions i see available

no port

i get no serial port number for windows>

Permission Error 13 part 2?

I know that there was an issue with the same problem however the solution given blamed it on drivers but I have updated my drivers and programmed my esp8266 boards however when I go to change the software it seems to get the same error.

Will not launch on mac os X

Catalina 10.15.6
iMac (21.5-inch, Late 2013)
image
Fresh download today.
No option to select in Settings>Security to bypass

Upload defaults

Hi, Not an issue, just a question.
What are the default upload settings please or is it dependent on the Bin file?
Ie Higher memory 160Mhz .

Thanks

Flasher Not Seeing Device On USB

Hi
Running ESPHome-Flasher-1.3.0-Windows-x64.exe on my Windows 10 64-bit PC and the Serial Port remains blank.

I have tried 2 different cables and different USB ports, both 3.0 and 2.0 and clicking the "refresh" option and still nothing is appearing in the serial port drop down.

The board has a power light on and the PC dings to indicate that something is connected.

Windows shows it as "CP2102 USB to UART Bridge Controller" and says there are no drivers available.

Am I doing something wrong? Do I need to find a driver for Windows to connect properly with it?

Thanks in advance.

"Timed out waiting for packet header" while flashing M5Stack Atom

I tried to flash a bin file using esphome-flasher 1.2.0 to my M5Stack Atom, but was getting the "Timed out waiting for packet header" after getting the basic chip identification data in the log. Both on macOS and Windows.

Flashing succeeded using esphome-flasher 1.1.0. I expect it has to do with the faster upload speed in 1.2.0.

FEATURE REQUEST - TCP OTA

I have many custom made devices using ESP32 and esphome. These devices are installed away from my PC in wall socket boxes, which makes manual flashing a cumbersome task (often needed when I screw up something leading OTA to fail). I can use my notebook, but it's not convenient.

I found this library Stream server for ESPHome which I use for serial connection over wifi. Now if I flash one battery-powered device with ESPHome and use the Stream server for the ESPHome library, I can take the "Remote Flashing Unit" to any mounted ESPhome device.

What I would like to do is connect the Remote Flashing unit serial to that of the mounted ESPHome unit and flash a working ESPHome bin file over the air. Essentially, the Remote Flashing unit will act as wifi to serial bridge.
This, however, requires the esphome-flasher to have the capability to flash over IP:Port in addition to the local port.

Unexpected error / AttributeError: 'RedirectText' object has no attribute 'isatty'

Hi, I'm on Arch Linux, where esphome-flasher installed flawless from AUR.
Trying to flash an ESP32 (MH-ET Live Mini) or a common ESP32 DevKit with ah ESPHome binary, the following error appears:
Screenshot from 2020-12-19 22-36-06

This is the console output:

$ esphomeflasher 
22:35:24: Warning: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1013,wx containers,compatible with 2.8),
and wxPython used 3.0 (wchar_t,compiler with C++ ABI 1014,wx containers,compatible with 2.8).
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.9/site-packages/esphomeflasher/gui.py", line 163, in run
    run_esphomeflasher(argv)
  File "/usr/lib/python3.9/site-packages/esphomeflasher/__main__.py", line 158, in run_esphomeflasher
    esptool.write_flash(stub_chip, mock_args)
  File "/usr/bin/esptool.py", line 2983, in write_flash
    print_overwrite('Writing at 0x%08x... (%d %%)' % (address + seq * esp.FLASH_WRITE_SIZE, 100 * (seq + 1) // blocks))
  File "/usr/bin/esptool.py", line 156, in print_overwrite
    if sys.stdout.isatty():
AttributeError: 'RedirectText' object has no attribute 'isatty'

Trying to proceed while waiting for a solution, i didn't find a proper and complete esptool.py command to inizialize and flash a factory new ESP32 with an ESPHome binary.

Hints?
Thank you,
Piero

Could not open port

When I connect a ESP32 DEVKITV1 to my win7 machine the driver Silicon Labs CP210x USB to UART bridge (COM17) shows up in device manager
I esphome flasher I get the following error message:
Connecting.......Using 'COM17' as serial port.
Unexpected error: could not open port 'COM17': PermissionError(13, 'Zugriff verweigert', None, 5)
..............................._____
Unexpected error: ESP Chip Auto-Detection failed: Failed to connect to Espressif device: Timed out waiting for packet header
As by some recommendation I cleared all the unused occupied ports and assigned port 8 to have single digit number, but same error.
Could someone suggest me a solution? with esp8266 and CH340 driver flashing is no problem.
Regards Gerhhard

Small issue in Console window

The log window is the black area in esphome-flasher where the log messages are printed.

When I flash an esp8266, I see a log message that indicated the progress of flashing.
Something like this: Writing at 0x00048000... (100 %)

This log message eats up all other log messages above it.
So this log message moves up and deletes the messages above it.

Crash on Linux Mint 20 (Ubuntu 20.04 base) when click "Browse"

Using ESPHome-Flasher-1.3.0-Ubuntu-x64.exec on Linux Mint 20 x86_64 with 5.8.0-050800-generic kernel

When clicking "Browse" the application crashes:

/usr/lib/x86_64-linux-gnu/gio/modules/libgioremote-volume-monitor.so: undefined symbol: g_mount_operation_get_is_tcrypt_system_volume
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgioremote-volume-monitor.so
/usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so: undefined symbol: g_date_time_format_iso8601
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
/usr/lib/x86_64-linux-gnu/gio/modules/libgioremote-volume-monitor.so: undefined symbol: g_mount_operation_get_is_tcrypt_system_volume
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgioremote-volume-monitor.so

(ESPHome-Flasher-1.3.0-Ubuntu-x64.exec:16518): Gtk-WARNING **: 14:51:07.102: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Mint-Y/actions/16/image-missing.svg: Unable to load image-loading module: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: /usr/lib/x86_64-linux-gnu/librsvg-2.so.2: undefined symbol: cairo_font_options_get_variations (gdk-pixbuf-error-quark, 5)
Aborted (core dumped)

Beside that crash everything else is working fine.

It's also possible to manual enter the source to the bin as a work'a'round for this bug.

error esphomeflasher

Hi
from a mac, when trying to load the .bin of the esp32 in esphomeflasher, it gives me the following error:

Using '/dev/cu.SLAB_USBtoUART' as serial port.
Connecting........___
Detecting chip type... ESP32
Connecting....

Chip Info:

  • Chip Family: ESP32
  • Chip Model: ESP32D0WDQ6 (revision 1)
  • Number of Cores: 2
  • Max CPU Frequency: 160MHz
  • Has Bluetooth: YES
  • Has Embedded Flash: NO
  • Has Factory-Calibrated ADC: YES
  • MAC Address: 84:0D:8E:12:02:A4
    Uploading stub...
    Running stub...
    Stub running...
  • Flash Size: 4MB
    Unexpected error: Error while retrieving firmware file 'https://raw.githubusercontent.com/espressif/arduino-esp32/1.0.0/tools/sdk/bin/bootloader_dio_40m.bin': HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /espressif/arduino-esp32/1.0.0/tools/sdk/bin/bootloader_dio_40m.bin (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x1147a20b8>: Failed to establish a new connection: [Errno 61] Connection refused',))

terminal code:

Last login: Sat Nov 23 16:50:21 on ttys000
MacBook-Pro-de-Jesus:~ chusrufo$ esphomeflasher
Exception in thread Thread-1:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
conn.connect()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connection.py", line 334, in connect
conn = self._new_conn()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x1154560b8>: Failed to establish a new connection: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /espressif/arduino-esp32/1.0.0/tools/sdk/bin/bootloader_dio_40m.bin (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x1154560b8>: Failed to establish a new connection: [Errno 61] Connection refused',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esphomeflasher/common.py", line 140, in open_downloadable_binary
response = requests.get(path)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /espressif/arduino-esp32/1.0.0/tools/sdk/bin/bootloader_dio_40m.bin (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x1154560b8>: Failed to establish a new connection: [Errno 61] Connection refused',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esphomeflasher/gui.py", line 163, in run
run_esphomeflasher(argv)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esphomeflasher/main.py", line 118, in run_esphomeflasher
args.otadata)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esphomeflasher/common.py", line 174, in configure_write_flash_args
format_bootloader_path(bootloader_path, flash_mode, flash_freq))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esphomeflasher/common.py", line 147, in open_downloadable_binary
"Error while retrieving firmware file '{}': {}".format(path, err))
esphomeflasher.common.EsphomeflasherError: Error while retrieving firmware file 'https://raw.githubusercontent.com/espressif/arduino-esp32/1.0.0/tools/sdk/bin/bootloader_dio_40m.bin': HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /espressif/arduino-esp32/1.0.0/tools/sdk/bin/bootloader_dio_40m.bin (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x1154560b8>: Failed to establish a new connection: [Errno 61] Connection refused',))

ESPHomeFlasher doesn't work on Mac

I've Download it. Then klick on it an nothing works. I've got the Failure "You do not have the required access rights to open the "ESPHome-Flasher" program."

esphome-flasher

anyone know why windows 10 will not run my esp32 in flasher will not open when i plug this in to usb

do not have permission to open application

You do not have permission to open the application "ESPHome-Flasher.app".
Contact your computer or your network administrator for assistance.

Screen Shot 2020-11-06 at 8 14 18 PM

[currently on macOS Big Sur Version 11.0.1 Beta (2085022a)]

ESPHome flasher error

Trying to use esphome-flasher to download a BIN file that was created using ESPHome under Home Assistant to a M5Stickc.

I get the following error(s) in the ESPHome-flasher log:
Using 'COM4' as serial port.
Connecting.......
Detecting chip type... ESP32
Connecting......

Chip Info:

  • Chip Family: ESP32
  • Chip Model: ESP32-PICO-D4 (revision 1)
  • Number of Cores: 2
  • Max CPU Frequency: 240MHz
  • Has Bluetooth: YES
  • Has Embedded Flash: YES
  • Has Factory-Calibrated ADC: YES
  • MAC Address: 94:B9:7E:8D:92:28
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 460800
    Changed.
    Unexpected error: Reading chip details failed: Timed out waiting for packet header

I can successfully download other example files using Arduino IDE using a baud rate of 115200, but can't figure out how to use Arduino to download ESPHome BIN files.. I'm using Windows 10, x86, USB 2.0

When I compile the *.yaml with ESPHome under HA, and then try to upload I get:
========================= [SUCCESS] Took 12.91 seconds =========================
INFO Successfully compiled program.
INFO Connecting to 192.168.1.230
ERROR Connecting to 192.168.1.230:3232 failed: [Errno 113] No route to host

Is there a way to select a slower baud rate when using ESPHome-Flasher?

Note it only works on osx 10.15.*

$ ./ESPHome-Flasher
[4379] Error loading Python lib '/var/folders/cn/yzzqv9xx7tz8v6_75t1yrptc0000gn/T/_MEIZppedb/libpython3.7m.dylib': dlopen: dlopen(/var/folders/cn/yzzqv9xx7tz8v6_75t1yrptc0000gn/T/_MEIZppedb/libpython3.7m.dylib, 10): Symbol not found: ____chkstk_darwin
Referenced from: /var/folders/cn/yzzqv9xx7tz8v6_75t1yrptc0000gn/T/_MEIZppedb/libintl.8.dylib (which was built for Mac OS X 10.15)
Expected in: /usr/lib/libSystem.B.dylib
in /var/folders/cn/yzzqv9xx7tz8v6_75t1yrptc0000gn/T/_MEIZppedb/libintl.8.dylib

(My hardware can't go passed 10.13.6)

Trojan:Win32/Zpevdo.B ???

Windows Defender on a Windows 10 Home machine is reporting this trojan when I download the file below and removing it. I have another copy of this file that I downloaded a few weeks ago that does not show as infected. Has the file below on the repository been compromised?

ESPHome-Flasher-1.3.0-Windows-x86.exe

EDIT: Just realized I clicked x86 instead of x64. Still, the x86 version triggers the trojan warning. The x64 is ok.

Flashing file returns error: "has no attribute 'erase_all'"

When running esphomeflasher on my macbook, i get the following error:

Console output in the GUI:

Using '/dev/cu.usbserial-A4012SPV' as serial port.
Connecting....
Detecting chip type... ESP8266
Connecting...

Chip Info:
- Chip Family: ESP8266
- Chip Model: ESP8285
- Chip ID: 0082C715
- MAC Address: DC:4F:22:82:C7:15
Uploading stub...
Running stub...
Stub running...
- Flash Size: 1MB
- Flash Mode: qio
- Flash Frequency: 40MHz
Erasing flash (this may take a while)...
Chip erase completed successfully in 0.5s
Unexpected error: 'MockEsptoolArgs' object has no attribute 'erase_all'

Terminal stacktrace:

Exception in thread Thread-7:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.7/site-packages/esphomeflasher/gui.py", line 48, in run
    run_esphomeflasher(argv)
  File "/usr/local/lib/python3.7/site-packages/esphomeflasher/__main__.py", line 113, in run_esphomeflasher
    esptool.write_flash(stub_chip, mock_args)
  File "/usr/local/bin/esptool.py", line 2128, in write_flash
    if args.erase_all:
AttributeError: 'MockEsptoolArgs' object has no attribute 'erase_all'```

Any ideas how to fix this? 

Permission Error 13

Unexpected error: could not open port 'COM4': PermissionError(13, 'Access is denied.', None, 5)

tried multiple farad capacitors. 1,2,10. 50V (it is suggested to do this..... However, since putting full specs down, is hard, I dont know if voltage is relevant.... yay youtubers.... always give half the info)

windows 10, port is selected, application was run as admin
Driver is installed. arduino see's it clear as day. I can see the serial monitor data:

17:03:28.609 -> ets Jun 8 2016 00:22:57
17:03:28.609 ->
17:03:28.609 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
17:03:28.644 -> configsip: 0, SPIWP:0x00
17:03:28.644 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
17:03:28.644 -> mode:DIO, clock div:2
17:03:28.644 -> load:0x3fff0008,len:8
17:03:28.644 -> load:0x3fff0010,len:3480
17:03:28.644 -> load:0x40078000,len:7804
17:03:28.644 -> ho 0 tail 12 room 4
17:03:28.644 -> load:0x40080000,len:252
17:03:28.644 -> entry 0x40080034
17:03:28.644 -> �[0;32mI (45) boot: ESP-IDF v2.0-3-gbef9896 2nd stage bootloader�[0m
17:03:28.644 -> �[0;32mI (46) boot: compile time 05:59:45�[0m
17:03:28.678 -> �[0;32mI (46) boot: Enabling RNG early entropy source...�[0m
17:03:28.678 -> �[0;32mI (64) boot: SPI Speed : 40MHz�[0m
17:03:28.678 -> �[0;32mI (77) boot: SPI Mode : DIO�[0m
17:03:28.678 -> �[0;32mI (89) boot: SPI Flash Size : 4MB�[0m
17:03:28.678 -> �[0;32mI (102) boot: Partition Table:�[0m
17:03:28.678 -> �[0;32mI (113) boot: ## Label Usage Type ST Offset Length�[0m
17:03:28.678 -> �[0;32mI (136) boot: 0 phy_init RF data 01 01 0000f000 00001000�[0m
17:03:28.712 -> �[0;32mI (159) boot: 1 otadata OTA data 01 00 00010000 00002000�[0m
17:03:28.712 -> �[0;32mI (182) boot: 2 nvs WiFi data 01 02 00012000 0000e000�[0m
17:03:28.712 -> �[0;32mI (206) boot: 3 at_customize unknown 40 00 00020000 000e0000�[0m
17:03:28.712 -> �[0;32mI (229) boot: 4 ota_0 OTA app 00 10 00100000 00180000�[0m
17:03:28.746 -> �[0;32mI (252) boot: 5 ota_1 OTA app 00 11 00280000 00180000�[0m
17:03:28.746 -> �[0;32mI (276) boot: End of partition table�[0m
17:03:28.746 -> �[0;32mI (289) boot: Disabling RNG early entropy source...�[0m
17:03:28.746 -> �[0;32mI (306) boot: Loading app partition at offset 00100000�[0m
17:03:29.129 -> �[0;32mI (1481) boot: segment 0: paddr=0x00100018 vaddr=0x00000000 size=0x0ffe8 ( 65512) �[0m
17:03:29.129 -> �[0;32mI (1482) boot: segment 1: paddr=0x00110008 vaddr=0x3f400010 size=0x1c5f0 (116208) map�[0m
17:03:29.129 -> �[0;32mI (1498) boot: segment 2: paddr=0x0012c600 vaddr=0x3ffb0000 size=0x0215c ( 8540) load�[0m
17:03:29.129 -> �[0;32mI (1528) boot: segment 3: paddr=0x0012e764 vaddr=0x40080000 size=0x00400 ( 1024) load�[0m
17:03:29.164 -> �[0;32mI (1552) boot: segment 4: paddr=0x0012eb6c vaddr=0x40080400 size=0x1b028 (110632) load�[0m
17:03:29.164 -> �[0;32mI (1630) boot: segment 5: paddr=0x00149b9c vaddr=0x400c0000 size=0x00034 ( 52) load�[0m
17:03:29.164 -> �[0;32mI (1632) boot: segment 6: paddr=0x00149bd8 vaddr=0x00000000 size=0x06430 ( 25648) �[0m
17:03:29.198 -> �[0;32mI (1648) boot: segment 7: paddr=0x00150010 vaddr=0x400d0018 size=0x7a56c (501100) map�[0m
17:03:29.198 -> �[0;32mI (1675) heap_alloc_caps: Initializing. RAM available for dynamic allocation:�[0m
17:03:29.198 -> �[0;32mI (1698) heap_alloc_caps: At 3FFBA6B8 len 00025948 (150 KiB): DRAM�[0m
17:03:29.198 -> �[0;32mI (1719) heap_alloc_caps: At 3FFE8000 len 00018000 (96 KiB): D/IRAM�[0m
17:03:29.198 -> �[0;32mI (1740) heap_alloc_caps: At 4009B428 len 00004BD8 (18 KiB): IRAM�[0m
17:03:29.233 -> �[0;32mI (1761) cpu_start: Pro cpu up.�[0m
17:03:29.233 -> �[0;32mI (1773) cpu_start: Single core mode�[0m
17:03:29.233 -> �[0;32mI (1786) cpu_start: Pro cpu start user code�[0m
17:03:29.233 -> �[0;32mI (1847) cpu_start: Starting scheduler on PRO CPU.�[0m
17:03:29.268 -> �[0;32mI (2087) uart: queue free spaces: 10�[0m
17:03:29.268 -> Bin version:0.10.0

17:03:29.268 -> I (2088) wifi: wifi firmware version: c604573
17:03:29.268 -> I (2088) wifi: config NVS flash: enabled
17:03:29.268 -> I (2089) wifi: config nano formating: disabled
17:03:29.268 -> I (2097) wifi: Init dynamic tx buffer num: 32
17:03:29.268 -> I (2098) wifi: wifi driver task: 3ffc4eac, prio:23, stack:3584
17:03:29.300 -> I (2103) wifi: Init static rx buffer num: 10
17:03:29.300 -> I (2107) wifi: Init dynamic rx buffer num: 0
17:03:29.300 -> I (2111) wifi: Init rx ampdu len mblock:7
17:03:29.300 -> I (2115) wifi: Init lldesc rx ampdu entry mblock:4
17:03:29.300 -> I (2120) wifi: wifi power manager task: 0x3ffca254 prio: 21 stack: 2560
17:03:29.300 -> I (2126) wifi: wifi timer task: 3ffcb2d4, prio:22, stack:3584
17:03:29.300 -> �[0;31mE (2131) phy_init: PHY data partition validated�[0m
17:03:29.335 -> �[0;32mI (2157) phy: phy_version: 329, Feb 22 2017, 15:58:07, 0, 0�[0m
17:03:29.335 -> I (2158) wifi: mode : softAP (80:7d:3a:b7:78:f9)
17:03:29.335 -> I (2161) wifi: mode : sta (80:7d:3a:b7:78:f8) + softAP (80:7d:3a:b7:78:f9)
17:03:29.335 -> I (2164) wifi: mode : softAP (80:7d:3a:b7:78:f9)

when trying to upload it is clearly in download mode:

17:19:29.285 -> ets Jun 8 2016 00:22:57
17:19:29.285 ->
17:19:29.285 -> rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
17:19:29.285 -> waiting for download
17:19:35.855 -> ts Jun 8 2016 00:22:57
17:19:35.855 ->
17:19:35.855 -> rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
17:19:35.855 -> waiting for download

I discovered the cause of this issue was due to a anker powerline cable. it has a resistor in it that prevented it from writing to the board.

Boot loop

Hi all, just trying this on windows with the latest version. I see there was a similar problem last year but it was resolved. Not sure what might be wrong but I'm getting the following boot loop.

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x10
clk_drv:0x00,q_drv:0x01,d_drv:0x00,cs0_drv:0x02,hd_drv:0x00,wp_drv:0x04
mode:DOUT, clock div:2
load:0x4342140c,len:-184009
1162 mmu set 00010000, pos 00010000
1162 mmu set 00020000, pos 00020000
1162 mmu set 00030000, pos 00030000
1162 mmu set 00040000, pos 00040000
1162 mmu set 00050000, pos 00050000
1162 mmu set 00060000, pos 00060000
1162 mmu set 00070000, pos 00070000
1162 mmu set 00080000, pos 00080000
1162 mmu set 00090000, pos 00090000
1162 mmu set 000a0000, pos 000a0000
1162 mmu set 000b0000, pos 000b0000
1162 mmu s⸮ets Jun  8 2016 00:22:57

Have to specify the usb serial via CLI

When I launch the app, it does not show the USB serial device in the GUI, so I have to pass it as a the -p flag in the CLI, which works...

$ ./ESPHome-Flasher -p /dev/cu.usbserial-AO009AL5 ~/Downloads/gate.bin
Using '/dev/cu.usbserial-AO009AL5' as serial port.
Connecting....
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: 24:0A:C4:C5:5E:A8
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 9.5s
Compressed 15872 bytes to 10319...
Wrote 15872 bytes (10319 compressed) at 0x00001000 in 0.2 seconds (effective 530.3 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 143...
Wrote 3072 bytes (143 compressed) at 0x00008000 in 0.0 seconds (effective 1569.3 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4037.5 kbit/s)...
Hash of data verified.
Compressed 949360 bytes to 533857...
Wrote 949360 bytes (533857 compressed) at 0x00010000 in 12.8 seconds (effective 594.8 kbit/s)...
Hash of data verified.

Leaving...
Hard Resetting...
Done! Flashing is complete!

Another Big Sur Issue/Strangeness

Mac OS 11.2.1 Big Sur

I wasn't able to successfully install it due to the following error: ERROR: Command errored out with exit status 1: For anyone else who faced this issue, this is what "successfully" installed ESPHF. python3 -m pip install --user -e .

That being said, there is no "ESPHome-Flasher" in my applications folder, or anywhere on the computer. In the main esphomeflasher directory, the dist folder is empty, as well as the "ESPHome-Flasher" folder. There are no executable files anywhere. Following the successful installation, I ran in my terminal "esphomeflasher" and was returned with the following error: zsh: command not found: esphomeflasher. I'm not sure if during the process it didn't create an executable file but instead just created an empty folder?

Now this is the second time I've reinstalled it after a first successful install kept throwing this error when I tried to run esphomeflasher.

This program needs access to the screen. Please run with a
Framework build of python, and only when you are logged in
on the main display of your Mac.

I should also note that when I ran that esphomeflasher command and it returned that error, there was still no app in my applications folder, and opening my sys prefs didn't indicate that I was trying to open a third party application. I'm aware of the solution from Issue #26 and Issue #38 where people have used chmod +x ESPHome-Flasher.app/Contents/MacOS/ESPHome-Flasher with success. I can't seem to connect my permissions in sys prefs with running this application.

Build issues on Debian 10 (Buster)

$ uname -srm
Linux 5.4.0-0.bpo.4-amd64 x86_64

"/usr/bin/python3" /tmp/pip-install-9q5l5r18/wxpython/bin/waf-2.0.19 --wx_config=/tmp/pip-install-9q5l5r18/wxpython/build/wxbld/gtk3/wx-config --gtk3 --python="/usr/bin/python3" --out=build/waf/3.7/gtk3 configure build
Setting top to : /tmp/pip-install-9q5l5r18/wxpython
Setting out to : /tmp/pip-install-9q5l5r18/wxpython/build/waf/3.7/gtk3
Checking for 'gcc' (C compiler) : /usr/bin/gcc
Checking for 'g++' (C++ compiler) : /usr/bin/g++
Checking for program 'python' : /usr/bin/python3
Checking for python version >= 2.7.0 : 3.7.3
python-config : /usr/bin/python3-config
Asking python-config for pyext '--cflags --libs --ldflags' flags : yes
Testing pyext configuration : yes
Finding libs for WX : yes
Finding libs for WXADV : yes
Finding libs for WXSTC : yes
Finding libs for WXHTML : yes
Finding libs for WXGL : yes
Finding libs for WXWEBVIEW : yes
Finding libs for WXXML : yes
Finding libs for WXXRC : yes
Finding libs for WXRICHTEXT : yes
Finding libs for WXMEDIA : yes
Finding libs for WXRIBBON : yes
Finding libs for WXPROPGRID : yes
Finding libs for WXAUI : yes
'configure' finished successfully (0.571s)
Waf: Entering directory `/tmp/pip-install-9q5l5r18/wxpython/build/waf/3.7/gtk3'
**** Compiler: /usr/bin/gcc --version
gcc (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[668/917] Linking build/waf/3.7/gtk3/_html.cpython-37m-x86_64-linux-gnu.so
[669/917] Compiling sip/cpp/sip_glcanvascmodule.cpp
[670/917] Compiling sip/cpp/sip_glcanvaswxGLAttribsBase.cpp
[671/917] Compiling sip/cpp/sip_glcanvaswxGLContextAttrs.cpp
[672/917] Compiling sip/cpp/sip_glcanvaswxGLContext.cpp
In file included from ../../../../sip/cpp/sip_glcanvascmodule.cpp:10:
../../../../sip/cpp/sipAPI_glcanvas.h:682:23: error: aggregate ‘wxGLAttributes _NullGLAttributes’ has incomplete type and cannot be defined
static wxGLAttributes _NullGLAttributes;
^~~~~~~~~~~~~~~~~
../../../../sip/cpp/sipAPI_glcanvas.h:683:25: error: aggregate ‘wxGLContextAttrs _NULLGLContextAttrs’ has incomplete type and cannot be defined
static wxGLContextAttrs _NULLGLContextAttrs;
^~~~~~~~~~~~~~~~~~~
In file included from ../../../../sip/cpp/sip_glcanvascmodule.cpp:10:
../../../../sip/cpp/sipAPI_glcanvas.h:865:198: error: ‘wxGLCanvasName’ was not declared in this scope
wxGLCanvas(wxWindow *parent, const wxGLAttributes &dispAttrs, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxGLCanvasName, const wxPalette &palette=wxNullPalette)
^~~~~~~~~~~~~~
../../../../sip/cpp/sipAPI_glcanvas.h:865:198: note: suggested alternative: ‘wxGLCanvas’
wxGLCanvas(wxWindow *parent, const wxGLAttributes &dispAttrs, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxGLCanvasName, const wxPalette &palette=wxNullPalette)
^~~~~~~~~~~~~~
wxGLCanvas

In file included from ../../../../sip/cpp/sip_glcanvaswxGLAttribsBase.cpp:10:
../../../../sip/cpp/sipAPI_glcanvas.h:682:23: error: aggregate ‘wxGLAttributes _NullGLAttributes’ has incomplete type and cannot be defined
 static wxGLAttributes _NullGLAttributes;
                       ^~~~~~~~~~~~~~~~~
../../../../sip/cpp/sipAPI_glcanvas.h:683:25: error: aggregate ‘wxGLContextAttrs _NULLGLContextAttrs’ has incomplete type and cannot be defined
 static wxGLContextAttrs _NULLGLContextAttrs;
                         ^~~~~~~~~~~~~~~~~~~
In file included from ../../../../sip/cpp/sip_glcanvaswxGLAttribsBase.cpp:10:
../../../../sip/cpp/sipAPI_glcanvas.h:865:198: error: ‘wxGLCanvasName’ was not declared in this scope
     wxGLCanvas(wxWindow *parent, const wxGLAttributes &dispAttrs, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxGLCanvasName, const wxPalette &palette=wxNullPalette)
                                                                                                                                                                                                      ^~~~~~~~~~~~~~
../../../../sip/cpp/sipAPI_glcanvas.h:865:198: note: suggested alternative: ‘wxGLCanvas’
     wxGLCanvas(wxWindow *parent, const wxGLAttributes &dispAttrs, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxGLCanvasName, const wxPalette &palette=wxNullPalette)
                                                                                                                                                                                                      ^~~~~~~~~~~~~~
                                                                                                                                                                                                      wxGLCanvas

In file included from ../../../../sip/cpp/sip_glcanvaswxGLContextAttrs.cpp:10:
../../../../sip/cpp/sipAPI_glcanvas.h:682:23: error: aggregate ‘wxGLAttributes _NullGLAttributes’ has incomplete type and cannot be defined
 static wxGLAttributes _NullGLAttributes;
                       ^~~~~~~~~~~~~~~~~
../../../../sip/cpp/sipAPI_glcanvas.h:683:25: error: aggregate ‘wxGLContextAttrs _NULLGLContextAttrs’ has incomplete type and cannot be defined
 static wxGLContextAttrs _NULLGLContextAttrs;
                         ^~~~~~~~~~~~~~~~~~~
In file included from ../../../../sip/cpp/sip_glcanvaswxGLContextAttrs.cpp:10:
../../../../sip/cpp/sipAPI_glcanvas.h:865:198: error: ‘wxGLCanvasName’ was not declared in this scope
     wxGLCanvas(wxWindow *parent, const wxGLAttributes &dispAttrs, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxGLCanvasName, const wxPalette &palette=wxNullPalette)
                                                                                                                                                                                                      ^~~~~~~~~~~~~~
../../../../sip/cpp/sipAPI_glcanvas.h:865:198: note: suggested alternative: ‘wxGLCanvas’
     wxGLCanvas(wxWindow *parent, const wxGLAttributes &dispAttrs, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxGLCanvasName, const wxPalette &palette=wxNullPalette)
                                                                                                                                                                                                      ^~~~~~~~~~~~~~
                                                                                                                                                                                                      wxGLCanvas

In file included from ../../../../sip/cpp/sip_glcanvaswxGLContext.cpp:10:
../../../../sip/cpp/sipAPI_glcanvas.h:682:23: error: aggregate ‘wxGLAttributes _NullGLAttributes’ has incomplete type and cannot be defined
 static wxGLAttributes _NullGLAttributes;
                       ^~~~~~~~~~~~~~~~~
../../../../sip/cpp/sipAPI_glcanvas.h:683:25: error: aggregate ‘wxGLContextAttrs _NULLGLContextAttrs’ has incomplete type and cannot be defined
 static wxGLContextAttrs _NULLGLContextAttrs;
                         ^~~~~~~~~~~~~~~~~~~
In file included from ../../../../sip/cpp/sip_glcanvaswxGLContext.cpp:10:
../../../../sip/cpp/sipAPI_glcanvas.h:865:198: error: ‘wxGLCanvasName’ was not declared in this scope
     wxGLCanvas(wxWindow *parent, const wxGLAttributes &dispAttrs, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxGLCanvasName, const wxPalette &palette=wxNullPalette)
                                                                                                                                                                                                      ^~~~~~~~~~~~~~
../../../../sip/cpp/sipAPI_glcanvas.h:865:198: note: suggested alternative: ‘wxGLCanvas’
     wxGLCanvas(wxWindow *parent, const wxGLAttributes &dispAttrs, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxGLCanvasName, const wxPalette &palette=wxNullPalette)
                                                                                                                                                                                                      ^~~~~~~~~~~~~~
                                                                                                                                                                                                      wxGLCanvas

Waf: Leaving directory `/tmp/pip-install-9q5l5r18/wxpython/build/waf/3.7/gtk3'
Build failed
 -> task in '_glcanvas' failed with exit status 1 (run with -v to display more information)
 -> task in '_glcanvas' failed with exit status 1 (run with -v to display more information)
 -> task in '_glcanvas' failed with exit status 1 (run with -v to display more information)
 -> task in '_glcanvas' failed with exit status 1 (run with -v to display more information)
Command '"/usr/bin/python3" /tmp/pip-install-9q5l5r18/wxpython/bin/waf-2.0.19 --wx_config=/tmp/pip-install-9q5l5r18/wxpython/build/wxbld/gtk3/wx-config --gtk3 --python="/usr/bin/python3" --out=build/waf/3.7/gtk3 configure build ' failed with exit code 1.
Finished command: build_py (0m5.78s)
Finished command: build (0m5.436s)
Command '"/usr/bin/python3" -u build.py build' failed with exit code 1.

----------------------------------------

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-9q5l5r18/wxpython/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-_ss2_tu7/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-9q5l5r18/wxpython/

Unexpected error: No module named '_random'

After successfully flashing a couple of ESP8266 I wanted to flash an AI-Thinker ESP32-Cam module with the binary compiled by ESPHome in Home Assistant.

The flashing ends with an error:

Using '/dev/cu.usbserial-A50285BI' as serial port.
Connecting.....
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: AC:67:B2:38:AC:AC
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
 - Flash Size: 4MB
Unexpected error: No module named '_random'

The module works properly, I flashed it with some code from Arduino IDE and I was even able to get a video stream.

I'm on macOS 10.15.5 if this is helpful. How can I fix this problem?

LuaNode looping after binary upload

I'm stuck trying to flash a Luanode and hope someone will be able to point me in the right direction to get it to work :)
I've got the latest version of esphome installed on HA and successfully flashed one Sonoff TH10 by downloading the bin onto a Mac and flashing with esphome-flasher. When I try the same with my Luanode it seems to flash ok but after pushing the EN button it gets stuck in a loop and the flasher gets stuck as well, the same node works ok when I flash it via the Arduino IDE (Wifi scan sketch).

Using '/dev/cu.SLAB_USBtoUART' as serial port.
Connecting........____
Detecting chip type... ESP32
Connecting....

Chip Info:

  • Chip Family: ESP32
  • Chip Model: ESP32D0WDQ5 (revision 1)
  • Number of Cores: 2
  • Max CPU Frequency: 240MHz
  • Has Bluetooth: YES
  • Has Embedded Flash: NO
  • Has Factory-Calibrated ADC: YES
  • MAC Address: F0:08:D1:62:D3:68
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 460800
    Changed.
  • Flash Size: 4MB
  • Flash Mode: dout
  • Flash Frequency: 40MHz
    Erasing flash (this may take a while)...
    Chip erase completed successfully in 8.5s
    Compressed 15872 bytes to 10320...
    Writing at 0x00001000... (100 %)Wrote 15872 bytes (10320 compressed) at 0x00001000 in 0.2 seconds (effective 523.6 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 1578.2 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 5187.6 kbit/s)...
    Hash of data verified.
    Compressed 397936 bytes to 274196...
    Writing at 0x00050000... (100 %)Wrote 397936 bytes (274196 compressed) at 0x00010000 in 6.3 seconds (effective 502.4 kbit/s)...
    Hash of data verified.

Leaving...
Hard Resetting...
Done! Flashing is complete!

I've also tried it from the command line based on Issue 589:
esphomeflasher bathroomfan.bin --bootloader bootloader_qio_80m.bin
which causes the following loop:
[14:19:42]rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[14:19:42]configsip: 0, SPIWP:0xee
[14:19:42]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[14:19:42]mode:DOUT, clock div:2
[14:19:42]load:0x3fff0018,len:4
[14:19:42]load:0x3fff001c,len:3884
[14:19:43]load:0x40078000,len:10828
[14:19:43]ho 0 tail 12 room 4
[14:19:43]load:0x40080400,len:6544
[14:19:43]entry 0x400806f0
[14:19:43]E (60) esp_image: invalid segment length 0x400024cc
[14:19:43]E (61) boot: OTA app partition slot 0 is not bootable
[14:19:43]E (61) esp_image: image at 0x200000 has invalid magic byte
[14:19:43]E (65) boot: OTA app partition slot 1 is not bootable
[14:19:43]E (70) boot: No bootable app partitions in the partition table
[14:19:43]ets Jun 8 2016 00:22:57

Unexpected error: Reading chip details failed: Timed out waiting for packet header

Hello, I'm using M5Stick C and when I try to flash with esphome-flasher in windows, I've got this:

Connecting.....
Detecting chip type... ESP32
Connecting.....

Chip Info:

  • Chip Family: ESP32
  • Chip Model: ESP32-PICO-D4 (revision 1)
  • Number of Cores: 2
  • Max CPU Frequency: 240MHz
  • Has Bluetooth: YES
  • Has Embedded Flash: YES
  • Has Factory-Calibrated ADC: YES
  • MAC Address: D8:A0:1D:68:CF:18
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 460800
    Changed.
    Unexpected error: Reading chip details failed: Timed out waiting for packet header

Anyone can help?
Thanks!

Feature request: "Offline-Mode" for flashing

When flashing same type of ESP32-modules each time the esphome-flasher seems to download the bootloader and partition-schema again. Would be nice, if the flasher would be able to cache these files, so you can use the tool without internet-connection.
I recommend the esphome-flasher for flashing firmware of my own project (https://github.com/gs-avionik-gunnar/GS-Traffic2WIFI) and some of the users reported me, that this features would be nice for them, too. That's why I think, it's not only me missing such function.
Anyway: Thanks a lot for that great tool!

Unexpected error: ESP Chip Auto-Detection failed:

Context:

I am trying to flash my sonoff rfr3 switch with esp yaml configuration file. I'm receiving the error below while trying to use the flash tool.

image

My yaml config file:

esphome:
name: sonoff_humidity-control
platform: ESP8266
board: esp01_1m

wifi:
ssid: "Abatha Gardens"
password: "81035120"

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

ap:
ssid: "Sonoff Humidity-Control"
password: "VDheuhABXV6s"

captive_portal:

Enable logging

logger:

Enable Home Assistant API

api:
password: 'abatha'

ota:

binary_sensor:

  • platform: gpio
    pin:
    number: GPIO0
    mode: INPUT_PULLUP
    inverted: True
    name: "Desk light button"
    on_press:
    • switch.toggle: relay

switch:

  • platform: gpio
    name: "Desk light relay"
    pin: GPIO12
    id: relay

status_led:
pin:
number: GPIO13
inverted: yes

sensor:

  • platform: wifi_signal
    name: "Desk light WiFi signal"
    update_interval: 60s

  • platform: uptime
    name: "Desk light uptime"

text_sensor:

  • platform: version
    name: "Desk light ESPHome version"

wont find the serial port

Not sure if this is just an issue with my quite yet. I've been trying to troubleshoot, new chord, driver. but wanted to check if anyone was having the issue here.

IMAC not detecting board using ESPHOME-FLASHER

Man I hope this is a stupid mistake on my end. I DL the latest version of flasher on my iMAC running Catalina. It doesn't detect the device on the serial port (ESP32 dev board). Otherwise I have my compile bin ready to go. Is there a dependency that needs to be mentioned in the instructions?

esp32 partition table doesn't match the esphome one

The partition table for esp32 that is included in the flasher doesn't match the one that esphome uses. esphome allows the firmware size to be up to 1835008 bytes, but the flasher only allows 1638400 bytes. This means that a successfully compiled firmware might not boot when flashed.

Big Sur + macOS M1

Hello,
I have an iMac 2013 with Big Sur where I'm able to use esphome-flasher no problems. However connecting the same cable to my Macbook Air M1 I'm unable to get the USB serial port to show up. I've tried with tons of different cables and hubs, but no luck.

Is this a known bug?

esphome-flasher fails running under MacOS X Big Sur 11.2.1

installed with pip3 under python 3.9.0b5

Traceback (most recent call last):
File "/Users/w/.pyenv/versions/3.9.0b5/bin/esphomeflasher", line 5, in
from esphomeflasher.main import main
File "/Users/w/.pyenv/versions/3.9.0b5/lib/python3.9/site-packages/esphomeflasher/main.py", line 8, in
import esptool
File "/Users/w/.pyenv/versions/3.9.0b5/bin/esptool.py", line 57, in
import serial.tools.list_ports as list_ports
File "/Users/w/.pyenv/versions/3.9.0b5/lib/python3.9/site-packages/serial/tools/list_ports.py", line 29, in
from serial.tools.list_ports_posix import comports
File "/Users/w/.pyenv/versions/3.9.0b5/lib/python3.9/site-packages/serial/tools/list_ports_posix.py", line 31, in
from serial.tools.list_ports_osx import comports
File "/Users/w/.pyenv/versions/3.9.0b5/lib/python3.9/site-packages/serial/tools/list_ports_osx.py", line 32, in
kIOMasterPortDefault = ctypes.c_void_p.in_dll(iokit, "kIOMasterPortDefault")
ValueError: dlsym(RTLD_DEFAULT, kIOMasterPortDefault): symbol not found

problem running esphome flasher in lubuntu 20.04

Hi,
I tried to get it to run, installed all dependencies and now I got this traceback when starting :

Traceback (most recent call last):
  File "/home/geertsteyaert/esphome-flasher-master/esphome-flasher-master/esphomeflasher/gui.py", line 286, in OnInit
    frame = MainFrame(None, "esphome-flasher (Based on NodeMCU PyFlasher)")
  File "/home/geertsteyaert/esphome-flasher-master/esphome-flasher-master/esphomeflasher/gui.py", line 177, in __init__
    self._init_ui()
  File "/home/geertsteyaert/esphome-flasher-master/esphome-flasher-master/esphomeflasher/gui.py", line 226, in _init_ui
    serial_boxsizer.Add(reload_button, 0, wx.ALIGN_RIGHT, 20)
wx._core.wxAssertionError: C++ assertion "!(flags & wxALIGN_RIGHT)" failed at /home/wxpy/wxPython-4.1.0/ext/wxWidgets/src/common/sizer.cpp(2094) in DoInsert(): Horizontal alignment flags are ignored in horizontal sizers
OnInit returned false, exiting...

Any idea?

Thanks.

Weird access to a non existing path...

I started esphomeflasher from command line on my Mac (Catalina 10.15.6 (19G73))

serial_boxsizer.Add(reload_button, 0, wx.ALIGN_RIGHT, 20)
wx._core.wxAssertionError: C++ assertion "!(flags & wxALIGN_RIGHT)" failed at /Users/robind/projects/bb2/dist-osx-py38/build/ext/wxWidgets/src/common/sizer.cpp(2098) in DoInsert(): Horizontal alignment flags are ignored in horizontal sizers
OnInit returned false, exiting...

/Users/robind/ is not on my mac...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.