Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Climatisation State for 2024 Q4 #452

Merged
merged 3 commits into from
Jul 24, 2024
Merged

fix: Climatisation State for 2024 Q4 #452

merged 3 commits into from
Jul 24, 2024

Conversation

coreywillwhat
Copy link
Contributor

Add mapping for climatisation state for 2024 Q4

Add mapping for climatisation state for 2024 Q4
@coreywillwhat
Copy link
Contributor Author

@pergolafabio please test, this should pull the climate state for your vehicle.

@pergolafabio
Copy link

Tested and working it added 1 extra entity now!

image

@pergolafabio
Copy link

Can you also add the timer left? the timer that counts down from 30 to 0

@pergolafabio
Copy link

I see the timer left in this request url:
https://emea.bff.cariad.digital/vehicle/v1/vehicles/XXX/selectivestatus?jobs=climatisation

=> remainingClimatisationTime_min

Maybe also the target temp is interesting?

=> targetTemperature

Body:

{
  "climatisation": {
    "climatisationSettings": {
      "value": {
        "carCapturedTimestamp": "2024-07-24T18:50:05Z",
        "targetTemperature_C": 21,
        "targetTemperature_F": 70,
        "unitInCar": "celsius",
        "climatizationAtUnlock": false,
        "windowHeatingEnabled": false,
        "zoneFrontLeftEnabled": false,
        "zoneFrontRightEnabled": false
      }
    },
    "climatisationStatus": {
      "value": {
        "carCapturedTimestamp": "2024-07-24T18:50:09Z",
        "remainingClimatisationTime_min": 30,
        "climatisationState": "cooling"
      },
      "requests": [
        {
          "status": "successful",
          "operation": "start",
          "body": {
            "climatizationAtUnlock": false,
            "zoneFrontRightEnabled": false,
            "zoneRearLeftEnabled": false,
            "zoneRearRightEnabled": false,
            "targetTemperature": 21,
            "targetTemperatureUnit": "celsius",
            "climatisationWithoutExternalPower": true,
            "windowHeatingEnabled": false,
            "zoneFrontLeftEnabled": false
          },
          "requestId": "47c44560-02ff-47ef-85a5-6772b7afc580",
          "vcfRequestId": "d31e96f4-3aa0-4839-878c-416deefc457d"
        }
      ]
    },
    "windowHeatingStatus": {
      "value": {
        "carCapturedTimestamp": "2024-07-24T18:50:01Z",
        "windowHeatingStatus": [
          {
            "windowLocation": "front",
            "windowHeatingState": "off"
          },
          {
            "windowLocation": "rear",
            "windowHeatingState": "off"
          }
        ]
      }
    }
  }
}

@coreywillwhat
Copy link
Contributor Author

coreywillwhat commented Jul 24, 2024

I've added Remaining Climatisation Time please retest @pergolafabio .
As for target temp, it will take a little more time as I'll have to modify a few other files since the entity doesn't exist yet.

Ideally, entities like remaining time, and target temp, would be attributes to the Climatisation State entity, but that would take a good amount more work as well.

Please submit a feature request for Target Temp and any others so myself or someone else can get to it when they have more time.

@pergolafabio
Copy link

ok, the remainingClimatisationTime is also working! :-)

the target temp is for another time then :-)

@coreywillwhat coreywillwhat marked this pull request as ready for review July 24, 2024 19:04
@pergolafabio
Copy link

Just trying to understand, you said :

As for target temp, it will take a little more time as I'll have to modify a few other files since the entity doesn't exist yet.

But you added the "remainingClimatisationTime_min" also with a few lines of code? that entity didnt exist either?

I also see the target temp in this request:

https://emea.bff.cariad.digital/vehicle/v1/vehicles/XXXX/selectivestatus?jobs=charging%2CchargingTimers%2CchargingProfiles%2CdepartureTimers%2Cclimatisation%2CclimatisationTimers%2CdepartureTimers%2Cmeasurements%2Cmeasurements%2CoilLevel%2Caccess%2CvehicleLights%2CvehicleHealthWarnings

