[BETA] CSV Visualization - Completely Local Data Graphs

Companion app to [BETA] Device Attribute Iterative Storage (RRD) to allow some simple, but completely local, visualizations of the CSV data utilizing the chart.js library (thanks to @dandanache for the inspiration):

In HPM or at
(https://raw.githubusercontent.com/thebearmay/hubitat/main/apps/csvVisual.groovy)

HPM will install chart.js into the File Manager, but the app will check upon load and prompt you to install the file via a button if not found.

Data sets with attribute values that are reasonably close in scale graph best, i.e. don't expect a good graph if you're using freememory and cpuPct.

Graphs can be seen from inside the app or externally (including via the cloud) using an endpoint.

13 Likes

Now that is slick!
Works great, very nice.

Dashboard display?

1 Like

Use an iFrame tile device and the app endpoint.

Thank you, it does not get any better than this.

1 Like

Curious Question:

Something like this (resident to the hub) has been asked for going on a few years now.

What were the key elements that enabled it to be realized now?

File writing capability, storage capacity, tile capabilities, ...etc. ?

Thank you for addressing the need !

Local graphing has been available in a few different options over time. Hubigraphs was one option, but the developer quit supporting it for a few reasons. Then it got integrated in Webcore, There was also a option from @bptworld for a time.

The big concern with it is load on the hub to create graphs and manage the data.

1 Like

Most of the options to date were dependent on libraries that required Internet access to use, so the ability to download one library to the hub and make this work was attractive. webCoRE and Hubigraphs have local storage options integrated into them so not blazing a trail there but the file management utilities available on the hub now make it simpler to store and fetch the data, and by putting the number of iterations to retain in the user’s hands it allows them to control the impact to the hub.

So nothing completely new in concept, just a nice lightweight way of providing it. (In testing so far, it is less than half of my MakerAPI load for my Grafana implementation.) Browser does the heavy lifting for rendering, so minimal impact there too.

Edit: One other thing that may set this solution apart is that the visualization works through the cloud interface as well as locally.

5 Likes

v0.0.2 Changes:

  • Only show chart.js download button if not in File Manager
  • Fix download speed if chart.js is needed
  • Show available CSV files as a dropdown instead of requiring manual entry
  • Fix cloud rendering
1 Like

Much appreciated enhancements, thank you.

1 Like