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
Next revision Both sides next revision
en:mervis-scada:80-mqtt [2020/08/27 10:20]
l.osladil [Weintek compatible format]
en:mervis-scada:80-mqtt [2021/12/20 12:37]
m.chlupac [Basic properties and requirements]
Line 9: Line 9:
   * possibility of a dynamic variable set (devices can specify what variables they publish)   * possibility of a dynamic variable set (devices can specify what variables they publish)
   * only built-in types are supported (bool, integers, floating point numbers, string)   * only built-in types are supported (bool, integers, floating point numbers, string)
-  * no commands/set point yet 
   * support for secured channel. A device can use secure or non-secure connection   * support for secured channel. A device can use secure or non-secure connection
  
Line 121: Line 120:
 </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
Line 127: Line 127:
   * Topic: $deviceId/mervis/values or $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 148:
  
 </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/*
Line 153: Line 154:
     * /d root element     * /d root element
       * "propertyName" must include some informations(separate by ","). Value is ignored.       * "propertyName" must include some informations(separate by ","). Value is ignored.
-        * "id" what is command id and define subscribe topic($deviceId/mervis/command/change_temperature)+        * "id" what is command id and define subscribe topic ($deviceId/mervis/command/change_temperature)
         * "name" just for customer info         * "name" just for customer info
-        * "params" parameters with informations to command(must include all parameters of supscribe topic)+        * "params" parameters with informations to command (**must include all parameters of supscribe topic**)
           * "name" parameter name in json           * "name" parameter name in json
-          * "type" type of parameter (we supported only our list of types) +          * "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]]
-            our types:+          "unit" information about unit of parameter 
 +        * "ts" time span  
 +<code> 
 +
 +    "d" 
 +        "id:change_temperature, name:change temperature in house ,params:[{name: temperature, type:generic_float64, unit:°C}, {name: date, type:generic_datetime, unit:UTC}]" : false 
 +    }, 
 +    "ts" : "2020-08-27T07:10:11.356013" 
 +
 +</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_bool"
               * "generic_sint8"               * "generic_sint8"
Line 172: Line 189:
               * "generic_string"               * "generic_string"
               * "generic_datetime"               * "generic_datetime"
-          "unit" information about unit of parameter +===Create a subcribe topic for executing command=== 
-        "ts" time span  +  for previous command example 
-<code> +  create topic $deviceId/mervis/command/change_temperature 
-{ +  * with two addresses: 
-    "d" : { +    * temperature(32-bit float) 
-        "id:change_temperature, name:change temperature in house ,params:[{name: temperature, type:generic_float64, unit:°C}, {namedate, type:generic_datetime, unit:UTC}]" : false +    * date(string) 
-    }, +{{ :en:mervis-scada:annotation_2020-08-27_110134.png?600 |}}
-    "ts" "2020-08-27T07:10:11.356013" +
-} +
-</code>+
  • © Energocentrum Plus, s.r.o. 2017 - 2024