skodaconnect / homeassistant-skodaconnect

Skoda Connect - A home assistant plugin to add integration with your car
Apache License 2.0
233 stars 27 forks source link

Skoda Enyaq: not showing entities #32

Closed bslefevre closed 3 years ago

bslefevre commented 3 years ago

Describe the bug I'm not being able to login with both of our Skoda Connect accounts.

Latest working release Never used it before. Installed the latest stable and the latest beta

Debug logs Logging from latest stable: DEBUG (MainThread) [skodaconnect.connection] Using service https://msg.volkswagen.de DEBUG (MainThread) [skodaconnect.connection] Got authorization endpoint, logging on. ERROR (MainThread) [skodaconnect.connection] Login failed for skoda account, 'NoneType' object has no attribute 'find_all' WARNING (MainThread) [custom_components.skodaconnect] Could not login to Skoda Connect, please check your credentials and verify that the service is working ERROR (MainThread) [homeassistant.setup] Setup failed for skodaconnect: Integration failed to initialize.

Logging from latest beta: DEBUG (MainThread) [skodaconnect.connection] Using service https://msg.volkswagen.de DEBUG (MainThread) [skodaconnect.connection] Initiating new login DEBUG (MainThread) [skodaconnect.connection] Got authorization endpoint DEBUG (MainThread) [skodaconnect.connection] Authenticating with email and password. DEBUG (MainThread) [skodaconnect.connection] Parsing login response. DEBUG (MainThread) [skodaconnect.connection] Login successful, received authorization code. DEBUG (MainThread) [skodaconnect.connection] Trying to fetch user identity tokens. DEBUG (MainThread) [skodaconnect.connection] User identity token verified OK. INFO (MainThread) [skodaconnect.connection] Successfully logged in DEBUG (MainThread) [skodaconnect.connection] Trying to fetch api tokens. DEBUG (MainThread) [skodaconnect.connection] VW-Group API token verified OK. DEBUG (MainThread) [skodaconnect.connection] Fetching vehicles associated with account DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://msg.volkswagen.de/fs-car/usermanagement/users/v1/skoda/CZ/vehicles" DEBUG (MainThread) [skodaconnect.connection] Request for "https://msg.volkswagen.de/fs-car/usermanagement/users/v1/skoda/CZ/vehicles" returned with status code [200] DEBUG (MainThread) [skodaconnect.connection] Failed to retrieve list of cars, trying new API DEBUG (MainThread) [skodaconnect.connection] Got authorization endpoint DEBUG (MainThread) [skodaconnect.connection] Authenticating with email and password. DEBUG (MainThread) [skodaconnect.connection] Parsing login response. DEBUG (MainThread) [skodaconnect.connection] Login successful, received authorization code. DEBUG (MainThread) [skodaconnect.connection] Trying to fetch user identity tokens. DEBUG (MainThread) [skodaconnect.connection] User identity token verified OK. INFO (MainThread) [skodaconnect.connection] Successfully logged in to Skoda new API DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://api.connect.skoda-auto.cz/api/v2/garage/vehicles" WARNING (MainThread) [homeassistant.setup] Setup of skodaconnect is taking over 10 seconds. DEBUG (MainThread) [skodaconnect.connection] Request for "https://api.connect.skoda-auto.cz/api/v2/garage/vehicles" returned with status code [200] DEBUG (MainThread) [skodaconnect.connection] Going to call vehicle updates DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://mal-1a.prd.ece.vwg-connect.com/api/cs/vds/v1/vehicles/[VIN]/homeRegion" ERROR (MainThread) [skodaconnect.connection] Got unhandled error from server: 404 DEBUG (MainThread) [skodaconnect.connection] Could not get homeregion, error 'homeRegion' DEBUG (MainThread) [skodaconnect.vehicle] Get homeregion for VIN [VIN] DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/skoda/CZ/vehicle/[VIN]/carportdata" DEBUG (MainThread) [skodaconnect.connection] Attempting extraction of subject from identity token. DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://customer-profile.apps.emea.vwapps.io/v1/customers/[GUID]/realCarData" DEBUG (MainThread) [skodaconnect.connection] Request for "https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/skoda/CZ/vehicle/[VIN]/carportdata" returned with status code [200] DEBUG (MainThread) [skodaconnect.connection] Request for "https://customer-profile.apps.emea.vwapps.io/v1/customers/[GUID]/realCarData" returned with status code [200] INFO (MainThread) [skodaconnect.vehicle] Vehicle [VIN] added. Homeregion is "https://msg.volkswagen.de" DEBUG (MainThread) [skodaconnect.vehicle] Attempting discovery of supported API endpoints for vehicle. DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://msg.volkswagen.de/api/rolesrights/operationlist/v3/vehicles/[VIN]" ERROR (MainThread) [skodaconnect.connection] Got HTTP 400 "Bad Request" from server, this request might be malformed or not implemented correctly for this vehicle WARNING (MainThread) [skodaconnect.connection] Could not fetch operation list, HTTP status code: 400 WARNING (MainThread) [skodaconnect.connection] Could not update information: 'serviceInfo' WARNING (MainThread) [custom_components.skodaconnect] Could not login to Skoda Connect, please check your credentials and verify that the service is working ERROR (MainThread) [homeassistant.setup] Setup failed for skodaconnect: Integration failed to initialize. Installation:

Additional context Clean set-up via HACS, logged on with same credentials via https://www.skoda-connect.com/ and that works. Accepted new terms.

App screenshot

vladimirzrnic commented 3 years ago

Same hereπŸ€”.

2021-04-30 12:22:18 WARNING (MainThread) [homeassistant.setup] Setup of skodaconnect is taking over 10 seconds. 2021-04-30 12:23:07 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: skodaconnect 2021-04-30 12:23:11 WARNING (MainThread) [custom_components.skodaconnect] Could not login to Skoda Connect, please check your credentials and verify that the service is working 2021-04-30 12:23:11 ERROR (MainThread) [homeassistant.setup] Setup failed for skodaconnect: Integration failed to initialize.

I can access Skoda Connect through a browser or mobile app.

I tried to reinstall and remove the app again but it didn't help.

Farfar commented 3 years ago

Same here.

What car do you have? Did the integration work at any point for you?

