Skip to main content
Version: 4.0

Datalogger

The Datalogger object displays statistical data collected by HSYCO dataloggers.

It groups data over time so that trends can be visualized in charts for the current day, previous day, month, and year.

It can also display data with minute resolution, although this requires more disk space.

In addition, it can log every processed value to a CSV file.

Datalogger declaration tutorial

Datalogger counter tutorial

Datalogger range tutorial

Attributes​

Common​

ID​

Sets the object's ID.

The ID identifies the object and is used to reference it in UISet actions, allowing to change its attributes dynamically.

The ID is not unique, it can be shared among multiple objects to quickly change a common attribute.

IDs can't be changed with a UISet action, but they can have a Value Binding assigned to them. Value Bindings on IDs allow an object to be dinamically attached to a set of attribute values.

E.g. the following Value Binding switches the ID of the object between mybutton1 and mybutton2 based on the value of the UISet button.address:

Value binding:

="mybutton" + ui('button', 'address')

UISet:

UISet('button', 'address', '1') switches the ID to mybutton1

UISet('button', 'address', '2') switches the ID to mybutton2

Position and Size​

Position​

Sets the object's position.

The default value is: x0y0.

Attribute Values​
ValueDescriptionExample
x<left>y<top>Specify left/top coordinates in pixels.x10y20

Flex Grow​

Specifies if the objects should grow to fill the available space.

The default value is: true.

Attribute Values​
ValueDescription
trueDefault value. Objects expand to fill the available space.
falseObjects do not grow to fill the available space.

Flex Shrink​

Specifies if the objects should shrink to fit the available space.

The default value is: true.

Attribute Values​
ValueDescription
trueDefault value. Objects shrink to fit the available space.
falseObjects do not shrink to fit the available space.

Width​

Sets the object's width in pixels.

Minimum value is 1.

Height​

Sets the object's height in pixels.

Minimum value is 1.

Datalogger​

Dataloggers​

Specifies the datalogger options.

For the full item reference, see Datalogger Config.

Attribute Values​
ValueDescriptionExample
<JSON array>Array of datalogger configuration objects.[{"name":"energy_today","label":"Energy Today","unit":"kWh"}]

Mode​

Selects live mode or browser mode.

The default value is: live.

Attribute Values​
ValueDescription
liveDefault value. Live mode.
browserBrowser mode.
liveonlyLocks the interface in live mode. It will hide the browser/live button on the UI.
browseronlyLocks the interface in browser mode. It will hide the browser/live button on the UI.

Selection​

List of datalogger names to display.

Attribute Values​
ValueDescription
<comma-separated list>List of datalogger names.

List​

List of datalogger names used to define the available logger ids and their order. Deprecated, use the Dataloggers attribute instead.

note

This attribute has been deprecated since ver. 4.0

Attribute Values​
ValueDescription
<comma-separated list>Legacy datalogger names.

Names​

List of display labels matched positionally to List, or to Dataloggers when List is empty. Deprecated, use the Dataloggers attribute instead.

note

This attribute has been deprecated since ver. 4.0

Attribute Values​
ValueDescription
<comma-separated list>Legacy datalogger labels.

Slot​

Shows a specific slot, from 0 to the number of slots-1.

Attribute Values​
ValueDescription
<number>Slot index, from 0 to the number of slots-1.

Group​

Name of a group. Datalogger objects with the same group are synchronized (controlling one affects the others).

Attribute Values​
ValueDescription
<string>Name of a group.

Controls​

Controls​

Specifies the object's controls.

The default value is: none.

Attribute Values​
ValueDescription
noneDefault value. Don't show any controls.
tabsShow tabs on live mode for scale and slots.
toolbarShow a toolbar to control live and browser modes.

HD​

Controls the HD mode, or shows an HD icon that lets the user toggle HD on and off.

The default value is: false.

Attribute Values​
ValueDescription
falseDefault value. Disables HD.
trueEnables HD.
toggleShows an HD icon that lets the user toggle HD on and off.

