Any problems when updating the car status every 30 sec? I’ve heard other car models having 12v car battery drainage when contacting the car too often.
No issues noted by me after nearly 3 months of use.
I assumed that the integration is querying the data held on the central VW server rather than triggering additional polling of the car itself, but happy to be corrected.
Correct @dazzyp - you’re not pinging the car but rather VW/Cupra’s (slightly ropey) back-end API. The car autonomously sends periodic updates to the back-end as and when it’s needed, and this integration will pick them up on the next polling interval. There is no relation between the rate that the integration polls and the rate that the car updates, which is typically every few minutes depending on what needs to be sent.
In short, nothing to worry about
I’ve added a new, minor update today which should sort out an issue which was causing HA to take a long time to start up when this integration was installed. Grab it here!
I tried updating but now I get ‘Unexpected error’ instantly when entering username and password. Then tried to do a fresh install of the integration, by removing it from HACS and removing the files from custom_components
, but I get the same error. Anyone else having this?
Maybe I’m doing something wrong, but these are the installation steps right?:
Don’t need to do any of that. Just install from here into custom_components
, reboot and add the integration. Remember to select the Cupra login. Job done.
If still having issues, share some logs and I’ll try to help.
Thanks for the quick reply. I followed the steps, but I get the same error. I find this in the logs:
2023-03-27 22:13:17.710 ERROR (MainThread) [custom_components.volkswagen_we_connect_id.config_flow] Unexpected exception during setup
Traceback (most recent call last):
File "/config/custom_components/volkswagen_we_connect_id/config_flow.py", line 75, in async_step_user
info = await validate_input(self.hass, user_input)
File "/config/custom_components/volkswagen_we_connect_id/config_flow.py", line 40, in validate_input
we_connect = weconnect.WeConnect(
TypeError: WeConnect.__init__() got an unexpected keyword argument 'service'
Can you confirm weconnect-python version? Should be in the log.
Should say Weconnect-python version 0.49.16
I’m guessing that’s something I’m missing! I can’t seem to find that anywhere. How can I install this?
It’s installed automatically in the background by the component, but if you’ve installed the original VW component you’ve probably got an incorrect, non-forked version. Search the logs for “weconnect-python”.
Not finding anything mentioning weconnect-python… Starting to feel like a noobie here
Edit: Updating HA from 2023.3.5 tot 2023.3.6 has somehow fixed being able to configure the integration. Now getting a 500 error when retrieving data. Hopefully this is something that will be resolved automatically
Yes, upgrading HA clears out all of the Python libraries and forces them to redownload, so it will have cleared out your conflict.
Can you share the 500 error you’re seeing? (mine is working ok today)
Good to hear yours is working okay
I see the following in the logs (I masked the VIN, but it’s the right one):
2023-03-28 11:03:06.841 ERROR (SyncWorker_0) [weconnect] Failed to retrieve data for VIN ************: Could not fetch data. Status Code was: 500
2023-03-28 11:03:06.845 ERROR (SyncWorker_0) [weconnect] Could not fetch data. Status Code was: 500
2023-03-28 11:05:06.854 ERROR (MainThread) [custom_components.volkswagen_we_connect_id] Timeout updating weconnect
2023-03-28 11:05:16.865 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform volkswagen_we_connect_id is taking over 10 seconds.
2023-03-28 11:05:16.869 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform volkswagen_we_connect_id is taking over 10 seconds.
2023-03-28 11:05:16.873 WARNING (MainThread) [homeassistant.components.number] Setup of number platform volkswagen_we_connect_id is taking over 10 seconds.
2023-03-28 11:05:16.876 WARNING (MainThread) [homeassistant.components.device_tracker] Setup of device_tracker platform volkswagen_we_connect_id is taking over 10 seconds.
2023-03-28 11:05:45.890 ERROR (SyncWorker_1) [weconnect] Failed to retrieve data for VIN ************: Could not fetch data. Status Code was: 500
2023-03-28 11:05:45.894 ERROR (SyncWorker_1) [weconnect] Could not fetch data. Status Code was: 500
2023-03-28 11:06:06.866 ERROR (MainThread) [homeassistant.components.binary_sensor] Setup of platform volkswagen_we_connect_id is taking longer than 60 seconds. Startup will proceed without waiting any longer.
2023-03-28 11:06:06.871 ERROR (MainThread) [homeassistant.components.sensor] Setup of platform volkswagen_we_connect_id is taking longer than 60 seconds. Startup will proceed without waiting any longer.
2023-03-28 11:06:06.876 ERROR (MainThread) [homeassistant.components.number] Setup of platform volkswagen_we_connect_id is taking longer than 60 seconds. Startup will proceed without waiting any longer.
2023-03-28 11:06:06.879 ERROR (MainThread) [homeassistant.components.device_tracker] Setup of platform volkswagen_we_connect_id is taking longer than 60 seconds. Startup will proceed without waiting any longer.
Can you confirm that you are seeing a weconnect-python version in your logs now? Should be just once, at startup. I assume you’ve at least managed to do the initial login and have the list of entities in HA under devices and services?
After this, can you see if you can try debug to find out which call is failing:
logger:
default: warn
logs:
homeassistant.components.recorder: warn #debug
custom_components.volkswagen_we_connect_id: debug
weconnect: debug
We have seen situations in the past where certain cars at certain versions behave differently on the API, so this might be a localised issue for you. Has this ever worked for you, and how new is your car?
Unfortunately not seeing a weconnect-python version in the logs. Yesterday I have entered my username and password and it started to configure, but I have no entities available.
This has worked just before I started updating. My car is from december 2021.
I’m going to configure the logger and will report back.
Edit: Okay I now see the weconnect-python version is 0.49.16. Rest of the log can be found here and here.
Yeah, looks like your car is blowing up here:
DEBUG:weconnect:Retrieved data from url: https://ola.prod.code.seat.cloud.vwgroup.com/v1/vehicles/<vin>/status
DEBUG:weconnect:{"lights": "off", "engine": "off", "hood": {"open": "false", "locked": "false"}, "trunk": {"open": "false", "locked": "true"}, "doors": {"frontLeft": {"open": "false", "locked": "true"}, "frontRight": {"open": "false", "locked": "true"}, "rearLeft": {"open": "false", "locked": "true"}, "rearRight": {"open": "false", "locked": "true"}}, "windows": {"frontLeft": "closed", "frontRight": "closed", "rearLeft": "closed", "rearRight": "closed"}}
This is taken from my debug logs on the console, and I don’t see this in yours. I’m guessing that your car, being quite an early one, probably doesn’t support lock status which is why the most recent updates has broken it.
I notice that your car is missing state
from the capabilities list here, when compared to my car:
{"capabilities": [{"id": "mapUpdate", "status": [], "expirationDate": "2032-03-09T23:59:59Z"}, {"id": "routing", "status": [], "expirationDate": "2032-03-09T23:59:59Z"}, {"id": "parkingInformation", "status": [], "expirationDate": "2032-03-09T23:59:59Z"}, {"id": "automation", "status": [], "expirationDate": "2032-03-09T23:59:59Z"}, {"id": "onlineSpeech", "status": [], "expirationDate": "2032-03-09T23:59:59Z"}, {"id": "chargingStations", "status": [], "expirationDate": "2032-03-09T23:59:59Z"}, {"id": "trafficInformation", "status": [], "expirationDate": "2032-03-09T23:59:59Z"}, {"id": "charging", "status": [], "expirationDate": "2032-03-09T23:59:59Z"}, {"id": "webRadio", "status": [], "expirationDate": "2032-03-09T23:59:59Z"}, {"id": "climatisation", "status": [], "expirationDate": "2032-03-09T23:59:59Z"}]}
I suspect that either your in-car hardware, or software level does not return lock status (boo!) and as such it’s failing the call. Can you confirm if the official app shows door lock / window status for you? For my car (mid-2022), this shows up as a yellow “unlocked” only when unlocked, but otherwise doesn’t really show much else:
Can you also send me your “services” page from the official app? (scroll down on main page)
Edit: Having pondered this over lunch, I’m pretty sure from earlier work that the above is correct and that vehicles not advertising “state” capability cannot provide lock, window and engine status information. On this basis, there’s a new version available here, which will detect this and not attempt to load this data - would appreciate it if you could test it. As always, just drop over the top of your existing custom component and restart HA. No need to mess around with anything else.
Thanks! Just installed the latest version and that works like a charm! Thank you for looking into this
Everything is working fine, except the ability to set Target State of Charge and Target Temperature are missing.
The car is getting a software update tomorrow, so hopefully I get more entities in HA later
Excellent, good news. Would you mind confirming your car’s software version before and after the update. Will be interesting to see what (if anything) gets changed as a result…
Surprised you can’t see the target charge and temperature. Can you do this in the official app?
At work I can see exactly how many kWh I have charged on the charging station and I think it would be great to see this again HA. I have tried to do this via a Riemann sum and a utility meter but unfortunately this does not work.
Has anyone already made a sensor that adds up the total power of a charge ?
Okay the update took longer than expected, but today I got the car back and I can say it’s a nice upgrade. Setting the target temperature and charge in HA are fixed and entities like odometer, location and door lock status are now available! Before update:
Hardware: H20
Software: 0796
ABT hardware: H43
ABT software: 6074
Navigation database: 20.7
Media-codec: 3.1.4
Available entities in HA: about 29
After update:
Hardware: H20
Software: 0561
ABT hardware: H43
ABT software: 6085
Navigation database: 22.9
Media-codec: 3.1.4
Available entities in HA: 59!
Ah, VW. Where the software version goes down but new features get added
Glad this is all working for you. Hopefully will help others having similar issues, and glad to hear that the component automatically picked up your additional capabilities and turned on the new features.