MQTT (orders)

Databoom allows the remote control of MQTT devices.

A MQTT command consists in the publication of a customized message on the default topic <project>/<device token>/commands or on a topic customized by the user.

The MQTT client must be appropriately configured so it can correctly interpretate the commands received on the topic and execute them.

 


 

Device configuration

For a correct configuration of a MQTT device refert to the article MQTT.

A MQTT device is commandable if all the fields

  • Projects
  • Topic where publish data 
  • Topic where it's possible to recieve informations from Databoom

are filled.

 


 

Signal configuration

In each order you can set:

  • Description and Icon allow to identify the order
  • Visibility, to specify which type of users can display the order. User's type is set by the administrator when the user is added to the domain or can be updated in Manage users section. The creator and the administrators of the signal can always see the orders indipendently of its visibility 

  • Hexadecimal data, when selected input values are converted to hexadecimal
    • bits, allows to specify the number of bits to be used to represent hexadecimal value among 16bits (4 characters) or 32bits (8 characters)
  • Enable scaling, to apply signal rescaling to order values
  • Template, allows to customize the data format to forward
    • To indicate the value position in the payload, use the keyword $VALUE$ that will be replaced by the value inserted from the widget. You can also refer more than a value, for example $VAL1$, $VAL2$, ...
    • Signal and device tokens can be referenced in template using keywords $SIGNAL_TOKEN$ and $DEVICE_TOKEN$
  • Publishing topics, to set the topic where payload is published
    • Default topic is <project>/<device token>/commands
    • By checking the checkbox Custom topic it is possible to manually add a topic. The custom topic must contain the device part <project>/<device token>/<customized>
    • It is possible to add more topics to a single order

Once an order has been added, it is possible to remove it by clicking the bin buttom or you can edit it by clicking the pencil button.

 


 

Executing an order

It is possible to send commands from the

  • Signals list
  • Signal detai
  • Signals boxes

widgets.

Once the Show commands option has been enabled in widget menu, orders buttons will be shown, if the device is appropriately configured and the user verifies visibility criteria.

The widgets display up to two quick orders buttons. Quick orders are all those orders that don't require any input or only a variable. All other orders are accessible by clicking the Send orders button.

Orders buttons are also displayed in the signals list and in the device details pages, in the Last value cell of the corresponding signal.

Orders forwarding consists in data publication on the commands topic, is therefore not possible having a feedback on the actual value update. Depending on the type of device used as MQTT client, wait the proper time before reloading the widget and see the updated value.

 


 

Additional notes

  • MQTT broker uses a cache to store topics. It may take up to 15/20 minutes before a new topic to be visible;
  • If, after the configuration has been completed, the modal keeps on loading when a command is sent, it may be due firewall restrictions. Be sure the following ports are accessible:
    • 1883 MQTT
    • 8883 MQTT over TLS
    • 8001 MQTT over web socket
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.