Fullscreen​

Enables or disables fullscreen mode.

note

This attribute is live. It can't be set from the Project Editor, it needs to be set dynamically with a UISet.

Attribute Values​
ValueDescription
falseDisables fullscreen mode.
trueEnables fullscreen mode.

Time​

Scale​

Specifies the scale of the data to display.

The default value is: auto.

Attribute Values​
ValueDescription
autoDefault value. Selects the smallest available scale.
yearSet the live scale to year.
monthSet the live scale to month.
daySet the live scale to day.
hourSet the live scale to hour.

Browser Date​

Sets the browser's date and time.

Attribute Values​
ValueDescription
yyyySpecify a year.
yyyymmSpecify year and month.
yyyymmddSpecify year, month and day.
yyyymmddhhSpecify year, month, day and hour.

Browser Scale​

Sets the browser's scale, if in browser mode.

When toggling between browser and scale mode, the initial browser's scale is the same as the live scale.

The default value is: 10y.

note

This attribute is live. It can't be set from the Project Editor, it needs to be set dynamically with a UISet.

Attribute Values​
ValueDescription
10yDefault value. Set the browser scale to 10 years.
yearSet the browser scale to year.
monthSet the browser scale to month.
daySet the browser scale to day.
hourSet the browser scale to hour.

By Month​

Shows or hides monthly data (days).

The default value is: true.

Attribute Values​
ValueDescription
trueDefault value. Show monthly data (days).
falseHide monthly data.

By Day​

Shows or hides daily data (hours).

The default value is: true.

Attribute Values​
ValueDescription
trueDefault value. Show daily data (hours).
falseHide daily data.

By Hour​

Shows or hides hourly data (minutes).

The default value is: true.

Attribute Values​
ValueDescription
trueDefault value. Show hourly data (minutes).
falseHide hourly data.

By Minute​

Shows or hides minute data (seconds).

The default value is: true.

Attribute Values​
ValueDescription
trueDefault value. Show minute data (seconds).
falseHide minute data.

Charts​

Type​

Specifies the chart type.

The default value is: bars.

Attribute Values​
ValueDescription
barsDefault value. Draw bars.
pointsDraws points.
lineDraws a line connecting the values.
splineDraws a spline connecting the values.
pieDraws a pie chart, each slice representing a datalogger (if multiple dataloggers are visible), or past/present values. Percentage is shown in the legend.

Avg Values​

Displays the average values, if in range mode.

The default value is: true.

Attribute Values​
ValueDescription
trueDefault value. Show average values, if in range mode.
falseHide average values.

Max Values​

Displays the maximum values, if in range mode.

The default value is: true.

Attribute Values​
ValueDescription
trueDefault value. Show maximum values, if in range mode.
falseHide maximum values.

Min Values​

Displays the minimum values, if in range mode.

The default value is: true.

Attribute Values​
ValueDescription
trueDefault value. Show minimum values, if in range mode.
falseHide minimum values.

Multi Chart​

Shows multiple scale charts in live mode.

The default value is: false.

Attribute Values​
ValueDescription
trueShow multiple charts.
falseDefault value. Show a single chart, based on the selected scale.

Multi Range​

For multiple datalogger ids only. Show multiple ranges for each datalogger id: each chart has multiple value axes.

The default value is: false.

Attribute Values​
ValueDescription
trueShow multiple ranges for each datalogger id.
falseDefault value. Single range for each datalogger.

Draw Axis​

Displays or hides the axes (also notches and labels).

The default value is: true.

Attribute Values​
ValueDescription
[empty]Default. The axes are visible (also notches and labels).
falseThe axes are not visible (also notches and labels).

Point Size​

Specifies the point size (only for points chart type).

Attribute Values​
ValueDescription
<number of pixels>Point size.

Stroke​

Specifies the pixel size of the stroke that applies to line and spline chart types.

Attribute Values​
ValueDescription
<number of pixels>Stroke size.

Notches​

Specifies the number of notches on the y-axis.

