Start Stop - Mileage trip

Mexxwelll 7 years ago

Hello,

I would like to have the start and stop mileage to report in each trip. I have an Teltonika FMB001 device with OBDII support and this value's should be available.

Any idea of this is possible?

Anton Tananaev 7 years ago

If your device sends those values, they are probably decoded as general IO values

Mexxwelll 7 years ago

I have an IO16 value that contains my total mileage in Meters. I have added an computed attribute that calculates the M to KM, but it does not show up under Total Distance.

Any idea?

https://www.screencast.com/t/NVKtEzHWtpI

Anton Tananaev 7 years ago

Total distance is probably calculated after your computed attribute. Try using different attribute.

Mexxwelll 7 years ago

I will try to use the OBD Odometer attribute because thats the value. Can I edit the Trips report to add an OBD Odometer Start and Stop value? I cannot find any documentation on editing reports.

https://www.screencast.com/t/Fcagk8DjY3S

Anton Tananaev 7 years ago

Why you don't want to use regular odometer?

Mexxwelll 7 years ago

Not sure, was thinking that value is comming from the OBD. I have changed it to the regular Odometer now:
Attribute: Odometer
Expression: io16 ? io16 / 1000 : null
Type: Number

How can I report those values on a start and stop on the Trips report? Any documentation regarding this?

Anton Tananaev 7 years ago

It should use those values automatically.

Mexxwelll 7 years ago

I did some testing, but the odometer is not being updated with this parameters:

Attribute: Odometer
Expression: io16 ? io16 / 1000 : null
Type: Number

Do you have an idea why this is happening? Or is there somesort of logging of the applied computed attributes?

https://www.screencast.com/t/wqsDgW0Ed

Mexxwelll 7 years ago

Can it be that I did not assign an computed attribute to my car? I just created under Settings -> Computed Attribute the 'Odometer' parameter. How do I assign the attribute?

Source: Computed Attributes

Anton Tananaev 7 years ago

Of course you need to assign it. Select device, click on computed attributes in devices toolbar and then tick checkbox.

Mexxwelll 7 years ago

After assigning the Computed Attributes to the device I was able to calculate the Odometer status based on OBDII data. Only thing was I had to change "io16 ? io16 / 1000 : null" to "io16 ? io16 : null" because Traccar calculates the Meters to KM.

Everything is working great.

Thanks for your support.