From a8ba4f6eed09cc7459adf01b61ea370074e9f184 Mon Sep 17 00:00:00 2001 From: Eric Bariaux <375613+ebariaux@users.noreply.github.com> Date: Fri, 13 Feb 2026 11:11:44 +0100 Subject: [PATCH] Add doc on applying predicted datapoints values and datapoints / predicted datapoints in general --- .../assets-agents-and-attributes.md | 17 ++++++ docs/user-guide/manager-ui/manager-ui.md | 53 ++++++++++--------- 2 files changed, 44 insertions(+), 26 deletions(-) diff --git a/docs/user-guide/assets-agents-and-attributes.md b/docs/user-guide/assets-agents-and-attributes.md index a9cab2ff..c0a3e285 100644 --- a/docs/user-guide/assets-agents-and-attributes.md +++ b/docs/user-guide/assets-agents-and-attributes.md @@ -10,6 +10,23 @@ An asset is a digital representation of a physical or logical `Thing` (this is t ## Attributes Each asset can have one or more attributes that hold a value; a value can be of any type that can be represented as JSON. The name of the attribute is used to cross-reference it with an attribute descriptor (see below), which provides schema information for the attribute. +### Datapoints + +In addition to its current value, an attribute can store historical datapoints. +You enable this by setting the `storeDataPoints` meta item on the attribute. +By default, the history is kept for one month but this can be configured using the `dataPointsMaxAgeDays` meta item. +Once enabled, on the asset page in the manager UI, you'll see a History panel, and you'll be able to select this attribute from a dropdown menu. +This displays a line graph of the attribute values over a configurable period of time. +This also allows you to use that attribute in graphs in [Insights](manager-ui/manager-ui.md#insights) dashboards. + +### Predicted Datapoints + +An attribute can also store values the attribute would take in the future i.e. predicted datapoints. +You enable this by setting the `hasPredictedDataPoints` meta item on the attribute. +Predicted datapoints are automatically removed when their time has passed (cleaning routine runs once per day). + +If in addition, you set the `applyPredictedDataPoints` meta item on the attribute, then the predicted value is automatically applied as the current value when the time matches. + ## Configuration items As well as having a value an attribute can have configuration items (called 'meta items' in the code) which control the behaviour of the attribute (link it to an agent for read/write from/to external systems, link to another attribute, configure historical value storage, and much more). Each attribute can have one or more meta items which is essentially a well known named value (metadata) that can be used in various parts of the system to control behaviour of the associated attribute (e.g. an `agentLink` meta item is used to connect an attribute to an agent/protocol). diff --git a/docs/user-guide/manager-ui/manager-ui.md b/docs/user-guide/manager-ui/manager-ui.md index 6c402643..fe0af12e 100644 --- a/docs/user-guide/manager-ui/manager-ui.md +++ b/docs/user-guide/manager-ui/manager-ui.md @@ -50,32 +50,33 @@ _Figure 4. The Asset view in 'Edit mode' while adding an attribute_ While in `Edit asset` mode you can expand each attribute, which gives you the option to add configuration items or change existing ones. You can use configuration items to arrange access permission, parse and store data points, allow data to be used in rules, or define whether and how to show data. The available configuration items are: -| Configuration items | Description | -| :-------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Access public read` | Users can read without authentication, e.g. use with public dashboard | -| `Access public write` | Users can write without authentication | -| `Access restricted read` | Restricted users can read if they have read attribute access to the asset | -| `Access restricted write` | Restricted users can write if they have write attribute access to the asset | -| `Agent link` | Define the Agent from which data is retrieved including data parsing, see [agent links](../agents-protocols/overview.md#agent-links) | -| `Attribute links` | Filter and parse multiple values retrieved with an Agent link, see [example](../../tutorials/open-weather-api-using-http-agent.md#setting-multiple-attributes-with-one-agent-link) | -| `Constraints` | Value constraints applied to the value (size/length, regex, not empty, etc.) | -| `Data points max age days` | Time period for which data is stored | -| `Forecast` | Adds [forecasting data](../rules-and-forecasting/forecasting.md), to be used in combination with 'Has predicted data points' | -| `Format` | Used for data parsing, see [format for available options](https://github.com/openremote/openremote/blob/201cc15451a2cd040a6ab9e699cbec5297821e80/model/src/main/java/org/openremote/model/value/ValueFormat.java#L37) | -| `Has predicted data points` | Enable the option to add forecasted values | -| `Label` | Add a friendly name, replacing the default name | -| `Momentary` | Button input to send the true/on/pressed/closed value when pressed; and false value when released | -| `Multiline` | Indicates that any input should support multiline text entry | -| `Read only` | Data can not be filled via UI, only by agents or rules | -| `Rule event` | Events are stored in rule to allow evaluation of change history of an attribute | -| `Rule event expires` | Set lifetime of event triggers and facts | -| `Rule state` | Add this attribute as option to select in rules, on left-hand side | -| `Rule reset immediate` | Allows rule to re-trigger immediately. Can be useful for event based data | -| `Secret` | Marks the value as secret indicating clients to display this in a concealed manner | -| `Show on dashboard` | Used in combination with 'location' will display asset on the Map view | -| `Store data points` | Stores data points in the database, default for one month | -| `Units` | Adds a unit to the attribute value, see [composition and options](../assets-agents-and-attributes.md#attribute-descriptor) | -| `User connected` | Shows all restricted users which have access to this asset, see [Restricted user realm role](../identity-and-security/realms-users-and-roles.md#restricted-user-realm-role) | +| Configuration items | Description | +|:------------------------------| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Access public read` | Users can read without authentication, e.g. use with public dashboard | +| `Access public write` | Users can write without authentication | +| `Access restricted read` | Restricted users can read if they have read attribute access to the asset | +| `Access restricted write` | Restricted users can write if they have write attribute access to the asset | +| `Agent link` | Define the Agent from which data is retrieved including data parsing, see [agent links](../agents-protocols/overview.md#agent-links) | +| `Apply predicted data points` | Automatically apply predicted value as actual value when timestamp matches | +| `Attribute links` | Filter and parse multiple values retrieved with an Agent link, see [example](../../tutorials/open-weather-api-using-http-agent.md#setting-multiple-attributes-with-one-agent-link) | +| `Constraints` | Value constraints applied to the value (size/length, regex, not empty, etc.) | +| `Data points max age days` | Time period for which data is stored | +| `Forecast` | Adds [forecasting data](../rules-and-forecasting/forecasting.md), to be used in combination with 'Has predicted data points' | +| `Format` | Used for data parsing, see [format for available options](https://github.com/openremote/openremote/blob/201cc15451a2cd040a6ab9e699cbec5297821e80/model/src/main/java/org/openremote/model/value/ValueFormat.java#L37) | +| `Has predicted data points` | Enable the option to add forecasted values | +| `Label` | Add a friendly name, replacing the default name | +| `Momentary` | Button input to send the true/on/pressed/closed value when pressed; and false value when released | +| `Multiline` | Indicates that any input should support multiline text entry | +| `Read only` | Data can not be filled via UI, only by agents or rules | +| `Rule event` | Events are stored in rule to allow evaluation of change history of an attribute | +| `Rule event expires` | Set lifetime of event triggers and facts | +| `Rule state` | Add this attribute as option to select in rules, on left-hand side | +| `Rule reset immediate` | Allows rule to re-trigger immediately. Can be useful for event based data | +| `Secret` | Marks the value as secret indicating clients to display this in a concealed manner | +| `Show on dashboard` | Used in combination with 'location' will display asset on the Map view | +| `Store data points` | Stores data points in the database, default for one month | +| `Units` | Adds a unit to the attribute value, see [composition and options](../assets-agents-and-attributes.md#attribute-descriptor) | +| `User connected` | Shows all restricted users which have access to this asset, see [Restricted user realm role](../identity-and-security/realms-users-and-roles.md#restricted-user-realm-role) | See the documentation page [explaining all available configuration item options for assets and attributes, and references](../assets-agents-and-attributes.md#asset-type-model). Don't forget to save the asset after making changes.