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
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
| Value | Description | Example |
|---|---|---|
| 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
| Value | Description |
|---|---|
| true | Default value. Objects expand to fill the available space. |
| false | Objects 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
| Value | Description |
|---|---|
| true | Default value. Objects shrink to fit the available space. |
| false | Objects 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
| Value | Description | Example |
|---|---|---|
| <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
| Value | Description |
|---|---|
| live | Default value. Live mode. |
| browser | Browser mode. |
| liveonly | Locks the interface in live mode. It will hide the browser/live button on the UI. |
| browseronly | Locks the interface in browser mode. It will hide the browser/live button on the UI. |
Selection
List of datalogger names to display.
Attribute Values
| Value | Description |
|---|---|
| <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.
This attribute has been deprecated since ver. 4.0
Attribute Values
| Value | Description |
|---|---|
| <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.
This attribute has been deprecated since ver. 4.0
Attribute Values
| Value | Description |
|---|---|
| <comma-separated list> | Legacy datalogger labels. |
Slot
Shows a specific slot, from 0 to the number of slots-1.
Attribute Values
| Value | Description |
|---|---|
| <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
| Value | Description |
|---|---|
| <string> | Name of a group. |
Controls
Controls
Specifies the object's controls.
The default value is: none.
Attribute Values
| Value | Description |
|---|---|
| none | Default value. Don't show any controls. |
| tabs | Show tabs on live mode for scale and slots. |
| toolbar | Show 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
| Value | Description |
|---|---|
| false | Default value. Disables HD. |
| true | Enables HD. |
| toggle | Shows an HD icon that lets the user toggle HD on and off. |
Fullscreen
Enables or disables fullscreen mode.
This attribute is live. It can't be set from the Project Editor, it needs to be set dynamically with a UISet.
Attribute Values
| Value | Description |
|---|---|
| false | Disables fullscreen mode. |
| true | Enables fullscreen mode. |
Time
Scale
Specifies the scale of the data to display.
The default value is: auto.
Attribute Values
| Value | Description |
|---|---|
| auto | Default value. Selects the smallest available scale. |
| year | Set the live scale to year. |
| month | Set the live scale to month. |
| day | Set the live scale to day. |
| hour | Set the live scale to hour. |
Browser Date
Sets the browser's date and time.
Attribute Values
| Value | Description |
|---|---|
| yyyy | Specify a year. |
| yyyymm | Specify year and month. |
| yyyymmdd | Specify year, month and day. |
| yyyymmddhh | Specify 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.
This attribute is live. It can't be set from the Project Editor, it needs to be set dynamically with a UISet.
Attribute Values
| Value | Description |
|---|---|
| 10y | Default value. Set the browser scale to 10 years. |
| year | Set the browser scale to year. |
| month | Set the browser scale to month. |
| day | Set the browser scale to day. |
| hour | Set the browser scale to hour. |
By Month
Shows or hides monthly data (days).
The default value is: true.
Attribute Values
| Value | Description |
|---|---|
| true | Default value. Show monthly data (days). |
| false | Hide monthly data. |
By Day
Shows or hides daily data (hours).
The default value is: true.
Attribute Values
| Value | Description |
|---|---|
| true | Default value. Show daily data (hours). |
| false | Hide daily data. |
By Hour
Shows or hides hourly data (minutes).
The default value is: true.
Attribute Values
| Value | Description |
|---|---|
| true | Default value. Show hourly data (minutes). |
| false | Hide hourly data. |
By Minute
Shows or hides minute data (seconds).
The default value is: true.
Attribute Values
| Value | Description |
|---|---|
| true | Default value. Show minute data (seconds). |
| false | Hide minute data. |
Charts
Type
Specifies the chart type.
The default value is: bars.
Attribute Values
| Value | Description |
|---|---|
| bars | Default value. Draw bars. |
| points | Draws points. |
| line | Draws a line connecting the values. |
| spline | Draws a spline connecting the values. |
| pie | Draws 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
| Value | Description |
|---|---|
| true | Default value. Show average values, if in range mode. |
| false | Hide average values. |
Max Values
Displays the maximum values, if in range mode.
The default value is: true.
Attribute Values
| Value | Description |
|---|---|
| true | Default value. Show maximum values, if in range mode. |
| false | Hide maximum values. |
Min Values
Displays the minimum values, if in range mode.
The default value is: true.
Attribute Values
| Value | Description |
|---|---|
| true | Default value. Show minimum values, if in range mode. |
| false | Hide minimum values. |
Multi Chart
Shows multiple scale charts in live mode.
The default value is: false.
Attribute Values
| Value | Description |
|---|---|
| true | Show multiple charts. |
| false | Default 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
| Value | Description |
|---|---|
| true | Show multiple ranges for each datalogger id. |
| false | Default value. Single range for each datalogger. |
Draw Axis
Displays or hides the axes (also notches and labels).
The default value is: true.
Attribute Values
| Value | Description |
|---|---|
| [empty] | Default. The axes are visible (also notches and labels). |
| false | The axes are not visible (also notches and labels). |
Point Size
Specifies the point size (only for points chart type).
Attribute Values
| Value | Description |
|---|---|
| <number of pixels> | Point size. |
Stroke
Specifies the pixel size of the stroke that applies to line and spline chart types.
Attribute Values
| Value | Description |
|---|---|
| <number of pixels> | Stroke size. |
Notches
Specifies the number of notches on the y-axis.
The default value is: auto.
Attribute Values
| Value | Description |
|---|---|
| <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
| Value | Description |
|---|---|
| <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
| Value | Description |
|---|---|
| inside | Default value. Value labels are shown inside (if "type" is bars, points or gauge) or over (if "type" is line or spline). |
| outside | Value labels are shown above or below. |
| popup | Value labels are shown on mouseover, or on touch (if on a touch-enabled device). |
Colors
Axis Color
Specifies the axis color.
Attribute Values
| Value | Description |
|---|---|
| <CSS color> | Axis color. |
Label Color
Specifies the color of the axis and bars labels.
Attribute Values
| Value | Description |
|---|---|
| <CSS color> | Color of the axis and bars labels. |
Notch Color
Specifies the color of the axis notches.
Attribute Values
| Value | Description |
|---|---|
| <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
| Value | Description |
|---|---|
| <comma-separated list of CSS colors> | List of colors of threshold lines. |
Past Value Color
Specifies the value color for past data.
Attribute Values
| Value | Description |
|---|---|
| <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
| Value | Description |
|---|---|
| <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
| Value | Description |
|---|---|
| <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
| Value | Description |
|---|---|
| true | Default value. Shows the panel. |
| false | Hides the panel. |
Panel Color
Specifies the panel color.
The default value is: default.
Attribute Values
| Value | Description |
|---|---|
| default | Default value. Default color. |
| primary | Primary color, used to highlight important areas. |
| warning | Warning color, used to highlight warning areas. |
| success | Success color, used to highlight success areas. |
| error | Error color, used to highlight error areas. |
| red,blue,yellow,green,yellow,purple,orange,green | Palette colors. |
| custom | Custom color, defined in the "Custom Color" attribute. |
Panel Custom Color
Specifies the panel custom color.
Attribute Values
| Value | Description | Example |
|---|---|---|
| <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
| Value | Description |
|---|---|
| true | Default value. Show past period. |
| false | Hide past period. |
Pie Legend Position
Specifies the pie chart legend position. Applies only to "pie" type.
The default value is: top.
Attribute Values
| Value | Description |
|---|---|
| top | Default value. Show the legend on the top of the pie chart. |
| right | Show the legend on the right of the pie chart. |
Legend
Specifies how the legend is displayed.
The default value is: true.
Attribute Values
| Value | Description |
|---|---|
| true | Default value. Show all legends. |
| false | Hide 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
| Value | Description |
|---|---|
| true | Default value. Show totals. |
| false | Hide 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
| Value | Description |
|---|---|
| true | Display the download button in browser mode. |
| false | Default 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
| Value | Description |
|---|---|
| <character> | Character used to separate columns in the generated CSV file. |
HD Mode
Toggles the HD mode.
The default value is: false.
Attribute Values
| Value | Description |
|---|---|
| false | Default value. HD mode off. |
| true | HD mode on. |
Refresh Interval
Specifies the live refresh interval in milliseconds.
The default value is: 5000.
Attribute Values
| Value | Description |
|---|---|
| <number> | Live refresh interval in milliseconds. |
View
Visible
Sets the object's visibility.
The default value is: true.
Attribute Values
| Value | Description |
|---|---|
| true | Default value. Visible. |
| false | Hidden. |
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
| Value | Description |
|---|---|
| true | Default value. Enabled. |
| false | Disabled. |
Blink
Blinks the object at the specified speed.
The default value is: false.
Attribute Values
| Value | Description |
|---|---|
| false | Default value. Not blinking. |
| slow | Blinks slowly. |
| fast | Blinks fast. |
Transition
Specifies the transition effect when the object is shown or hidden.
The default value is: none.
This attribute is experimental. It might not work properly and it might be modified or removed in a future release.
Attribute Values
| Value | Description |
|---|---|
| none | Default value. No transition. |
| fade | Fade in/out. |
| fade-left | Slide from left and fade in/out. |
| fade-right | Slide from right and fade in/out. |
| fade-up | Slide from top and fade in/out. |
| fade-down | Slide from bottom and fade in/out. |
| slide-left | Slide from left. |
| slide-right | Slide from right. |
| slide-up | Slide from top. |
| slide-down | Slide from bottom. |
| zoom-in | Zoom in. |
| zoom-out | Zoom out. |
| 3d-flip-left | 3D flip from left. |
| 3d-flip-right | 3D flip from right. |
Transition Duration
Specifies the transition duration in milliseconds.
The default value is: 300.
This attribute is experimental. It might not work properly and it might be modified or removed in a future release.
Attribute Values
| Value | Description |
|---|---|
| <integer> | Duration in milliseconds. |
Transition Delay
Specifies the transition delay in milliseconds.
The default value is: 0.
This attribute is experimental. It might not work properly and it might be modified or removed in a future release.
Attribute Values
| Value | Description |
|---|---|
| <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
| Value | Description |
|---|---|
| 0 | The object is fully transparent. |
| >0.0, <1.0 | The object is translucent (content behind the element can be seen). |
| 1.0 | Default 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.
This attribute is experimental. It might not work properly and it might be modified or removed in a future release.
Attribute Values
| Value | Description | Example |
|---|---|---|
| <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.
This attribute is experimental. It might not work properly and it might be modified or removed in a future release.
Attribute Values
| Value | Description |
|---|---|
| <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.
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.
This attribute is static. Its value can't be changed dynamically with a uiSet command or with a value binding.
Attribute Values
| Value | Description |
|---|---|
| false | Default value. Object is included in the UI. |
| true | Object is excluded from the UI. |