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.