Historical custom device attributes

jvds2 years ago

Hi,

Just to be sure, is it right that Traccar does not natively support historical data (logging older values) for custom device attributes (not computed attributes but the ones in the attributes field)? I am currently of the understanding that this is not possible but if someone somehow knows a method to do this easily then I'd like to know.

Kind regards

Anton Tananaev2 years ago

Traccar does support logging historical data and it supports any custom attributes. Not sure I understand your question about the method. Your device needs to upload that data and that's it. There's nothing special you need to do.

jvds2 years ago

I somehow missed the 'attributes' column when looking at older entries. I was already pushing data to the device but did not know that older attribute values were also saved.
Thanks!

jvds2 years ago

I have another small question: What is the use-case for the attribute fields when editing a device via the GUI (stored in the attributes column of the tc_devices table in the db)?
I first thought that the attributes in these fields would also be sent to the position update attribute list, but this seems to not be the case. When I send an OsmAnd request with custom attributes, it only sends those attributes to the attribute list of the position update (tc_positions table in the db), so when are the attributes inside the tc_devices table actually used? Is this only used to compute computed attributes? Is it normal that new custom attributes sent through an OsmAnd request are also not added to the tc_devices attributes column?

Anton Tananaev2 years ago

Those are usually used for device configuration.

jvds2 years ago

Oh ok, so these two attribute lists (inside tc_positions and tc_devices) need to be essentially seen as separate types / not really connected with eachother?

Anton Tananaev2 years ago

Correct.

jvds2 years ago

Thanks! It is clear now.