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.
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.
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
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,