Hass.io + InfluxdB + Grafana + Home Assistant Companion

Hi!

I have googled for hours and pursued different solutions but always ended up at a dead end. Help!

I am using Hass.io (0.101.3) on a Raspberry 3b+ with the add-ons Grafana (3.0.0) and InfluxdB (3.3.0). Data flows fine from Hass.io to InfluxdB and is visualized in Grafana.

I then want to get the Grafana panels into Hass.io and are using iframe…

cards:
  - type: iframe
    id: graf1
    url: http://192.168.1.65:8123/api/hassio_ingress/8R0NvNvb6b-5pPEF3Z7zvNDIusRAuQtFDEK4pGd-FHQ/d-solo/OMoaJ1mRk/grafana?orgId=1&theme=light&panelId=4
  - type: iframe
    id: graf2
    url: http://192.168.1.65:8123/api/hassio_ingress/8R0NvNvb6b-5pPEF3Z7zvNDIusRAuQtFDEK4pGd-FHQ/d-solo/OMoaJ1mRk/grafana?orgId=1&theme=light&panelId=2

…and it works just fine on my desktop computer (windows, chrome) both with local IP and xxx.diskstation.me to the raspberry.

But when I try to connect through my phone (iPhone) by either using Chrome or the Home Assistant Companion Beta app the panels are replaced by “401: Unauthorized” if connected to the local LAN and blank panels if on the mobile network. What am I doing wrong?

I have found this lead in the Grafana documentation “this sharing require either anonymous access or setting [cookie_samesite] to none” but aren’t successful in using it.

my Grafana Config

{
  "plugins": [],
  "env_vars": [],
  "log_level": "info",
  "ssl": false,
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

Some images of what I see
Panels in Grafana


Panels in Hass.io, Windows, WLAN, local IP

401: Unauthorized, iPhone, Chrome, WLAN, local IP

401: Unauthorized, iPhone, Chrome, WLAN, xxx.diskstation.me

Blank panel, iPhone, Home Assistant Companion Beta, Mobile Network

Blank panel, iPhone, Chrome, Mobile Network, xxx.diskstation.me

Lots of people having the same issue.
Still trying to make progress with it myself!

Some config settings added here as you described. Still nowt!!

1 Like

I tried your config but no luck.

Didn’t work here either :wink:
But it’s a work in progress!

hello, is it stiil impossible to see Grafana iframe on mobile app ?
thanks

I have not tested, given up on that, did you try it?

Hi there Jumping, it works just fine on mobile app or pc. The trick it you have to configure the link including your outside network so.

You just have to be consisted with what you do, if you config all you iframe grafana charts with 192.168.X.XX and you reach them using https://outside-IP:8123 they will not work but if you reach them with https:local-ip:8123 they will! But remember, if you changed them all to https:outside-ip:8123 and you grap your pc and reach HASSIO local, they will not work.

However the main issue still exists that after a while you still get eror 401 if you don’t login periodically into Grafana to ‘update ‘the iframes in HASSIO.

now it works for me on mobile app, as you said the main issue is the 401 error.
thank you