Clean set-up via HACS, logged on with same credentials via https://www.skoda-connect.com/ and that works. Accepted new terms.

From the logs it looks like the data for your car isn't available through any of the known API endpoints. It might be that your car has been migrated from VW-Group servers to Skodas own API servers but I can't tell. The only way to say for sure is to debug the native app, disable SSL pinning and run the connections through a SSL MITM proxy to inspect the HTTP calls.

vladimirzrnic commented 3 years ago

Hi Farfar,

The car is Ε koda Octavia and the integration worked normally until two hours ago.

Thanks, Vlad

Farfar commented 3 years ago

The car is Ε koda Octavia and the integration worked normally until two hours ago.

OK then I would say that the service is temporary down, try again later.

bslefevre commented 3 years ago

The only way to say for sure is to debug the native app, disable SSL pinning and run the connections through a SSL MITM proxy to inspect the HTTP calls.

I would like to help but I do not know how to do this. If you've got a manual telling me what to do to deliver you the information you need I'm more than happy to do so!

bslefevre commented 3 years ago

Update: The Citigo-e seems to be working (without adding the VIN because I've outcommented the Citigo-e so it seems that all of the cars will be added automatically?). The Enyaq isn't working though, is that known common issue?

bslefevre commented 3 years ago

@Farfar is there a way to help you, help me with having my Enyaq entities visible within HASS?

fritsie82 commented 3 years ago

Echoing that Skodaconnect has the same issues for my Enyaq with release version v1.0.40-RC2 Logged on with same credentials via https://www.skoda-connect.com/ and that works. image

Logger: skodaconnect.connection Source: /usr/local/lib/python3.8/site-packages/skodaconnect/connection.py:477 First occurred: 10:36:54 PM (1 occurrences) Last logged: 10:36:54 PM

Setup failed for skodaconnect: Integration failed to initialize. 10:36:54 PM – (ERROR) setup.py Could not login to Skoda Connect, please check your credentials and verify that the service is working 10:36:54 PM – (WARNING) skodaconnect (custom integration) Could not update information: 'serviceInfo' 10:36:54 PM – (WARNING) /usr/local/lib/python3.8/site-packages/skodaconnect/connection.py Could not fetch operation list, HTTP status code: 400 10:36:54 PM – (WARNING) /usr/local/lib/python3.8/site-packages/skodaconnect/connection.py Got HTTP 400 "Bad Request" from server, this request might be malformed or not implemented correctly for this vehicle 10:36:54 PM – (ERROR) /usr/local/lib/python3.8/site-packages/skodaconnect/connection.py Got unhandled error from server: 404 10:36:52 PM – (ERROR) /usr/local/lib/python3.8/site-packages/skodaconnect/connection.py

Farfar commented 3 years ago

For me to be able to move forwards with the Enyaq problems I would need to have access to one of your accounts and debug the login/API calls. Contact me via email and we can talk further.

bslefevre commented 3 years ago

I've send you my credentials to skoda-connect with some extra info! Hopefully you can do your magic with the Enyaq!

Farfar commented 3 years ago

I have started work on this but support for Enyaq, and probably a lot of upcoming models, will require some rework of the login and vehicle discovery functions.

fritsie82 commented 3 years ago

Ok standing by as beta tester. Let me know if I can help/send logs

Farfar commented 3 years ago

I got a few hours of free time so I scraped together a new beta release with initial support for theese newer EV's. So far only 5 sensors added thanks to debugging from @bslefevre If anyone have more status data than what the release notes mentions then please contact me and I'll surely be able to incorporate it.

bslefevre commented 3 years ago

So I've installed rc3 and after the reboot I'm getting these errors: `Logger: homeassistant.setup Source: setup.py:164 First occurred: 10:24:40 PM (1 occurrences) Last logged: 10:24:40 PM

Setup failed for skodaconnect: Integration failed to initialize.

Logger: custom_components.skodaconnect Source: custom_components/skodaconnect/init.py:218 Integration: skodaconnect (documentation, issues) First occurred: 10:24:40 PM (1 occurrences) Last logged: 10:24:40 PM

Could not login to Skoda Connect, please check your credentials and verify that the service is working ` Is this something you've encounted before? Maybe it has issues getting the data from the "old" servers for the Citigo-e and the "new" servers for the Enyaq?

Farfar commented 3 years ago

So I've installed rc3 and after the reboot I'm getting these errors: `Logger: homeassistant.setup Source: setup.py:164 First occurred: 10:24:40 PM (1 occurrences) Last logged: 10:24:40 PM

Setup failed for skodaconnect: Integration failed to initialize.

Logger: custom_components.skodaconnect Source: custom_components/skodaconnect/init.py:218 Integration: skodaconnect (documentation, issues) First occurred: 10:24:40 PM (1 occurrences) Last logged: 10:24:40 PM

Could not login to Skoda Connect, please check your credentials and verify that the service is working ` Is this something you've encounted before? Maybe it has issues getting the data from the "old" servers for the Citigo-e and the "new" servers for the Enyaq?

Make sure that the latest pypi package of skodaconnect was installed, it usually takes awhile after publishing for the package to become available from the servers. I'll check again tomorrow but my testing rig was working with the new lib and one car of each, one old and one new.

bslefevre commented 3 years ago

I've checked the logging and this is what I'm getting (it seems to have fetched data for the Enyaq btw) but overall the integration won't properly start. May 11 08:51:32 raspberrypi hass[581]: 2021-05-11 08:51:32 DEBUG (MainThread) [skodaconnect.connection] Using service https://msg.volkswagen.de May 11 08:51:32 raspberrypi hass[581]: 2021-05-11 08:51:32 DEBUG (MainThread) [skodaconnect.connection] Initiating new login May 11 08:51:32 raspberrypi hass[581]: 2021-05-11 08:51:32 INFO (MainThread) [skodaconnect.connection] Connecting to Skoda native API May 11 08:51:39 raspberrypi hass[581]: 2021-05-11 08:51:39 DEBUG (MainThread) [skodaconnect.connection] Got authorization endpoint May 11 08:51:39 raspberrypi hass[581]: 2021-05-11 08:51:39 DEBUG (MainThread) [skodaconnect.connection] Found item: ('_csrf', '35f9b85f-15a9-4c7f-a21f-d527a4c5684c') May 11 08:51:39 raspberrypi hass[581]: 2021-05-11 08:51:39 DEBUG (MainThread) [skodaconnect.connection] Found item: ('relayState', 'c14c3d9e7b8daa84877beef34f4cf5f2c5f2009d') May 11 08:51:39 raspberrypi hass[581]: 2021-05-11 08:51:39 DEBUG (MainThread) [skodaconnect.connection] Found item: ('hmac', 'bbeaa6183e5e11f24f3a68d2082598ca10f7377d011d95b7495170a23d25c995') May 11 08:51:39 raspberrypi hass[581]: 2021-05-11 08:51:39 DEBUG (MainThread) [skodaconnect.connection] Posting email with form data {'_csrf': '35f9b85f-15a9-4c7f-a21f-d527a4c5684c', 'relayState': 'c14c3d9e7b8daa84877beef34f4cf5f2c5f2009d', 'hmac': 'bbeaa6183e5e11f24f3a68d2082598ca10f7377d011d95b7495170a23d25c995', 'email': '[EMAIL]@gmail.com'} May 11 08:51:40 raspberrypi hass[581]: 2021-05-11 08:51:40 WARNING (MainThread) [homeassistant.components.hue] ('Please check for software updates of the bridge in the Philips Hue App.', 'Signify Hue', 'hue_hub_firmware') May 11 08:51:40 raspberrypi hass[581]: 2021-05-11 08:51:40 DEBUG (MainThread) [skodaconnect.connection] Found item: ('_csrf', '35f9b85f-15a9-4c7f-a21f-d527a4c5684c') May 11 08:51:40 raspberrypi hass[581]: 2021-05-11 08:51:40 DEBUG (MainThread) [skodaconnect.connection] Found item: ('relayState', 'c14c3d9e7b8daa84877beef34f4cf5f2c5f2009d') May 11 08:51:40 raspberrypi hass[581]: 2021-05-11 08:51:40 DEBUG (MainThread) [skodaconnect.connection] Found item: ('email', '[EMAIL]@gmail.com') May 11 08:51:40 raspberrypi hass[581]: 2021-05-11 08:51:40 DEBUG (MainThread) [skodaconnect.connection] Found item: ('hmac', '2668bc615ba3d9747e3f5c5be38fe2d909271fce4590346ae96c80cc61873232') May 11 08:51:40 raspberrypi hass[581]: 2021-05-11 08:51:40 DEBUG (MainThread) [skodaconnect.connection] Authenticating with email and password. May 11 08:51:40 raspberrypi hass[581]: 2021-05-11 08:51:40 DEBUG (MainThread) [skodaconnect.connection] Parsing login response. May 11 08:51:41 raspberrypi hass[581]: 2021-05-11 08:51:41 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform aarlo does not generate unique IDs. ID connected_deurbel already exists - ignoring binary_sensor.aarlo_connected_deurbel May 11 08:51:41 raspberrypi hass[581]: 2021-05-11 08:51:41 WARNING (ArloBackgroundWorker) [pyaarlo] error in response={'data': {'error': '2059', 'message': 'Device is offline.', 'reason': 'Device is offline.'}, 'success': False} May 11 08:51:41 raspberrypi hass[581]: 2021-05-11 08:51:41 DEBUG (MainThread) [skodaconnect.connection] Login successful, received authorization code. May 11 08:51:41 raspberrypi hass[581]: 2021-05-11 08:51:41 DEBUG (MainThread) [skodaconnect.connection] Trying to fetch user identity tokens. May 11 08:51:41 raspberrypi hass[581]: 2021-05-11 08:51:41 WARNING (ArloBackgroundWorker) [pyaarlo] error in response={'data': {'error': '2059', 'message': 'Device is offline.', 'reason': 'Device is offline.'}, 'success': False} May 11 08:51:41 raspberrypi hass[581]: 2021-05-11 08:51:41 DEBUG (MainThread) [skodaconnect.connection] User identity token verified OK. May 11 08:51:41 raspberrypi hass[581]: 2021-05-11 08:51:41 DEBUG (MainThread) [skodaconnect.connection] Executing GET request for URL: "https://api.connect.skoda-auto.cz/api/v2/garage/vehicles", with VIN: "" May 11 08:51:41 raspberrypi hass[581]: 2021-05-11 08:51:41 DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://api.connect.skoda-auto.cz/api/v2/garage/vehicles" May 11 08:51:42 raspberrypi hass[581]: 2021-05-11 08:51:42 WARNING (ArloBackgroundWorker) [pyaarlo] error in response={'data': {'error': '2059', 'message': 'Device is offline.', 'reason': 'Device is offline.'}, 'success': False} May 11 08:51:42 raspberrypi hass[581]: 2021-05-11 08:51:42 DEBUG (MainThread) [skodaconnect.connection] Request for "https://api.connect.skoda-auto.cz/api/v2/garage/vehicles" returned with status code [200] May 11 08:51:42 raspberrypi hass[581]: 2021-05-11 08:51:42 DEBUG (MainThread) [skodaconnect.connection] Found vehicle(s) associated with account. May 11 08:51:42 raspberrypi hass[581]: 2021-05-11 08:51:42 DEBUG (MainThread) [skodaconnect.connection] Found vehicle [CITIGO] with connectivity: ONLINE May 11 08:51:42 raspberrypi hass[581]: 2021-05-11 08:51:42 DEBUG (MainThread) [skodaconnect.vehicle] Creating Vehicle class object with data {'vin': '[CITIGO]', 'service': 'ONLINE', 'capabilities': ['DCS']} May 11 08:51:42 raspberrypi hass[581]: 2021-05-11 08:51:42 DEBUG (MainThread) [skodaconnect.connection] Found vehicle [ENYAQ] with connectivity: REMOTE May 11 08:51:42 raspberrypi hass[581]: 2021-05-11 08:51:42 DEBUG (MainThread) [skodaconnect.vehicle] Creating Vehicle class object with data {'vin': '[ENYAQ]', 'service': 'REMOTE', 'capabilities': ['DCS', 'AUTOMATION', 'CHARGING', 'CHARGING_STATIONS', 'AIR_CONDITIONING', 'DESTINATIONS', 'FUEL_STATUS', 'MAP_UPDATE', 'ONLINE_SPEECH', 'PARKING_INFORMATION', 'ROUTING', 'TRAFFIC_INFORMATION', 'WEB_RADIO']} May 11 08:51:42 raspberrypi hass[581]: 2021-05-11 08:51:42 INFO (MainThread) [skodaconnect.connection] Found vehicle with legacy VW-Group API May 11 08:51:42 raspberrypi hass[581]: 2021-05-11 08:51:42 INFO (MainThread) [skodaconnect.connection] Connecting to VW-Group API May 11 08:51:42 raspberrypi hass[581]: 2021-05-11 08:51:42 WARNING (MainThread) [homeassistant.setup] Setup of skodaconnect is taking over 10 seconds. May 11 08:51:43 raspberrypi hass[581]: 2021-05-11 08:51:43 DEBUG (MainThread) [skodaconnect.connection] Got authorization endpoint May 11 08:51:43 raspberrypi hass[581]: 2021-05-11 08:51:43 DEBUG (MainThread) [skodaconnect.connection] Found item: ('_csrf', 'bbee4e47-06b9-4f22-9602-54d9675252ca') May 11 08:51:43 raspberrypi hass[581]: 2021-05-11 08:51:43 DEBUG (MainThread) [skodaconnect.connection] Found item: ('relayState', '05072ce6bd2855ff934c886342b8ffcfd50fa68b') May 11 08:51:43 raspberrypi hass[581]: 2021-05-11 08:51:43 DEBUG (MainThread) [skodaconnect.connection] Found item: ('hmac', '92ef460ef5da97c9ff2b6f9f51496f0c432f4dddc9767b7d55dbb78839f11451') May 11 08:51:43 raspberrypi hass[581]: 2021-05-11 08:51:43 DEBUG (MainThread) [skodaconnect.connection] Posting email with form data {'_csrf': 'bbee4e47-06b9-4f22-9602-54d9675252ca', 'relayState': '05072ce6bd2855ff934c886342b8ffcfd50fa68b', 'hmac': '92ef460ef5da97c9ff2b6f9f51496f0c432f4dddc9767b7d55dbb78839f11451', 'email': '[EMAIL]@gmail.com'} May 11 08:51:43 raspberrypi hass[581]: 2021-05-11 08:51:43 DEBUG (MainThread) [skodaconnect.connection] Found item: ('_csrf', 'bbee4e47-06b9-4f22-9602-54d9675252ca') May 11 08:51:43 raspberrypi hass[581]: 2021-05-11 08:51:43 DEBUG (MainThread) [skodaconnect.connection] Found item: ('relayState', '05072ce6bd2855ff934c886342b8ffcfd50fa68b') May 11 08:51:43 raspberrypi hass[581]: 2021-05-11 08:51:43 DEBUG (MainThread) [skodaconnect.connection] Found item: ('email', '[EMAIL]@gmail.com') May 11 08:51:43 raspberrypi hass[581]: 2021-05-11 08:51:43 DEBUG (MainThread) [skodaconnect.connection] Found item: ('hmac', 'f88cee164491c5cd3a7b778358785c5fd39a56ff28e8eb9d1aa15022092d6d6b') May 11 08:51:43 raspberrypi hass[581]: 2021-05-11 08:51:43 DEBUG (MainThread) [skodaconnect.connection] Authenticating with email and password. May 11 08:51:43 raspberrypi hass[581]: 2021-05-11 08:51:43 DEBUG (MainThread) [skodaconnect.connection] Parsing login response. May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] Login successful, received authorization code. May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] Trying to fetch user identity tokens. May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] User identity token verified OK. May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 INFO (MainThread) [skodaconnect.connection] Successfully logged in May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] Trying to fetch api tokens. May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] VW-Group API token verified OK. May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] Available token {'skoda': {'access_token': 'TOKEN', 'refresh_token': 'TOKEN', 'id_token': 'TOKEN', 'token_type': 'bearer', 'expires_in': 3599}, 'connect': {'access_token': 'TOKEN', 'id_token': 'TOKEN', 'token_type': 'bearer', 'expires_in': 3599}, 'vwg': {'access_token': 'TOKEN', 'token_type': 'bearer', 'refresh_token': 'TOKEN', 'expires_in': 3599, 'scope': 'fal'}} May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] Going to call vehicle updates May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] Adding [CITIGO] for data refresh May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] Adding [ENYAQ] for data refresh May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] Calling update function for all vehicles May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.vehicle] Starting discovery for vehicle [CITIGO] May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] Executing GET request for URL: "https://mal-1a.prd.ece.vwg-connect.com/api/cs/vds/v1/vehicles/$vin/homeRegion", with VIN: "[CITIGO]" May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://mal-1a.prd.ece.vwg-connect.com/api/cs/vds/v1/vehicles/[CITIGO]/homeRegion" May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.vehicle] API endpoints: {'CHARGING': {'active': True}} May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] Executing GET request for URL: "https://api.connect.skoda-auto.cz/api/v1/charging/$vin/status", with VIN: "[ENYAQ]" May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://api.connect.skoda-auto.cz/api/v1/charging/[ENYAQ]/status" May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] Request for "https://mal-1a.prd.ece.vwg-connect.com/api/cs/vds/v1/vehicles/[CITIGO]/homeRegion" returned with status code [200] May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.vehicle] Get homeregion for VIN [CITIGO] May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] Executing GET request for URL: "fs-car/promoter/portfolio/v1/skoda/CZ/vehicle/$vin/carportdata", with VIN: "[CITIGO]" May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/skoda/CZ/vehicle/[CITIGO]/carportdata" May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] Attempting extraction of subject from identity token. May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] Executing GET request for URL: "https://customer-profile.apps.emea.vwapps.io/v1/customers/c7033925-7b01-4e61-85e9-2cb848f6e7a8/realCarData", with VIN: "" May 11 08:51:44 raspberrypi hass[581]: 2021-05-11 08:51:44 DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://customer-profile.apps.emea.vwapps.io/v1/customers/c7033925-7b01-4e61-85e9-2cb848f6e7a8/realCarData" May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] Request for "https://customer-profile.apps.emea.vwapps.io/v1/customers/c7033925-7b01-4e61-85e9-2cb848f6e7a8/realCarData" returned with status code [200] May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] Request for "https://api.connect.skoda-auto.cz/api/v1/charging/[ENYAQ]/status" returned with status code [200] May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] Got vehicle data {'plug': {'connectionState': 'Disconnected', 'lockState': 'Unlocked'}, 'charging': {'state': 'ReadyForCharging', 'remainingToCompleteInSeconds': 0, 'chargingPowerInWatts': 0.0, 'chargingRateInKilometersPerHour': 0.0, 'chargingType': 'Invalid', 'chargeMode': 'MANUAL'}, 'battery': {'cruisingRangeElectricInMeters': 218000, 'stateOfChargeInPercent': 72}} May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] Request for "https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/skoda/CZ/vehicle/[CITIGO]/carportdata" returned with status code [200] May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 INFO (MainThread) [skodaconnect.vehicle] Vehicle [CITIGO] added. Homeregion is "https://mal-1a.prd.ece.vwg-connect.com/api" May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.vehicle] Attempting discovery of supported API endpoints for vehicle. May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] Executing GET request for URL: "/api/rolesrights/operationlist/v3/vehicles/$vin", with VIN: "[CITIGO]" May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/operationlist/v3/vehicles/[CITIGO]" May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] Request for "https://mal-1a.prd.ece.vwg-connect.com/api/rolesrights/operationlist/v3/vehicles/[CITIGO]" returned with status code [200] May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.vehicle] Discovered enabled service: rclima_v1 May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.vehicle] Discovered enabled service: carfinder_v1 May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.vehicle] Discovered enabled service: statusreport_v1 May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.vehicle] Discovered enabled service: trip_statistic_v1 May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.vehicle] Discovered enabled service: rbatterycharge_v1 May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.vehicle] API endpoints: {'rheating_v1': {'active': False}, 'rclima_v1': {'active': True, 'expiration': datetime.datetime(2030, 6, 7, 23, 0, tzinfo=datetime.timezone.utc), 'operations': ['P_START_CLIMA_NOSET', 'G_JOBSTATUS', 'P_STOP', 'G_SETTINGS', 'G_DATA', 'G_STATUS', 'P_SETTINGS', 'P_START_CLIMA_EL']}, 'rlu_v1': {'active': False}, 'trip_statistic_v1': {'active': True, 'expiration': datetime.datetime(2030, 6, 7, 23, 0, tzinfo=datetime.timezone.utc), 'operations': ['G_AGGR_TRIPDATA', 'D_TRIPDATA', 'G_TRIPDATA', 'G_JOBSTATUS']}, 'statusreport_v1': {'active': True, 'expiration': datetime.datetime(2030, 6, 7, 23, 0, tzinfo=datetime.timezone.utc), 'operations': ['G_CVDATAID', 'G_RQSTAT', 'G_SVDATA', 'G_CVDATA']}, 'rbatterycharge_v1': {'active': True, 'expiration': datetime.datetime(2030, 6, 7, 23, 0, tzinfo=datetime.timezone.utc), 'operations': ['G_SETTINGS', 'G_DATA', 'P_STOP', 'P_SETTINGS', 'G_STATUS', 'P_START_NOSET', 'G_JOBSTATUS', 'P_START']}, 'rhonk_v1': {'active': False}, 'carfinder_v1': {'active': True, 'expiration': datetime.datetime(2030, 6, 7, 23, 0, tzinfo=datetime.timezone.utc), 'operations': ['FIND_CAR']}} May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] Executing GET request for URL: "fs-car/bs/climatisation/v1/skoda/CZ/vehicles/$vin/climater", with VIN: "[CITIGO]" May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/skoda/CZ/vehicles/[CITIGO]/climater" May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] Executing GET request for URL: "fs-car/bs/tripstatistics/v1/skoda/CZ/vehicles/$vin/tripdata/shortTerm?newest", with VIN: "[CITIGO]" May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://msg.volkswagen.de/fs-car/bs/tripstatistics/v1/skoda/CZ/vehicles/[CITIGO]/tripdata/shortTerm?newest" May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] Executing GET request for URL: "fs-car/bs/cf/v1/skoda/CZ/vehicles/$vin/position", with VIN: "[CITIGO]" May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://msg.volkswagen.de/fs-car/bs/cf/v1/skoda/CZ/vehicles/[CITIGO]/position" May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] Executing GET request for URL: "fs-car/bs/vsr/v1/skoda/CZ/vehicles/$vin/status", with VIN: "[CITIGO]" May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://msg.volkswagen.de/fs-car/bs/vsr/v1/skoda/CZ/vehicles/[CITIGO]/status" May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] Executing GET request for URL: "fs-car/bs/batterycharge/v1/skoda/CZ/vehicles/$vin/charger", with VIN: "[CITIGO]" May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/skoda/CZ/vehicles/[CITIGO]/charger" May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 WARNING (MainThread) [skodaconnect.connection] Received "unauthorized" error while fetching data: 401, message='Unauthorized', url=URL('https://msg.volkswagen.de/fs-car/bs/batterycharge/v1/skoda/CZ/vehicles/[CITIGO]/charger') May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 WARNING (MainThread) [skodaconnect.connection] Could not fetch charger, HTTP status code: 401 May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.vehicle] Could not fetch charger data May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] Request for "https://msg.volkswagen.de/fs-car/bs/climatisation/v1/skoda/CZ/vehicles/[CITIGO]/climater" returned with status code [200] May 11 08:51:45 raspberrypi hass[581]: 2021-05-11 08:51:45 DEBUG (MainThread) [skodaconnect.connection] Request for "https://msg.volkswagen.de/fs-car/bs/tripstatistics/v1/skoda/CZ/vehicles/[CITIGO]/tripdata/shortTerm?newest" returned with status code [200] May 11 08:51:46 raspberrypi hass[581]: 2021-05-11 08:51:46 DEBUG (MainThread) [skodaconnect.connection] Request for "https://msg.volkswagen.de/fs-car/bs/vsr/v1/skoda/CZ/vehicles/[CITIGO]/status" returned with status code [200] May 11 08:51:46 raspberrypi hass[581]: 2021-05-11 08:51:46 DEBUG (MainThread) [skodaconnect.connection] Request for "https://msg.volkswagen.de/fs-car/bs/cf/v1/skoda/CZ/vehicles/[CITIGO]/position" returned with status code [200] May 11 08:51:46 raspberrypi hass[581]: 2021-05-11 08:51:46 WARNING (MainThread) [custom_components.skodaconnect] Could not login to Skoda Connect, please check your credentials and verify that the service is working May 11 08:51:46 raspberrypi hass[581]: 2021-05-11 08:51:46 ERROR (MainThread) [homeassistant.setup] Setup failed for skodaconnect: Integration failed to initialize.

Farfar commented 3 years ago

I have just found the issue. A typo in the code that caused the library to assume that the connection wasn't logged in anymore when collecting charger data. Should be fixed in RC4.

bslefevre commented 3 years ago

It seems to be working with RC4! But with the Citigo-e the name for the car is taken from the webAPI and with the Enyaq the entities are being prefixed with the VIN. Even when I add name: VIN: "New Name" The entities are still being prefixed with the VIN :-)

