Making traccar handle dynamically custom attributes

NouAKA UNITY2 years ago

Hi,
Is there a dynamic way to add custom attributes to the generic -Attribute- list managed by traccar.
in a way that allows generating reports and calculated attributes from them.
PS:
By dynamic, I mean through API requests. without the need to modify the code and redeploy the web-app.
Best regards

Anton Tananaev2 years ago

No, but in most places we support custom attributes.

NouAKA UNITY2 years ago

In this interface http://MyTraccarServer:8082/position/id I can find all sent custom attributes .
Besides that, I can't find them anywhere.
What do you mean by most places?

Anton Tananaev2 years ago

For examples, you can enter custom attributes in the computed attributes or enable them in the popup.

NouAKA UNITY2 years ago

Are custom attributes, those send by devices (or apps) with no "key" matching with any traccar's handled attribute?
In other word,do traccar consider any received -lambda named- attribute as custom attribute? or do i need to prepare some config file for that.

Anton Tananaev2 years ago

You don't need to add anything to the configuration file for attributes to be available.

NouAKA UNITY2 years ago

Sorry for bothering you, but i asked that because i couldn't find my "custom attribute" neither in this list :
Computed Attributes list
nor in this other one:
Popup Attributes list
!!!

NouAKA UNITY2 years ago

It seems the Markdown didn't works.
Computed Attributes list :(https://ibb.co/tKzm3qB)
Popup Attributes list :(https://ibb.co/wwHSghB)

Anton Tananaev2 years ago

The markdown works just fine if you point it to the actual image, not a web page containing the image.

As for the attribute, you have to type it in.

NouAKA UNITY2 years ago

Yes, you are right on both topics:

  • The markdown works, it was just mater of uploading time.
  • I can force adding the custom attribute by simply typing it.

My last question (in this topic):
Can I use calculated attributes in report generation?
If yes, does this stipulates being able to use custom attributes indirectly in the report generation?
thank you for your patience.

Anton Tananaev2 years ago

Yes, you can.

Anton Tananaev2 years ago

I mean the attributes are calculated at the time you receive the data, but they will be included in the report.

NouAKA UNITY2 years ago

Thanks

KEGeos Fleet a year ago

Hi NouAKA UNITY, did you find out on how to process custom attributes, I have the same challenge using the osmand protocol

http://xxx.xxx.xxxx:5055/?id=xxxxxx×tamp=1624909176&lat=-1.25469&lon=36.599&bearing=7.19&speed=40&ignition=true&customatt1=1.66&customatt2=true&customatt3=2.36&customatt4=0.78&fuel1=80.1

The data if being populated in the database but I want to access it and use and render it in the popup of the vehicle.

Anton Tananaeva year ago

You should be able to show custom attributes in the popup, at least in the latest version of Traccar.