cyr-ius / hass-audiconnect

Adds an audi connect integration to home assistant
MIT License
32 stars 5 forks source link

(406, {'error': {'errorCode': 'climatisation.bs.notacceptable', 'description': 'Not Acceptable'}}) #22

Closed bavala3010 closed 11 months ago

bavala3010 commented 1 year ago

Until recently, I used the original integration made by Arjenvrh. With that integration, I could (un)lock doors and start/stop climatisation via services.

I really like this fork because of the extra entities (any tyre problem, light status etc), but unfortunately, the services are not working.

This code in the development tools gives the following error: code service: audiconnect.turn_on_action data: vin: 0000ca0f6df064a65a822c278eedff22 action: climater

error (406, {'error': {'errorCode': 'climatisation.bs.notacceptable', 'description': 'Not Acceptable'}})

The Audi is an Etron sportback 55 quattro.

To solve the issue, which info can I share from the debug logging without revealing any personal/secret information? (security tokens ?) Thanks.

Chris-NL commented 1 year ago

I'm having the same issue. I used version 1.0.7 without problems and upgraded to 1.3.0 some time ago. Since then a number of entities changed (eg. entity names) but some commands to the car doesn't seem to work anymore. Locking/unlocking works, but starting climate or starting car-charge (it's an Audi A6 55 TFSI-e) doesn't. The logs show me a similar error as above. Details:

Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.audiconnect.services
Source: custom_components/audiconnect/services.py:57
Integration: Audi Connect (documentation, issues)
First occurred: 18:05:26 (2 occurrences)
Last logged: 18:06:38

(406, {'error': {'errorCode': 'climatisation.bs.notacceptable', 'description': 'Not Acceptable'}})
(400, {'error': {'errorCode': 'gw.error.validation', 'description': 'Invalid Request'}})

Hopefully this is some info to fix the issue with.

tieskuh commented 1 year ago

I have the same issue. It worked with 1.0.7 but not on 1.3.0 Here is the debug log. Please let me know if I can provide something else.

2023-11-05 14:00:36.983 DEBUG (MainThread) [audiconnectpy.auth] REQUEST HEADERS: {'Accept': 'application/json', 'Accept-Charset': 'utf-8', 'User-Agent': 'okhttp/3.11.0', 'X-App-Name': 'myAudi', 'X-App-Version': '4.13.0', 'Authorization': 'Bearer [deleted]'}

2023-11-05 14:00:36.983 DEBUG (MainThread) [audiconnectpy.auth] REQUEST: https://mal-3a.prd.eu.dp.vwg-connect.com/api/rolesrights/authorization/v2/vehicles/[deleted]/services/rclima_v1/operations/P_START_CLIMA_AU/security-pin-auth-requested

2023-11-05 14:00:37.272 DEBUG (MainThread) [audiconnectpy.auth] RESPONSE HEADERS: <CIMultiDictProxy('X-FS-Tracking-ID': '[deleted]', 'Content-Encoding': 'gzip', 'Content-Type': 'application/json;charset=UTF-8', 'Content-Length': '600', 'Date': 'Sun, 05 Nov 2023 13:00:37 GMT', 'Server': 'www')>

2023-11-05 14:00:37.273 DEBUG (MainThread) [audiconnectpy.auth] RESPONSE: {"securityPinAuthInfo":{"securityToken":"[deleted]","securityPinTransmission":{"hashProcedureVersion":2,"challenge":"[deleted]"},"remainingTries":3}} ,return_code '200'

2023-11-05 14:00:37.274 DEBUG (MainThread) [audiconnectpy.auth] REQUEST HEADERS: {'Accept': 'application/json', 'Accept-Charset': 'utf-8', 'User-Agent': 'okhttp/3.11.0', 'X-App-Name': 'myAudi', 'X-App-Version': '4.13.0', 'Authorization': 'Bearer [deleted]', 'X-Client-ID': '[deleted]', 'Content-Type': 'application/json'}

2023-11-05 14:00:37.274 DEBUG (MainThread) [audiconnectpy.auth] REQUEST: https://mal-3a.prd.eu.dp.vwg-connect.com/api/rolesrights/authorization/v2/security-pin-auth-completed

2023-11-05 14:00:37.582 DEBUG (MainThread) [audiconnectpy.auth] RESPONSE HEADERS: <CIMultiDictProxy('X-FS-Tracking-ID': 'xx', 'Content-Encoding': 'gzip', 'Content-Type': 'application/json;charset=UTF-8', 'Content-Length': '695', 'Date': 'Sun, 05 Nov 2023 13:00:37 GMT', 'Server': 'www')>

2023-11-05 14:00:37.582 DEBUG (MainThread) [audiconnectpy.auth] RESPONSE: {"securityToken":"[deleted]"} ,return_code '200'

2023-11-05 14:00:37.583 DEBUG (MainThread) [audiconnectpy.auth] REQUEST HEADERS: {'Accept': 'application/json', 'Accept-Charset': 'utf-8', 'User-Agent': 'okhttp/3.11.0', 'X-App-Name': 'myAudi', 'X-App-Version': '4.13.0', 'Authorization': 'Bearer [deleted]', 'X-Client-ID': '[deleted]', 'Content-Type': 'application/vnd.vwg.mbb.ClimaterAction_v1_0_0+xml', 'x-mbbSecToken': '[deleted]'}

2023-11-05 14:00:37.583 DEBUG (MainThread) [audiconnectpy.auth] REQUEST: https://fal-3a.prd.eu.dp.vwg-connect.com/fs-car/bs/climatisation/v1/Audi/NL/vehicles/[deleted]/climater/actions

2023-11-05 14:00:37.739 DEBUG (MainThread) [audiconnectpy.auth] RESPONSE HEADERS: <CIMultiDictProxy('x-fault-id': '[deleted]', 'X-FS-Tracking-ID': '[deleted]', 'X-FS-Error-Code': 'GW406', 'Content-Type': 'application/json', 'Content-Length': '87', 'Date': 'Sun, 05 Nov 2023 13:00:37 GMT', 'Server': 'www')>

2023-11-05 14:00:37.739 DEBUG (MainThread) [audiconnectpy.auth] RESPONSE: {"error":{"errorCode":"climatisation.bs.notacceptable","description":"Not Acceptable"}} ,return_code '406'

2023-11-05 14:00:37.740 ERROR (MainThread) [custom_components.audiconnect.services] (406, {'error': {'errorCode': 'climatisation.bs.notacceptable', 'description': 'Not Acceptable'}})
oleg-d commented 1 year ago

hi guys, what does your scripts look like? i keep getting this error so i think my script is wrong.

Failed to call service audiconnect/execute_vehicle_action. 'NoneType' object has no attribute 'identifiers'

oleg-d commented 1 year ago

@tieskuh any chance you could share your script so i can see how to call this thing correctly for climatisation?

tieskuh commented 1 year ago

@tieskuh any chance you could share your script so i can see how to call this thing correctly for climatisation?

It doesn’t work with version 1.3.0. That is what this issue is about. You need to downgrade to 1.0.7. With version 1.0.7 it works for my e-tron 55.

IMG_7334

oleg-d commented 1 year ago

@tieskuh any chance you could share your script so i can see how to call this thing correctly for climatisation?

It doesn’t work with version 1.3.0. That is what this issue is about. You need to downgrade to 1.0.7. With version 1.0.7 it works for my e-tron 55.

thanks! your fork is from 1.3.0 i guess? does the service: audiconnect.turn_on_action work in your fork?

tieskuh commented 1 year ago

@tieskuh any chance you could share your script so i can see how to call this thing correctly for climatisation?

It doesn’t work with version 1.3.0. That is what this issue is about. You need to downgrade to 1.0.7. With version 1.0.7 it works for my e-tron 55.

thanks! your fork is from 1.3.0 i guess? does the service: audiconnect.turn_on_action work in your fork?

No unfortunately not. That is for some other issues. I currently use 1.0.7 waiting for a new version.

oleg-d commented 11 months ago

v1.4.5 allows turning on of climater now