Access the router from the frontend (Hassio 0.94.3)

I want to access the router directly from the left column of the user interface. To do this, I have added the following to the configuration.yalm file:

# Muestra el Router en la columna izquierda del frontend
panel_iframe:
  router:
    title: Router ASUS RT-AC87U
    icon: mdi:router-wireless
    url: http://192.168.1.1

The icon and the name of the router appear in the left column. However, H. A. rejects the connection.

How do I get H.A. to establish the connection?

Thanks in advance.

I have a similar router. I find that it redirects to a different URL.
Try url: http://router.asus.com/Main_Login.asp

I’ve tried your suggestion, but it doesn’t work.
In any case, thank you for your interest.

It is probably the router and not HA rejecting the connection. I have a TP-Link router and tried to do the same thing with a panel iframe. In my case, the router forwards traffic to an Apache server, which sends it to HA on another computer. As far as I can tell, the router is set up so that it can only be accessed from inside the local network as a security measure. Even with the panel iframe, I think there is still something in the http header between the browser and router that the router picks up and knows the connection is outside the local network or forwarded. I tried briefly to change the headers when it was passed through the Apache server, but didn’t have much luck. That may be the direction you would need to go, but someone more knowledgeable than I would have to detail what you can do to fix it.

I believe that if you use HA with https it can only display pages with https. Some pages wont load at all like sabnzbd.

1 Like

On my router it appears you can enable https. I have not tried it though.

That’s a pretty faulty router. The piece of your network that is supposed to be the most secure doesn’t run https

The web server is only accessible on the local network. It is not routed to outside. Many people do not want the additional complexity of dealing with an ssl certificate.

1 Like

I have done a new test to connect to the router from the Home Assistant I.U. This time, with the Lovelace editor I have created a new tab “www”.

In it, I’ve added three links to different sites, including the router. I’ve done it this way:

Despite the error message, all three links work correctly. I am not able to interpret the meaning of the message (my knowledge of English and H.A. is limited).
The “weblink” section of my configuration file is as follows.

# ModificaciĂłn del archivo configuration.yaml
# para añadir el componente Weblink
weblink:
  entities:
    - name: Router Asus RT-AC87U
      url: http://router.asus.com/Main_Login.asp
    - name: Iconos material desing
      url: https://materialdesignicons.com/
    - name: Calidad del Aire
      url: http://aqicn.org/city/spain/pais-vasco/sondika/sangroniz/es/

# Muestra el Router en la columna izquierda del frontend
panel_iframe:
  router:
    title: Router ASUS RT-AC87U
    icon: mdi:router-wireless
#    type: weblink
    url: http://router.asus.com/Main_Login.asp

However, the link to the router from the left column of the frontend with “iframe” still fails.
I don’t quite understand the differences between the operation of the two alternatives.

These are links, that open in another tab, or in the same tab, going to a different page. They can be http or https. It makes no difference.

iFrame will require the same protocol as your HA system. If your HA system is using https, then your iframe must use https as well.

Except for a mistake on my part, the access protocol to my H.A. is “not secure.”

Peticion_ayuda_02

Access to the router by “iframe”, as can be checked in the configuration file, also uses the “unsecured” protocol.
Thank you for your interest, the matter is unimportant and, in addition, you have an alternative solution. However, I am interested in learning as much as possible about how Home Assistant works.

I have the same issue, Found the route page is required same-origin. then iframe was not allow to cross the different domain. I’ve installed the cros plug-in on the chrome, but it doesn’t work.

Sorry to revive 4 years later but this is the first result on Google and I figured out a way. My use case was that I found myself in a country with blocked websites and even VPN. Here’s what I did:

  1. Install terminal & extension. Configure SSH (it won’t work externally because the port isn’t open)
  2. Use ssh in the web terminal to escape the docker instance and login to your pi user
  3. Install a terminal based browser to browse your router admin page. Lynx is lightweight but doesn’t support javascript, this won’t work with TP-link routers. I used brow.sh instead

1 Like

Looks nice! Could you explain more about the steps to install browsh. My terminal in HA seems not allow me to install it.