Read all attributes

memesaregood2 months ago

Is there a way to read all attributes of a device, having only deviceId?

I figured out I can create a Device object using Device device = cacheManager.getObject(Device.class, deviceId);, but I can't find any way to gain access to attributes.

What I'm trying to do is to add fuel sensor values calculation functionality to Traccar, and I need access to attributes to do this. I figured out the best place to do this is probably the message decoders. Is this correct, or is there any other Position post-processing past the decoders?

Anton Tananaev2 months ago

There is a lot of post processing. If you have access to a device object, you can call getAttributes or one of the helpers like getString.