Cupra Born Support in Home Assistant

All CUPRA Born related discussions
p3nn
Posts: 1
Joined: Wed May 24, 2023 3:23 pm

Post by p3nn »

Awesome, good job! I'm getting my Cupra Born next month and I use Home Assistant, excited to have a play :)

daern
Posts: 177
Joined: Wed Jul 20, 2022 1:31 pm

Post by daern »

FYI, the upcoming 2023.6 release of HA breaks this integration. You need to install a new version beforehand to avoid this:
https://github.com/daernsinstantfortres ... a4ff8e.zip

(just copy over the files in custom_components as usual and restart HA to take effect)
User avatar
CupraV3
Posts: 45
Joined: Wed Nov 23, 2022 9:55 am

Post by CupraV3 »

daern wrote: Fri Jun 02, 2023 10:21 am FYI, the upcoming 2023.6 release of HA breaks this integration. You need to install a new version beforehand to avoid this:
https://github.com/daernsinstantfortres ... a4ff8e.zip

(just copy over the files in custom_components as usual and restart HA to take effect)
Thanks for the heads up. Is it just a case of deleting the current 'volkswagen_we_connect_id' folder in 'custom_components' > rebooting HA > adding the newer version of the folder to 'custom_components' and rebooting again?

Also, after completing this process, will the Cupra Born dashboard I have created all look and function in the same way or will I have to recreate it?

Thanks
Cupra Born | V3 | Aurora Blue | e-Boost | 20" 'Blizzard' Wheels | Panoramic Roof | Easee One Charging Robot
daern
Posts: 177
Joined: Wed Jul 20, 2022 1:31 pm

Post by daern »

CupraV3 wrote: Fri Jun 02, 2023 1:56 pm Thanks for the heads up. Is it just a case of deleting the current 'volkswagen_we_connect_id' folder in 'custom_components' > rebooting HA > adding the newer version of the folder to 'custom_components' and rebooting again?

Also, after completing this process, will the Cupra Born dashboard I have created all look and function in the same way or will I have to recreate it?

Thanks
Just chuck the new files over the top of the old ones, and reboot. Nothing will change and you won't have to do anything. Do it before the 2023.6 upgrade next week and it should all go smoothly.
User avatar
CupraV3
Posts: 45
Joined: Wed Nov 23, 2022 9:55 am

Post by CupraV3 »

daern wrote: Fri Jun 02, 2023 2:15 pm
CupraV3 wrote: Fri Jun 02, 2023 1:56 pm Thanks for the heads up. Is it just a case of deleting the current 'volkswagen_we_connect_id' folder in 'custom_components' > rebooting HA > adding the newer version of the folder to 'custom_components' and rebooting again?

Also, after completing this process, will the Cupra Born dashboard I have created all look and function in the same way or will I have to recreate it?

Thanks
Just chuck the new files over the top of the old ones, and reboot. Nothing will change and you won't have to do anything. Do it before the 2023.6 upgrade next week and it should all go smoothly.
Great I’ll do it now!
Cupra Born | V3 | Aurora Blue | e-Boost | 20" 'Blizzard' Wheels | Panoramic Roof | Easee One Charging Robot
Elmeraculous
Posts: 5
Joined: Sat Jun 03, 2023 10:26 am

Post by Elmeraculous »

