processing.copyAttributes not working

Abou5 years ago

I have enabled copyAttributes for ignition,battery,power . But i see nothing in new position
Below is the sample data :

{"distance":0.0,"totalDistance":0.0,"motion":false}

I am using Traccar 4.6 Version.

In traccar.xml file.

<entry key='processing.copyAttributes.enable'>true</entry>
<entry key='processing.copyAttributes'>power,ignition,battery</entry>
Anton Tananaev5 years ago

It probably means there's nothing to copy.

Abou5 years ago

how can i check thers's nothing to copy.
In addition when I send an sms check to my device, it sends me some informations like power, battery..

Anton Tananaev5 years ago

You can check the history.

Abou5 years ago

part of server log

2020-04-27 15:31:35  INFO: [da7e2739: gps103 < 41.188.67.32] HEX: 696d65693a3335393731303034373337353933372c747261636b65722c3230303432373233333133352c2c462c3135333133332e3030302c412c313830352e383234382c4e2c30313535372e373930372c572c302e30302c303b
2020-04-27 15:31:36  INFO: [da7e2739] id: 359710047375937, time: 2020-04-27 15:31:33, lat: 18.09708, lon: -15.96318, course: 0.0
2020-04-27 15:31:43  INFO: [da7e2739: gps103 < 41.188.67.32] HEX: 3335393731303034373337353933373b
2020-04-27 15:31:43  INFO: [da7e2739: gps103 > 41.188.67.32] HEX: 4f4e
2020-04-27 15:32:05  INFO: [da7e2739: gps103 < 41.188.67.32] HEX: 696d65693a3335393731303034373337353933372c747261636b65722c3230303432373233333230352c2c462c3135333230332e3030302c412c313830352e383234382c4e2c30313535372e373930372c572c302e30302c303b
2020-04-27 15:32:05  INFO: [da7e2739] id: 359710047375937, time: 2020-04-27 15:32:03, lat: 18.09708, lon: -15.96318, course: 0.0

and i use gps103 protocol. any help

Anton Tananaev5 years ago

The topic is about copyAttributes, right? Can you please provide some evidence that it's not working.

Abou5 years ago

in attributes colomun of positions table i got only this:

{"distance":0.0,"totalDistance":21.61,"motion":false}

I have not seen the other parameters that I have configured such as power, battery...

Anton Tananaev5 years ago

So, where do you expect them to be copied from?

Abou5 years ago

when a new position is inserted, i want to get them automatically. so how can i do it.

my device us the protocol gps103

Anton Tananaev5 years ago

I guess you should have started with this question instead of making claims that something is working incorrectly.

There are two possibilities:

  1. Your device doesn't report this data. In this case you should contact your device vendor.
  2. Traccar does not support this data for your protocol. In this case you have to modify the code to add support for the data.
Abou5 years ago

so how can i do the second point?

Anton Tananaev5 years ago

Source code is available on GitHub. You need to know Java.

Abou5 years ago

Anton, So how can i check traccar, it doesn't support data for gps103 protocol such as power, battery.

i'm using traccar 4.6 and i use 104Pro device using gps103 protocol.

you could explain how (processing.copyAttributes) works. Tried to use it to copy ignition event from tk103 device, but to no avail.
it sends complete and then without the information.
here with ignition.

{"distance":0.0,"ignition":true,"motion":false,"totalDistance":0.0,"motion":false}

then

{"distance":0.0,"totalDistance":0.0,"motion":false}

or tell me where is the line of code that sends the information to the database when the information arrives from the tk103b device. to change the setting.

if you can help, I thank you.