Project

General

Profile

roos-fs tasks #365

Updated by Vadim Pariev 8 months ago

**General** 
 Enable users in ROOS to click a button and instantly see the remaining kilometers until next oil change for a selected vehicle, based on its VIN number. 
 We need to integrate the Geotab MyGeotab API into ROOS to fetch the current odometer value of a vehicle (using VIN → Device lookup) and calculate the kilometers remaining until the next oil change. 

 **What data to be fetched and displayed** NOT YET CLEAR 
 We need to fetch these data for <u>The oil change interval (every 15,000 km) this value is hardcoded on the vechicled based on its VIN  
 <img style="width: 1166px;" src="clipboard-202509091623-ax4so.png"><br> device. Once the calculation is done, the value should be displayed in the vehicle details view.</u> 

 **Flow** 

 - User selects a vehicle (with VIN stated inside) 
 - go to a seperate tab with the name "GeoTab data". 
 - User clicks “Check Oil Change” button. 

 **System performs:** 

 - Authenticate with Geotab (if session expired). 
 - Get Device by VIN. 
 - Get Odometer Diagnostic Id (or cached globally). 
 - Get latest StatusData for Odometer. 

 **Business logic:** 

 - Retrieve last service odometer from Geotab MaintenanceReminder if available. 
 - Calculate next_service_due = last_service_km + interval_km. (if not provided inside the evice already) 
 - Calculate km_remaining = next_service_due – current_odometer. (if not provided inside the evice already) 

 Display result to user in the vichicle overview window in a seperate tab. 
 <img style="width: 1774px;" src="clipboard-202509052246-fqgdl.png"><br> 

 API DOCUMENTATION 
 https://developers.geotab.com 

 TEST 
 VIN VSSZZZ5FZKR052148 

 Authentication 

 user    michal.slavik@roos-fs.com 
 database    roos_intern 
 password           Sarka772360MH

Back