Farfar commented 3 years ago

It seems to be working with RC4! But with the Citigo-e the name for the car is taken from the webAPI and with the Enyaq the entities are being prefixed with the VIN. Even when I add name: VIN: "New Name" The entities are still being prefixed with the VIN :-)

Yes, since Enyaq use the new Skoda native API I haven't figured out yet how to fetch the correct data for vehicle info. For VW-Group API this is fetched with different API endpoints that aren't available for the Enyaq. I have the data and a plan though, it seems like the vehicle info data (model, year, nickname) for both new and old cars are available through Skoda API so it's just a matter of testing and coding to make it work.

bslefevre commented 3 years ago

For now, the most important entities work! πŸ‘ image

fritsie82 commented 3 years ago

Unfortunately it does not work for me yet :( updated to RC4 but it fails to start.

Log:

2021-05-11 09:41:33 DEBUG (MainThread) [skodaconnect.connection] Found item: ('_csrf', '23758fd3-2140-4b10-9b34-6754e5a9ee88') 2021-05-11 09:41:33 DEBUG (MainThread) [skodaconnect.connection] Found item: ('relayState', '09fbd6ccc10f78a7fa2eab8b99fb7e60cb1fe1f8') 2021-05-11 09:41:33 DEBUG (MainThread) [skodaconnect.connection] Found item: ('email', '[EMAIL ADRESS]') 2021-05-11 09:41:33 DEBUG (MainThread) [skodaconnect.connection] Found item: ('hmac', '3fff70d828ff5cca662898a1445d78998299eed8fea744863cfd2aad59b0065e') 2021-05-11 09:41:33 DEBUG (MainThread) [skodaconnect.connection] Authenticating with email and password. 2021-05-11 09:41:33 INFO (MainThread) [homeassistant.setup] Setup of domain default_config took 1.2 seconds 2021-05-11 09:41:33 INFO (SyncWorker_2) [pychromecast] Querying device status 2021-05-11 09:41:33 DEBUG (MainThread) [skodaconnect.connection] Parsing login response. 2021-05-11 09:41:33 INFO (MainThread) [hass_nabucasa.google_report_state] Connected 2021-05-11 09:41:34 INFO (MainThread) [hass_nabucasa.iot] Connected 2021-05-11 09:41:34 DEBUG (MainThread) [skodaconnect.connection] Login successful, received authorization code. 2021-05-11 09:41:34 DEBUG (MainThread) [skodaconnect.connection] Trying to fetch user identity tokens. 2021-05-11 09:41:34 DEBUG (MainThread) [skodaconnect.connection] User identity token verified OK. 2021-05-11 09:41:34 DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://api.connect.skoda-auto.cz/api/v2/garage/vehicles" 2021-05-11 09:41:35 DEBUG (MainThread) [skodaconnect.connection] Request for "https://api.connect.skoda-auto.cz/api/v2/garage/vehicles" returned with status code [200] 2021-05-11 09:41:35 DEBUG (MainThread) [skodaconnect.connection] Found vehicle(s) associated with account. 2021-05-11 09:41:35 DEBUG (MainThread) [skodaconnect.connection] Found vehicle [VIN] with connectivity: REMOTE 2021-05-11 09:41:35 DEBUG (MainThread) [skodaconnect.vehicle] Creating Vehicle class object with data {'vin': '[VIN]', 'service': 'REMOTE', 'capabilities': ['DCS', 'AUTOMATION', 'CHARGING', 'CHARGING_STATIONS', 'AIR_CONDITIONING', 'DESTINATIONS', 'FUEL_STATUS', 'MAP_UPDATE', 'ONLINE_SPEECH', 'PARKING_INFORMATION', 'ROUTING', 'TRAFFIC_INFORMATION', 'WEB_RADIO']} 2021-05-11 09:41:35 ERROR (MainThread) [homeassistant.setup] Error during setup of component skodaconnect Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 248, in _async_setup_component result = await task File "/config/custom_components/skodaconnect/init.py", line 298, in async_setup return await update(utcnow()) File "/config/custom_components/skodaconnect/init.py", line 216, in update await connection.doLogin() File "/usr/local/lib/python3.8/site-packages/skodaconnect/connection.py", line 137, in doLogin await self.set_token('vwg') File "/usr/local/lib/python3.8/site-packages/skodaconnect/connection.py", line 1212, in set_token self._session_headers['Authorization'] = 'Bearer ' + self._session_tokens[type]['access_token'] KeyError: 'vwg'

fritsie82 commented 3 years ago

By the way @Farfar I am amazed how quick you adopted to this new API :) Big thanks for all of your efforts so far

