Actions are used to define which action should be triggered when data arrive in the sender. Rules are used to define under which circumstances should these actions be triggered.
Automated Actions
By using automated actions, users choose what to do with the data. In other words, they choose what should be the output. There are 5 different actions available:
- BellaDati REST
- Save to file
- MQTT publish
- HTTP request
Users can choose one or more action. It is possible to use each action more than once (since IoT Data Collector 1.2).
Adding an Automated Action
To add an action, users have to click on New action, select which type of action they would like to use, and click on Continue. For some types of actions, further configuration is necessary (see below).
Removing an Automated Action
To remove an automated action, users have to click on the icon and confirm the removal.
To finish the operation, users have to click on Apply to save the changes to the sender.
BellaDati REST
This action will send the data to a BellaDati Data Set via the REST API. To be able to use this action, the connection parameters and mapping have to be specified.
Connection
Parameter | Description |
---|---|
Name | Name of the action (optional) |
URL | IP adress or URL of BellaDati |
Use SSL | Enables SSL. |
Consumer Key | Consumer Key defined in the domain. OAuth has to be enabled in the domain. Learn more. |
Consumer Secret defined in the domain. OAuth has to be enabled in the domain. Learn more. | |
Username | Username of BellaDati user |
Password | Password of BellaDati user |
Continue on error | This toggle influences the behavior of the sender in a situation when the sending of the data fails. When disabled, unprocessed data are not deleted from the receiver and the action is triggered on the same data again. When enabled, the data are deleted from the receiver and the action is not triggered until new data arrive. Please note that this option is applied both when the action fails during the sending of the data and when it cannot connect to the target (e.g. because of wrong username). |
Mapping
Parameter | Description |
---|---|
ID of the target data set | |
ID of the import template (import settings definition) | |
ID attribute | Which column (code of the column) should be used to store the ID. Example: L_ID |
Receiver Attribute | Which column (code of the column) should be used to store the Receiver. Example: L_RECEIVER |
Content Attribute | Which column (code of the column)should be used to store the source content (e. g. JSON) Example: L_JSON |
Timestamp Attribute | Which column (code of the column) should be used to store the timestamp L_TIMESTAMP |
Mapping | Mapping of source data and data set columns (attributes and indicators) Example: L_SENSOR_ID=sensorId,M_ACCELER_X=acceler_x,M_ACCELER_Y=acceler_y,M_ACCELER_Z=acceler_z,M_INERT_ACCELER_X=inert_acceler_x |
If the connection is not established at init (e.g. because BellaDati is not running), the action will try to reconnect when sending the data.
Save to File
This action will save the output to a text file on the server. The path to the file is installation_dir/data/NameOfSender/NameOfReceiver/.
MQTT Publish
This action is used to publish the data to an MQTT Broker. To be able to use this action, the connection parameters and the message have to be specified.
Parameter | Description |
---|---|
Name | Name of the action (optional) |
URL of IP address of the MQTT Broker | |
Port | Port where the MQTT Broker is running |
Topic | Topic under which the messages should be published |
QoS | Which level of Quality of Service should be used |
Message content | The content of the message. It is possible to reference the input values by using tags with following format: ${NameOfField}. Example: The pressure is ${pressure} and the temperature is ${temperature}. |
Authentication type | What type of authentication should be used. Available options:
|
Use SSL | Enables SSL. |
Continue on error | This toggle influences the behavior of the sender in a situation when the sending of the data fails. When disabled, unprocessed data are not deleted from the receiver and the action is triggered on the same data again. When enabled, the data are deleted from the receiver and the action is not triggered until new data arrive. Please note that this option is applied only when the action fails during the sending of the data. When the action fails because of different reason (e.g. because it cannot connect to the target), the whole action will fail. Example: Incorrect port - Continue on error is not applied. |
Email
This action will send the data via an email. To be able to use this action, the connection parameters and the message have to be specified.
Parameter | Description |
---|---|
Name | Name of the action (optional) |
URL of IP address of the SMTP host | |
Port | Port where the SMTP host is running |
Use SSL/TLS | Enables SSL and TLS |
Username | Username of the SMTP user |
Password | Passwrod of the SMTP user |
Sender email | Defines from which address the email will be sent |
Sender caption | Name of the sender |
Recipients | List of recipients |
Subject | Subject of the email |
Content Type | Content Type of the email (text/plain, text/html) |
Message content | The content of the message. It is possible to reference the input values by using tags with following format: ${NameOfField}. Example: The pressure is ${pressure} and the temperature is ${temperature}. |
Continue on error | This toggle influences the behavior of the sender in a situation when the sending of the data fails. When disabled, unprocessed data are not deleted from the receiver and the action is not triggered on the same data again. When enabled, the data are deleted from the receiver and the action is not triggered until new data arrive. |
HTTP Request
By using this option the data will be sent via HTTP with one of the standard methods (POST, GET, DELETE, PUT). This option is useful when the data should be transferred to another service or application. To be able to use this action, the connection parameters and the message have to be specified.
Parameter | Description |
---|---|
Name | Name of the action (optional) |
Method | Which HTTP method should be used. |
Port | Port of the target endpoint Example: 80 |
Hostname | Hostname of the target endpoint Example: belladatiiotservice.com |
Relative URI | Relative URI of the target endpoint Example:/postendpoint |
HTTP headers | Specification of HTTP headers; one header per row Example: header1=value1 header2=value2 |
HTTP POST content | Specification of HTTP body. It is possible to reference the input values by using tags with following format: ${NameOfField}. Example: The pressure is ${pressure} and the temperature is ${temperature}. |
Send as Form | Enables URL-encoding of the data, similar to --data-urlencode from cUrl. When enabled, each row of the content is one entry splitted by =. Example: From=+123456789 Body=This is the message To=+987654321 |
Authentication type | What type of authentication should be used. Available options:
|
Use SSL | Enables SSL. |
Continue on error | This toggle influences the behavior of the sender in a situation when the sending of the data fails. When disabled, unprocessed data are not deleted from the receiver and the action is triggered on the same data again. When enabled, the data are deleted from the receiver and the action is not triggered until new data arrive. |
Action Rules
Action rules can be used to filter outgoing data by using various type of data-driven conditions. Each action rule is defined by the Field, Operation and Value.
It is possible to add more than rule. In that case, the message has to match all the rules to be processed by the automated action. When the sender has more than one action, the rules are applied to all actions.
Adding an Action Rule
To add a new action rule, users have to click on New filter rule. In the pop-up window, they have to fill in the name of the field and then choose which operation they want to use. Lastly, they need to specify the compare value. Once they have the condition ready, users have to click on Add to save the rule and close the pop-up window.
As the last step, users have to click on Apply to save the changes to the sender.
Editing an Action Rule
To edit an action rule, users need to click on the row.
Removing an Action Rule
To remove an action rule, users have to click on the icon and confirm the action.
To finish the operation, users have to click on Apply to save the changes to the sender.
Action Rule Options
Following operations are available:
- greater than
- lower than
- equals
- not equal to
- greater than or equal to
- lower than or equal to
- contains
- doesn't contain
- not empty
- empty
For operation "not empty" and "empty", the compare value is not available.