diff --git a/docs/user-guide/agents-protocols/img/simulator-chart.png b/docs/user-guide/agents-protocols/img/simulator-chart.png new file mode 100644 index 0000000..661c865 Binary files /dev/null and b/docs/user-guide/agents-protocols/img/simulator-chart.png differ diff --git a/docs/user-guide/agents-protocols/img/simulator-scheduler-occurr.png b/docs/user-guide/agents-protocols/img/simulator-scheduler-occurr.png new file mode 100644 index 0000000..0573c6c Binary files /dev/null and b/docs/user-guide/agents-protocols/img/simulator-scheduler-occurr.png differ diff --git a/docs/user-guide/agents-protocols/img/simulator-scheduler-recurr.png b/docs/user-guide/agents-protocols/img/simulator-scheduler-recurr.png new file mode 100644 index 0000000..9750ca6 Binary files /dev/null and b/docs/user-guide/agents-protocols/img/simulator-scheduler-recurr.png differ diff --git a/docs/user-guide/agents-protocols/simulator.md b/docs/user-guide/agents-protocols/simulator.md index c70a071..9d17b76 100644 --- a/docs/user-guide/agents-protocols/simulator.md +++ b/docs/user-guide/agents-protocols/simulator.md @@ -15,19 +15,38 @@ For attributes linked to this agent, the following describes the supported agent | Field | Description | Value type | Required | | ------------- | ------------- | ------------- | ------------- | -| `type` | Agent type | Text (Must be `SimulatorAgentLink`) | Y | | `replayData` | A dataset of values that should be replayed (i.e. written to the linked attribute) in a continuous loop | [SimulatorReplayDatapoint[]](https://github.com/openremote/openremote/blob/master/model/src/main/java/org/openremote/model/simulator/SimulatorReplayDatapoint.java) | N | | `schedule` | When defined overwrites the default 24h dataset length and how it is replayed. | [SimulatorProtocol.Schedule](https://github.com/openremote/openremote/blob/master/agent/src/main/java/org/openremote/agent/protocol/simulator/SimulatorProtocol.java) | N | +| `timezone` | The timezone the Simulator should follow when replaying the dataset. | [TimeZone](https://github.com/openremote/openremote/blob/master/agent/src/main/java/org/openremote/agent/protocol/simulator/SimulatorAgentLink.java) | N | ## Additional info Attributes linked to this agent that are written to will follow a route through the system as if it came from a remote service. The `has predicted data points` configuration item will cause the dataset of the current and next occurrence to be inserted as predicted data points alongside the normally scheduled data points. +![](img/simulator-chart.png) + If the `replayData` contains data points scheduled after the default 24 hours or the recurrence rule, the data points will be ignored. ### Simulator Replay Datapoints Attributes linked to this agent that have a `replayData` field in their Agent Link will cause the values within to be replayed over a 24h period in a continuous loop, unless a schedule is configured. Each `SimulatorReplayDatapoint` value must have a `timestamp` (seconds offset from midnight `00:00` in the system time of the machine that hosts the manager) and a `value`, this value will then be written to the attribute at the specified seconds offset from midnight each day. ### Schedule -The schedule can be set to occur only once when only a start- (and end) date are defined, or as a recurring event following the [RFC 5545 RRULE](https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10) format. If not provided defaults to every 24 hours. +The schedule can be set to occur only once by selecting "Plan an occurrence". This will allow a period to be specified where the data will be replayed. Any datapoints specified to be replayed after the end date are ignored. + +![](img/simulator-scheduler-occurr.png) + +The dataset can also be replayed recurringly by selecting "Plan a repeating occurrence". In addition to the period options this allows a frequency to be specified and how the repeating occurrence ends. + +The `frequency` defines how often the replay data is replayed. The frequency can be set to replay the dataset every `minute`, `hour`, `day`, `week`, `month` or `year`. By increasing the number alongside the selected frequency (the `interval`), the frequency will change to run every few `minutes`, `hours`, `days`, `weeks`, `months` or `years`. Besides the interval and frequency, the dataset can also be replayed on certain days of the week when selected. + +The `repeating occurrence ending` can be specified to stop at a certain date and time or set to end after a certain amount of occurrences. + +These options follow the [RFC 5545 RRULE](https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10) specification. + +![](img/simulator-scheduler-recurr.png) + +If the schedule is not provided it defaults to every 24 hours. + +### Timezone +The timezone parameter allows the replay data to follow any specified timezone. Upon adding a new SimulatorAgentLink the timezone parameter will be added with the users' timezone. If not specified will fall back to UTC. diff --git a/versioned_docs/version-1.12.0/user-guide/agents-protocols/img/simulator-chart.png b/versioned_docs/version-1.12.0/user-guide/agents-protocols/img/simulator-chart.png new file mode 100644 index 0000000..661c865 Binary files /dev/null and b/versioned_docs/version-1.12.0/user-guide/agents-protocols/img/simulator-chart.png differ diff --git a/versioned_docs/version-1.12.0/user-guide/agents-protocols/img/simulator-scheduler-occurr.png b/versioned_docs/version-1.12.0/user-guide/agents-protocols/img/simulator-scheduler-occurr.png new file mode 100644 index 0000000..0573c6c Binary files /dev/null and b/versioned_docs/version-1.12.0/user-guide/agents-protocols/img/simulator-scheduler-occurr.png differ diff --git a/versioned_docs/version-1.12.0/user-guide/agents-protocols/img/simulator-scheduler-recurr.png b/versioned_docs/version-1.12.0/user-guide/agents-protocols/img/simulator-scheduler-recurr.png new file mode 100644 index 0000000..9750ca6 Binary files /dev/null and b/versioned_docs/version-1.12.0/user-guide/agents-protocols/img/simulator-scheduler-recurr.png differ diff --git a/versioned_docs/version-1.12.0/user-guide/agents-protocols/simulator.md b/versioned_docs/version-1.12.0/user-guide/agents-protocols/simulator.md index c70a071..c0b5dcf 100644 --- a/versioned_docs/version-1.12.0/user-guide/agents-protocols/simulator.md +++ b/versioned_docs/version-1.12.0/user-guide/agents-protocols/simulator.md @@ -15,7 +15,6 @@ For attributes linked to this agent, the following describes the supported agent | Field | Description | Value type | Required | | ------------- | ------------- | ------------- | ------------- | -| `type` | Agent type | Text (Must be `SimulatorAgentLink`) | Y | | `replayData` | A dataset of values that should be replayed (i.e. written to the linked attribute) in a continuous loop | [SimulatorReplayDatapoint[]](https://github.com/openremote/openremote/blob/master/model/src/main/java/org/openremote/model/simulator/SimulatorReplayDatapoint.java) | N | | `schedule` | When defined overwrites the default 24h dataset length and how it is replayed. | [SimulatorProtocol.Schedule](https://github.com/openremote/openremote/blob/master/agent/src/main/java/org/openremote/agent/protocol/simulator/SimulatorProtocol.java) | N | @@ -24,10 +23,26 @@ Attributes linked to this agent that are written to will follow a route through The `has predicted data points` configuration item will cause the dataset of the current and next occurrence to be inserted as predicted data points alongside the normally scheduled data points. +![](img/simulator-chart.png) + If the `replayData` contains data points scheduled after the default 24 hours or the recurrence rule, the data points will be ignored. ### Simulator Replay Datapoints Attributes linked to this agent that have a `replayData` field in their Agent Link will cause the values within to be replayed over a 24h period in a continuous loop, unless a schedule is configured. Each `SimulatorReplayDatapoint` value must have a `timestamp` (seconds offset from midnight `00:00` in the system time of the machine that hosts the manager) and a `value`, this value will then be written to the attribute at the specified seconds offset from midnight each day. ### Schedule -The schedule can be set to occur only once when only a start- (and end) date are defined, or as a recurring event following the [RFC 5545 RRULE](https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10) format. If not provided defaults to every 24 hours. +The schedule can be set to occur only once by selecting "Plan an occurrence". This will allow a period to be specified where the data will be replayed. Any datapoints specified to be replayed after the end date are ignored. + +![](img/simulator-scheduler-occurr.png) + +The dataset can also be replayed recurringly by selecting "Plan a repeating occurrence". In addition to the period options this allows a frequency to be specified and how the repeating occurrence ends. + +The `frequency` defines how often the replay data is replayed. The frequency can be set to replay the dataset every `minute`, `hour`, `day`, `week`, `month` or `year`. By increasing the number alongside the selected frequency (the `interval`), the frequency will change to run every few `minutes`, `hours`, `days`, `weeks`, `months` or `years`. Besides the interval and frequency, the dataset can also be replayed on certain days of the week when selected. + +The `repeating occurrence ending` can be specified to stop at a certain date and time or set to end after a certain amount of occurrences. + +These options follow the [RFC 5545 RRULE](https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10) specification. + +![](img/simulator-scheduler-recurr.png) + +If the schedule is not provided it defaults to every 24 hours.