{
......
.....
  "climatisation": {
    "climatisationSettings": {
      "value": {
        "carCapturedTimestamp": "2024-07-24T19:01:58Z",
        "targetTemperature_C": 21,
        "targetTemperature_F": 70,
        "unitInCar": "celsius",
        "climatizationAtUnlock": false,
        "windowHeatingEnabled": false,
        "zoneFrontLeftEnabled": false,
        "zoneFrontRightEnabled": false
      }
    },
    "climatisationStatus": {
      "value": {
        "carCapturedTimestamp": "2024-07-24T19:02:22Z",
        "remainingClimatisationTime_min": 0,
        "climatisationState": "off"
      },
      "requests": [
        {
          "status": "successful",
          "operation": "start",
          "body": {
            "climatisationWithoutExternalPower": true,
            "climatizationAtUnlock": false,
            "zoneRearRightEnabled": false,
            "targetTemperature": 21,
            "targetTemperatureUnit": "celsius",
            "zoneFrontRightEnabled": false,
            "zoneRearLeftEnabled": false,
            "windowHeatingEnabled": false,
            "zoneFrontLeftEnabled": false
          },
          "requestId": "7d6b8b21-4b01-4a14-b599-438038fb3bec",
          "vcfRequestId": "c49f2344-05b7-4fd7-adb8-6623d11f4f7c"
        },
        {
          "status": "timeout",
          "operation": "stop",
          "requestId": "1a0bffcb-fb63-4f99-b499-56b35083e80f",
          "vcfRequestId": "e74f83bf-544e-4500-a7e5-3aeefb514dd8",
          "group": 9,
          "info": "Your vehicle is not reachable at the moment. Please try again later."
        }
      ]
......
.....
}

@coreywillwhat
Copy link
Contributor Author

coreywillwhat commented Jul 24, 2024

No worries!

To create new entities requires telling the integration where to look, how to interpret the data, and providing all the metadata for the new entities. That requires modification and code in 3 different files.

The Climatisation State and Remaining Climatisation Time entities already existed for other vehicles, so the data interpretation and metadata was already there, i just had to tell it where to look for Climate state and Remaining Time for your vehicle.

@coreywillwhat
Copy link
Contributor Author

Here is the full list of existing sensors and diagnostics, if you see any others that need mapping to your vehicle, please let us know in a new issue so we can track development.

image
image

@pergolafabio
Copy link

ah ok, makes sense
i'm comparing your entities in your screenshot to mine now ...
for sensors:
you have also longterm.short trip trip data sensoers, not sure what it is?

for diagnostics, you have a lot more, but its because you have a hjybrid :-)

as for the door/window/trunk sensors, i have them, but the states doesnt work... they are always locked...
But also in the myAudi app, they dont change... probably the app needs an update for my new car :-)

@coreywillwhat
Copy link
Contributor Author

ah ok, makes sense i'm comparing your entities in your screenshot to mine now ... for sensors: you have also longterm.short trip trip data sensoers, not sure what it is?

for diagnostics, you have a lot more, but its because you have a hjybrid :-)

as for the door/window/trunk sensors, i have them, but the states doesnt work... they are always locked... But also in the myAudi app, they dont change... probably the app needs an update for my new car :-)

Trip Data is unavailable for your vehicle at this time according to the logs:

2024-07-24 19:07:15.608 DEBUG (MainThread) [custom_components.audiconnect.audi_connect_account] Trip data support is disabled for VIN: *************6552. Exiting update process.
2024-07-24 19:07:15.608 DEBUG (MainThread) [custom_components.audiconnect.audi_connect_account] Trip data support is disabled for VIN: *************6552. Exiting update process.

as you're suggesting, the Audi App may need to be updated, or we may need to find more services for newer vehicles. If you find anything with HTTPTool let us know in a feature request.

@pergolafabio
Copy link

Will do, will check next time when the app gets updated...

Are you also going to work on the climate start ?

@pergolafabio
Copy link

And thnx! Much appreciated 👍

@Kolbi
Copy link
Contributor

Kolbi commented Jul 24, 2024

I merged this.

@Kolbi Kolbi merged commit 24f9ad4 into master Jul 24, 2024
6 checks passed
@Kolbi Kolbi deleted the coreywillwhat-patch-1 branch July 24, 2024 20:12
@coreywillwhat
Copy link
Contributor Author

Will do, will check next time when the app gets updated...

Are you also going to work on the climate start ?

I will be working on it when I have time. I'm desperately missing it with the summer heat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants