Home Assistant Community Add-on: Grafana

The add-on does not support that and thus that plugin cannot be installed in the add-on

1 Like

Thanks for your reply,
Can you please update grafana to latest 7.1.3,
Thanks

1 Like

Frenck, try to install Grafana and InfluxDB and I follow the instructions really step by step. No creativity there… So installed Grafana by the book and followed your instruction to change the user name but I already got my first hurdle:

I can’t change my username because its not allowed… A suggestion for this?

I went through all the remarks and issues. A bit worried now… by the time I get HA, Grafana and InfluxDB working together, I will be probably capable of hacking the CIA database as well… :shushing_face:

lost…

Can this add-on be used with curl to generate png’s of the graphs? I tried the following curl commnand based on another post but I keep getting “401: Unauthorized”. Is this expected, or am I not doing something correctly?

I have generated an API key already.

'curl -s -H "Authorization: API_KEY" "https://NABU_CASA_ADDRESS/api/hassio_ingress/SOMETHING_HERE/render/d-solo/H_skAXlZk/last-7-days?orgId=1&from=now-7d&to=now&panelId=2&width=1000&height=500&tz=America%2FChicago" > /config/grafana_charts/7d_Temp.png'

Help… just see that something broke after a reboot of the entire system

image

I really do not know where to troubleshoot this. have looked into everything but nothing changed…

this is the total error i get:

### error parsing query: found %, expected identifier, string, number, bool at line 1, char 13

Object

message:"InfluxDB Error: error parsing query: found %, expected identifier, string, number, bool at line 1, char 13"

data:Object

error:"error parsing query: found %, expected identifier, string, number, bool at line 1, char 13"

message:"error parsing query: found %, expected identifier, string, number, bool at line 1, char 13"

config:Object

method:"GET"

url:"api/datasources/proxy/3/query"

params:Object

data:null

precision:"ms"

inspect:Object

paramSerializer:function(e){…}

headers:Object

retry:0

hideFromInspector:false

Influxdb runs and also I can “explore” data there.

EDIT: This post just saved my evening:

solution:
Update: Fixed the problem. In the Grafana go to the datasource then change the Query Language to Flux → Save & Test → change Query Language back to InfluxQL and disable basic auth option (enabled after changing language to Flux)
Save & Test → Data source is working

2 Likes

try use the IP address as the host

Is there some way to easily delete dashboard snapshots within the Grafana UI please?

I can see the URLs and click on them, but see now delete buttons.

Thanks

Just set up Grafana with InfluxDB and integrated charts via iFrame. All works and looks great!

One question, though: right now I add the to and from filters in the iFrame URL to be dynamic (say from: now/d and to: now for Today so far). I’d rather not have it set there at the consumption side, but in the source configuration of the charts in Grafana UI, but for the life of me I can’t get it persisted that way. Whenever I’ve set it like so, I save it and when I come back the range is again now-15m … now.

I can’t imagine this is how it should be, so it’s probably my bad, but I really scratched my head for long now and can’t get it to work. So any hint welcome :wink:

habitoti

This got me also.

If you want it set it on the Grafana side then you need to check the box (in the save dialog box)
Save current time range as dashboard default’.

Note this check box only appears if you change the date range

1 Like

Ok, this seems to work, but I’d then need a separate dashboard for every panel that has it’s own time range. From an organisational perspective this doesn’t make too much sense generally, IMHO. I can do it now with importing them individually into the Lovelace UI anyway, but I wonder how that plays out for a Grafana dashboard. Also there I’d probably need different time ranges per panel.

Obviously there is still no solution how to change the password. Now I’ve tried the following code. Unfortunately, you can no longer log into Grafana at all. Is there any other approach?

env_vars:
  - name: GF_AUTH_PROXY_ENABLED
    value: 'false'
  - name: GF_AUTH_LDAP_ENABLED
    value: 'false'

Why does Grafana require InfluxDB? Is there a way to access the Home Assistant database directly as Data Source in a Grafana?

does anyone find out how to reset the password in Grafana?

I seem to have lost mine :confused:

or do I need to do a full re-install?

Grafana does support SQL data sources (Home Assistant uses SQLite), so as long as you know the credentials for the Home Assistant database that is theoretically possible. That being said, SQL databases are optimized for relational data, where as time series databases (InfluxDB) are optimized for the time series data you would normally be visualizing in Grafana.
NOTE: There are time series databases built on SQL, that do optimize for time series data, but you would not want to use those for your Home Assistant database.
TLDR: While possible, I would suspect either Home Assistant is not storing all the data for long durations, and if it was, querying it would be super slow and inefficient compared to InfluxDB.

1 Like

Thx. I have installed InfluxDB and enjoying the great integration with Grafana.

@petewill @stephack
hi all, have you found a way how to change the default password yet?

Change Your Password
You cannot change password when ldap or auth proxy authentication is enabled.

You can try the steps in post 222: Home Assistant Community Add-on: Grafana

I didn’t try it though.

Unfortunately not. It may be a question worth asking in Discord.

1 Like

the influxDB & Grafana plug-ins work really super great. Thx for making it so easy for us.

I want to set the Grafana configuration [date_formats] from the browser use_browser_locale

use_browser_locale = true

Where can I put that configuration text ? I tried Supervisor -> Add-Ons -> Grafana -> Configuration. Did not work…