ardevd / jlrpy

Python library for interacting with the JLR Remote Car API
MIT License
85 stars 28 forks source link

Info about installed Software version #96

Closed ismarslomic closed 2 years ago

ismarslomic commented 2 years ago

Thanks for very nice lib for retrieving data from my I-Pace!

Just wondering if there are any data available about currently installed software version(s)?

ardevd commented 2 years ago

Hey!

The API does expose a few software version numbers, primarily related to the TCU. Look at the TU_STATUS_SW_VERSION_MAIN status value for example. It correlates to a TCU software version. I've created a mapping between known values and the readable equivalents (14.2, 16.2, etc) and implemented them in WattCat. However, from my experience it doesnt seem like all cars actually provide updated version info through the API. My car still returns the equivalent of 14.2 even though I'm on 18.2.

ismarslomic commented 2 years ago

Right, I have seen the version data for TU_STATUS_SW_VERSION_MAIN (which is the only software version field), which for my car is L8B2-70712-AX. How does this map to the readable equivalents you are referring to (what is the mapping logic)?

ardevd commented 2 years ago

I havent seen that value before I'm afraid. Its also region specific so I only have the most common ones nailed down tbh.

 @Nullable
     public static String getAlternateTcuVersion(String tcuVersion) {
         switch (tcuVersion) {
             case "J8A2-70712-AS":
                 return "14.2";
             case "J8A2-70712-AT":
             case "J9C3-70712-AT":
                 return "15.2";
             case "J8A2-70712-AV":
             case "J9C3-70712-AV":
                 return "16.2";
             case "J8A2-70712-AX":
                 return "17.2";
             case "J8A2-70712-AY":
             case "J9C3-70712-AY":
                 return "18.2";
             case "J8A2-70712-AZ":
                 return "19.2";
             default:
                 return null;
         }
}
ismarslomic commented 2 years ago

Anywhere I can find these translations documented?

ardevd commented 2 years ago

What do you mean exactly?

ismarslomic commented 2 years ago

How did you find out that for instance J8A2-70712-AS maps to 14.2? Where these mapping rules documented somewhere?

ardevd commented 2 years ago

The mapping rules are the result of surveys I did on various owner forums, so it's not based on any official documentation (there is no such thing) but rather community reported data.

ardevd commented 2 years ago

I'll close this for now. Feel free to open a new one if you have more questions.

Cheers