Graphing / Charting Temp/Power Data

Hi @potts.mike,

I haven't got back to this yet. I was able to get live readings coming through for my sensors, but haven't looked at recording history or reporting that history on a chart. My time spent on HE has been sporadic and I have a few other things ahead of this in my list.

I would also be interested to hear anyone else's experience.

I’ve started down the path of installing the grafana-image-render Docker. It will generate a new .png every 15 min that I should be able to show in a dashboard.

1 Like

Any unraid docker experts here?

I need to do the below using environmental variables in unraid

*version: '2'*

*services:*
*  grafana:*
*    image: grafana/grafana:master*
*    ports:*
*     - "3000:3000"*
*    environment:*
*      GF_RENDERING_SERVER_URL: http://renderer:8081/render*
*      GF_RENDERING_CALLBACK_URL: http://grafana:3000/*
*      GF_LOG_FILTERS: rendering:debug*
*  renderer:*
*    image: grafana/grafana-image-renderer:latest*
*    ports:*
*      - 8081*

I've got it rendering the images that show in my browser alone. The image is not loading into the dashboard and the image isn't updating as I expected. I need to do some more research on how this should work.

It's taken me a while but I got around to reporting my temperature and humidity readings through grafana, ultimately on a Raspberry Pi (Debian) rather than Windows.

I followed @asj 's notes on the post New Hubitat to InfluxDB Bridge via MakerAPI+Node [beta]

Happy to share any experiences with anyone attempting the same setup.

Simon

Hi @potts.mike,

I noticed your post from back in Jan trying to get Grafana charts on your dashboard. I was able to achieve this recently and thought I'd share my solution. I posted briefly about it here, showing the outcome, but didn't include any of the details. There would be a neater solution than this, but..

  1. I setup a new virtual device using the Tile Master tile driver, not linked to the App of the same name.
  2. In Grafana I started by selecting to share a panel, grabbing the embed code, then switched out the panel's URL for the entire dashboard URL.
    2.1) Update the Grafana config to enable embedding, achieved by (in my case) updating the /etc/grafana/grafana.ini file, uncommenting and adjusting the following settings:
    allow_embedding = true
    cookie_samesite = lax
    See this article for more details
    2.2) Update the auth_anonymous section of the grafana.ini config file to enable anonyouse login
    2.3) Remember to restart your grafana service on the raspberry pi.
  3. Back in HE, I then used the sendTile01 command button in the Tile Master device setup screen to set the tile contents to my IFRAME (Grafana chart), e.g.

<iframe src="http://192.168.0.29:3000/d/fZew_iiRk/hubitat-climate-charts?orgId=1&refresh=30s&from=now-1h&to=now&var-Sensor=Kitchen %2F Dining&var-Sensor=Master Bedroom&var-Sensor=Study&var-Sensor=Third Bedroom&kiosk" width="900" height="2000" frameborder="0"></iframe>

I did tweak the width and height settings, made sure I hade the from and to settings how I wanted them (the last 1 hour) and included the &kiosk at the end to remove all the menus and other things around the outside.

  1. I then added the device to my dashboard, selecting the attribute template and the tile01 attribute from the device.

Hope this helps,
Simon

2 Likes

I’m definitely trying this tonight

1 Like

What do you mean in step 2?

I added the embedded url from grafana but it’s not loading in the dashboard.

Grafana URL
iframe src="http://192.168.0.100:3000/d-solo/UO7rBG3Wk/washer-test?orgId=1&refresh=30s&from=1587242367912&to=1587263967912&panelId=2" width="450" height="200" frameborder="0"></iframe

Ah yes, I did miss a step, you need to enable embedding within Grafana. Give me a minute and I'll find the setting.

Hi @potts.mike,

I have updated my earlier post to include change I needed to make in the grafana config to allow embedding (steps 2.1 and 2.2). Hopefully this makes sense. From the article I listed, don't forget to remove the semi-colon from the beginning of the two config items in the grafana.ini file, so they are no longer commented out.

Simon

I believe I updated the auth_anonymous section to allow anonymous login as well, I'll update the steps again.

I need to do some research on how to change the settings in a docker, probably using environmental variables.

Ok. If I see anything that may help I'll pass it on

Added the below container variable with no luck. Chrome says Grafan refused the connection

What's the last one shown as true? I can't see the variable name. As well as the allow embedding and cookie settings there was also the allowing anonymous login.

@sburke781, I've followed your instructions (several times) and I'm not getting the expected display. The graph looks great in a browser window and I'm running InfluxDB and Grafana natively on the same Arch Linux host. I get:


I checked each of the items listed and found no problems.

The device looks like this:


And the code is:
<iframe src="http://redacted:3000/d/gXciQEkMk/environment-sensors?orgId=1&refresh=1m&now-12h&to=now&kiosk" width="900" height="400" frameborder="0"></iframe>

Any idea what's wrong?

Wait...The same dashboard is displaying the graph properly in the Hubitat app on my phone! WTH?

You're probably stretching my knowledge and experience here, it does mention the use of a proxy... could there be something different about how you access the dashboard between your PC (?) and your phone? Could one be a local dashboard link and one be cloud? I'll take another look at my setup in a few hours.

I don't do cloud anything but it's definitely something to do with my home networking. I'll post back here when I figure it out. Thanks for looking.

1 Like

I don't expect this will be related to your problem, but I did have to go through at one point and reassign the owner and group for my Grafana or Influxdb files. It was messing with my ability to start up the services automatically on boot. Perhaps it could be something like that? Though it is still strange that it displays on your phone.

Only other thing I have read is about large numbers of stale connections hanging around... Not sure what it could be...