ardevd / jlrpy

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

China mainland InControl server support #94

Closed syhan closed 2 years ago

syhan commented 3 years ago

If I was a customer from China mainland, seems I would use a separate jaguar InControl server (like https://incontrol.jaguar.com.cn/ and the server shall be host in China mainland per Chinese regulation).

From the InControl web UI, I could observe that the request for example to poll vehicle status like the following

https://incontrol.jaguar.com.cn/jaguar-portal-owner-web/ajax/pollvehiclestatus

And it would return the following json response

{
    "currentVehicleStolen": false,
    "vehicles": [{
        "continueSetupLink": "vehicle/add/3/VINVINVINVINVIN/continue",
        "nickname": "My Car Name",
        "fullVin": "VINVINVINVINVIN",
        "registrationNumber": "XXXXXXX",
        "vehicleBrand": "Jaguar",
        "vehicleType": "XE",
        "stolenVehicleTrackingCentrePhone": "+441926926049",
        "stolen": false,
        "state": "CUSTOMER_REGISTERED",
        "vehicleBrandType": "Jaguar XE"
    }]
}

Is there any chance that it could support the China mainland server, I suppose the interface shall be the same but only differs from the URL end, while I cannot find the real server URL

Thanks

evolify commented 3 years ago

Any solution?

ardevd commented 3 years ago

Hey, apologies for the late response.

I've already added support for the Chinese region in WattCat so adding it to jlrpy won't be difficult. I'll take a look at it in the next few days and add a fix.

evolify commented 3 years ago

Any update?

ardevd commented 3 years ago

@syhan @evolify Could you give https://github.com/ardevd/jlrpy/pull/95 a try and verify that it works?

evolify commented 3 years ago

It works, thank you!