audi_connect_ha: `start_climate_control` not working

Describe the bug 404 error when running start_climate_control

Your Vehicle Details Model: Q5 Year: 2021 Type (ICE/PHEV/BEV): PHEV

Region: US (NA)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 102 (40 by maintainers)

Commits related to this issue

Most upvoted comments

Having trouble finding a big block of time to work on this. Hoping to have some time to work on this again next week. I would also love this ready for the cold weather. I’ll keep you updated.

Action is functioning. Closing this issue. #571 opened for check_request_succeeded

Thats it for now! Thanks again @pergolafabio

check_request_succeeded is next. Will let you know when ready for testing if you’re able.

changing my config to api level 1 , then it works

Ah yeah thats it. Appreciate you pointing me to the right place.

PR automatically closed it, thanks for the hint.

Hey @Kolbi , maybe you can leave it open? The stop climate needs to be fixed as well 😃

Yes, thats correct. Stop command needs to be fixed yet.

ok, the start is indeed working , but the stop code is not yet implemented, right?

Fair enough haha I’ll work on that after we get this merged. The single PR is already massive changes. Prefer to make updates in smaller chunks but wasn’t possible to get the service up and running.

Been traveling since October. Hoping to get into the actions next week. Thanks for sticking with us!

Unstale

if you want, i can sniff it for you, you can give me for example your account with a temp password … up to you i’m on discord

Sorry if this is off topic. I just want to help with this.

The iOS app doesn’t seem to use the standard/simple SSL pinning methods e.g. boringssl. I think it’s using swift-ssl-nio for pinning which is harder to patch. Anyone here been successful sniffing traffic from an iOS device?

I might have to find an Android device.

Will probably work, but it will break it for other users that are not using cariad?

Maybe we need to determine which users need new endpoints and which one needs old logic.

Just released https://github.com/audiconnect/audi_connect_ha/releases/tag/v1.10.5a1 (for better versioning)

for the ones interested , i did an hardcode, changed file audi_services.py to this:

    async def set_climatisation(self, vin: str, start: bool):
        if start:
            data = '{ "targetTemperature": 23, "targetTemperatureUnit": "celsius", "climatisationWithoutExternalPower": true, "climatizationAtUnlock": false, "windowHeatingEnabled": true, "zoneFrontLeftEnabled": false, "zoneFrontRightEnabled": false, "zoneRearLeftEnabled": false,  "zoneRearRightEnabled": false }'
            headers = { "Authorization": "Bearer " + self._bearer_token_json["access_token"] }
            res = await self._api.request(
                "POST",
                "https://emea.bff.cariad.digital/vehicle/v1/vehicles/{vin}/climatisation/start".format(
                    vin=vin.upper(),
                ),
                headers=headers,
                data=data,
            ) 
        else:
            data = ''
            headers = { "Authorization": "Bearer " + self._bearer_token_json["access_token"] }
            res = await self._api.request(
                "POST",
                "https://emea.bff.cariad.digital/vehicle/v1/vehicles/{vin}/climatisation/stop".format(
                    vin=vin.upper(),
                ),
                headers=headers,
                data=data,
            )



        # checkUrl = "{homeRegion}/fs-car/bs/climatisation/v1/{type}/{country}/vehicles/{vin}/climater/actions/{actionid}".format(
            # homeRegion=await self._get_home_region(vin.upper()),
            # type=self._type,
            # country=self._country,
            # vin=vin.upper(),
            # actionid=res["action"]["actionId"],
        # )

        # await self.check_request_succeeded(
            # checkUrl,
            # "start climatisation" if start else "stop climatisation",
            # SUCCEEDED,
            # FAILED,
            # "action.actionState",
        # )

Thanks for the logs. The missing values are due to the climatisation data structure being different. I checked my vehicle, and it’s still using the old structure. We’ll need to add a check for your new structure, as I assume this will be the standard for new vehicles.

Is your GPS location still working? for me it doesnt work in HA and doesnt work in the Android app either, i get an error there too, tough i have it enabled in “audi connect” as a function, guess the App needs to be updated probably, maybe my car is to new yet…

2024-07-24 19:20:10.617 ERROR (MainThread) [custom_components.audiconnect.audi_connect_account] POSITION: ClientResponseError with status 404 for VIN: *************6552. Error: 404, message='Not Found', url=URL('https://emea.bff.cariad.digital/vehicle/v1/vehicles/WAUZZZFZ9RP076552/parkingposition')

GPS is still working for me in app and HA

Alright, I’ve set up frida on a rooted android emulator. I’ll work on testing for NA/US. If I can get that working I’m sure we can easily integrate the EMEA endpoints as well. Just hard to test on things I dont know work for myself haha