I’m trying to add a new NodeMCU ESP8266 cP2101. I’ve tried from both Linux Ubuntu 18.04, and 20.04. I’m connecting the device to the local machine via USB. I then click the add button on the ESPHome web UI, and enter the device name no spaces, and my Wifi information. I click Next, and it asks me to select the device from a list of TTY connections. it’s listed as CP2101 USB to UART Bridge Controller (ttyusb0) - Paired.
I select it, click Connect, and it immediately takes me back to the options to pick a device connected to this machine, or “Skip This Step” and / or “Connect” (just depending on where I get to the dialog from.
Any idea what may be going wrong? Any help is greatly appreciated, as I’m brand new to ESPHome stuff, but wanting to learn. Thank you.
Also, to be clear, I’m using Google Chrome, and connecting over https to my HA install.
I also looked at the browser developer console. I can see where it says the following:
Uncaught (in promise) Error: Request not successful (502)
core.7ce1f920.js:1 WebSocket connection to 'wss://mcghomeassist.routemehome.org/api/websocket' failed:
a @ core.7ce1f920.js:1
/api/hassio_ingress/SANoyCkiutLdX-NZ26V_mO7CWCjNlFUGrJnCbi2vH4k/ping:1 Failed to load resource: the server responded with a status of 502 ()
VM111 index-7db316db.js:1 Uncaught (in promise) Error: Request not successful (502)
WebSocket connection to 'wss://mcghomeassist.routemehome.org/api/hassio_ingress/SANoyCkiutLdX-NZ26V_mO7CWCjNlFUGrJnCbi2vH4k/ace' failed:
f @ VM111 index-7db316db.js:1
/api/hassio_ingress/SANoyCkiutLdX-NZ26V_mO7CWCjNlFUGrJnCbi2vH4k/ping:1 Failed to load resource: the server responded with a status of 502 ()
VM111 index-7db316db.js:1 Uncaught (in promise) Error: Request not successful (502)
core.7ce1f920.js:1 WebSocket connection to 'wss://mcghomeassist.routemehome.org/api/websocket' failed:
a @ core.7ce1f920.js:1
entrypoint.0d3c68f7.js:47966 The main 'lit-element' module entrypoint is deprecated. Please update your imports to use the 'lit' package: 'lit' and 'lit/decorators.ts' or import from 'lit-element/lit-element.ts'.
5704 @ entrypoint.0d3c68f7.js:47966
/api/hassio_ingress/SANoyCkiutLdX-NZ26V_mO7CWCjNlFUGrJnCbi2vH4k/info?configuration=office-temp.yaml:1 Failed to load resource: the server responded with a status of 404 ()
VM119 c.14b31b51.js:57 Connecting...
VM116 c.4c2b1138.js:401 DOMException: Failed to open serial port.
_handleConnectSerialSubmit @ VM116 c.4c2b1138.js:401
VM116 c.4c2b1138.js:401 DOMException: No port selected by the user.
_handleConnectSerialSubmit @ VM116 c.4c2b1138.js:401
Ok. Not sure why but Regardless of using Chrome, when I try this from Linux, it does not work. At least from Ubuntu 18.04 or 20.04 desktops. I connected it to my Macbook Air today, and using Chrome it worked fine.
I don’t know if this has any relationship to your issue, but I was having the same problem when upgrading my nodes whether they were on Wemos D1 Minis or ESP8266 Sonoff’s.
I initially thought that I was on the threshold of memory limits, but the same yaml file on a Wemos D1 Mini with 8kb ram (versus 1kb on the ESP8266) produced the same results.
A d1 mini essentially is a esp8266 (mostly a esp12 module). And all esp82xx have the same amount of ram (32 KiB for instruction and 80 KiB user data) - maybe you mixed up things @stevemann with esp32’s (which also have SRAM support)?
And ram will not be the limiting factor for simple/normal setups anyway, some flash limits will typically reached before (some older modules often have 1MiB and only half is usable because of ota)
FWIW, I had this same issue and tried esphome-flasher, which gave me a permission error. I assumed maybe I wasn’t getting into it a proper bootloader/flashing mode or something but wasn’t able to figure that out either. What eventually worked was to plug it into the PC, set up esphome-flasher so that it’s ready to flash, unplug it from the PC, then plug it in and quickly start flashing. For whatever reason, flashing as soon as it boots was the only thing that worked. I wasn’t able to do this through chrome because of the delay introduced selecting a device.
I’m not sure what that would be since it was plugged into my laptop that wasn’t running anything else besides Chrome. I might play around with it again but just being quick to run esphome-flasher got me through with flashing my current devices.
I have exactly the same problem. Also tried to connect to the Rpi hassio box which fails too. I unfortunately (?) run Fedora with GNOME 40 and esphome-flasher doesn’t “work well” on wayland and GTK4. Other attemps using esptool also gives me errors as I installed esptool for my user and it refuses to access /dev/ttyUSB0.
Any tip would be very nice.
Thank you.
I had this problem too.
BUT i have a personal admin who found the problem
The first idea was it may be a permission problem.
Looking into /dev you could see ttyUSB0 belonging to user root and group dialout.
So my user was added to group dialout (dont forget to relogin after this change)
Voila - device could be selected in https://web.esphome.io without error. @bmcgonag