Calculating Spent Fuel

nofuse2 years ago

I am using a teltonika FMC130 with LV-CAN200 and am trying to get Spent Fuel in reports to show a value.

The ids I have available for fuel are;
83 Fuel Consumed Value in liters
89 Fuel level - Value in percentages

priority=0  sat=16  event=0  ignition=true  motion=true  rssi=3  gpsStatus=1  io81=18  io89=83  pdop=0.7000000000000001  hdop=0.4  power=14.602  battery=3.887  io68=0  io85=1056  coolantTemp=79.0  operator=23410  odometer=48126400  io83=4  io87=48126400  distance=4.6  totalDistance=1.368630351E7  hours=448424990  fuel=999999.6 

How would I create (if needed) an attribute so the value in shown in the reports for fuel used (is that the same as Spent Fuel?)

Also the final value "fuel=999999.6" is what actually because it it counting down as I use fuel, but I don't know why it shows 999999?

Anton Tananaev2 years ago

How did you calculate it currently?

nofuse2 years ago

I don't, I trying to understand how to do it. I'm getting values coming through from the tracker but can't figure out how to get them to show as spent fuel in reports.

I'm confused between Spent Fuel and Fuel Used?

Anton Tananaev2 years ago

Is the 999999 value coming from the device?

nofuse2 years ago

Yes

Anton Tananaev2 years ago

Then you're not using an official Traccar version. We don't decode fuel level value for Teltonika.

nofuse2 years ago

I am. It was my first version that I downloaded from this website.

I tried to set up Computed attribute maybe that's what the value is?

Attribute: Fuel
Expression: io83? 1000000-(io83*0.1):null
Type: Number

Anton Tananaev2 years ago

But you said it's coming from the device? Can you please elaborate a bit on how you came to that conclusion. I'm sure it wasn't just a random guess.

nofuse2 years ago

I only set my CAN reader up yesterday, before that I did not get readings for io83 or Fuel. I added the computed attribute last week and no values were being shown because I had nothing that could read the fuel values from the car.

Anton Tananaev2 years ago

Well, that's exactly what you programmed your computed attribute to do.

nofuse2 years ago

So how do I get this to show in reports as Spent Fuel?

Anton Tananaev2 years ago

Which report?

nofuse2 years ago

Summary

Anton Tananaev2 years ago

It should show as is. Obviously it requires the data to present in every position.

nofuse2 years ago

Should it show as Spent Fuel or Fuel?