The default value is: auto.

Attribute Values​
ValueDescription
<int>Number of notches on the y-axis.

Thresholds​

Specifies a list of values at which to display a line (threshold). Not supported with multiple dataloggers with different scales/units.

Attribute Values​
ValueDescription
<comma-separated list>List of values at which to display a line (threshold).

Value Label Type​

Specifies the type of value label.

The default value is: inside.

Attribute Values​
ValueDescription
insideDefault value. Value labels are shown inside (if "type" is bars, points or gauge) or over (if "type" is line or spline).
outsideValue labels are shown above or below.
popupValue labels are shown on mouseover, or on touch (if on a touch-enabled device).

Colors​

Axis Color​

Specifies the axis color.

Attribute Values​
ValueDescription
<CSS color>Axis color.

Label Color​

Specifies the color of the axis and bars labels.

Attribute Values​
ValueDescription
<CSS color>Color of the axis and bars labels.

Notch Color​

Specifies the color of the axis notches.

Attribute Values​
ValueDescription
<CSS color>Color of the axis notches.

Threshold Colors​

Specifies a list of colors for thresholds, one value per line. Not supported with multiple dataloggers with different scales/units.

Attribute Values​
ValueDescription
<comma-separated list of CSS colors>List of colors of threshold lines.

Past Value Color​

Specifies the value color for past data.

Attribute Values​
ValueDescription
<CSS color>A color that applies to all past values.
<comma-separated list>Three colors that apply respectively to minimum, average and maximum past values.

Present Value Color​

Specifies the value color for present data.

Attribute Values​
ValueDescription
<CSS color>A color that applies to all present values.
<comma-separated list>Three colors that apply respectively to minimum, average and maximum present values.

Value Colors​

Specifies a list of colors for each datalogger, in multiple datalogger mode.

Attribute Values​
ValueDescription
<comma-separated list of CSS colors>List of colors of values.

Layout​

Panel​

Shows a panel that frames the object. Its style can be modified.

The default value is: true.

Attribute Values​
ValueDescription
trueDefault value. Shows the panel.
falseHides the panel.

Panel Color​

Specifies the panel color.

The default value is: default.

Attribute Values​
ValueDescription
defaultDefault value. Default color.
primaryPrimary color, used to highlight important areas.
warningWarning color, used to highlight warning areas.
successSuccess color, used to highlight success areas.
errorError color, used to highlight error areas.
red,blue,yellow,green,yellow,purple,orange,greenPalette colors.
customCustom color, defined in the "Custom Color" attribute.

Panel Custom Color​

Specifies the panel custom color.

Attribute Values​
ValueDescriptionExample
<html color>Color in any html accepted format.#ff0000

Past Period​

Specifies if the past period is visible (not available for multiple datalogger ids).

The default value is: true.

Attribute Values​
ValueDescription
trueDefault value. Show past period.
falseHide past period.

Pie Legend Position​

Specifies the pie chart legend position. Applies only to "pie" type.

The default value is: top.

Attribute Values​
ValueDescription
topDefault value. Show the legend on the top of the pie chart.
rightShow the legend on the right of the pie chart.

Legend​

Specifies how the legend is displayed.

The default value is: true.

Attribute Values​
ValueDescription
trueDefault value. Show all legends.
falseHide legends.
<comma-separated list>List of legends (min, avg, max) to show.

Totals​

Specifies if the totals are displayed.

The default value is: true.

Attribute Values​
ValueDescription
trueDefault value. Show totals.
falseHide totals.

Other​

Download​

Displays a button in browser mode that downloads a CSV file with the currently displayed data.

The default value is: false.

Attribute Values​
ValueDescription
trueDisplay the download button in browser mode.
falseDefault value. Hide the download icon.

CSV Separator​

Specifies a character used to separate columns in the generated CSV file. Rows are always separated with the newline character.

Attribute Values​
ValueDescription
<character>Character used to separate columns in the generated CSV file.

HD Mode​

Toggles the HD mode.

