Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:mervis-scada:80-mqtt [2020/08/27 10:00]
l.osladil [Weintek compatible format]
en:mervis-scada:80-mqtt [2024/05/08 10:42] (current)
Line 121: Line 121:
 </code> </code>
 ==== Weintek compatible format ==== ==== Weintek compatible format ====
-  * We assume that all DateTime values are in **UTC**+  * We assume that all datetime values are in **UTC** 
 +  * Print screens are from EasyBuilder Pro SW
 === Variable values === === Variable values ===
   * Publishes values of variables   * Publishes values of variables
   * Publish message with “At least once delivery”   * Publish message with “At least once delivery”
-  * Topic: $deviceId/mervis/values/+  * Topic: $deviceId/mervis/values or $deviceId/mervis/values/*
   * Payload: UTF-8 JSON document   * Payload: UTF-8 JSON document
-    * /FormatId(string), message ID +    * /droot element 
-    /ApiVersion(int), version of API +      "property_name": value - property name, can contain metada(not required). Always use array [...] for value of property 
-    /CollectionId (int), identification of the collection +        metadata format: 
-    /TagData (Array of value items) +          "name" name of property 
-      * /Time (datetime), timestamp in ISO format (YYYY-MM-DDTHH:MM:SSZ), ideal is a UTC form +          "type" property type(we supported only [[https://kb.mervis.info/doku.php/en:mervis-scada:80-mqtt#our_supported_types|our list of types]]
-      /Values (Collection of Tag and value tuples)+          "unit" information about unit of value
  
 **Example** **Example**
Line 148: Line 149:
  
 </code> </code>
 +{{ :en:mervis-scada:annotation_2020-08-27_120101.png?600 |}}
 === Command registration === === Command registration ===
   * Topic: $deviceId/mervis/cmd_reg or $deviceId/mervis/cmd_reg/*   * Topic: $deviceId/mervis/cmd_reg or $deviceId/mervis/cmd_reg/*
 +  * Format:
 +    * /d root element
 +      * "propertyName" must include some informations(separate by ","). Value is ignored.
 +        * "id" what is command id and define subscribe topic ($deviceId/mervis/command/change_temperature)
 +        * "name" just for customer info
 +        * "params" parameters with informations to command (**must include all parameters of supscribe topic**)
 +          * "name" parameter name in json
 +          * "type" type of parameter (we supported only [[https://kb.mervis.info/doku.php/en:mervis-scada:80-mqtt#our_supported_types|our list of types]])
 +          * "unit" information about unit of parameter
 +        * "ts" time span 
 <code> <code>
 { {
Line 158: Line 170:
 } }
 </code> </code>
 +choose/create $deviceId/mervis/cmd_reg/
 +{{ :en:mervis-scada:annotation_2020-08-27_110112.png?400 |}}
 +set general tab by screenshot
 +{{ :en:mervis-scada:annotation_2020-08-27_121338.png?400 |}}
 +add commands
 +{{ :en:mervis-scada:annotation_2020-08-27_115716.png?400 |}}
 +===Our supported types===
 +              * "generic_bool"
 +              * "generic_sint8"
 +              * "generic_uint8"
 +              * "generic_sint16"
 +              * "generic_uint16"
 +              * "generic_sint32"
 +              * "generic_uint32"
 +              * "generic_sint64"
 +              * "generic_uint64"
 +              * "generic_float32"
 +              * "generic_float64"
 +              * "generic_string"
 +              * "generic_datetime"
 +===Create a subcribe topic for executing command===
 +  * for previous command example
 +  * create topic $deviceId/mervis/command/change_temperature
 +  * with two addresses:
 +    * temperature(32-bit float)
 +    * date(string)
 +{{ :en:mervis-scada:annotation_2020-08-27_110134.png?600 |}}
  • © Energocentrum Plus, s.r.o. 2017 - 2025