msp1974 / homeassistant-jlrincontrol

An integration for JLR InControl to Home Assistant
MIT License
65 stars 11 forks source link

JLR have changed API again and integration no longer loads #138

Closed TonyMontuna closed 6 months ago

TonyMontuna commented 6 months ago

Integration recently stopped working within the last week or so.

Settings says it’s failed to setup.

Disabled. Re-enabled. Refreshed.

Enabled debugger and got this:

`Logger: homeassistant.config_entries Source: config_entries.py:504 First occurred: 9:29:36 PM (5 occurrences) Last logged: 11:18:30 PM

Error setting up entry gmail@gmail.com for jlrincontrol Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 504, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/jlrincontrol/init.py", line 276, in async_setup_entry hass, config_entry, data.connection.vehicles, data ^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'vehicles' `

Other details:

-My system is running on a dell optiplex Core 2024.3.1 Supervisor 2024.03.0 Operating System 12.1 Frontend 20240307.0

And the JLR app is 2.2.6

JonSilver commented 6 months ago

Mine stopped working yesterday morning and an integration reload this morning confirmed that it's an API problem. Looks like they blocked us again.

Grimroper commented 6 months ago

Same for me. Seemed to stop working sometime midday yesterday. Im getting a similar error to the above

This error originated from a custom integration.

Logger: custom_components.jlrincontrol
Source: custom_components/jlrincontrol/__init__.py:399
integration: Jaguar Landrover InControl (documentation)
First occurred: 11:20:34 (3 occurrences)
Last logged: 11:21:06

Error connecting to JLRInControl. Error is 'NoneType' object is not subscriptable
msp1974 commented 6 months ago

Yes, seems so. This is being looked at.

BNWEIN commented 6 months ago

Seems like you are aware but just in case I thought I’d let you know it’s stopped working in the latest Beta version too.

pmharris77 commented 6 months ago

The error is within the jlrpy library and v1.7.0 seems to have fixed it (have confirmed I can log in using it). Seems JLR changed the auth header format:

https://github.com/ardevd/jlrpy/pull/123/commits/48567a4a62ee6ac91377d70154bbe411d9eaa1d7

https://github.com/ardevd/jlrpy/releases/tag/v1.7.0

ismarslomic commented 6 months ago

Thanks @pmharris77 for verifying that jlrpy v1.7.0 has fixed the issue. I did same test and it seems to work now. I will make a new release in few minutes.

pmharris77 commented 6 months ago

I just tested it in HomeAssistant by manually updating the manifest.json file to pull in v 1.7.0 and it is all working again :)

ismarslomic commented 6 months ago

Release v2.2.7 is released. Please upgrade and verify the fix.

BNWEIN commented 6 months ago

Sorry to be a pain @ismarslomic any chance you could add the fix to beta 3.0 for little old me :)

ismarslomic commented 6 months ago

@BNWEIN will also be upgraded in few minutes

ismarslomic commented 6 months ago

New beta release v3.0.0beta7 is released. Please upgrade and verify the fix.

BNWEIN commented 6 months ago

Confirmed as working! What a legend!! Thank you soo much @ismarslomic

ismarslomic commented 6 months ago

The legend is @ardevd! Thanks for quick fix! 🙏 ❤️

BNWEIN commented 6 months ago

I do have one question @ismarslomic, i know this probably isnt the place, but seeing as you are here!!

How do i set the temperature when using the new "switch.mycar_climate_engine"?

ismarslomic commented 6 months ago

Please raise new issue for that question. This is totally off topic in current (closed) issue