Page tree

SAYMON документация

Skip to end of metadata
Go to start of metadata

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.

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.

It is possible to add a set of default operations to an object class in the System configuration window.

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:

| execute operation;

| change operation;

| delete operation.


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

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


  • MQTT message sends a message using the MQTT protocol.


Fields description:

Field         Description in program / scriptDescription in MQTT
NameOperation 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 following is specified there:
      • the name or the full path to the script;
      • arguments the script will be executed with.

  • 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.

Topic
MQTT topic to send message.
Message

MQTT message text.
DescriptionExplanation 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.

The window is closed with clicking the 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.
  • No labels