OH3: Charts/Graphs/Plots

I’m mainly using RRD4J for this right now. I tried it briefly with InfluxDB and it didn’t work but I didn’t look into whether that was my problem or a bug yet.

I have rrd4j set as my default and I currently have a profile to save everything. There is a reason for this. In MainUI you will find scattered here and there a button labeled “Analyze”. Clicking on that will generate a chart of what ever you are looking at. Here is the chart I see when I click on “Analyze All” on my Humidity card in the “Properties” tab. I show this because I didn’t set anything up to generate this chart. All I had to do was build the semantic model so my humidity sensors are properly tagged and make sure the humidity Items are saved to the default persistence.

You can change how the chart looks in controls and change the time period by clicking D in the upper right corner.

You can even put the chart of an Item behind the Item’s card so no matter where you look at it you can see a history of it’s state.

And there’s that "Analyze button again.

I bring these up to point out that a lot of charting capability “just happens”. You don’t have to do much of anything to get them.

If you want to create a chart manually though, go to Settings -> Pages and click the + icon at the bottom right. Choose “Chart” from the list.

I don’t know what everything here does so you’ll have to play around . To create a simple line chart:

  1. give it a reasonable ID, Label, and set the visibility settings as desired.
  2. Change the Chart Type and Initial Period as desired.
  3. Add Grid
    a. Click the + in the upper left to add the Y-axis, click the newly created axis to configure it

    b. Click the + in the lower right to add the X axis, click the newly created axis to configure it
    c. Click “Add Time Series” and then click the menu to edit the series

    d. Choose the Item and other charting parameters for that time series.
    e. Repeat c-d for all the Items you want to chart.

    f. You can add additional components like tool tips, a legend, title, etc at the bottom.
  4. Repeat 3 to add additional charts to the page.

At any time you can toggle the live view in the bottom right corner or by typing ctrl-r.

Save the page as you go (ctrl-s, button at top right).

When done, depending on the settings you chose, you will see a new entry in the left menu for the new chart page.

Obviously this doesn’t cover everything but it should give you enough to get started.

4 Likes