I was very exited to upgrade to the last version of ESPhome to test the new serial programming through Chrome/Edge. However, as mentioned in the esphome documentation (and dashboard), I have first to setup HTTPS in order to enable this feature for Chrome/Edge: fair enough.
I already have and successfully deployed SSL certificates for my homeassistant webui (docker container) but I can’t find where to configure it for my esphome docker container. Futhermore, I was not able to locate any configuration file inside the container nor any related documentation on the official documentation page.
I realize HTTPS is perhaps not possible within the ESPHome container and I have to setup an external SSL reverse proxy for this. With this “new” keywords, I was able to find some post in this forum on how to enable HTTPS HA iframes with ESPHome (for example).
I can deploy an nginx proxy container to proxy esphome but is this the way to go?
Can I use the HA web server to also reverse proxy ESPhome?
I don’t have any issue using the “regular” function of esphome with HTTP. The problem occurs when I want to use the new “Web serial” feature (programming through the serial port present on the computer which is running the Chrome web browser). Indeed, Chrome won’t allows sharing the host serial port to non-HTTPS websites.
I, too, would like to know this. The esphome documentation simply has this enigmatic line “You need to access the ESPHome Dashboard over HTTPS for this to work. This is a requirement of browsers to access your ESP device to ensure that we write the correct data.” However, there are no instructions on how to do this anywhere that I can find.
I setup a Cloudflare Tunnel really quick and pointed it to ESPHome. This adds https to it. Doing a quick test by trying to add a new device, it did pop up a dialogue box looking for a serial device to talk to, but I’m not near one to test right now. Ill try later.
EDIT: Hooked up a few different unused ESPs and was able to successfully flash through a Cloudflare Tunnel
Using the addon in a supervised setup works if you access HA (and therefore the addon) via your nabucasa account. Not much use except in HAOS or supervised sorry.
I did not spend to much further time on it. I far as I am concerned this serial programming over the browser is a good idea but just a nice to have feature. Sadly I don’t have the skills to make a clean solution so i am not spending hours tinkering a dirty solution to make this convenient feature work.
Don’t get me wrong, I am very grateful to the dev team for this piece of software which by the way is amazing. This software is improving a lot between releases. Let’s just hope, that one day, an out the box working solution came to make the UX even greater
Hi, your solution looks pretty simple to implement, but sadly I am not skilled with Nginx at all. Could you provide more information regarding your working setup?
I tried to recreate it already, but it did not work for me. Here is my setup.
I would like to create a simple repository that would allow everybody to use this solution.
I’m definitely not qualified to be anyone’s nginx guide but at first glance, you don’t seem to be serving your proxy as https. As far as I’m aware, it should look something like this as well as some more settings below for how to deal with ssl, where the certs are, etc.
server {
listen 443 ssl http2;
server_name esphome
I would start by looking for a boilerplate https config and then modify it to work as a reverse proxy.
Or maybe work from linuxserver.io’s swag image.
@sixo To tell you the truth, I don’t know if it’s working properly. I had it working and then it suddenly wasn’t working without explanation after I declared victory online. I currently have “local” as the domain in my firewall’s (pfsense) DHCP server settings for that VLAN. It’s a cheat but it worked for me and I never investigated further. Sorry I’m not more help.