Traccar does not accept the setting of the battery attribute and the error in the logs and when testing the attribute

engpro6 years ago

I'm trying to use this attribute in tracing but it's not accepting

battery < 4.18 && speed < 1 ? false : true
<entry key='processing.copyAttributes'>power,ignition,battery</entry> 
    <entry key='processing.copyAttributes.enable'>true</entry>

I get error back

WARN: Attribute computation error - org.traccar.processing.ComputedAttributesHandler.computeAttribute@1:12 parsing error near '...  < 4,18 && ...' - Parsing (... < ComputedAttributesHandler:91 < *:102 < BaseDataHandler:27 < ... < *:29 < ... < *:29 < ... < *:29 < ...)

org.traccar.processing.ComputedAttributesHandler.computeAttribute@1:10 parsing error near '... ry < 4. ...' - Parsing (... < ComputedAttributesHandler:91 < AttributeResource:54 < ...)

thanks in advance for any help thanks

Anton Tananaev6 years ago

Screenshot of the attribute configuration please.

engpro6 years ago
Anton Tananaev6 years ago

You should upgrade to the latest version of Traccar.

engpro6 years ago

I am using version 4.2, do you advise to upgrade to 4.3 anyway?

I have the same issue I want to get a Fuel level report from the Teleonika FMB120 device , the device sends the value as (Adc1) attribute it is now showing in the Fuel report , I thought i have to make a Computed Attribute but I could not be able to get it as Computed Attribute and I get the same above error (parsing...)

Below is the screenshot

https://drive.google.com/file/d/18bQLCnOHWgCoR5Skx4qy7P_62qVP2aJ0/view?usp=sharing
https://drive.google.com/file/d/1eLfOnjAWehjNTNrw3aonPPO1gTCZXnig/view?usp=sharing
https://drive.google.com/file/d/1rPfJcNlMcj55DlWxoDrUjHaV2DV1hL5Z/view?usp=sharing

Anton Tananaev3 years ago

Fuel and Number are part of the expression.