Promotic

Preconfiguration "Communication with iNELS devices network API interface Communication set with data and panel"


This preconfiguration can be created in the object: PmaFolder or PmaRoot.

Creates the PmaFolder object with subobjects:
- Commun with objects and methods configured as communication driver interface.
- Test contains panel and data for testing the communication with connected devices.

The created preconfigured connection is functional usually immediately. Otherwise it is necessary to obtain the connection parameters specified by the device manufacturer or see also PmChar - Driver for communication by user defined ASCII/BIN protocol..
- The panel is used for communication testing and it is not essential for the communication functionality.


PmaFolder Test has methods that call methods with the same names in the Commun object. There is additional the "onReceive" method that contains examples of processing individual cathegories of communication requests.

The control itself in the panel is solved step by step. By repeatedly calling the "StartGetReceive" method by the "Start Get API" button and selecting the appropriate parameter in the URL address, you can, for example, find information about the device at URL: urladdr/api/devices/XXXXX. In the left half of the panel, JSON structure data is visible as it came from the communication. In the right half of the panel, these data is displayed as processed in the "onReceive" method.

By adding /state to the end of the address and by calling the "StartGetReceive" method it is possible to detect current state of the device. If the device allows changing some state or value then it can be entered into PUT parameters parameter. The corresponding property and its value must be entered in correct syntax (example: {"on":true} or {"brightness":100,"red":255,"green":255,"blue":0}, etc.)

Complete entry of URL address with the parameter before calling the "StartPutReceive" method by the "Start Put API" button may, for example, look like this:
 
url: http://217.197.144.56:9090/api/devices/46458 and PUT parameters: {"brightness":100,"red":255,"green":255,"blue":0}

These configurators can be set before the preconfiguration is created:
The name of created objectName of the object created in the Pma objects tree. The maximum name length is 30 characters. This is a system name, so it must contain only alphanumeric and must not contain any diacritics (i.e. national dependent characters), empty string, spaces and the first character must not be a number.
Default: "iNELS"
URL address and port

History:
Pm8.03.21: Created
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.