Questions about the use of custom attributes

Luc Peulen7 years ago

Dear Anton. Any reference as to how to hide such using user attributes? When I check Calculated attributes at the user level, it only shows me the calculated attributes I defined, but not attributes such as io1/io2/io3.

Anton Tananaev7 years ago

Hide position attributes

Luc Peulen7 years ago

Thank you, this works. Is there a list of how to refer to all attributes? "address,movement,contact" e.g. don't work.

Anton Tananaev7 years ago

There are some attributes that you can't remove (e.g. address).

Luc Peulen7 years ago

OK I understand, but is there a list? Now it's just guesswork which work and which don't.

Anton Tananaev7 years ago
Murthy Varanasi4 years ago

the common attributes ink is down can i knw the new link please

Anton Tananaev4 years ago

Find the Position class in the source code. It's still there, but the path has changed.

Ali Raza3 years ago

Dear Anton,

I have a number of questions about using attributes.

Question 1: my gps103 based GPS trackers report the io1, io2 and io3 attribute. These show as either 0 or 1. What I would like to have is, per device (group), have a custom attribute with a logical name, which reports the assigned io1, io2 or io3 value. E.g.: I have a device group called "RFS 201" for which "io2" indicates whether some button is pushed or not. So I would like to have an attribute for all devices in the RFS 201 group called "Button" which report the io2 value. When I create a calculated attribute, I cannot select "io2" as the attribute assigned, but have to choose from a drop down list e.g. Contact, but in the calculation I can refer to io2 and read its value. But as a result, the calculated attribute shows as Contact, i.e. with the name from the drop down list. What steps do I need to do to get a new attribute called "Button" which shows the value of io2 in the status list with parameters?

Question 2: the filter.distance attribute requires a minimum displacement for the value to be recorded. Is there also a filter that does not record any excess movements, e.g. more than 1 km should be ignored? I'm refering to this list: https://www.traccar.org/configuration-file/

Question 3: I need to calculate distance when another attribute has a specific value. So, for example linked to question 1, I need a parameter activeDistance which accumulates distance traveled only when Contact = io2 = true / 1. Is there any reference on how to proceed?

Any help is greatly appreciated.

Thanks, best,
Luc

Greetings,
Dear @Luc Peulen have you managed to create custom attributes you mentioned in your first statement (Question # 3) ?

if yes please share the expression you used to calculate "Active-Distance" (current trip) by accumulating "distance attribute" and checking if ignition status is ON and not changed to OFF. Then resets the value to ZERO when ignition is turned-off. Your help would be much appreciated. Thanks

rpsjr3 years ago