Graphing / Charting Temp/Power Data

I originally had this running on a Win10 box and it worked perfectly. You just need to follow the Windows install instructions for each app ie Influxdb, Grafana and nodeRed. I also used NSSM to get each app to auto start as a service.

Influxdb:

Grafana:

Nodered:
https://nodered.org/docs/getting-started/windows

NSSM:
https://nssm.cc/

2 Likes

Thanks @stephack, I'll use your notes as a starting point. I'm working through accessing data from my sensors at the moment and will then start to look at recording the historical results. When I do I'll start with the instructions you've provided.

Simon

Has anyone gotten grafana graphs into dashboards yet?

The dashboard won’t accept an iframe and the image option for sharing doesn’t seem to update.

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

1 Like

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. The normal use of this driver is for devices created using the App of the same name, but I simply created a new virtual device manually through the HE Web UI.
  2. In the Grafana web front-end I opened my dashboard, clicked the drop-down menu above any panel on the dashboard and selected "Share Panel", grabbing the embed code from the pop-up that appears. I then swapped the panel's URL in the embed code with the URL for the entire dashboard.
    Before we can use this embed code in HE, some configuration changes need to be made to Grafana, in my case on my raspberry pi.
    2.1) Update the Grafana config file to enable embedding, achieved by (in my case) updating the /etc/grafana/grafana.ini file, uncommenting and adjusting the settings shown below. Note, any hashes or semi-colons need to be removed, otherwise the changes will be ignored.
    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 anonyous login
    2.3) Remember to restart your grafana service once the configuration changes are saved
  3. Back in HE, on the device configuration screen for the virtual Tile Master device, paste the dashboard embed code into the parameter text field for the sendTile01 command button and click the button to run the command. An example of the embed code is shown below:

<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>

In addition to the embed code from previous steps, the following adjustments may also be needed:

  • The width and height settings may need to be adjusted based on the HE dashboard layout where the tile will be displayed
  • The from and to settings can be provided as part of the URL, e.g. the last 1 hour
  • The &kiosk parameter will remove all the menus and other Grafana UI elements around the dashboard

  1. Lastly, add the Tile Master device to a HE dashboard, selecting the attribute template and the tm-tile01 attribute. Some adjustments may be necessary to some of the settings listed in the IFRAME from step 3.

Hope this helps,
Simon

3 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

1 Like

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?