How to deal with non-SSL Panel iframe pages inside SSL Hass.io environment?

Since this thread has been revived a small comment on this: weblinks do exactly that. Well, not “tabs” like the groups, but links in the menu on the left. So like panel_iframe, but it opens the URL in a new tab.

hi is it possible to use panel iframe, with a url when in my home network and another url when im not home ?i dont know if a make myself clear

It is possible - I do it that way. Your router needs to support loopback though.

I got a Google WiFi, don’t know if it’s capable and how to do it

I think I found a way to make it work:

This is in my configuration.yaml:

panel_iframe:
 anna:
    title: Plugwise Anna
    icon: mdi:thermostat
    url: http://192.168.1.210:8123/local/anna.html

In config/www (hassio) I created the file anna.html with the following contents:

<html>
    <head>
    </head>
    <body>
        <style>.embed-container { position: relative; padding-bottom: 56.25%; height: 100%; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style>
        <div class='embed-container'> <iframe src='https://your_local_ip' style='border:0'></iframe></div>
    </body>
</html>

Replace your_local_ip by the numbers of your local ip address.

This works for me on Chrome on Windows 10. It does not seem to work on Android.
I found several bits of info online, tried several combinations of these and in the end it worked.

3 Likes

It would be great if you can paste here :> some bit of info that you have found

1 Like

HI David,
can this be used to show pages from other sources on the network, like nas or printer admin pages (not secure)

Yes. A reverse proxy like caddy will let you do this quite easily.

1 Like

You can add second duckdns subdomain or CNAME to your principal duckdns with other subdomain, with Nginx Proxy Manager create new host and use https on iframe

So from what I’m reading here & other information which caused me to look here an iFrame doesn’t actually do anything except tell your browser to find the page linked in the iFrame in config.
So, for instance, say I had a Plex server on 192.168.1.85:32400/web/index.html if I was over at Joe’s House & joe also has his Plex server setup on 192.168.1.85 & I accessed my HomeAssistant through notjoeshouse.duckdns.org my iFrame page notjoeshouse.duckdns.org:8123/plex would go to Joe’s Plex server because on the network I’m logged into 192.168.1.85:32400/web/index.html goes to his Plex server. & if he doesn’t have a Plex server it will return a Yo, That Page Ain't Here message because the browser is just being told to go to 192.168.1.85:32400/web/index.html, not Home Assistant going there.

This makes me completely confused as to the point of iFrames. I thought the point was so that Home Assistant could access the page. I was looking for a way to register the self-signed SSL within Home Assistant so I’d be able to manage my Cron Manager & Docker Logs through Home Assistant instead of exposing them to the internet directly as their security is not good since they are intended to be accessed locally.

Is that correct? That’s what I got from this conversation & it fits with what I had already learned, but it makes the iFrames seem pointless & makes me wonder how the Addon iFrames work in that case since, as far as I know, they aren’t accessible outside Home Assistant.

@LostOnline Take a look at Frigate Proxy add on

You can change this up to be your own add on, and icon, and point to services that don’t have SSL, Instead of using an iFrame option in config.yaml

That wouldn’t work for me as I don’t have the ability to use add-ons. If there’s a Docker version I could use that, but if it’s a Proxy it’s the same problem. I don’t want my things to be accessible over the internet directly, a proxy, generally, if for that purpose. Trying to find information about Frigate Proxy seems to indicate that it’s an IP Camera tool, which I have no use for.

I’m not understanding how that is related to the iframe issue

The frigate proxy, is an Nginx server, to point at another internal address that is non SSL

So for example, let’s say you only expose HA to the Internet

You add an iFrame to an internal address. 192.168.0.69

The iframe works when you are on your network, but not when you are outside of it, because clicking that iframe is like you trying to go directly to an IP that isn’t available over the web.

Where as a Nginx setup, like the frigate proxy, adds the side tab like an iframe and makes it so when you are logged into HA, you can access the page, since technically HA is loading the webpage, not you as a client outside your network.

I’ve modified the frigate proxy in my own private repo, for other services I don’t want to expose over the internet, but would like a available to me when I am logged into HA, whether outside or inside my network, but the service is not directly exposed. Like you those other services run http, and HA is https, so it won’t load http resources in an iframe.

In regards to you needing docker, just clone it, and use the dockerfile in the repo to build your image, instead of using it as an add-on, and make a docker-compose that maps the schema fields.

1 Like

That definitely sounds promising. I’m curious, I already have an NGINX proxy running, would it be possibly to add this to my current NGINX instead of running it as a separate one? If so would you be able to point me in the right direction for instructions on doing that?

Curious, I just looked at a couple other HA add-ons & the others all have a Dockerfile as well, which begs the questions, doesn’t that just mean that the versions that can run Add-ons are essentially running a literal Docker environment internally?
If so shouldn’t it be possible to run ANY addon as a Docker Container?

Assuming that is the case, why does Home Assistant make it so hard? why not just have them as a hassio/addon Repo? that would make it easier for them to be added internally as well as making it so that those running Docker could do so as well…

1 Like

Yes, HAOS and supervised can run addons, and both are running docker to run everything, HA, the supervisor, hassio-audio, hassio-dns, hassio-cli, hassio-observer and all the addons.

1 Like

Because they do more than just run a dockerised app, and you require the supervisor to, well, supervise them. see here Developing an add-on | Home Assistant Developer Docs

The Supervisor is definitely not required to run them, they run as a Docker container. Literally.
The supervisor is essentially a dumbed down simpleton version of a Docker Stack Manager like Portainer & a fancy catalogue browser.
& since, per @Deckoz2302’s explanation, it appears possible to manually add it as a regular docker container & still get it to work in Home Assistant then the Supervisor isn’t needed, it just makes it easier, I assume by adding the panels, frames, components, entities, etc from the addons instead of needing to do this manually.
Like I know the DuckDNS addon acts like the DuckDNS Docker Container, keeping the DDNS updated with the current NAT IP, but it also acts as the Let’s Encrypt agent keeping the SSL updated & instead of getting that information from Environment Variables in the Docker Container, it gets them from Home Assistant somehow.

So, again, lets assume all that is true, as I have yet to have to time to try it myself I will take the words of others as true until I have reason to believe otherwise.
Now for someone who already runs docker containers, who has more experience with Portainer than with Home Assistant (thought they both seem to have the same problem with support liking to address things so that only those who already know things can understand), since they are already containers, why not make it easy for us to use them AS containers & those of us who can easily do so manage them ourselves.

Just give us a way to

  1. Add the images
  2. Find the standard configurations
  3. Add them to Home Assistant (without having to piece together the pieces we can find scattered about to do it ourselves)

If you are running docker anyway, just run the software you want. The way the addons for ha are built and controlled is open.

But they aren’t though. Running the addon gives me a dumbed down version of what I’d get running a full docker container, BUT it gives me access from inside Home Assistant.

Like the DuckDNS one I mentioned. You do your setup of it within Home Assistant, & it does some unexplained openssl process to do the Lets Encrypt SSL cert. The container just does the DDNS update, nothing else, & can only be adjusted by editing the compose.

Or the Frigate Proxy mentioned above. It just runs NginX without all the capabilities of actually running NginX Proxy Manager or even just NginX alone, but it does something that I can’t do with NginX to my knowledge, it gives the ability to create an iFrame-like tab that doesn’t just tell the browser to go to another page, it goes there within the local network without exposing it to the internet,
To get the Frigate version like @Deckoz2302 was mentioning I have to add the files locally, build the image, then setup & run it. With that being the case I’d much rather use my already existing NginX server & just figure out what I need to do to add this if possible. However IF it was available as a Repo I could just run a stack with it because all it would require is for me to write the compose, as opposed to downloading everything, building it, THEN writing the compose & manually repeating the process every time there’s an update… Not the same thing at all

So from the same person who made the Addon there’s a Docker Frigate Container, & it definitely isn’t a Proxy Manager, There’s a Docker HASS Integration but it just sets up the Frigate Container, MQTT, Home Assistant, & a VScode Dev Environment. So it doesn’t look like there’s a Docker Image for the Frigate Proxy, but I think I understand what it is, It’s specifically designed to send the page from the Frigate Docker to the addon, but that still leaves the problem of not having the addon. The integration requires camera sources just to setup, so that doesn’t work.

If you have an example of what you altered to make it work that would be appreciated, as that would make it a lot easier for me, as well as anyone else who wants to try this. If I get it working I’ll most a more user-accessible version somewhere.