Caution
This is the documentation for the current development branch of the CometVisu. It is possible that some of the described features are not yet available in the current release.
Also there might be lots of errors in this documentation as some parts of the content have been translated by an online translation service.
The diagram2_info plugin
Description
The diagram2_info plugin shows the current value of an address as a widget. With popup="true"
a click on it opens a fullscreen diagram showing the history of that value. It is the successor of
diagram_info and draws with D3.
The displayed value comes from the <address> element and is rendered through format, like
in every other info widget. The diagram in the popup is configured exactly like The diagram2 plugin:
through <axis> and the data sources <iobroker>, <rrd>, <influx>, <openhab> and
<demo>. Interaction in the popup — panning, zooming, reloading the visible range — is the same
as well.
Without popup="true" the widget stays a plain value display and is not clickable.
To show the diagram itself as the widget, use The diagram2 plugin.
<diagram2_info series="day" period="3" popup="true" format="%.1f °C">
<layout colspan="3" />
<label>Outside temperature</label>
<axis unit=" °C" decimals="1">temperature</axis>
<iobroker instance="influxdb.0" color="#FF0000">hm-rpc.0.LEQ123456.1.TEMPERATURE</iobroker>
<address transform="DPT:9.001">4/2/0</address>
</diagram2_info>
Settings
Allowed attributes in the diagram2_info-element
Element |
Attribute |
|||
|---|---|---|---|---|
Name |
Content |
Description |
||
diagram2_info |
popup |
true or false |
Makes the widget clickable and opens a fullscreen view of the diagram when clicked |
|
format |
string |
Formatting of the value (printf syntax). |
||
styling |
string |
Change the color of the displayed value depending on its value. See also Styling |
||
mapping |
string |
Map the bus value to a different value, text or symbol for displaying. See also Mapping |
||
align |
left, right or center |
|||
bind_click_to_widget |
true or false |
use the whole widget area to react on click events |
||
series |
hour, day, week, month, year, fullday or custom |
Defines the base unit for the period attribute eg. day, hour |
||
refresh |
integer |
|||
period |
string |
Time period shown in the diagram as multiple of “series” |
||
gridcolor |
string |
Color of the grid shown behind the graphs |
||
gridwidth |
decimal |
Stroke width of the grid lines, the axes and their ticks, in pixels. Default 1, the value the flot based diagram uses as well. |
||
gridopacity |
decimal |
How solid the grid lines are drawn, between 0 and 1. Default 0.4, the flot based diagram draws them with the full grid color, so 1. |
||
borderwidth |
decimal |
Stroke width of the frame around the plotting area, in pixels. Default 1, the flot based diagram draws it with 2. |
||
linewidth |
decimal |
Stroke width of the graphs, their bar and point outlines included, in pixels. Without it lines are drawn with 1.5 and outlines with 1, the flot based diagram draws all of them with 2. |
||
legend |
both, inline, popup or none |
|||
legendposition |
nw, ne, sw or se |
|
||
title |
string |
|||
tooltip |
true or false |
|||
timeformat |
string |
The time format for formatting the x-axis of diagrams with following placeholders:<br/> %a: weekday name (customizable) %b: month name (customizable) %d: day of month, zero-padded (01-31) %e: day of month, space-padded ( 1-31) %H: hours, 24-hour time, zero-padded (00-23) %I: hours, 12-hour time, zero-padded (01-12) %m: month, zero-padded (01-12) %M: minutes, zero-padded (00-59) %q: quarter (1-4) %S: seconds, zero-padded (00-59) %y: year (two digits) %Y: year (four digits) %p: am/pm %P: AM/PM (uppercase version of %p) %w: weekday as number (0-6, 0 being Sunday) |
||
timeformatTooltip |
string |
The time format for formatting the tooltip’s time value. See timeformat attribute for possible values |
||
zoomYAxis |
true or false |
|||
seriesStart |
string |
In case series attribute is of type “custom” the value of this attribute is used for the start of the series. |
||
seriesEnd |
string |
In case series attribute is of type “custom” the value of this attribute is used for the end of the series. |
||
seriesResolution |
integer |
In case series attribute is of type “custom” the value of this attribute is used for the resolution of the series. |
||
Allowed child-elements and their attributes
Element |
Attribute |
|||
|---|---|---|---|---|
Structure |
Name |
Content |
Description |
|
|
colspan |
decimal |
Amount of columns this widget should be wide. |
|
colspan-m |
decimal |
Overrules the amount of columns on a medium screen. |
||
colspan-s |
decimal |
Overrules the amount of columns on a small screen. |
||
rowspan |
decimal |
Amount of rows this widget should be high. |
||
x |
string |
Horizontal position of the widget for 2D pages. |
||
x-s |
string |
Horizontal position of the widget for 2D pages on a small screen. |
||
x-m |
string |
Horizontal position of the widget for 2D pages on a medium screen. |
||
y |
string |
Vertical position of the widget for 2D pages. |
||
y-s |
string |
Vertical position of the widget for 2D pages on a small screen. |
||
y-m |
string |
Vertical position of the widget for 2D pages on a medium screen. |
||
z |
string |
Reserved for future use. |
||
width |
string |
Width for the widget for 2D pages. |
||
width-s |
string |
Width for the widget for 2D pages on a small screen. |
||
width-m |
string |
Width for the widget for 2D pages on a medium screen. |
||
scale |
true or false |
Enable/Disable scaling layout values relative to backdrop on 2d pages (default: true). |
||
scale-s |
true or false |
Enable/Disable scaling layout values relative to backdrop on 2d pages on a small screen (default: true). |
||
scale-m |
true or false |
Enable/Disable scaling layout values relative to backdrop on 2d pages on a medium screen (default: true). |
||
Element |
Attribute |
|||
|---|---|---|---|---|
Structure |
Name |
Content |
Description |
|
|
name |
string |
Name of the icon registration. |
|
type |
string |
|||
flavour |
string |
Selection of a display variant. See also Flavour. |
||
color |
string |
Color of the icon in CSS notation (e.g. #1188FF). |
||
styling |
string |
Change the color of the displayed value depending on its value. See also Styling |
||
class |
string |
Add this value to the CSS class so that it can be formatted by a user provided style sheet. |
||
|
string |
Text to display a label for the widget. |
||
Element |
Attribute |
|||
|---|---|---|---|---|
Structure |
Name |
Content |
Description |
|
|
label |
string |
Defines the label of the axis |
|
min |
decimal |
Defines the minimum of y-axis. |
||
max |
decimal |
Defines the maximum of y-axis. |
||
position |
left or right |
|||
unit |
string |
Defines the unit shown behind values in y-axis and tooltip |
||
decimals |
integer |
Defines the number of digits in values of y-axis |
||
|
string |
|||
Element |
Attribute |
|||
|---|---|---|---|---|
Structure |
Name |
Content |
Description |
|
|
backend |
string |
Name of the backend connection the history is read from. Defaults to the default backend connection. |
|
instance |
string |
Instance of the ioBroker history adapter that holds the data, e.g. sql.0. Without it ioBroker uses the instance configured on the state itself. |
||
yaxis |
string |
|||
color |
string |
|||
label |
string |
|||
scaling |
decimal |
|||
steps |
true or false |
|||
fill |
true or false |
|||
offset |
integer |
|||
resolution |
integer |
Resolution in seconds. Sets the aggregation step of the ioBroker history request. |
||
consolidationFunction |
AVERAGE, MIN, MAX, TOTAL, COUNT, INTEGRAL, MINMAX or NONE |
How the values are aggregated per step by the ioBroker history adapter. Not every adapter implements all of them, NONE returns the stored values unaggregated. |
||
fillMissing |
previous, linear or none |
|||
style |
lines, bars or points |
|||
barWidth |
integer |
|||
align |
left, right or center |
|||
|
string |
|||
Element |
Attribute |
|||
|---|---|---|---|---|
Structure |
Name |
Content |
Description |
|
|
yaxis |
string |
Assigns the rrd-data to a y-axis |
|
color |
string |
Defines the color of the data-line in the graph |
||
label |
string |
Defines the label of the data-series in the legend |
||
scaling |
decimal |
|||
steps |
true or false |
|||
fill |
true or false |
Fill the space below the data-series or bar |
||
style |
lines, bars or points |
|||
barWidth |
integer |
Width of the bars in units of the x axis, contrary to most other measures that are specified in pixels. For instance, for time series the unit is milliseconds so 24 * 60 * 60 * 1000 produces bars with the width of a day. |
||
align |
left, right or center |
|||
datasourceIndex |
integer |
If there are multiple datasources in the RRD file this index defines which one to show. Use “rrdtool info” to find the correct index. |
||
consolidationFunction |
AVERAGE, LAST, MIN or MAX |
Choose one of the consolidation functions of the RRDTool (see http://rrdtool.org). |
||
resolution |
integer |
The standard resolution for retrieving data from the RRD file can be overriden with a custom value in seconds. |
||
offset |
integer |
An offset in seconds to modify the timestamp of the retrieved data from the RRD file. |
||
|
string |
|||
Element |
Attribute |
|||
|---|---|---|---|---|
Structure |
Name |
Content |
Description |
|
|
measurement |
string |
Selection of the database and measurement (example: timeseries_db/KNX_LINE1) |
|
yaxis |
string |
Assigns the InfluxDB-data to a y-axis |
||
color |
string |
Defines the color of the data-line in the graph |
||
label |
string |
Defines the label of the data-series in the legend |
||
scaling |
decimal |
|||
steps |
true or false |
|||
fill |
true or false |
Fill the space below the data-series or bar |
||
style |
lines, bars or points |
|||
barWidth |
integer |
Width of the bars in units of the x axis, contrary to most other measures that are specified in pixels. For instance, for time series the unit is milliseconds so 24 * 60 * 60 * 1000 produces bars with the width of a day. |
||
align |
left, right or center |
|||
authentication |
string |
When the InfluxDB requires authentication the credentials in the hidden config with this key will be used. |
||
field |
string |
If there are multiple fields in the InfluxDB series this field defines which one to show. When not set a default of “*” will be used. Warning: when more than one field is selected none will be displayed. |
||
resolution |
integer |
The temporal resolution for the InfluxDB data can be set to a fixed interval (value in seconds). A value of “0” disables the grouping. |
||
consolidationFunction |
COUNT, DERIVATIVE, DERIVATIVE_COUNT, DERIVATIVE_MEAN, DERIVATIVE_MEDIAN, DERIVATIVE_MODE, DERIVATIVE_SUM, DERIVATIVE_FIRST, DERIVATIVE_LAST, DERIVATIVE_MIN, DERIVATIVE_MAX, DERIVATIVE_PERCENTILE_1, DERIVATIVE_PERCENTILE_5, DERIVATIVE_PERCENTILE_10, DERIVATIVE_PERCENTILE_20, DERIVATIVE_PERCENTILE_25, DERIVATIVE_PERCENTILE_75, DERIVATIVE_PERCENTILE_80, DERIVATIVE_PERCENTILE_90, DERIVATIVE_PERCENTILE_95, DERIVATIVE_PERCENTILE_99, DIFFERENCE, DIFFERENCE_COUNT, DIFFERENCE_MEAN, DIFFERENCE_MEDIAN, DIFFERENCE_MODE, DIFFERENCE_SUM, DIFFERENCE_FIRST, DIFFERENCE_LAST, DIFFERENCE_MIN, DIFFERENCE_MAX, DIFFERENCE_PERCENTILE_1, DIFFERENCE_PERCENTILE_5, DIFFERENCE_PERCENTILE_10, DIFFERENCE_PERCENTILE_20, DIFFERENCE_PERCENTILE_25, DIFFERENCE_PERCENTILE_75, DIFFERENCE_PERCENTILE_80, DIFFERENCE_PERCENTILE_90, DIFFERENCE_PERCENTILE_95, DIFFERENCE_PERCENTILE_99, ELAPSED, INTEGRAL, MAX, MEAN, MEDIAN, MIN, MODE, SPREAD, STDDEV or SUM |
Choose one of the available data aggregation functions - required when the “resolution” attribute is set. |
||
fillMissing |
string |
Optional when attribute “resolution” is set: fill the time steps where data is missing by this value or one of “linear”, “none”, “null” or “previous”. |
||
offset |
integer |
An offset in seconds to modify the displayed timestamps of the retrieved data from the InfluxDB. |
||
|
key |
string |
||
operator |
=, !=, <, <=, >, >=, =~ or !~ |
|||
value |
string |
|||
|
key |
string |
||
operator |
=, !=, <, <=, >, >=, =~ or !~ |
|||
value |
string |
|||
|
key |
string |
||
operator |
=, !=, <, <=, >, >=, =~ or !~ |
|||
value |
string |
|||
Element |
Attribute |
|||
|---|---|---|---|---|
Structure |
Name |
Content |
Description |
|
|
measurement |
string |
Name of the item, an alternative to writing it into the element. |
|
yaxis |
string |
|||
color |
string |
|||
label |
string |
|||
scaling |
decimal |
|||
steps |
true or false |
|||
fill |
true or false |
|||
offset |
integer |
|||
resolution |
integer |
|||
fillMissing |
previous, linear or none |
|||
style |
lines, bars or points |
|||
barWidth |
integer |
|||
align |
left, right or center |
|||
|
string |
|||
Element |
Attribute |
|||
|---|---|---|---|---|
Structure |
Name |
Content |
Description |
|
|
measurement |
string |
Name of the demo data, an alternative to writing it into the element. |
|
yaxis |
string |
|||
color |
string |
|||
label |
string |
|||
scaling |
decimal |
|||
steps |
true or false |
|||
fill |
true or false |
|||
offset |
integer |
|||
resolution |
integer |
|||
fillMissing |
previous, linear or none |
|||
style |
lines, bars or points |
|||
barWidth |
integer |
|||
align |
left, right or center |
|||
|
string |
|||
Element |
Attribute |
|||
|---|---|---|---|---|
Structure |
Name |
Content |
Description |
|
|
transform |
string |
Transformation of the bus system value to be shown. |
|
mode |
disable, read, write or readwrite |
“disable” deactivates the communication, “read” will only fetch data from the backend, “write” will only write to it and an address with “readwrite” will be both, read from and written to. |
||
variant |
string |
|||
format-pos |
decimal |
Position for format string when multiple addresses are used. |
||
selector |
string |
Only MQTT: JSON selector |
||
qos |
decimal |
Only MQTT: QoS |
||
retain |
true or false |
Only MQTT: retain flag |
||
ignore-error |
true or false |
Only MQTT: ignore decode errors. |
||
|
string |
The GA (like: 12/0/7) for KNX-backends, the item name for openHAB / ioBroker backend or the MQTT topic |
||