# myStrom app

> The Smart WiFi Switch turns connected devices on and off, saves energy, and protects your home. Developed in Switzerland.

This application provides direct access to myStrom Smart Switches via Eliona. It enables users to check the current status of the switches, view statistics, manage the Smart Switches, and, above all, connect myStrom devices with systems from various other brands.

### Installation

The myStrom app is installed in Eliona via the App Store.

### Assets

The myStrom app automatically creates all necessary asset types and assets.

#### Structuring assets

The asset types `myStrom Root` and `myStrom Room` are created only to establish a structure in Eliona. ​

#### Devices

​- *Switch*: A WiFi switch.&#x20;

| Attribute    | Description  | Subtype |
| ------------ | ------------ | ------- |
| `Power`      | Energy       | Input   |
| `Temp`       | Temperature  | Input   |
| `RelayState` | Relay Status | Input   |
| `Relay`      | Relay        | output  |

### Configuration

{% hint style="info" %}
More information on configuring apps can be found [↗ here](https://doc.eliona.io/collection/dokumentation/einstellungen/apps).​
{% endhint %}

| Attribute          | Description                                                                                                                                |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `apiKey`           | API key provided by myStrom                                                                                                                |
| `enable`           | Flag to enable or disable retrieval from this API                                                                                          |
| `refreshInterval`  | Interval in seconds for device discovery. This is an expensive operation and should not be less than 3600 s                                |
| `dataPollInterval` | Polling frequency for data updates in seconds.                                                                                             |
| `requestTimeout`   | API query timeout in seconds                                                                                                               |
| `assetFilter`      | Filter for asset creation; further details can be found in the app's README                                                                |
| `projectIDs`       | List of Eliona project IDs for which this device should collect data. For each project ID, all assets are automatically created in Eliona. |

Configuration is done using a corresponding JSON structure. As an example, the following JSON structure can be used to define an endpoint for app permissions:

```
{
  "apiKey": "api.key",
  "enable": true,
  "refreshInterval": 3600,
  "dataPollInterval": 60,
  "requestTimeout": 120,
  "assetFilter": [],
  "projectIDs": [
    "10"
  ]
}
```

Configurations can be created in Eliona with this structure under `Apps > myStrom > Settings` . To do so, select the /configs endpoint with the POST method.

After configuration is complete, the app starts continuous asset creation. When all discovered devices have been created, the user is informed via Eliona's notification system.
