traccar-web icon indicating copy to clipboard operation
traccar-web copied to clipboard

Driver id

Open integreated opened this issue 8 years ago • 10 comments

Happy new year to all. I have got driver id working on a Teltonika fm1100 but it only sends details in the first data packet so when you get the second location or event the driver details are gone.I would like to be able to put the details into a report but don't know if this is possible or how I would do it. Just wondering if anybody has done this.

integreated avatar Dec 28 '16 13:12 integreated

If you are using some latest version of backend, say 3.9 then it should be possible to copy attributes from last received positions if you define following settings in configuration file:

  • processing.copyAttributes.enable - Enable copying of missing attributes from last position to the current one. Might be useful if device doesn’t send some values in every message. I think it should be set to true

  • processing.copyAttributes - List of attributes to copy if missing. Attribute names should be separated by a single space. For example power ignition battery.

Hope this helps. Happy new year ;)

vitalidze avatar Dec 28 '16 15:12 vitalidze

Hi Vitalidze It looks like this will do what I want to do but I am no software expert so just wondered if you could tell me where to find the file to change.I install the hardware for a living but have very little knowledge about software. Thanks Mark

integreated avatar Dec 28 '16 16:12 integreated

You need to change traccar.xml file, add there in the middle something like:

<entry key="processing.copyAttributes.enable">true</entry>
<entry key="processing.copyAttributes">your_attribute_name</entry>

vitalidze avatar Dec 28 '16 16:12 vitalidze

No luck yet but I will have a play and let you know the results. Thanks

integreated avatar Dec 28 '16 16:12 integreated

Hi Vitalidze I have tried the extra command you sent me in every position in traccar.xml but with no joy. I have renamed the attribute also but still the same result,as soon as the second packet arrives the driver id is gone. Regards Mark

integreated avatar Dec 28 '16 19:12 integreated

Maybe driver id attribute is incorrect in your case. Are you sure you have set it up correctly? You need to replace your_attribute_name with the name of your driver id attribute.

vitalidze avatar Dec 28 '16 20:12 vitalidze

Morning Vitalidze I have been playing around with this and have made a couple of discoveries. The problem is not the lack of the data in the packet which would explain why the added script won't work. It appears to revert to the lowest number in the list of keys which is 000000 which indicates no fob attached but if I hold the driver fob on the dallas pad it shows the correct driver on the next packet send and again if I remove the key it will send no fob attached. Basically it look's like it forgets it read a key after the first data send and reverts to no fob so I need to know if there is anyway to tell the server to ignore the dallas after the first packet until the ignition is turned off and on again. Not as simple as I thought it would be. Regards Mark

integreated avatar Dec 29 '16 10:12 integreated

Thanks for the info. Hope you will make it ;)

vitalidze avatar Dec 30 '16 06:12 vitalidze

Hi guys, I have the same problem

add this line traccar.xml <entry key='processing.copyAttributes.enable'>true</entry> <entry key='processing.copyAttributes'>power,ignition,battery</entry>

but Still disappears, What else could it be? thanks for your time

thericardovega avatar Apr 28 '17 17:04 thericardovega

@thericardovega maybe you are using old version? Have you restarted server after making changes? Also list of attributes does not contain alarm.

vitalidze avatar Apr 29 '17 04:04 vitalidze