Cupra Born EV integration

Was fixed this morning, BTW.

Does this happen to work with VW ID3 as well? :crossed_fingers:t2:

You can use the integration that this was heavily based on, which works fine with the ID.3:

Thank you daern!

Are there more people who do not see data at the doors, window, lights, trunk and hood.
When I now look at binary_sensor.cupra_born_door_front_left_open_status, for example, I now see unknown while it says normally on / off.

Nope, working fine here. All of my individual sensors seem ok.

I have removed the integration and reinstalled it but I still see the doors, lights, trunk and hood are unknown. Are you also using the beta version and if not, please check whether you also see this there.

I also checked it in the app and it works fine there. Maybe something with the api not passing it right.

Just had a quick test of the library and it seemed to do sensible things:

#  Initialize
#  Login
#  Update
#  Report
[chargingSettings] (last captured 2023-09-01T15:59:11+00:00) (last updated 2023-09-01T17:10:41+00:00)
        Maximum Charge Current AC: maximum
        Auto Unlock When Charged: off
        Target SoC: 80.0 %
[chargingStatus] (last captured 2023-09-01T15:59:11+00:00) (last updated 2023-09-01T17:10:41+00:00)
        State: notReadyForCharging
        Mode: manual
        Remaining Charging Time: 0 minutes
        Charge Type: invalid
        Charging Settings: default
[batteryStatus] (last captured 2023-09-01T15:59:11+00:00) (last updated 2023-09-01T17:10:41+00:00)
        Current SoC: 80%
        Range: 291km
[accessStatus]
        Overall Status: safe
        Doors: 6 items
                frontLeft: closed, locked
                frontRight: closed, locked
                rearLeft: closed, locked
                rearRight: closed, locked
                trunk: closed, locked
                hood: closed, locked
        Windows: 4 items
                frontLeft: closed
                frontRight: closed
                rearLeft: closed
                rearRight: closed
        Engine: off
        Lights: off
        Door locks: locked
        Overall Status: safe
[connectionStatus]
        Connection state: online
#  done

Maybe try this yourself using GitHub - daernsinstantfortress/WeConnect-Cupra-python: Cupra version of the WeConnect python library ?

python3 examples/access_status.py -u <username> -p <password> --vin <vin> --service MyCupra

After a lot of reading and trying, I have not succeeded in collecting any data.
I do see this in the logs :
Logger: weconnect_cupra
Source: /usr/local/lib/python3.11/site-packages/weconnect_cupra/api/cupra/elements/vehicle.py:288
First occurred: 10:22:16 (89 occurrences)
Last logged: 11:19:17
Failed to get vehicle status

Unfortunately I’ll be abroad again for the next few days so can’t dive into this, thanks for the help so far.

Versie core-2023.9.0b3|
Type installatie Home Assistant OS
Python-versie 3.11.5

Have you granted all of the appropriate permissions in the app? This error wraps two calls: odometer, and access status - one of these must be failing on your car. Might be worth just refreshing them all anyway

After that, I’ve seen issues around this between different versions of the car - e.g. the first versions wouldn’t return any of the access status data. Has this ever worked for your car?

Yes, everything just worked.
I have deactivated and reactivated everything and now wait a few days and it will probably come back online.

1 Like

I’m pleased to say that this integration is now in the default list in HACS, so there should be no need to manually add the repository in future. Just search for it, and it will be there. Lovely :slight_smile:

3 Likes

Hi all

I’m curious if this integration can also be useful to integratie the Cupra Leon Break?

At this moment I tried it already but I don’t get any device in my HA. Maybe or hopefully I do something wrong because it would be great to be able to use this as well.

Kind regards
Joren

No, I’m afraid not. VAG have a very fragmented API model, so all of these vehicles have different back-ends. This integration is specifically for the Cupra Born range of cars.

Hello, have you managed to stabilize the kwh sensor associated with sensor.cupra_born_charge_power (sensor.batterij_kwh)? I would like to have one that gives me the total consumption since the beginning to calculate the total cost of the charge. Thanks in advance for your help.

tl;dr:
"After that enable the integration on the integration page in Home Assistant with your e-mail and password that you use to login into the app. "

HOW?

---------
It seems I am too dumb for this.

I have installed HACS in my HASSOS with SSH
Then I restarted my HASSOS
Now under HACS → Integrations there is a “Cupra WeConnect” “card”
When I click on it, it shows me the same site that told me how to install it. I can’t see where I can login to my cupra account anywhere?

Does anyone have a readme that doesn’t stop at “install it ffs” and then continues with “you are done”?

I need a “how to add things to actually see more than the examples” :smiley:

ahhh goddamn I found it. I am blind

Hi Daern, I want to show my gratitude and say a huge thank you for this amazing piece of work.
I’ve migrated to this new version and have been using it for the last few months.
Its been working really well!
Looking at the state of my Cupra in HA, has overtaken my previous top activity of obsessively monitoring my solar panels, and I’ve been working pondering on a whole new host of automation :slight_smile:

I’d love to buy you a coffee.
Thanks again and well done!

darren

Glad it’s working for you! Please share any interesting automation ideas you have as I’m sure others would be very interested in what you’ve been doing…and how it could help them too.

Awesome integration, thanks so much for putting this together Daern.

Would love some more automation ideas, so far I have the following which all send me slack notifications with relevant details when triggered.

  1. Arrived home 2 minutes ago and the car is still unlocked (I may have gotten distracted and not locked it)
  2. Arrived home and the current charge level is under 60% (so needs charging)
  3. Charging state changed (have had it stop charging at a public point and arrived back not as charged as I would like!)

Great ideas! Coincidentally, I have all three of these too, but with a bit of personal tweaking on each as I’ve been trying hard to tone down my notifications so they’re only telling me things I need to know, rather than the superfluous nonsense I initially configured (“Car has been plugged in.” - I know, I plugged it in!):

  1. I have this, but it only notifies after 15 minutes - I might be unloading shopping, faffing around with the kids, unloading bikes etc. so would rather only be notified when I really have left it open. That said, I should probably make the duration a bit tighter when parked away from home as I’ve already had to send a child running back to the car after they left a window open when we were all sat in the cinema!

  2. This one is really useful. Mine also sends a second reminder at 9pm, for when I ignore the first one :slight_smile:

  3. I get a charge summary (“Charge completed - requested 100%, got 80%”), but only when charging away from home as I don’t need to know about it at home. This is really useful as I know to go and move the car off the charger and be a good EV citizen. Used this one just tonight, as it happens.

Nice touch is that (1) and (2) also shout around the house (Google Assistant integration), so the family get a nice audio notification to tell someone to go and lock the car or plug it in…