Grafana panels not visible as webpage cards in Lovelace, when viewed via the iOS App

I have a number of panels created in Grafana, which are set up to be visible as webpage cards in Lovelace.

This all works well when viewing through a browser on my windows PC. However, these are not generally visible using the companion app on my iPhone 10. Instead there’s just a grey card, of the same size, with a “401: Unauthorised” message at the top.
But strangely they do become visible occasionally, without any changes to my configuration.

In both cases I’m accessing from inside my local network. (I will be looking to access from outside
eventually, but that’s for a later date)

Any suggestions appreciated.

Visit the grafana addon and open the web interface.

This sets up authorisation and your graphs should be visible in home assistant until you end the session (by closing the app).

Thanks Tom. Much appreciated, and explains why the panels were sometimes visible.

But is there some way the app could just set up the authorisation automatically, without this extra step?
It’s a bit of a faff, and the web browser on my PC seems able to do it.

For anyone else wanting to get Grafana panels in to Lovelace, my method is;

  1. Change the view mode to ‘Kiosk’ by clicking the ‘View Mode’ icon twice.
    (you can exit this view later, if need be, by pressing the escape key.)
  2. Click on the title of your chosen panel in Grafana and select ‘Share’, then the ‘Embed’ tab.
  3. Deselect the ‘current time range’ toggle.
  4. Copy just the text within the quotation marks.
  5. Paste this in as the source of your webpage card in Lovelace.

The only other method I know of is to set up a generic camera. This has disadvantages, mainly the resolution. Search for ‘best method to import Grafana graphs’.

Honestly there isn’t a good method of importing Grafana graphs that I know of. I just put a link to the Grafana web interface in the side menu and use that for the moment. Hopefully a better way will be developed.

This is a known issue with Grafana. After asking on Github, it appears a fix is coming soon.
https://github.com/home-assistant/iOS/issues/1259

1 Like

I’m using HA container with Grafana as a separate docker container. The Grafana dashboards I set up work fine on Safari and Chrome, just not in the iOS app.

I opened that issue. It is not related to your problem of authorisation between home assistant and grafana. That issue was inside grafana itself.

OK. thanks Tom.

I guess I’ll have to wait longer for a fix to this.

I had the same problem that I need to first click on the grafana link in the side panel before the grafana lovelace cards would “authorise”. This was required whenever the browser was closed/reopened, timed out, or if changing to a new device.

So as a band-aid solution I made a new “web card” on my main home assistant landing page with the link copied from the side panel “https://blahblah.duckdns.org:8123/a0d7b954_grafana

Now whenever I first open home assistant that card connects/authorises to grafana automatically, then when I switch to other home assistant tabs where I have the grafana chart cards they work ok.

Disadvantage is that I have a dumb grafana (see image below) home card at the bottom of my main home assistant page. For me its better than clicking on grafana side panel though as its just way down bottom of screen.

grafanapanel

Maybe someone knows haw to do a similar thing without showing the card? Or perhaps there is a generic way to hide cards or make them invisible?

And here is a tab with the grafana chart that just works:

Any fixes out for this issue?

I have same issue, I have to open graphana on my iPhone manually before the graphs cant be viewed as a webcard in lovelace dashboard.