JLR InControl v1.5.0-beta.1
Pre-releaseBeta. Reworks how the vehicle-location sign-in is kept, based on a measurement rather than a guess. Update, sign in once, then please leave it alone and report back — how long it lasts is the whole question.
What was measured
On a live account, Jaguar Land Rover's identity session lasts 60 minutes idle, 2 hours absolute. Nothing this integration does extends either, and a new one can only be created by signing in with an emailed code. The portal session that identity session creates is the durable half — one in active use has been observed working for over thirty hours.
What was wrong
This had it exactly backwards. It saved the short-lived identity session, threw the durable portal session away on every restart, and then tried to create a new portal session using an identity session that had already expired. That is the entire cause of the repeated "sign in again" prompts.
What changes
The portal session is now what gets saved. On start it is offered straight to the portal, and if it still works there is no sign-in chain at all. The identity route becomes a fallback, used only to create a new portal session while it is still possible — and whatever it creates is saved in turn.
Also stops saving one cookie that describes a single pending sign-in request rather than the session; handing a stale one back is a likely reason a second sign-in was refused while the session behind it was still alive.
The honest limit
When the portal session eventually dies there is no way back without you — Home Assistant will ask for one emailed code. This does not remove that. It aims to make it rare rather than half-hourly. If it still fails within the hour, the next step is removing vehicle location rather than asking anyone for more codes.
Live vehicle status is unaffected, as it has been throughout.
What's Changed
- Keep the portal session, not the identity session
Installation
HACS (recommended)
Add https://github.com/willbeeching/ha-jlr-incontrol as a custom repository (category Integration), install, and restart Home Assistant.
Manual
Download jlr_incontrol.zip, extract into config/custom_components/, and restart Home Assistant.