Open local ESPHome "container" IP web page from HA dashboard link

I did use search, but nothing (usable) came out, so my end result guess is that my request is not possible… but, there’s always a hope that i’m wrong, so:

my Ha runs in VM on proxmox. I use esphome as addon which runs inside HA all this time. However, now i just installed esphome as separate LXC in proxmox and my tests shows that compiling is noticeable faster, so i’d like to use it instead of HA addon.

Now question: is it possible to create a link - shortcut in HA’s sidebar ? I didn’t open esphome LXC to outside world (yet) and i don’t want to unless it’s really necesarry, so at this time i don’t have https, but only local IP address (say http://192.168.1.111:6052).

All results of my search points that it’s mandatory to have https… or isn’t it? Is there a way?

Have you installed and turned on certificates?

If you access HA over HTTP (non-secure) you can also open any other webUI on your LAN that is served over HTTP.

I’m doing this for LMS and Z2M.

Yeah it’s unclear to me what the issue is that you’re asking about.

Settings → dashboards → add dashboard → webpage → type in the local address with http → on the next page make sure “add to sidebar” is enabled.

Local addresses should work fine when you are on the local network. If you are viewing HA remotely then you’ll get an error when you try to access that page.

Thanks for your answers.
So, no, i didn’t install any certificates, i just installed esphome into proxmox with pre-made script. It’s accessible only via http.
As for other two answers: i added “web page” dashboard, and, as you say, it’s only available when browsing locally. If i want to open it remotely (via my HA domain) it shows an error that it’s not possible to load iframes with http.
I mostly access my ha with my remote domain, not with local IP, (for start to check if all is ok, and also to eliminate vscode nag…), so it’s gonna be a problem… i do have VPN set up, but the way it works now it’s not much of an improvement…
So, i guess opening to outside world is the only option to work “no matter what” ,right?

Pavel, you didn’t make it clear in your first post that you want to open ESPHome from outside of your LAN over HTTPS.

If you open HA over HTTPS, you cannot open an iFrame in HTTP.
If you want to be able to open your non-secure ESPHome UI, you have 2 options:

  • use a VPN
  • install a reverse proxy to be able to serve ESPHome over HTTPS and put that in an iFrame

Yeah, sorry about that. I mostly use external domain for access to my HA, even if i’m at home - as said, for number of reasons: first i regularly check if all is ok with my external domain, but more importantly because of that nag from vs code "Vscode is being accessed in an insecure context… " if i open HA with my local IP, so i have to click that “X” each time…
I do have VPN, but it doesn’t help much if i open my HA with external domain, as explained above.
I know that having external domain for ESPHome LXC would solve my “problem”. I have reverse proxy (in my Synology NAS), so i can easily open this new esphome to outside world, i also found out how to password-protect it (it’s not by default), i just wonder how secure this is… but, i’d say similar as all other exposed things… correct?

I got domain

Installed caddy

Setup local dns that forwards domain traffic to caddy reverse proxy

Caddy gets cert from letsencrypt but port forward is not used for this. Caddy verify domain using module. This allows caddy to only be accessible from my lan and domain is only lan based.

With this I have https with valid cert to local only domain name wit no port forward required

Huh… never heard of Caddy. I’ll investigate, thanks.

Caddy isn’t special.

I use nginx for external connections from wan

Caddy is just simple in that you don’t need to deal with a complicated config file and it auto manages certs so it perfect for local only

DNS is a seperate matter
I use opnsense as router so it has dns module. Something like Pihole may work also.

DNS is the real key as you need something to tell your devices the local IP of server/servicesemphasized text

There is a third option, which is to utilize HA’s ingress support. I haven’t used this yet, but this integration should do the trick:

(Edited with correct link)

Thanks, but sadly this addon gives me same error: can’t load iframe which points to http, only https allowed.

My apologies, I linked the wrong integration. This is the correct one, and I’ll edit my previous post:

1 Like

Yeah, second addon works, great! After installation i added this to my config:

ingress:
  link_automation:
    work_mode: iframe
    ui_mode: replace
    title: ESPHome Proxmox 
    icon: mdi:chip
    url: http://192.168.x.y:6052

and i’ve got set name in sidebar. When i click on it i’m redirected to my local esphome’s page. It works perfectly if i’m at home and i access my HA with my remote link, which was my main goal.

This page of course doesn’t open when being away from home, but that’s what VPN is for - it works with VPN (just tested with my phone via cellular data and VPN enabled). I’m always working with VPN outside my home whenever possible anyway - it’s another step to a better safety, i guess.

Thanks a lot for your help!

I expect that it can be set up to handle the connection so that the dashboard can be shown without VPN as well, since that what the native ingress feature does in HAOS for addons.

But as I mentioned, I haven’t used it (yet, but am planning to) so I’m not sure what has to be changed to get that functionality. If I figure it out I’ll reply back.

1 Like

Update: new day, new testings…

Success! I changed “work_mode” to “ingress” and “ui_mode” to “normal”. With my first settings (above) clicking on link caused web page to go “out of HA” interface and directly to set IP (replaced HA page, thus “replace” mode), and that’s why it didn’t work out of home network. Normal mode shows page inside HA dashboard, so it works everywhere.

(oh, i also changed name “link_automation” to “esphome_proxmox” )

1 Like