Farfar commented 3 years ago

Unfortunately it does not work for me yet :( updated to RC4 but it fails to start.

Log:

2021-05-11 09:41:33 DEBUG (MainThread) [skodaconnect.connection] Found item: ('_csrf', '23758fd3-2140-4b10-9b34-6754e5a9ee88') 2021-05-11 09:41:33 DEBUG (MainThread) [skodaconnect.connection] Found item: ('relayState', '09fbd6ccc10f78a7fa2eab8b99fb7e60cb1fe1f8') 2021-05-11 09:41:33 DEBUG (MainThread) [skodaconnect.connection] Found item: ('email', '[EMAIL ADRESS]') 2021-05-11 09:41:33 DEBUG (MainThread) [skodaconnect.connection] Found item: ('hmac', '3fff70d828ff5cca662898a1445d78998299eed8fea744863cfd2aad59b0065e') 2021-05-11 09:41:33 DEBUG (MainThread) [skodaconnect.connection] Authenticating with email and password. 2021-05-11 09:41:33 INFO (MainThread) [homeassistant.setup] Setup of domain default_config took 1.2 seconds 2021-05-11 09:41:33 INFO (SyncWorker_2) [pychromecast] Querying device status 2021-05-11 09:41:33 DEBUG (MainThread) [skodaconnect.connection] Parsing login response. 2021-05-11 09:41:33 INFO (MainThread) [hass_nabucasa.google_report_state] Connected 2021-05-11 09:41:34 INFO (MainThread) [hass_nabucasa.iot] Connected 2021-05-11 09:41:34 DEBUG (MainThread) [skodaconnect.connection] Login successful, received authorization code. 2021-05-11 09:41:34 DEBUG (MainThread) [skodaconnect.connection] Trying to fetch user identity tokens. 2021-05-11 09:41:34 DEBUG (MainThread) [skodaconnect.connection] User identity token verified OK. 2021-05-11 09:41:34 DEBUG (MainThread) [skodaconnect.connection] HTTP GET "https://api.connect.skoda-auto.cz/api/v2/garage/vehicles" 2021-05-11 09:41:35 DEBUG (MainThread) [skodaconnect.connection] Request for "https://api.connect.skoda-auto.cz/api/v2/garage/vehicles" returned with status code [200] 2021-05-11 09:41:35 DEBUG (MainThread) [skodaconnect.connection] Found vehicle(s) associated with account. 2021-05-11 09:41:35 DEBUG (MainThread) [skodaconnect.connection] Found vehicle [VIN] with connectivity: REMOTE 2021-05-11 09:41:35 DEBUG (MainThread) [skodaconnect.vehicle] Creating Vehicle class object with data {'vin': '[VIN]', 'service': 'REMOTE', 'capabilities': ['DCS', 'AUTOMATION', 'CHARGING', 'CHARGING_STATIONS', 'AIR_CONDITIONING', 'DESTINATIONS', 'FUEL_STATUS', 'MAP_UPDATE', 'ONLINE_SPEECH', 'PARKING_INFORMATION', 'ROUTING', 'TRAFFIC_INFORMATION', 'WEB_RADIO']} 2021-05-11 09:41:35 ERROR (MainThread) [homeassistant.setup] Error during setup of component skodaconnect Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 248, in _async_setup_component result = await task File "/config/custom_components/skodaconnect/init.py", line 298, in async_setup return await update(utcnow()) File "/config/custom_components/skodaconnect/init.py", line 216, in update await connection.doLogin() File "/usr/local/lib/python3.8/site-packages/skodaconnect/connection.py", line 137, in doLogin await self.set_token('vwg') File "/usr/local/lib/python3.8/site-packages/skodaconnect/connection.py", line 1212, in set_token self._session_headers['Authorization'] = 'Bearer ' + self._session_tokens[type]['access_token'] KeyError: 'vwg'

Ah, I have some flaws in the logic implemented. It tries to set the default authorization token for requests to one used for the old API. That won't work if you have only a Enyaq for instance. I will try to fix ASAP.

fritsie82 commented 3 years ago

BTW we're on the bleeding edge here with the Skoda API, when I picked up my Enyaq on the 28th of April the SKODA API was not ready yet (dealer told me I could not register to MySkoda until they pushed it live), so the API is brand spanking new at the Skoda side and is probably still a bit buggy.

Farfar commented 3 years ago

BTW we're on the bleeding edge here with the Skoda API, when I picked up my Enyaq on the 28th of April the SKODA API was not ready yet (dealer told me I could not register to MySkoda until they pushed it live), so the API is brand spanking new at the Skoda side and is probably still a bit buggy.

Yeah from what I've seen this far it's very basic in functionality. Many features seems to be missing but probably on their way. I can say this though, the formatting and implementation from Skoda is SO much more easy to deal with than VW-Group API. If they continue on the same path I hope they migrate all cars to their own API.

bslefevre commented 3 years ago

The refresh interval or the refresh at all doesn't seem to be working any more Is that something you're aware of? Forcing the update via the entity results in an error

Farfar commented 3 years ago

The refresh interval or the refresh at all doesn't seem to be working any more Is that something you're aware of? Forcing the update via the entity results in an error

Refresh interval is how often the integration fetches data.from the API. The refresh button will force the car to connect and update, it's described in the READMEs. But force refresh is not implemented on new API which is why I disabled it in RC5.

fritsie82 commented 3 years ago

image YESSS it works

I'm guessing the FALSE name comes from me not providing a name in the config YAML?

fritsie82 commented 3 years ago

Just a small note, still one error in the logs, not sure if it is relevant:

Logger: skodaconnect.connection Source: /usr/local/lib/python3.8/site-packages/skodaconnect/connection.py:649 First occurred: 6:48:17 PM (1 occurrences) Last logged: 6:48:17 PM

Could not fetch realCarData, error:

(after error: there is no more data)

Farfar commented 3 years ago

I'm guessing the FALSE name comes from me not providing a name in the config YAML?

Haha no it's me who have set the "nickname" variable incorrectly somewhere when expected data is missing. Have you named your car in the app? The error you get for "realCarData" is somewhat related.

fritsie82 commented 3 years ago

The name was the default "My Enyaq" that is given to it during the account setup. I renamed it in the app and reloaded Skodaconnect but it is still giving me FALSE as a name

Farfar commented 3 years ago

The name was the default "My Enyaq" that is given to it during the account setup. I renamed it in the app and reloaded Skodaconnect but it is still giving me FALSE as a name

When it's been added under a name you either have to rename all entities or remove the integration config (comment it out), restart hass and remove entities, add config again and reboot hass.

Do you still get the realCarData error? I don't remember without the debugs in front of me if that endpoint is where the nickname is set.

bslefevre commented 3 years ago

The refresh interval or the refresh at all doesn't seem to be working any more

Is that something you're aware of?

Forcing the update via the entity results in an error

Refresh interval is how often the integration fetches data.from the API.

The refresh button will force the car to connect and update, it's described in the READMEs.

But force refresh is not implemented on new API which is why I disabled it in RC5.

My data is still the same as this morning, I've depleted my battery from the Enyaq today but it still says it's 72% and the cable is connected but not in the HASS My is interval setting is 5mins, but it doesn't seem to work unfortunallyimage

Farfar commented 3 years ago

The refresh interval or the refresh at all doesn't seem to be working any more

Is that something you're aware of?

Forcing the update via the entity results in an error

Refresh interval is how often the integration fetches data.from the API. The refresh button will force the car to connect and update, it's described in the READMEs. But force refresh is not implemented on new API which is why I disabled it in RC5.

My data is still the same as this morning, I've depleted my battery from the Enyaq today but it still says it's 72% and the cable is connected but not in the HASS My is interval setting is 5mins, but it doesn't seem to work unfortunallyimage

The integration can only fetch data from the servers and never directly from car. If the data is stale it's usually because the data haven't been updated from the car of problems with communication to servers. Is the data updated in the app?

bslefevre commented 3 years ago

You're making a very good point! It seems that the data within the app show the same (wrong) results. I'm ready on the internet that Skoda-Connect should work after the 13th of May! By the way, is is possible to show Enyaqs Odometer? That's something I need for my statistics :D

Farfar commented 3 years ago

By the way, is is possible to show Enyaqs Odometer? That's something I need for my statistics :D

Not yet, the only exposed endpoints so far is charging/status and charging/settings. This is the data returned:

charging/status
{
    "battery": {
        "cruisingRangeElectricInMeters": 218000,
        "stateOfChargeInPercent": 72
    },
    "charging": {
        "chargeMode": "MANUAL",
        "chargingPowerInWatts": 0.0,
        "chargingRateInKilometersPerHour": 0.0,
        "chargingType": "Invalid",
        "remainingToCompleteInSeconds": 0,
        "state": "ReadyForCharging"
    },
    "plug": {
        "connectionState": "Disconnected",
        "lockState": "Unlocked"
    }
}
charging/settings
{
    "autoUnlockPlugWhenCharged": "Permanent",
    "maxChargeCurrentAc": "Maximum",
    "targetStateOfChargeInPercent": 100
}
fritsie82 commented 3 years ago

The name was the default "My Enyaq" that is given to it during the account setup. I renamed it in the app and reloaded Skodaconnect but it is still giving me FALSE as a name

When it's been added under a name you either have to rename all entities or remove the integration config (comment it out), restart hass and remove entities, add config again and reboot hass.

Do you still get the realCarData error? I don't remember without the debugs in front of me if that endpoint is where the nickname is set.

I have complete uninstalled Skodaconnect and reconnected it and now I am seeing the right name in all my entities! Also, the realCarData error is gone.

Raainman commented 3 years ago

I'm not seeing updates to all entities;

I did a fresh install of a Home Assistant docker instance.

Then installed RC5 within the docker container, and configured my Enyaq. Then the entities start showing up, however the binary sensors are never changed (and not correct), although I do get the data when I look at the response which is logged (see below).

I am a new Home Assistant user, (but not new to domotica), and some data seems to be shown but not all. So did I forget something or is something else wrong ?

Also I'm seeing some values that could be added, like charingPowerInWatts for instance.

`2021-05-24 10:39:15 DEBUG (MainThread) [skodaconnect.connection] Got vehicle data {'plug': {'connectionState': 'Connected', 'lockState': 'Locked'}, 'charging': {'state': 'ReadyForCharging', 'remainingToCompleteInSeconds': 0, 'chargingPowerInWatts': 0.0, 'chargingRateInKilometersPerHour': 0.0, 'chargingType': 'Invalid', 'chargeMode': 'MANUAL'}, 'battery': {'cruisingRangeElectricInMeters': 315000, 'stateOfChargeInPercent': 80}}

2021-05-24 10:41:16 DEBUG (MainThread) [skodaconnect.connection] Got vehicle data {'plug': {'connectionState': 'Connected', 'lockState': 'Locked'}, 'charging': {'state': 'Charging', 'remainingToCompleteInSeconds': 2400, 'chargingPowerInWatts': 10500.0, 'chargingRateInKilometersPerHour': 53.0, 'chargingType': 'Ac', 'chargeMode': 'MANUAL'}, 'battery': {'cruisingRangeElectricInMeters': 319000, 'stateOfChargeInPercent': 81}}`

RC5 Issue

Farfar commented 3 years ago

2021-05-24 10:41:16 DEBUG (MainThread) [skodaconnect.connection] Got vehicle data {'plug': {'connectionState': 'Connected', 'lockState': 'Locked'}, 'charging': {'state': 'Charging', 'remainingToCompleteInSeconds': 2400, 'chargingPowerInWatts': 10500.0, 'chargingRateInKilometersPerHour': 53.0, 'chargingType': 'Ac', 'chargeMode': 'MANUAL'}, 'battery': {'cruisingRangeElectricInMeters': 319000, 'stateOfChargeInPercent': 81}}`

Thanks, this is still WIP and since I don't have a Enyaq myself I can't test all endpoint data. With this info I'll be able to fix theese sensors, RC6 on the way!

Raainman commented 3 years ago

Great and if you need any testing or info, I would be happy to help.

Thanks for this so far!

Develon1000 commented 3 years ago

Any news on RC6 @Farfar? I just got my Enyaq and I'm experiencing similar issues as @Raainman with certain sensors not updating or showing the correct state. What seems to be working is the electric range and the battery percentage. It would be great if you could get this working and even greater if we were able control the HVAC from HA! πŸ™‚

As others have said, I'd be happy to supply log files or help in other ways if needed.πŸ™‚

Farfar commented 3 years ago

Any news on RC6 @Farfar? I just got my Enyaq and I'm experiencing similar issues as @Raainman with certain sensors not updating or showing the correct state. What seems to be working is the electric range and the battery percentage. It would be great if you could get this working and even greater if we were able control the HVAC from HA! πŸ™‚

As others have said, I'd be happy to supply log files or help in other ways if needed.πŸ™‚

New RC out now with config flow. It's a bit untested for merging yaml config so I recommend to setup from scratch. It should contain fixes for correct sensor states.