Skip to main content

Determining unit's current odometer with API Adapter data in Optimizer database

SDavi-1096
Original Poster

I've setup the API Adapter and I'm trying to retrieve as much data from it as I can that I used to pull through the C# SDK. One thing I absolutely need to get is odometer data. I'm not seeing that I'm getting StatusData for all of our units for the odometer.

 

I can see units that are showing odometer values updating when I look at our asset list in the website, and if I use the SDK to pull the 'DiagnosticOdometerAdjustmentId' diagnostic (where FromDate and EndDate are set to UtcNow), I get the updated value. But I'm apparently not getting the corresponding data flowing into the Optimizer database. From what it looks like, the only odometer data I'm getting in the Optimizer database is the 'DiagnosticOdometerId' data, not the adjustment data. This isn't happening for all units though.

 

So, does this mean that there's something wrong that's not allowing the Geotab device to read the actual odometer reading from the ECM and is therefore having to generate a guessed amount? If so, is there any way to get adjustment odometer data through the API adapter?

 

I'd like to be able to rely on the API adapter data as much as possible, but in order to do that, I need to be able to get odometer readings for all of our units.

 

Thanks,

Sean

Join the conversation

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

2 Replies

SDavi-1096
Original Poster

As a follow up, I updated the appsettings.json file for the adapter application to only retrieve the specific status data I'm looking for. Among the specific diagnostics, I added DiagnosticOdometerId, DiagnosticRawOdometerId, and DiagnosticOdometerAdjustmentId.

 

Unfortunately the application isn't downloading any DiagnosticOdometerAdjustmentId data, which is what I believe I need in order to record an odometer reading for any vehicles in which we're not getting the actual odometer reading. I added this according to the official documentation for the adapter setup as shown on page 53 where the DiagnosticOdometerAdjustmentId diagnostic was specifically mentioned when showing how to setup the application to pull specific status data.

 

I am now getting only the status data that I specified in the settings with the exception of DiagnosticOdometerAdjustmentId. What do I need to do in order to get this data as it's a must-have in order for me to not have to retrieve it through the SDK.

 

Thanks

Sean

@SDavi-1096​ 

For all intents and purposes the statement you made in your first post is correct, if you do not see Odometer for a unit in the feed returned by the Api Adapter it means that the GO device is unable to read actual odometer from the vehicle. This does not mean that there is something inherently wrong with the GO device or the installation, there are vehicles from which the GO device cannot obtain Odometer. If you would want to troubleshoot this the best is to group the units by Make Model and Year and if you have a majority of units a particular grouping reporting odometer but a few not then there is at least reason to investigate further. At that point I would recommend going through the support process with these examples so that our team can review and see if anything can be done.

 

In terms of what to do to get an Odometer value (not guessed but it is based on GPS distance and not the vehicle in any way) you would need to make individual Get<StatusData> calls for each unit that isn't reporting odometer looking for specifically the DiagnosticOdometerAdjustmentId and for the date of right now.

Here is a javascript example where this is done: Get Odometer and VIN Example

 

Here is an article that talks a little bit about Odometer: https://community.geotab.com/s/knowledge-article-ra?solutionid=221222150009927 in case you would like to read more.

 

Still have questions?