The default value is: false.

Attribute Values​
ValueDescription
falseDefault value. HD mode off.
trueHD mode on.

Refresh Interval​

Specifies the live refresh interval in milliseconds.

The default value is: 5000.

Attribute Values​
ValueDescription
<number>Live refresh interval in milliseconds.

View​

Visible​

Sets the object's visibility.

The default value is: true.

Attribute Values​
ValueDescription
trueDefault value. Visible.
falseHidden.

Enabled​

Specifies if the object is enabled or disabled. A disabled object appears as grayed out and can't be interacted with.

The default value is: true.

Attribute Values​
ValueDescription
trueDefault value. Enabled.
falseDisabled.

Blinks the object at the specified speed.

The default value is: false.

Attribute Values​
ValueDescription
falseDefault value. Not blinking.
slowBlinks slowly.
fastBlinks fast.

Transition​

Specifies the transition effect when the object is shown or hidden.

The default value is: none.

note

This attribute is experimental. It might not work properly and it might be modified or removed in a future release.

Attribute Values​
ValueDescription
noneDefault value. No transition.
fadeFade in/out.
fade-leftSlide from left and fade in/out.
fade-rightSlide from right and fade in/out.
fade-upSlide from top and fade in/out.
fade-downSlide from bottom and fade in/out.
slide-leftSlide from left.
slide-rightSlide from right.
slide-upSlide from top.
slide-downSlide from bottom.
zoom-inZoom in.
zoom-outZoom out.
3d-flip-left3D flip from left.
3d-flip-right3D flip from right.

Transition Duration​

Specifies the transition duration in milliseconds.

The default value is: 300.

note

This attribute is experimental. It might not work properly and it might be modified or removed in a future release.

Attribute Values​
ValueDescription
<integer>Duration in milliseconds.

Transition Delay​

Specifies the transition delay in milliseconds.

The default value is: 0.

note

This attribute is experimental. It might not work properly and it might be modified or removed in a future release.

Attribute Values​
ValueDescription
<integer>Delay in milliseconds.

Opacity​

Sets the object's opacity. Opacity is the degree to which content behind an object is hidden.

The default value is: 1.0.

Attribute Values​
ValueDescription
0The object is fully transparent.
>0.0, <1.0The object is translucent (content behind the element can be seen).
1.0Default value. The object is fully opaque.

Rotation​

Specifies the degrees by which the object is rotated. A positive number rotates it clockwise, while a negative value rotates it counter-clockwise.

The default value is: 0.

CSS Class​

Specifies a CSS Class that applies to the object, useful to customize its appearance. Custom CSS Classes are specified within the custom.css file.

Margin​

Specifies the margin of the object. The margin is the space outside the object's border.

note

This attribute is experimental. It might not work properly and it might be modified or removed in a future release.

Attribute Values​
ValueDescriptionExample
<int>Specify the margin in pixels for all sides of the object.
<top> <right> <bottom> <left>Specify the margin in pixels for each side of the object.10 20 30 40

View Scale​

Specifies the scale of the object. The scale is the ratio between the object's size and the size of the view it is contained in.

The default value is: 1.0.

note

This attribute is experimental. It might not work properly and it might be modified or removed in a future release.

Attribute Values​
ValueDescription
<float>Specify the scale for both width and height of the object.

Meta​

Comment​

Specifies a comment, visible only in the Project Editor. It can be used to add a note or a tag to the object. The filter in the object's SELECT panel applies to the comment as well.

note

This attribute is static. Its value can't be changed dynamically with a uiSet command or with a value binding.

Exclude​

Excludes the object from the UI. Useful to temporarily hide an object without deleting it. Different from the "Visible" attribute, which hides the object in the UI but keeps it in the project, allowing it to be shown again with a UISet.

The default value is: false.

note

This attribute is static. Its value can't be changed dynamically with a uiSet command or with a value binding.

Attribute Values​
ValueDescription
falseDefault value. Object is included in the UI.
trueObject is excluded from the UI.