## General

This digitalSTROM application allows "User-defined states" to be created that are derived direct from sensor values, window contacts, system events, logical links or a performance measurement of a terminal block or the dSMs. This allows the trigger as well as conditions to be set in other server Apps that allows different applications to be implemented.
The creating states can also be displayed in the smartphone App "dS Dashboard" that will provide you with a clear overview of your home. In this way, you can see, e.g. if all windows are closed or if the television connected to an inline adapter is on. Manually set states are also offered additionally that can be set directly in the "ds Dashboard" app or via a timer or Event Responder.

## Overview of all states

States can be set up, edited or deleted as desired. The list view provides you with your saved settings (name, description, trigger and period) for setting and resetting a state at one glance. With the setting in the column "Smartphone", it is defined if this state should be faded in automatically in the smartphone app "ds Dashboard". It the selection is set, the state is automatically visible on every smartphone. States faded out can however, be added in the smartphone app at any time.

## Create a new state

A dialogue opens via the function "New state" that can be used to select different types of states. The following types are available:

Evaluate measuring values from sensors

With the evaluation of a sensor measuring value, states can be set and thus used to trigger actions.
You want to, e.g. move the blinds to the "Sun protection" position when the temperature in the living room exceeds 24°C? For this purpose, create a state "Living room too warm/comfortable" that is set to "Too warm" when exceeding 24°C. Setting this state can then be used in the Event Responder in order to call up the blinds in the living room for sun protection.

For this purpose, the desired sensor is chosen in the "Sensor" tab. Next to the choice of the sensors available, existing room values (such as indoor temperature) can also be chosen. The outdoor temperature is also additionally available, that can be determined by a weather service.
Then the value of the state to be defined is set in the "Sensor values" tab. In doing so, the state change can be carried out when exceeding (greater than) or falling below (smaller than). Then, to reset the state, either the same value can be used or a lower or higher value can be selected.

Check if one or more windows or doors are opened

By linking several or all window or door contacts, you can conveniently check if all windows or doors are closed in the "ds Dashboard" app on your smartphone.
This state can also be used as condition e.g., in the Push Event Mailer app in order to check if everything is closed when leaving the house (activity "Leaving"). If a window is still opened, your home sends you a Push Message automatically.

When creating this state, a selection can be made if this is disregarded or considered for all available window or door contacts. The state is set when one of the contacts correspond to the selection "Open" or "Closed". If, e.g., four window contacts are selected as "Open", the state is set when opening the first window. It is only reset once all windows have been closed.
When using window handles with the information "Tilted", you can make an additional selection if a tilted window should be considered as closed or open.

Set the state on the basis of the usage report of a device

This state allows you to recognise if a device connected to a terminal block is switched on or off.
For this purpose, first configure the usage report for the desired terminal block (e.g. SW-KL) or an inline adapter in the "Hardware" tab. Then define a state (e.g. window switched on or switched off) and select only the respective terminal block. For the state with the usage report switching on for 'On' and switches off respectively for the message 'Off'.

Set the state due to the usage measurement in a power circuit

Depending on the current performance, a state can be set via the usage measurement of a digitalSTROM Meter (dsm).
If, e.g. the washing machine is connected in a power circuit, the state "Washing machine running/not running" can be set when the power exceeds 50 W. When falling below 40 W, then the state can be reset. In order to ignore pauses in the washing programme, the state can be restored only after a certain period.

When creating this state, first the desired dSM is selected and then the value of the consumption is defined for setting or resetting.

Set the state due to any trigger in the system

Using any trigger in your digitalSTROM installation, a state can be set and reset again by another trigger.
This allows a state e.g. "The doorbell has rung" to be set with trigger "Doorbell" and can be reset again after 30 seconds. For resetting, here also select the trigger "Doorbell" and set the period to 30 seconds.

The entry is defined by selecting the "Trigger for setting" and "Trigger for resetting" in the tag of the same name. In doing so, all events in the system are available as trigger.

Evaluating a logical link of several states

Using an AND or OR link of several states or sensor values, you can create a simply combined state.
This allows you to e.g., set a state "Light on on 1st floor" when the light is switched on in any room. For the desired room, select the state "Light is switched on" and select an OR link for this purpose. Via the function "New state", any sensors or system states can be added.
If the OR link has been selected, the state is set as soon as at least one sensor selected or system state has been set. With an AND link, all must be set at the same time.

Set the manual state via the server or smartphone app

If a state should be set by hand or via any trigger or timers, this can be defined and activated manually in a simple manner.
If e.g., you want to deactivate the timers for closing the shutters during a party at home, you can conveniently set the state "Party on/off" before a party in the Dashboard app on your smartphone. If the state "Party off" is used as a condition in the timers, the shutters stay open during the party.

When setting the states, first define a name and the description for a state set or reset. These names are displayed in the smartphone app and should be perceivable in the process.
Depending on the state type selected, then different settings are available.
For states that that can be set due to events or energy measurement values, setting or resetting can also be delayed where required. This only changes the state if no further triggers are detected over the defined periods.

## Edit State

In order to edit an existing state, select the desired state and click on the function "Edit state". As an alternative, the state can also be selected by a double-click and the dialogue is opened directly.
The dialogue for editing the entries offers the same setting options that are also available when creating.

## Toggle State

With the function "Toggle State", certain states can be set or reset. This is required in case an incorrect value is displayed after creating the state.
Take note that this function is only available for states that are set via system events.

## Delete State

The state selected is deleted using this function.