audiconnect/audi_connect_ha

sensor oil_level

Closed this issue · 14 comments

Hello,

From the new version, the oil_level sensor no longer goes up.
This sensor gives me the oil_level as a pourcentage.
Do you have an idea ?

Maybe related to: #297

Which vehicle you onw? Any logs what you get from API?

My car is A3 Sportback S-Line 2021.
audi-log.log

Rather than start a new issue, I believe my issue could be the same, similar or related to the OP

My sensor.audi_a6_limousine_oil_level sensor entity always reports 100. I can see that the unit_of_measurement is % which is fine, but the value seems to be stuck at 100.

  • HA Version: 2024.4.2
  • Audi Connect Version: v1.3.0
  • Vehicle: Audi A6
    model: Audi A6 Limousine sport 40 TDI S tronic/Audi A6 Limousine
    model_year: 2020
    model_family:
    title: Audi A6 Limousine

(i never got my head around why they call my car a Limousine, lol)

Has anyone else seen this defect or knows what I can tweak to get the correct oil_level value?

My car is A3 Sportback S-Line 2021. audi-log.log

I'm not seeing this value being provided by the API anymore. Here is what i see in your log:
textId:OIL_LEVEL_DIPSTICKS_PERCENTAGE loc:['oilLevel', 'oilLevelStatus', 'value', 'value']: val:None ts:None

@neil-bh can you provide a log? integrations > audiconnect > enable debug logging. Run the refresh_cloud_data service. Then disable debug logging and provide the file?

I'm guessing this isn't provided by the API anymore. My car is also reporting None value.

No problem, see attached -->
home-assistant_audiconnect_2024-04-08T19-50-31.509Z.log

I seem to be getting this returned:
textId:OIL_LEVEL_DIPSTICKS_PERCENTAGE loc:['oilLevel', 'oilLevelStatus', 'value', 'carCapturedTimestamp']: val:True ts:2024-04-06 09:40:10+00:00

That's odd, why would it be returning a timestamp?

I can also see some data the ends with something like:
.........., 'inspectionDue_days': 82, 'inspectionDue_km': 20278, 'mileage_km': 16779, 'oilServiceDue_days': 82, 'oilServiceDue_km': 12875}}}}

...this doesn't seem to contain any oil level values either (apart from service due), but i'm lost in these logs, so I won't pretend I know what I'm talking about.

What are your thoughts?

The returned value is actually "True" if you see val:True.
ts: is for timestamp.

It seems with API changes they've either moved away from using this, or its actually just a bool value for if the oil level is good (True) or bad (False). If its changed to that, we'll have to modify the sensor to binary_sensor and return the correct device_class to make this worthwhile. Its definitely not providing percentage anymore from what i've seen.

I'm just not sure why your vehicle would be returning True while mine is returning None. Could be a difference between diesel providing the value vs gas/hybrid/electric not providing the value.

Sounds like you could be right. The Audi app on my phone is reporting OK. I'm not sure if in the past this was an integer value - can't say I paid much attention.
Screenshot_20240408-211712

Also, in the service schedule section of the phone app, it provides a date for the oil change. I'm not sure how that's calculated if it doesn't know the level of oil. Maybe it's an estimation based on the last time the car had an oil change? If thats so, that'd be a semi-useful value to report on perhaps.
Screenshot_20240408-211822

This is great info. Thanks for providing this. I can put together a PR for a binary sensor for the "oil level" since that seems to be its purpose now.

As for the service schedule, these sensors should be available already. Do you have these sensors available for your car?
image
image

Glad I could provide some help to the future changes.
I'll just have to kiss my Oil Level Gauge Card goodbye.

As for the service schedule, yes, I double checked and I can see these entities already.

I'll just have to kiss my Oil Level Gauge Card goodbye.

Sorry for your loss 😞
Okay so for this its just the oil level. Service schedule and oil change are working for you.

2024-04-09 07:34:12.354 DEBUG (MainThread) [custom_components.audiconnect.audi_models] audi_models.py - _tryAppendFieldWithTs: textId:OIL_LEVEL_DIPSTICKS_PERCENTAGE loc:['oilLevel', 'oilLevelStatus', 'value', 'carCapturedTimestamp']: val:True ts:2024-04-08 15:27:43+00:00

The Web API still delivers it as an percentage: https://userinfo.my.audi.com/bvh/v1 (used in https://my.audi.com/ )

data.vehicleStatusReport.oilLevel {
  "value": 87,
  "unit": "%"
}

Maybe we need to think if we should integrate this API as well.

Full data:
{ "data": { "vehicleStatusReport": { "vin": "WAUZZZF23[XXX]", "vehicleType": "HYBRID", "lastUpdated": "2024-04-09T03:55:14Z", "engines": [ { "type": "GASOLINE", "range": { "value": 670, "unit": "km" }, "filling": { "value": 93, "unit": "%" }, "adBlueRange": null, "electric": null }, { "type": "ELECTRIC", "range": { "value": 15, "unit": "km" }, "filling": { "value": 22, "unit": "%" }, "adBlueRange": null, "electric": { "chargingState": "INACTIVE", "chargingTime": null } } ], "totalRange": { "value": 685, "unit": "km" }, "mileage": { "value": 20483, "unit": "km" }, "oilLevel": { "value": 87, "unit": "%" }, "oilLevelSupported": true, "service": { "oilChange": { "time": { "value": -193, "unit": "d" }, "distance": { "value": -9600, "unit": "km" } }, "inspection": { "time": { "value": -193, "unit": "d" }, "distance": { "value": -9600, "unit": "km" } } }, "messages": [ { "key": "vehicle.locked", "value": true }, { "key": "doors.closed", "value": true }, { "key": "windows.closed", "value": true }, { "key": "parking.lights.off", "value": true }, { "key": "bonnet.closed", "value": true }, { "key": "trunk.closed", "value": true } ], "stoWarnings": [] } } }

Oh nice catch @Kolbi .
Yeah maybe thats something we could do to get the Oil Level back as a separate sensor to the binary? Is that what you're thinking?

I have a same result before reload cloud data Audi.
textId:OIL_LEVEL_DIPSTICKS_PERCENTAGE loc:['oilLevel', 'oilLevelStatus', 'value', 'value']: val:None ts:None

oilLevel value remains at "None".

Just link it here: #276