$ sign in attribute value. How to get $ as lowercase

Joystick4 years ago

Hi Anton,

One of my devices send info as per below:
Driver2 $ (Engine off and no data received)
Driver2 $ P (Engine on and park brake applied)
Driver2 $ @ (Engine on and park brake off)
Driver2 $ รก (Engine on and forward gear selected)
Driver2 $ ` (Engine on and reverse selected)

The dollar sign is always present and there is a space between the dollar sign and the second value. I cannot get the correct expression to make a attribute work based on the value due to the space between the values. Only attribute I can get to work is:

E.G.
Attribute Engine off
Expression driver2=="$"? "Engine off":null
Type String

I've tried expression like driver2=="$P" but it does not work. Please help

Anton Tananaev4 years ago

Seems like some binary data. What's protocol? What's the attribute?

Joystick4 years ago

Hi Anton,

It is Teltonika protocol and the attribute is Driver2.

Driver2 is data received from a can sniffer connected to Teltonika GPS

Anton Tananaev4 years ago

I guess something is not decoded correctly. You should not see binary data in a text attribute.

Joystick4 years ago

Hi Anton,
It is most likely the problem. Below is the HEX message from log file if you wanted to have a look at it.

2020-02-28 07:44:28  INFO: [a2d44e3d: teltonika < 1.129.110.66] HEX: 000000000000009a8e0100000170889b9ac0005b3e3b5befa51d6c000600dc0e000000000018000900ef0000f00000150400450100010000020000510000520000720000060042658c0043000000440000000600570055000000730230000700c7000000000010aac01df901c1000029a3006400002e2f00690000008c006b00000003007b0000000000020065c5ca58d862a46462008424800000001000090000010000f5c3
2020-02-28 07:44:28  INFO: [a2d44e3d: teltonika > 1.129.110.66] HEX: 00000001