Skip to content
LukeOwncloud edited this page Apr 17, 2015 · 8 revisions

HABmin provides the ability to query a persistence store and graph the data.

Note that if there are more than 1000 data points to plot, HABmin will subsample the data to speed up the plotting.

Chart Window Recall

Saving charts

HABmin allows you to save a chart and restore it with a single click. The save window allows considerable customisation of the graphing, from the line style, colour and width, to axis customisation. Once the chart is saved, it can be loaded again in the Graph List window from where it is also possible to edit the chart definition.

Chart Save Window

Up to 8 channels can be specified in a graph, and 4 axis can be defined. (If you really need more channels: Edit https://github.com/cdjackson/HABmin/blob/master/app/graph/itemList.js#L196)

The following parameters can be configured for each item

  • The label text printed in the legend
  • The axis on which the item will be positioned
  • The type of graph to print (eg. line, spline, area, bar)
  • The ability to remove the legend all together for an item
  • Line colour, width and style.
  • Marker colour and symbol

The following parameters can be configured for each axis

  • Title text
  • Data format
  • Maximum and minimum values (note that this doesn't necessarily set the actual values if there are multiple axis since it will align the axis).
  • Positioning of the axis (left or right of the chart)

Viewing charts in sitemaps

Saved charts can be viewed in an openHAB sitemap so long as the client is a javascript enabled Webview. This has been tested in the ClassicUI and GreenT so far.

Chart In Sitemap

The image above shows a HABmin chart in the openHAB classicUI.

To use, configure the Webview URL (or other browser etc) to the following address -:

/habmin/chart.html?chart=aaa&service=bbb&period=ccc&refresh=ddd

Where

  • aaa (required) is the chart name saved in HABmin. It can accept spaces, but special http characters (&? etc) probably need escaping - I've not tested this.
  • bbb (required) is the persistence service name.
  • ccc (optional) sets the time period of the chart. If not supplied, it defaults to the period set in HABmin for this chart. Period can be specified either in seconds (number only) or on of the following (h,4h,8h,12h,d,2d,3d,4d,w,2w,3w,m,2m,3m,4m,6m,y).
  • ddd (optional) sets the refresh period (in minutes). If not supplied, the chart will update every minute.