Hi, I’ve seen quite some tutorials in which Grafana is being used for producing the most fantastic graphs. So far I understood there are two ways of including these charts in Lovelace (running Hassio on rPi 3):
using an iFrame
using camera sensor
In case of iFrame i noticed that, when copying the URL for a specific chart I can still browse the entire Grafana front-end (e.g. hamburger menu is shown in the iFrame). This is something I want to avoid because of obvious reasons Also the iFrame required a login when viewed from outside the local network.
In case of camera sensor you need Grafana to export the chart as image which requires the phantomJS plugin. This is however no longer supported for the ARM (e.g. rPI) platform and seems therefore not to be an option. In addition I expect that, since this results in an image, one can not hover over the chart and see it’s values (which is possible in the iFrame).
How can one embed a single chart in HASSIO which is viewable from outside the network but does not allow for changes to be made in Grafana?
Did you find any alteratives to Grafana? I’m having the same issue and was looking at ChartJS but you need some PHP to pull the values out of the database.
Grafana definately seems like the easier option if phantomJS can be added.
I kinda gave up on this. I’m now only using influxdb and it’s dashboard to check on some things every now and then. Nothing fancy that can be integrated in Lovelace for now
Well I guess that’s better than nothing. I did actually manage to fix the PhantomJS issue in the end, but it will only work if you’re running Raspbian Stretch, and even then it takes a while to generate the image, and you can’t hover over and see values but you can add it to homeassistant easily enough.
I also went through the hoops trying to get this working with hassos+add-ons. This won’t work even if you enable anonymous login for grafana. The Iframe cards supposedly won’t work because there is no guarantee of authentication for ingress (was told this by a dev). Interestingly though, one can still access the grafana link using a browser if anon login is enabled. This way at least the graphs can be accessed from a browser without having to use grafana creds.
It still begs for development though, because ultimately folks are want to get rid of recorder/history and replace graphs with the more efficient and usefull influxdb+grafana or similar. Until the hassio ingress issue is worked out with graphana, it can’t really serve as a suitable replacement.
Hi, @truglodite isn’t there yet a solution for this issue?? I’ve just discovered grafana and I think it’s really awesome and, at the same time, I cannot believe there’s no way to display it on lovelace.
Hi, thank you @francisp ! I had already tried that but it was only working for my PC and not for my FireOS panel and mobiles. But now, I’ve realized that just accesing Grafana from these devices and then going back to its lovelace dashboards solved the problem, as I was already logged in for each device.
Hi Francis, would you mind sharing how your iframe code looks like in the Raw Configuration Editor. Sofar, I’m not very succesfull with embedding Grafana chart in the HA front end.
Using Pi-Hole with DNSMasq covers the topic of making a HTTPS site within the network that can (or cannot) be accessed outside the network (if I understood the question correctly).
Here’s an example of the charts built in the second link:
The right side is a replacement for the climate “History” (where you see the target/mode/etc. for climate entity). You’re looking at a tri-zone heating system, actually an Arduino sensor & zone heating system I built from scratch. You can see the yellow (HVAC target), green (current temp) and red (heating?)