Other apps
Wialon for Android/iOS
Wialon Local
Wialon Hosting
Parameter Conversion
  • sensors
  • sensor_parameters

The parameters received directly from the device can be converted. For this purpose, you should specify the conversion operation in the Parameter field of the sensor properties. The situations in which this operation can be applied are described below.

Bitwise parameter control

Bitwise parameter control allows you to control a specific bit of a parameter. This operation is used if the device shows different data in one parameter: the first bit can correspond to the state of the alarm (on/off), the second to the state of the driver door (open/closed), the third to the state of the headlights, and so on.

The bits are numbered starting from 1 in the monitoring system. To control, for example, the third bit of the parameter param199, type a colon and the bit number after its name:


In this way, you can create several sensors on the basis of one parameter to control different bits.

The parameters of the  double  type are automatically converted into the  int type, after which a bit is retrieved.

Bitwise parameter control can be also applied to 64-bit parameter values, but consider the following particularity. When displaying a number with the 64th bit filled, this bit is regarded as a minus sign for the number contained in the remaining 63 bits. Thus, parameter values greater than (2^63 - 1) = 9223372036854775807 are displayed as negative ones.

For more information, see Sensors: Working with Bits .

Conversion of text parameters

If a sensor has an expression parameter which contains a text parameter, then the text value is converted to a 53-bit integer. By default, this value is considered decimal. If the value belongs to another numeral system, enter a colon after the text parameter and specify this numeral system. Thus, the value will be converted to the decimal system automatically. For example, if the parameter text_param sends the value 100, then

text_param = 100

text_param:10 = 100

text_param:16 = 256

text_param:2 = 4

Determination of the day number in a year

You can convert the UNIX time of the message to the day number relative to January 1st. To do this, create a custom sensor with the parameter time:d.

For example, for 11:00:00 (UTC) March 28, 2017, the UNIX time is 1490698800. Therefore,

time = 1490698800

time:d = 87

Conversion of the driver, trailer and passenger sensor parameters

Conversion of text and numerical parameter values is available for the sensor types Driver assignment, Trailer assignment and Passenger sensor. To convert a parameter value, you must specify an expression in the Parameter field of the sensor properties, which can include functions and mathematical operations.

Functions can only apply to text values, while mathematical operations apply to numeric ones.

Converted values are used as follows:


The functions apply only to text values of the parameters. Their description is in the table below, where param is the name of the parameter in which the device sends the text value.

FunctionDescriptionExample of the value beforeExample of the value after
ltrim(param) or ltrim(param,'0')

Trims all zeros to the left. By default, '0' is trimmed, but it can be applied to other characters as well. The character is specified in single quotes.

rtrim(param) or rtrim(param,'0')

Trims all zeros to the right. By default, '0' is trimmed, but it can be applied to other characters as well. The character is specified in single quotes.

lower(param)Converts characters to lowercase.Aa
upper(param)Converts characters to uppercase.aA
reverse(param)Reverses the characters order.A12344321A

Reverses the order of characters by two. If a string has an odd number of characters, it is first appended with a leading zero to the left, and then the string is reversed.


Adds the specified character (third function parameter) to the left until the string contains the required number of characters (second function parameter).

The added character is specified in single quotes.



Adds the specified character (third function parameter) to the right until the string contains the required number of characters (second function parameter).

The added character is specified in single quotes.


Changes the sequence of the characters. The characters are arranged in the order specified after the parameter name. If a non-existent index is specified, 0 is put in place of that character.

The indices are counted from left to right, starting from 0.

hex(param)Converts from the decimal system to the hexadecimal one.10a
dec(param)Converts from the hexadecimal system to the decimal one.00A10
hextoascii(param)Converts from hexadecimal to ASCII.3A29:)

Sticks strings together. More than two strings can stick together. 

In the example, it is used together with the substr function (see below), that is a part (substring) extracted from the parameter string is joined to the same parameter string. Two '00' characters are also appended.

The characters are specified in single quotes.


Extracts specified characters from the parameter value. The extracted characters make a substring.

There are 3 mandatory parameters for the function:

  1. source string,
  2. index from which the searched substring starts, 

  3. length of the searched substring, that is. how many characters should be extracted.

The indices are counted from left to right, starting from 0.

The extracted substring can be combined with another string using the concat function as in the example above.


Returns a number that specifies the number of characters in the string. You can perform mathematical operations on the result because it is a number.

For example, the expression substr(param,len(param)-4,4) uses the expression len(param)-4 as an index. It means that the substring will be counted from the fourth character from the end.


Mathematical operations

Mathematical operations of addition (+) and subtraction (-) are possible only with numeric values. With text values they are possible only after their conversion into numeric values (see the example for the len function above).

If one of the elements in an expression with a mathematical operation is not numeric, the result will show 0.

If you find a mistake in the text, please select it and press Ctrl+Enter.
Thank you for your feedback!
Report a mistake
Text with the mistake Comment
Maximum 500 characters