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)
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;
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.)
Click on the title of your chosen panel in Grafana and select ‘Share’, then the ‘Embed’ tab.
Deselect the ‘current time range’ toggle.
Copy just the text within the quotation marks.
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.
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 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.
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.
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: