Jaguar I-Pace EV400 Forum banner

InControl API reversing and Python lib

8814 Views 10 Replies 10 Participants Last post by  funny0frank
Hi there!

I'm still eagerly awaiting my I-Pace delivery (scheduled for May 19) and in the meantime I started reversing the API used by the InControl Mobile app for controlling the I-Pace. I'm hoping to document pretty much the entire thing and implement it in a Python library. Since I don't have a vehicle myself I rely on static analysis for pretty much everything but at the end of the day I rely on willing testers to verify that my analysis is correct.

I've gone through a large portion of the API already. It's a pretty fun API to work with mostly because it's full of weird quirks and it is entirely undocumented. I've also found API stuff that is not exposed directly to the user which I'm hoping I can implement as well, such as setting a max SOC.

At any rate, if anyone is interested in helping out or just find a Python lib for controlling your I-Pace useful, please check out the GitHub repo, the API documentation, and the Gitter channel :)

I've found the mobile app to be a complete mess and very unreliable but the API seems to be pretty stable. So things like vehicle preconditioning, locking/unlocking, etc seems to work well. There's also a TON of vehicle information provided by the API which I look forward to studying in detail once I get my own vehicle :)

Cheers!
  • Like
Reactions: 5
1 - 11 of 11 Posts
Hi there!

I'm still eagerly awaiting my I-Pace delivery (scheduled for May 19) and in the meantime I started reversing the API used by the InControl Mobile app for controlling the I-Pace. I'm hoping to document pretty much the entire thing and implement it in a Python library. Since I don't have a vehicle myself I rely on static analysis for pretty much everything but at the end of the day I rely on willing testers to verify that my analysis is correct.

I've gone through a large portion of the API already. It's a pretty fun API to work with mostly because it's full of weird quirks and it is entirely undocumented. I've also found API stuff that is not exposed directly to the user which I'm hoping I can implement as well, such as setting a max SOC.

At any rate, if anyone is interested in helping out or just find a Python lib for controlling your I-Pace useful, please check out the GitHub repo, the API documentation, and the Gitter channel :)

I've found the mobile app to be a complete mess and very unreliable but the API seems to be pretty stable. So things like vehicle preconditioning, locking/unlocking, etc seems to work well. There's also a TON of vehicle information provided by the API which I look forward to studying in detail once I get my own vehicle :)

Cheers!
Saw your posts on the UK forum. Very interested in following your progress. Going to take a look at what you have documented so far. Thank you for doing the reverse engineering of the API :smile2:
Hi there!

I'm still eagerly awaiting my I-Pace delivery (scheduled for May 19) and in the meantime I started reversing the API used by the InControl Mobile app for controlling the I-Pace. I'm hoping to document pretty much the entire thing and implement it in a Python library. Since I don't have a vehicle myself I rely on static analysis for pretty much everything but at the end of the day I rely on willing testers to verify that my analysis is correct.

I've gone through a large portion of the API already. It's a pretty fun API to work with mostly because it's full of weird quirks and it is entirely undocumented. I've also found API stuff that is not exposed directly to the user which I'm hoping I can implement as well, such as setting a max SOC.

At any rate, if anyone is interested in helping out or just find a Python lib for controlling your I-Pace useful, please check out the GitHub repo, the API documentation, and the Gitter channel :)

I've found the mobile app to be a complete mess and very unreliable but the API seems to be pretty stable. So things like vehicle preconditioning, locking/unlocking, etc seems to work well. There's also a TON of vehicle information provided by the API which I look forward to studying in detail once I get my own vehicle :)

Cheers!
I've been playing around with your library, thanks a lot for your efforts! Do you have access to any additional API documentation? I'm especially interested in what the values "EV_RANGE_VSC_REVISED_HV_BATT_ENERGY" and "EV_RANGE_VSC_INITIAL_HV_BATT_ENERGY" are. I've recorded the changes in values between the start and end of a short trip this morning and if I'm reading it correctly, there seems to be an inconsistency between the "State of charge" value, and the actual battery value. The "Range on battery" value seems to be consistent with the battery value. My "State of charge" value went from 100 to 96, just 4% down, but the battery value went from 83.85 to ~76, that's about 10%. Is there something I'm missing, or is JLR giving us an incorrect state of charge?

This was a 16.7 km (10.4 miles) trip with a total consumption (according to the app) of 4.65 kWh. If I deduct 76.2 from 83.85, however, I would say I used 7.65 kWh for that trip? Also, the battery should effectively have 84.7, but it looks like that's 83.85?

Start:
EV_STATE_OF_CHARGE 100
EV_RANGE_VSC_REVISED_HV_BATT_ENERGY 83.85
EV_RANGE_VSC_INITIAL_HV_BATT_ENERGY 83.85
EV_RANGE_ON_BATTERY_KM 301

Arrival:
EV_STATE_OF_CHARGE 96 = 96% of start value
EV_RANGE_VSC_REVISED_HV_BATT_ENERGY 76.2 = 91% of start value
EV_RANGE_VSC_INITIAL_HV_BATT_ENERGY 75.75 = 90% of start value
EV_RANGE_ON_BATTERY_KM 270 = 89.7% of start value
See less See more
Remember that displayed 0% is NOT 0 KWh. They never want you to get there. So, you'll have to shift your scaling to bottom out at 3 or 4 KWh left on the battery.
Remember that displayed 0% is NOT 0 KWh. They never want you to get there. So, you'll have to shift your scaling to bottom out at 3 or 4 KWh left on the battery.
I figured something like that, it's just interesting that the predicted range corresponds with remaining battery, but battery percentage doesn't. Also, the kWh used for a trip doesn't match the start number deducted by the arrival number. Maybe there's an algorithm behind the battery numbers, but I'd like to know what the actual kWh left value is.
When you read the battery SoC with a dealer tool, it will say 2% when the dashboard says 0%. Whether that comes into play or not I don't know.
Really cool stuff. Im actually only interested in one thing: Live Charging Speed
I havent found it in any of your documentation or any other place here. Any ideas ?
Great work on the reverse engineering of the API. I've used the Postman docs to create a Homebridge plugin. You can use the plug in to control your I-PACE from your Apple devices (including Siri).


The plug in currently supports:

- Charging status
- Vehicle lock status
- Lock/unlock


Ask Siri things like:


- "Is the I-PACE charging?"
- "Is the I-PACE locked?"
- "Unlock the I-PACE"



I'm happy to accept feature requests/pull requests.

Attachments

See less See more
Whatever happened to Alexa and the InControl app?
Thank you very much for the effort! I've always wondered when someone will do that as Jaguar Remote isn't world best app :) and offpeak automation is the best!
Thank you!!!

I was going mad not being able to set max SOC! This solves everything :)
1 - 11 of 11 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top