# Device simulator

> The device simulator app simulates data input in Eliona.

### Overview

This guide provides instructions for configuring, installing, and using the device simulator app.

### Installation

Install the device simulator app via the Eliona App Store.

### Configuration

The device simulator app requires configuration through the Eliona settings. Below are the general steps and details for configuring the app.

#### Configuration of the device simulator app

Generators can be created in Eliona under `Apps > Device Simulator > Settings` which opens the [Generic Frontend](https://doc.eliona.io/collection/v/eliona-english/manuals/settings/apps) of the app. Here you can use the endpoint `/generators` with the POST method. Each generator requires the following data:

| Attribute          | Description                                                                                                                                                                                                             |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `asset_id`         | ID of the simulated asset.                                                                                                                                                                                              |
| `attribute`        | Attribute name of the generated data.                                                                                                                                                                                   |
| `subtype`          | Subtype of the generated data (e.g. "input").                                                                                                                                                                           |
| `function_type`    | Function type for data generation (e.g. "sin\_wave", "random", "sawtooth\_wave").                                                                                                                                       |
| `min_value`        | Minimum value for the generated data.                                                                                                                                                                                   |
| `max_value`        | Maximum value for the generated data.                                                                                                                                                                                   |
| `integer`          | Indicates whether the generated value should be an integer or a float (`true` for integer, `false` for float).                                                                                                          |
| `interval_seconds` | Interval in seconds for data generation. (Sampling rate) (How often should new data be generated?)                                                                                                                      |
| `frequency`        | Frequency in Hz for wave functions. (How often should the function reach the original value per second?) (typically less than 1) (Must not be higher than 1/(2\*interval\_seconds) to avoid aliasing/Nyquist frequency) |

Example generator JSON:

```json
{
  "asset_id": 17202,
  "attribute": "power",
  "subtype": "input",
  "function_type": "sin_wave",
  "min_value": 10.5,
  "max_value": 75.2,
  "integer": false,
  "interval_seconds": 1,
  "frequency": 0.05
}
```
