Calculating Spent Fuel

Anton Tananaev 3 years ago

Do you have a "Fuel" column in the summary report? I only see "Spent Fuel".

GS 3 years ago

Perhaps I can help a little bit. Teltonika devices I use send fuel (litres x10) in "io390" attribute. Then I used Computed Attributes to make it visible in litres as "Fuel":

Attribute: Fuel
Expression: io390 ? io390 / 10 : null
Type: Number

I can now see Spent Fuel in Summary reports. The only thing is that if you buy some petrol during the trip, it will deduct it and sometimes shows Spent Fuel as negative value.

nofuse 3 years ago

I can see Spent Fuel but nothing is showing except 0.0l

The computed attribute for fuel I created at 100000 is reducing as the trip I made would’ve used about 0.4l and now showing 99999.6 but not showing in the summary

Anton Tananaev 3 years ago

That means that either the value hasn't changed or there is no value.

nofuse 3 years ago

I found another post regarding the subject and added the following to my config file and now it appears to be working;

<entry key='processing.copyAttributes.enable'>true</entry>
<entry key='processing.copyAttributes'>fuel</entry>
poleteada 9 days ago

I am using Teltonika FMC003; io390 is fuel in litres x 10. For example instead of 45L it shows 450.

Okay - i use formula for computed attribute: io390 ? io390 / 10 : null; i use attribute "fuel";

I also added

<entry key='processing.copyAttributes.enable'>true</entry>
<entry key='processing.copyAttributes'>fuel</entry> 

to my config file, but still, report "spent fuel" shows nothing.

Has anyone good solution how to get the "spent fuel" report working?

Anton Tananaev 9 days ago

You have to look at the individual position attributes to see what you have there.

poleteada 9 days ago

In Replay mode I can see individual points and the data, fuel in liters and also the "io390". My question is - what conditions have to be filled for the Reports - Summary - Spent Fuel to show spent fuel?

Anton Tananaev 9 days ago

Do you see any other fuel related attributes?

poleteada 9 days ago

No, the only fuel attribute is "io390". It shows full litres x 10. It is updating as the amount changes.

Anton Tananaev 8 days ago

Then I believe it should work. What version are you using?

poleteada 8 days ago

Okay I did some debugging and found out that it did show spent fuel, but since the vehicle refueled during this day, the overall consumption was not shown. If i put the reporting period from morning until the gas station, it showed spent fuel like 6L. But as soon as i put the report time period longer, it does not show any spent fuel.

I added Settings - Devices - Edit - Attributes - Fuel Increase Treshold - "5" . This should fix the issue?

My server is 6.11.1

Anton Tananaev 8 days ago

That does not affect anything.

poleteada 8 days ago

So the "spent fuel" in summary works only if there is no refueling during the report period?

Anton Tananaev 8 days ago

Refueling shouldn't matter either. You're missing something else.