Home Assistant Community Add-on: Grafana

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ā€¦

Hi all

I have Influx DB up and running and installed Grafana but i cannot access the Web UI. I get a 502 bad gateway error.

RPi3B+ with HASS.IO