How to serverwide set custom variables from device?

SYSTADO 3 years ago

My english is not tha best and i have been looking through documentation and forum about that some hours :(
How can i set custom variables in the interface.

ie Teltonika device sends ioXYZ how can i assign that to an new variable like
"My Input" where can i find the mapper for that kinf of things ?

Also how can i change how outputs are shown ?
like "Operator = 26203" been shown as "Operator = Telekom" for example ?

Anton Tananaev 3 years ago

You can use computed attributes. You can't do it server wide, but you can assign them to groups of devices.

SYSTADO 3 years ago

Would that be sth i can book as support on https://www.traccar.org/product/professional-services/
Becuase i just wont be able how to understand it after reading through the documentation and the JEXL Syntax
I just cannot understand that JEXL Syntax.

i was going for

operator
if (26202) { return Vodafone }

but cannot get it to work

Anton Tananaev 3 years ago

Yes, definitely.

SYSTADO 3 years ago

ok thx ill write a mail tomorrow to them

SYSTADO 3 years ago

ALSO: How can i change variables in language for there is a significant error in the german translation
operator = Networkoperator = "Bediener" is wrong
it should be "Netzwerk" instead of "Bediener"

Bediener is a operator like the person who handels a crane

SYSTADO 3 years ago

Help?

Tracker 3 years ago

@SYSTADO

Try
Description: operator
Attribute: operator
Expression: operator?operator=="26202"?"Vodafone":null
Type: String

Then link it to device or group

SYSTADO 3 years ago

Worked with

if (operator == 26202) { return "Vodafone"; } else
if (operator== 26201) { return "Telekom"; } else
if (operator == 26203) { return "Telefónica"; } return operator

Probably not the cleanest solution but ok for me