## General

This digitalSTROM application helps to activate Twitter messages. For example, you can have a Tweet sent if somebody rings the doorbell or if the digitalSTROM panic button is pushed.

## Preconditions

The digitalSTROM application must be connected with your Twitter user account and the access rights must be granted.
The following steps are required to create the connection to your Twitter account:

1. Click on 'Connect to Twitter' to start the authentication process.
2. After being transferred to the Twitter website, log into your user account. If you do not yet have a user account for your home, you can create it directly under Sign up for Twitter.
3. After logging on, Twitter prompts you to permit the application.
4. Then you are returned to your digitalSTROM application, where you may now begin with setting up your Twitter messages.

## Overview of all notifications

In this view, all existing messages with their trigger, defined text and the conditions will be listed. In addition to the option of creating and editing the messages, you can also activate and deactivate one by one without completely deleting them from the system.

## Creating or editing Twitter messages

First enter a name for your message. Define the activity that should trigger the message in the ‚Trigger‘ tab. Various activities can be considered as triggers:

- Activitiy in Room: Load single or several presets in a defined room
- Push-button Action: Use switching commands of locally controlled devices (e.g. cord dimmer locally on, locally off) or the clicks of an app push-button. These switching commands influence the preset in a room and will be analysed by a server app.
- User Defined Actions: Trigger a User Defined Action, e.g. via a smartphone.
- Binary Sensor Event: Changes in the state of a connected binary sensor such as motion detector or wind sensor.
- Room State: Changes in the room state such as light is switched on or movement becomes active.
- Consumption Event: Configured consumption events of adapters and black terminal blocks L
- Global activities Leaving Home, Coming Home, Bell and Panic.

Thereby several different presets or clicks may also serve as triggers so that e.g. a message is sent for presets 1, 2, 3 and 4. By holding the Ctrl key on your keyboard, you may select several presets at the same time.

The desired message is defined in the 'Message' tab..
As contents, you may enter a text of up to 109 characters. Please note that the hashtag '#mydigitalSTROM' and a time stamp are also attached to your text, which is why the permissible length is restricted to 109 characters.
The Tweet that is sent is a simple text message which does not permit any formatting.

Sending messages might be restricted by conditions. For example, a message might be sent during daytime only. The following conditions can be defined:

- Solar altitude

- Day: send message between sunrise and sunset only
- Night: Send between sunset and sunrise only.
- Bright: send message between dawn and dusk only
- Dark: send message between dusk and dawn only

- Time of Day: Define a time range in which the message is sent. Thus the sending of a message can be limited to a specific time span.
- Weekday: Restricts the sending of a message to a predefined weekday.
- Binary Sensor Event: Sends the message only at the corresponding sensor state.
- Present: Sends the message according to the selected condition when you are present or absent.
- Presence Simulation: Sends the message when the Presence Simulation is either active or inactive.
- Weather: Sends the message at the corresponding weather situation.
- Security: Sends the message when the selected security state is active.
- Room state: the message is sent only if the defined preset is active in a room.

The messages will only be sent if all pre-defined conditions are met. The actual status of the conditions is shown by symbols on the left side of the 'Conditions' column:

- Conditions are optional.
- The settings on the message will be saved and activated by 'Save'.

The actual sate of the conditions can be visualised in the Tooltip. The state is updated by reloading the page or by clicking 'Refresh view'. 'Test message' sends a message in any case, whatever the state of the conditions is.
You may revoke the access to the digitalSTROM application in your Twitter user account settings at any time. Please delete the saved authorisations in this application with a click on ‚Disconnect from Twitter‘.

The settings of the message are saved and activated by ‚Save‘.

## System -> Logging -> Browse system log files -> dss -> js -> event-twitterer.log

- We recommend setting up a protected Twitter account for your home, which only persons you authorise can follow.
- You may revoke the access to the digitalSTROM application in your Twitter user account settings at any time. Please delete the saved authorisations in this application by clicking on 'Disconnect from Twitter'.