@daern Stumbled upon your great Cupra/Home Assistant integration on a Reddit post. I have successfully installed Home Assistant on my RPI 3 and have your Cupra integration running. The part I'm trying now is to get HA send me a notification on my phone for example when the doors of my Born are unlocked. I have set up the automation with the trigger and action. The notification shows up on my phone when I manually run the trigger from the HA interface. But unfortunately when I actually unlock my doors the notification is not sent. Other triggers (send a notification when my Google Mini starts playing) do send notifications to my phone which is leading me to believe that it's not an HA issue but that my Born is somehow blocking this information or something. A Reddit user (who is also on this thread but I'll leave it up to them to reveil their 'identity') has been very helpful, but thus fare we have not found the solution. Is there anything you can think of why these notifications are not being sent? (FYI: I have just installed the update you provided yesterday, perhaps that does something...)
Elmeraculous
Posts: 5
Joined: Sat Jun 03, 2023 10:26 am

Post by Elmeraculous »

Elmeraculous wrote: Sat Jun 03, 2023 12:42 pm @daern Stumbled upon your great Cupra/Home Assistant integration on a Reddit post. I have successfully installed Home Assistant on my RPI 3 and have your Cupra integration running. The part I'm trying now is to get HA send me a notification on my phone for example when the doors of my Born are unlocked. I have set up the automation with the trigger and action. The notification shows up on my phone when I manually run the trigger from the HA interface. But unfortunately when I actually unlock my doors the notification is not sent. Other triggers (send a notification when my Google Mini starts playing) do send notifications to my phone which is leading me to believe that it's not an HA issue but that my Born is somehow blocking this information or something. A Reddit user (who is also on this thread but I'll leave it up to them to reveil their 'identity') has been very helpful, but thus fare we have not found the solution. Is there anything you can think of why these notifications are not being sent? (FYI: I have just installed the update you provided yesterday, perhaps that does something...)
I have just discovered there is a logbook in HA and have noticed there is all sorts of Cupra data in there! This is hopeful. So HA is receiving the data, then why on earth aren't my automation triggered by them.. hmm....

Image
Elmeraculous
Posts: 5
Joined: Sat Jun 03, 2023 10:26 am

Post by Elmeraculous »

Elmeraculous wrote: Sat Jun 03, 2023 5:02 pm
Elmeraculous wrote: Sat Jun 03, 2023 12:42 pm @daern Stumbled upon your great Cupra/Home Assistant integration on a Reddit post. I have successfully installed Home Assistant on my RPI 3 and have your Cupra integration running. The part I'm trying now is to get HA send me a notification on my phone for example when the doors of my Born are unlocked. I have set up the automation with the trigger and action. The notification shows up on my phone when I manually run the trigger from the HA interface. But unfortunately when I actually unlock my doors the notification is not sent. Other triggers (send a notification when my Google Mini starts playing) do send notifications to my phone which is leading me to believe that it's not an HA issue but that my Born is somehow blocking this information or something. A Reddit user (who is also on this thread but I'll leave it up to them to reveil their 'identity') has been very helpful, but thus fare we have not found the solution. Is there anything you can think of why these notifications are not being sent? (FYI: I have just installed the update you provided yesterday, perhaps that does something...)
I have just discovered there is a logbook in HA and have noticed there is all sorts of Cupra data in there! This is hopeful. So HA is receiving the data, then why on earth aren't my automation triggered by them.. hmm....
Ok, good news: somehow it's working. I noticed from the logs that there was different event, namely 'CUPRA Born Overall Status unlocked' and I had chosen the 'CUPRA Born Door Lock Status unlocked'. But I'm quite sure that for it's 'locked' counterpart, I had chosen the 'CUPRA Born Overall Status locked' option already, but I'm starting to doubt myself now.

I then played around with the app in focus on my phone, the app in the background, my phone on standby, etc. But still the notifications are coming. I'm cautiously filling up with joy, but don't have complete faith just yet especially because I had also played around with other triggers (eg charge above 70%) and those weren't working either. Will see what happens over the next days.
daern
Posts: 177
Joined: Wed Jul 20, 2022 1:31 pm

Post by daern »

Elmeraculous wrote: Sat Jun 03, 2023 12:42 pm @daern Stumbled upon your great Cupra/Home Assistant integration on a Reddit post. I have successfully installed Home Assistant on my RPI 3 and have your Cupra integration running. The part I'm trying now is to get HA send me a notification on my phone for example when the doors of my Born are unlocked. I have set up the automation with the trigger and action. The notification shows up on my phone when I manually run the trigger from the HA interface. But unfortunately when I actually unlock my doors the notification is not sent. Other triggers (send a notification when my Google Mini starts playing) do send notifications to my phone which is leading me to believe that it's not an HA issue but that my Born is somehow blocking this information or something. A Reddit user (who is also on this thread but I'll leave it up to them to reveil their 'identity') has been very helpful, but thus fare we have not found the solution. Is there anything you can think of why these notifications are not being sent? (FYI: I have just installed the update you provided yesterday, perhaps that does something...)
This is my own automation for alerting when the car is left unlocked, which might help you with your own:

Code: Select all

- id: car_left_unlocked
  alias: Car Left Unlocked
  mode: single
  trigger:
    - platform: time
      at: '21:00:00'
    - platform: state
      entity_id: 
        - binary_sensor.cupra_born_overall_status
      from: "off"
      to: "on"
      for: "00:15:00"
    - platform: state
      entity_id: 
        - binary_sensor.cupra_born_engine_status
      from: "on"
      to: "off"
      for: "00:15:00"
  condition:
    - condition: state
      entity_id: binary_sensor.cupra_born_engine_status
      state: 'off'
      for: "00:15:00"
    - condition: state
      entity_id: binary_sensor.cupra_born_overall_status
      state: 'on'
      for: "00:15:00"
  action:
    - service: notify.pushover
      data_template:
        title: >
          Car has been left insecure
        message: >
          The car has been parked up, but not secured. You should correct this.
          The doors are currently {% if is_state('binary_sensor.cupra_born_door_lock_status', 'off') %}Locked{% else %}Unlocked{% endif %}.
        data:
          sound: siren  
    - service: media_player.volume_mute
      data:
        entity_id: media_player.downstairs_broadcast
        is_volume_muted: false
    - service: media_player.volume_set
      data:
        entity_id: media_player.downstairs_broadcast
        volume_level: 0.5
    - service: tts.google_translate_say
      entity_id: media_player.downstairs_broadcast
      data:
        message: The car has been left unlocked
Few things to note:

1. I, personally, don't use the HA apps notification system. One of the awesome things about an open ecosystem like HA is that you don't have to do things the same as everyone else and, in my case, I prefer to use an app called Pushover to manage notifications on my phone. This is one I've used for years and absolutely depend on in for work, so have a really high level of confidence in it for my home environment. It's almost as easy to use as the built in notifications and extremely reliable. That said, I've used the built-in notifications from time to time, and they've always worked for me, so perhaps you have a local issue here.

2. There is a fair amount of lag in the system. The car only reports to the VAG servers relatively infrequently - several minutes after you lock the car is not unknown - and the HA integration only checks for changes every 30s anyway, so if you're standing next to the car waiting for an immediate response, you might be waiting a while!

3. The VAG (Cupra and ID.3) APIs have, over the last year, proven to be a bit unreliable although recently it's been pretty stable. This might have a bearing, but probably not.

Can you see the updates taking place when you look in developer tools -> states in HA? i.e. are the updates actually getting back to HA? It's also worth checking the official app to see what that says - it uses exactly the same API (*cough*) as the HA integration, so what one sees, the other should.
born_owner
Posts: 29
Joined: Mon Apr 24, 2023 2:33 pm

Post by born_owner »

daern wrote: Fri Jun 02, 2023 10:21 am FYI, the upcoming 2023.6 release of HA breaks this integration. You need to install a new version beforehand to avoid this:
https://github.com/daernsinstantfortres ... a4ff8e.zip

(just copy over the files in custom_components as usual and restart HA to take effect)
Thanks for the heads-up!
Born V2, 77kW, e-Boost, Vapour Grey
Post Reply