traccar-web
traccar-web copied to clipboard
Driver id
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.
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 totrue
-
processing.copyAttributes
- List of attributes to copy if missing. Attribute names should be separated by a single space. For examplepower ignition battery
.
Hope this helps. Happy new year ;)
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
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>
No luck yet but I will have a play and let you know the results. Thanks
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
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.
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
Thanks for the info. Hope you will make it ;)
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 maybe you are using old version? Have you restarted server after making changes? Also list of attributes does not contain alarm
.