Operations

In this section it is possible set predefined actions to execute by:

Events of operation launchings and results of operation executions are recorded into the log, indicating the time and initiator.
image

Operations can be used in order to:

  • change state of controlled object/link,

  • change parameters of controlled object/link,

  • obtain data from controlled object (parameters, configuration, software version etc),

  • upload software updates to the object.

This section is available only for users with rights to run operations.

Only users with rights to manage operations can add, edit and delete operations.

Control buttons:

image | execute operation;

image | change operation;

image | delete operation.

In order to create a new operation it is necessary to click the image button.

There are two operation types, the fields depend on the selected type:

Fields description:

Field Description in program / script Description in MQTT

Name

Operation name displayed in the web interface.

Type

Dropdown list with available operation types.

Subtype

Dropdown list with available subtypes:

  • Program/script in file system - previously created file stored on the server.

    • The name or the full path to the script is specified.

  • Script from repository - script created and added to the system repository earlier.

    • The script can be selected from the drop-down list.

  • Script with text - manual script input.

    • The script text must be entered.

Arguments

Dropdown list where arguments the script will be executed with are specified.

Topic

MQTT topic to send message.

Message

MQTT message text.

Description

Explanation to the operation.

Show results in popup message

If the slider is set to YES, then with execution of the operation the popup window will be displayed. The following is specified in the message:

  • operation name,

  • path to the object in the hierarchy,

  • result of the execution.

image

The window is closed with clicking the image button or with page refreshing.

The popup window is available only for manually executed operations. Results of operations, performed by triggers, are not displayed.

The following variables can be used in operations:

  • {{id}} - ID of the object, in which the operation is executed;

  • {{properties.property_name}} - property value of the object, in which the operation is executed (the name of the property is specified in the variable);

  • {{jobId}} - ID of the executed operation;

    The identifier is unique for each execution, details are in the REST-API documentation.
  • {{user.id}} - ID of the user, who has executed the operation;

  • {{user.login}} - login of the user, who has executed the operation.

The variables are used in:

  • the topic and the message of the operation type MQTT message;

  • the script of the operation type Program/script execution - Script with text.