Skip to main content

Locating Fuel Consumption Data via Geotab API Adapter

JRome-1938
Original Poster

I'm trying to locate fuel consumption data while using the Geotab API adapter. When I log into MyGeotab.com, I can find fuel-related information, but I am unable to find any fuel-related data or the corresponding tables via the API adapter.

I need this data to calculate MPG (Miles Per Gallon). I have already located the odometer data required for the calculation. I initially assumed the fuel data might be in the Diagnostics table, but it doesn't appear to be there.

Could someone please guide me on where to find this fuel data or suggest alternative tables that might contain this information?

Thank you for your assistance!

Join the conversation

You need to be logged in to reply to this post and participate in the Geotab Community discussions.

Top Answers

Hi @JRome-1938​,

 

The Diagnostics table is just a list of possible Diagnostics. The actual data for any of the diagnostics for individual vehicles can be found in the StatusData table.

 

You can see the fuel-related diagnostics by navigating to the KnownId page in the SDK and doing a simple search for the text "Fuel" on that page. You may be interested in certain diagnostics such as DiagnosticDeviceTotalFuelId, DiagnosticFuelLevelId or DiagnosticFuelTankCapacityId, for example.

 

To find records for the DiagnosticDeviceTotalIdleFuelId diagnostic, the following query (SQL Server version provided) could be used:

SELECT TOP (100) * FROM StatusData WHERE DiagnosticId = 'DiagnosticDeviceTotalIdleFuelId';

I hope this helps.

 

Steve

 

 

3 Replies

EishiFUN
Geotabber

Hey @JRome-1938​ ,

 

Thank you for asking your question in our community. The API Adapter does not pull data for all possible entity types. See the List of Tables section in the guide to see exactly which entity types the API Adapter processes: MyGeotab API Adapter — Solution and Implementation Guide [PUBLIC]

 

While we can't make the API Adapter do everything for everyone, it is provided as an open source solution with source code freely available. You can modify the API Adapter to suit your exact needs. One for our engineers shared this with me that may be helpful in this scenario: MyGeotab API Adapter — How to Add a Data Feed

 

Let us know if you have any other questions or concerns with this. We are here to help.

 

Have a great day!

Eishi FUN

JRome-1938
Original Poster

Hello Eishi,

 

Thank you for sharing the link. I've reviewed it prior to posting my question. As mentioned, I've already located the fuel data within Geotab, so I know it exists. My goal is to retrieve fuel consumption data using the Geotab Adapter API, which I'm currently utilizing. Specifically, I'm trying to calculate MPG (miles per gallon) for the vehicles.

 

Could you please guide me on pulling the fuel consumption data effectively?

Hi @JRome-1938​,

 

The Diagnostics table is just a list of possible Diagnostics. The actual data for any of the diagnostics for individual vehicles can be found in the StatusData table.

 

You can see the fuel-related diagnostics by navigating to the KnownId page in the SDK and doing a simple search for the text "Fuel" on that page. You may be interested in certain diagnostics such as DiagnosticDeviceTotalFuelId, DiagnosticFuelLevelId or DiagnosticFuelTankCapacityId, for example.

 

To find records for the DiagnosticDeviceTotalIdleFuelId diagnostic, the following query (SQL Server version provided) could be used:

SELECT TOP (100) * FROM StatusData WHERE DiagnosticId = 'DiagnosticDeviceTotalIdleFuelId';

I hope this helps.

 

Steve

 

 

Still have questions?