InControl API reversing and Python lib - Jaguar I-Pace EV400 Forum
 10Likes
Reply
 
LinkBack Thread Tools
post #1 of 11 (permalink) Old 01-08-2019, 04:18 AM Thread Starter
Junior Member
 
Join Date: Jan 2019
Posts: 19
InControl API reversing and Python lib

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!
ardevd is online now  
post #2 of 11 (permalink) Old 01-08-2019, 11:38 AM
Senior Member
 
Join Date: Nov 2018
Location: Central Florida
Posts: 302
Quote:
Originally Posted by ardevd View Post
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

2019 I-Pace EV400 SE
Firenze Red - Ebony/Ebony
Driver Assist Pack
Black Exterior Pack
20" 5 Spoke Style 5068 Gloss Black Wheels
plus a few extras
Sbingham60 is online now  
post #3 of 11 (permalink) Old 01-14-2019, 03:27 AM
Junior Member
 
Join Date: Jan 2019
Posts: 2
Quote:
Originally Posted by ardevd View Post
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
rogiervs is offline  
Sponsored Links
Advertisement
 
post #4 of 11 (permalink) Old 01-14-2019, 11:56 AM
Senior Member
 
Join Date: Nov 2018
Location: Scottsdale, AZ
Posts: 356
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.
WattAJag is offline  
post #5 of 11 (permalink) Old 01-14-2019, 12:46 PM
Junior Member
 
Join Date: Jan 2019
Posts: 2
Quote:
Originally Posted by WattAJag View Post
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.
rogiervs is offline  
post #6 of 11 (permalink) Old 01-14-2019, 02:27 PM
Senior Member
 
McRat's Avatar
 
Join Date: May 2018
Location: Norco, California, USA
Posts: 1,326
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.

Jaguar i-Pace FE Photon Red 20" wheels, "Leaper"
Two Chevrolet Volts in service
24.2 kW x 480v 3ph solar array self-installed.
McRat is online now  
post #7 of 11 (permalink) Old 01-14-2019, 03:35 PM
Senior Member
 
Join Date: Dec 2018
Location: Norway
Posts: 139
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 ?
phila is offline  
post #8 of 11 (permalink) Old 03-22-2019, 12:01 PM
Junior Member
 
Join Date: Mar 2019
Posts: 1
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.
Attached Thumbnails
Click image for larger version

Name:	IMG_F412CBBFEEB4-1.jpg
Views:	108
Size:	46.5 KB
ID:	1531  
wonkidonk is offline  
post #9 of 11 (permalink) Old 03-22-2019, 06:51 PM
Senior Member
 
bruintoo's Avatar
 
Join Date: Jun 2018
Location: California, USA
Posts: 416
Whatever happened to Alexa and the InControl app?
bruintoo is online now  
post #10 of 11 (permalink) Old 09-19-2019, 04:59 AM
Junior Member
 
Join Date: Sep 2019
Posts: 1
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!
raiu is offline  
Reply

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page



Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome