Tab: Devices
Device management
In the Devices tab we can configure devices and their variables:
The devices are a variable group of grouping and may or may not correspond to a real physical device or a logical grouping of variables.
In the table we can see all the configured devices, the instance to which they belong and how many variables they have.
Devices states
The state is shown at the header of each row in the table.
If the control of "Status alerts" is activated for a device, Normal Operating. See the section Automatic alerts for more information.
The devices have four states:
Stopped.
Initializing: Initial state while communication is established with the device.
Normal functioning.
Out of service: You can not consult the device / variable because it is not available or because it is not correctly configured.
Device editing

Device identification
This section is common to all types of devices. The fields it contains are:
- Active: If it is deactivated, the device will never start.
- Type: The type of protocol. This value will determine the properties to be covered by the device / variables.
- Code: Device identifier. Must be unique.
- Name: Device Name
- Description: Long description of the device
- Extra data: Couple name-value to store data from the device only informative, such as the serial number, location, ...
- Survey interval: Default survey time for the variable of this device. The value can be overwritten for individual variables.
Connection data
The parameters in this section are dependent on the type of module.
- Module: Selector of the module instance to which this device belongs. Only the instances of the same type of protocol are allowed to select the device configured.
- Multiple reading variables: (BACnet) Maximum number of variables surveyed in a single read request.
- Device instance: (BACnet) Bacnet identifier of the surveyed device.
-
MAC BACnet: (BACnet IP) The BACNET MAC identifies the direction of the device physically on the network. Although it has the same format, it is not the same as the Ethernet Mac. It can be calculated by the IP and the port where the device is accessible by the BACnet protocol as follows: 4 pairs of bytes identify the 4 pairs of IP bytes + 2 pairs of bytes that identify the network port, Represented in hexadecimal. Example: *
192.168.0.100:47808 -> C0:A8:00:64:BA:C0, siendo192 = 0xC0,168 = 0xA8,100 = 0x64,47808 = 0xBAC0. -
Modbus slave: (Modbus) Unique device identifier on the bus.
- Address offset.: (Modbus) Base address of the variables on the device, it will be added to the variable address. Especially useful for cases in which the Modbus device consulted contains data from multiple actual devices (for example, a climate control gateway that handles several machines). In that case we can configure several devices exactly with the same variable configuration only by changing the offset of the device.
- Timeout: (Modbus) Waiting time before communication as failed.
- Maximum request size: (Modbus) Maximum number of memory addresses to read in a single request. The value must be less than or equal to the supported by the device.
Variables
Adquio supports 2 types of variables:
- Variables: are variables existing in the device that are read / written by the protocol, therefore part of the parameters we have to configure are dependent on the protocol.
- Virtual variables: Are variable in memory that do not exist on the device but can be useful for storing values that we can use in programming
Setting parameters of variables are:
- Code: Unique variable identifier on the device.
- Name: Name of the variable.
- Description: Long description of the variable.
- Type: Indicates what the variable represents:
Temperature,Power,moisture, ... - Type of value: Indicates the internal representation form of the variable:
32 bits integer,32-bit decimal, ... - Units: Indicates the unit of measure:
Fahrenheit,Hercies,amperes, ... - Supports writing: Indicates whether the variable is writable.
- Supports reading: Indicates whether the variable can be read in real time.
- Reading interval.: Survey time of the variable, you are going to read past this time.
- Minimum value: Minimum value admissible in the writings of the variable.
- Maximum value: Maximum value admissible in the writings of the variable.
- Value correction: Value that is added to the value read on the device. For example: error correction in a temperature sensor.
- Values null: List of values that the variable takes when it is out of range or not available. If the value matches one of the list, the variable is passed to
Out of service.For example, a thermostat that does not detect external temperature sensor can return as value65535. - Extra data: Couple Name-value to store data from the variable only informative, such as the serial number, location, ...
- BACnet object: (BACnet) Indicates the object of the variable in BACnet. Existing types: '
analog-input', 'analog-output', 'analog-value', 'binary-input', 'binary-output' amd 'binary-value'. - BACnet object instance: (BACnet) Index to survey for the indicated object.
- ID BACnet: (BACnet) Property of the object to survey. Possible values: '
present-value', 'out-of-service'. - Application TAG BACnet: (BACnet) Indicates the type of data to be used in the writing process. Possible values: '
Null', 'Boolean', 'Unsigned Int', 'Signed Int', 'Real', 'Double' and 'Enumerated'. - Modbus memory: (Modbus) Indicates the memory area where the variable is located. Possible values:'
coil', 'discrete_input', 'holding_register' and 'input_register'. - Modbus address: (Modbus) Modbus address where the variable begins. The format is:
<address>.<Bit in the direction>. The bit should only be indicated in variablesbool,uint8oint8. Can be specified in hexadecimal starting the value with0x. Examples of values:2,0x20,2.13,0x0f.b, ... - Mask: (Modbus) apply the mask at the value read by Modbus in
holding_registeroinput_registerand move the value as many bits to the right as zeros to the right of the mask. It is used when a variable corresponds only to a set of bits within the address. Note that, when a mask is configured, the WRITING MODBUS function used for the variable is the function22 (0x16)(See parameterComplete record writing.). Example:- Mask:
0x0FF0 - Modbus readed value:
0x1234 - Return value:
0x0023(= (0x1234 & 0x0FF0) >> 8)
- Mask:
- Complete record writing.: (Modbus) It is used in the writes, when a mask is configured. If it is activated, instead of writing using the Modbus function
22 (0x16), A record reading is carried out (function3) And immediately the full updated record is written (function6). This configuration must be activated if the device does not support the function22. - Mappings: In listed numerical variables, it defines what each numerical value corresponds.

