Parameters

Through the Parameters, if the underlying communication channel supports bidirectional communication, it is possible to update the operating settings of the machine. For instance, you can change setpoints, and other running options.

Remote products must subscribe to a specific topic in order to receive parameter updates.

For instance, by using the Servitly Thing Connector (STC), this is an MQTT sample message:

// TOPIC
<username>/<asset-id>(/<thing-path>)?/<parameter-path>

// PAYLOAD
{
 "data":{
   "foo": "xyz", 
   "bar": 123.456, 
   "baz": true
 }
}

Parameter values can be strings, numbers, or boolean encoded by using the standard JSON data encoding.

For more details, refer to the Receive parameters through MQTT article.

Creating a Parameter

To add a new Parameter to a Thing Definition, you should:

  1. Enter the Remote Control / Parameters page.

  2. Select the Thing Definitions tab.

  3. Select the Thing Definition to edit.

  4. Press the Add Parameter button.

  5. Provide the required information.

  6. Press the Save button and edit the additional information, if needed.

Editing a Parameter

The parameter editing is composed by several sections.

General

The available properties are:

  • Name: the name used by the <configuration-parameters-widget> to reference the parameter.

  • Label: the parameter shown label within the widget.

  • Description: the text displayed to the user to describe the purpose of this parameter.

  • Type: the type of the parameter value. One of Boolean, Double, Float, Integer, Long, String, Base64, BLOB, Date. Pay attention to select the right type, this could affect the way the parameter value is encoded within the payload.

  • Group: the name of the group to which the parameter belongs (eg. Temperatures, System). The group is used in lists of parameters to aid in the search and selection of parameters.

Rendering

  • Selection Mode: the type of the rendered field, input, selection, or radio buttons.

  • Values and Labels: the set of values and labels mapping in case of selection or radio buttons.

Constraints

  • Min Value: the minimum valid value if the selected type is numeric.

  • Max Value: the maximum valid value if the selected type is numeric.

  • Step: the minimum increment step if the selected type is numeric.

  • Mandatory: the flag indicating whether the parameter is mandatory.

Mapping

The Mapping tab allows defining how parameters are exchanged between the Thing and the Cloud.

The available properties are:

  • Path: the topic path the Thing must subscribe to.

  • Name: the JSON property name holding the value.

  • Value Transformer: the transformer applied to the value before being encoded in the payload.
    For more details, see the article Transforming Values.

  • Value Encoding: the way the value must be encoded within the payload (Literal, Literal JSON, Binary HEX, Binary INT).
    For more details, see the article Encoding Values.

  • Raw binary metric: in case of binary encoding, the metric providing RAW binary value in case of multiple values are encoded together.
    For instance, a MODBUS registry that holds several boolean flags.

  • Sending Mode: specify whether the channel or a cloud API must be invoked to send parameter values.

Data Binding

  • Read Metric: the feedback metric the Thing must publish when the parameter is updated.

  • Synchronized Property: the property that, if updated, causes the parameter to be sent to the remote object.

Retry Policy

If the read metric has been defined, the retry policy can also be configured. In this way, the backend can retry several times until it receives back, from the connected thing, the same value being updated.

  • Retry Count: the maximum number of attempts before aborting the operation

  • Interval: the number of seconds between each retry.

  • Alert Definition: the alert to activate in case of operation abort (max retry reached).

Enable Condition

The Enable condition tab allows defining the condition which enables the parameter field within the page. If not defined, the field is always enabled.

The available properties are:

  • Metric: the metric to check for enabling the field.

  • Predicate: the predicate to evaluate.

  • Value: the comparison value.

Options

Additional parameter options:

  • Bulk Update: allows users to update the same parameter on multiple things.

  • Value Retention: when connecting to the cloud, the thing is notified with the latest parameter value.

Updating Parameters

Parameter values can be modified within the product dashboards by using specific widgets.

Bulk Update

According to the permissions, users can perform bulk updates for parameters, for instance, it is possible to select multiple products and trigger on them the update of a specific configuration parameter.

Servitly automatically schedules an operation that pushes to the remote products the new configuration parameter value through the chosen IoT connector.

If the remote products are offline, the bulk update is automatically retried periodically (1 per hour, max 12 hours) until all the connected products will be updated.