- Converters: Conversors allow you to do data type or value-like conversions directly when reading / writing to standardize and unify the representations of the variables of the different devices.
- sum (parameter): Sum the value indicated to the value of the variable.
- divide (parameter): Divide the variable for the indicated value.
- multiply (parameter): Multiply the variable for the indicated value.
- round (parameter): Round the value with the indicated decimals.
- celsius_to_fahrenheit: from celsius to fahrenheit
- fahrenheit_to_celsius: from fahrenheit to celsius
- nullif (parameter): if the value of the variable matches the specified one takes as null (
Out of service). - cast: Convert the type of data of value. You have two parameters (
Type of originyType of destination) - cdab32, int32cdab: (Modbus) Change the order of bytes.
- badc32, float32badc: (Modbus) Change the order of bytes.
- dcba64, int64dcba, float64dcba: (Modbus) Change the order in blocks of 2 bytes.
- invert16: (Modbus) Invert the order in blocks of 2 bytes.
- swap16: (Modbus) Invert the order of bytes in each block of 2 bytes.
- eq (parameter): If the value of the variable coincides with the indicated value, it becomes 1, if not at 0.
- ne (parameter): If the value of the variable coincides with the indicated value, it becomes 0, if not at 1.
- lt (parameter): If the value of the variable is less than the indicated value, it becomes 1, if not 0.
- le (parameter): If the value of the variable is less than or equal to the indicated value, it becomes 1, if not 0.
- gt (parameter): If the value of the variable is greater than with the indicated value, it becomes 1, if not at 0.
- ge (parameter): If the value of the variable is greater than or equal to the indicated value, it becomes 1, if not at 0.
- shift (parameter): Displacement of bits to the right of the variable.

- The converters are applied sequentially in the order in which they are shown in the table when a reading of the value is made to the device. When a script is made, they apply in reverse order.
- The field
Data type on 'adquio'is the type of data that has the variable inadquio , you can not change from this screen. FieldData type in the Protocolis the type of data that has the variable in the real device, the system calculates it according to the type of data inadquio And converters in reverse order. - In the example of the image it is a typical case of variable
Modbusthat stores the value multiplied by 100 in 1 Modbus record (16 bits). The first thing that is done is to convert the value to decimal type (float64) and then divided between 100. A direct division on an int16 field would truncify the decimals.
The configuration parameters of the virtual variables are:
- Persistent: The value of the variable is saved in persistent memory, so it maintains the value in the reboots.
- Default value: Value that takes the variable at the beginning.
- Autoincremental: It causes the variable to increase 1 unit every time you survey (it is not really survey, since it is not anywhere else).
Editing the JSON (Advanced Mode)
If the JSON edition is activated, you can edit at low level in your JSON representation.
In addition to editing the devices more advanced, this option can be used to make copies of the configuration to create an equal device in it or in another
Changes in the text are interpreted and try to refresh on the form as long as they are valid. Changes in the form are also transmuted in the JSON representation in real time.