Page 2 of 7

Re: Cupra Born Support in Home Assistant

Posted: Fri Apr 07, 2023 6:20 pm
by mluisbrown
Elea4 wrote:People also use Tronity for the same purpose. For a while (maybe still?) Tronity was free for Born owners
Wow! How is it possible I never heard about Tronity before? Gives you so much more info than the My Cupra app, and best of all I can link it to ABRP to have a realtime SOC without needing to use an OBD dongle. And yes, it is still free for Born owners, at least for now.

Re: Cupra Born Support in Home Assistant

Posted: Thu Apr 13, 2023 10:05 am
by daern
Latest version of the HA custom component here with various fixes to support older cars more effectively: https://github.com/daernsinstantfortres ... upport.zip

And no, I've not found any way to extract historical data from the APIs, which only ever return the current status of the vehicle. If you're collating in HA, you have a lot more control over what you do with this data of course!

Re: Cupra Born Support in Home Assistant

Posted: Thu Apr 13, 2023 10:39 am
by mluisbrown
It seems like Tronity also cannot collect historical data. But Tronity collates it for you and allows you to export it too.

Re: Cupra Born Support in Home Assistant

Posted: Sat Apr 22, 2023 3:19 pm
by knightnet
When we get ours in a couple of weeks, I'll be looking into Node-RED support for the Born as well.

Re: Cupra Born Support in Home Assistant

Posted: Sat Apr 22, 2023 8:40 pm
by daern
knightnet wrote: Sat Apr 22, 2023 3:19 pm When we get ours in a couple of weeks, I'll be looking into Node-RED support for the Born as well.
Don't use it myself, but I'm quite sure it would work just fine as node red is just an orchestration layer on top of the normal HA entities. Interested to hear your own experiences when your car turns up.

Re: Cupra Born Support in Home Assistant

Posted: Mon Apr 24, 2023 2:47 pm
by born_owner
I got a bit confused by trying this via HACS first, but then worked perfectly once I just downloaded the ZIP and installed manually. Great to see support for our new Born in HA, so thanks very much for your efforts on this @daern.

I notice in a previous screenshot that there are controls for heating, charging, and Stop Climate. I only get controls for the climate and charging targets. Are these extra switches or should they be there by default? Thanks!

Re: Cupra Born Support in Home Assistant

Posted: Tue Apr 25, 2023 7:06 am
by daern
haydnw wrote: Mon Apr 24, 2023 2:47 pm I got a bit confused by trying this via HACS first, but then worked perfectly once I just downloaded the ZIP and installed manually. Great to see support for our new Born in HA, so thanks very much for your efforts on this @daern.
Yes, HACS not supported and makes a bit of a mess. Need to fix this at some point...
haydnw wrote: Mon Apr 24, 2023 2:47 pm I notice in a previous screenshot that there are controls for heating, charging, and Stop Climate. I only get controls for the climate and charging targets. Are these extra switches or should they be there by default? Thanks!
They are actually buttons that you can add to the dashboard: button.cupra_born_start_climate, button.cupra_born_stop_climate, button.cupra_born_start_charging and button.cupra_born_stop_charging

Personally, I wrap these into template switches instead which gives a nicer UI:

Screenshot 2023-04-25 080558.png

Code: Select all

switch:
  - platform: template
    switches:
      car_heating:
        friendly_name: "Heating"
        value_template: "{{ is_state('sensor.cupra_born_climatisation_state', 'heating') }}"
        turn_on:
          service: button.press
          target:
            entity_id: button.cupra_born_start_climate
        turn_off:
          service: button.press
          target:
            entity_id: button.cupra_born_stop_climate
        icon_template: >-
          {% if is_state('sensor.cupra_born_climatisation_state', 'heating') %}
            mdi:radiator
          {% else %}
            mdi:radiator-off
          {% endif %}
  - platform: template
    switches:
      car_charging:
        friendly_name: "Charging"
        value_template: "{{ states('sensor.cupra_born_charging_state') in ['charging'] }}" 
        turn_on:
          service: button.press
          target:
            entity_id: button.cupra_born_start_charging
        turn_off:
          service: button.press
          target:
            entity_id: button.cupra_born_stop_charging
        icon_template: >-
          {% if states('sensor.cupra_born_charging_state') in ['charging'] %}
            mdi:car-electric
          {% else %}
            mdi:car-outline
          {% endif %}

Re: Cupra Born Support in Home Assistant

Posted: Wed Apr 26, 2023 8:52 pm
by born_owner
Ooh, I didn't know template switches were even a thing. That's brilliant. I've added the buttons successfully, but you're right about the switches being nicer. I'll give it a go. Thanks!

Re: Cupra Born Support in Home Assistant

Posted: Thu Apr 27, 2023 7:29 am
by daern
haydnw wrote: Wed Apr 26, 2023 8:52 pm Ooh, I didn't know template switches were even a thing. That's brilliant. I've added the buttons successfully, but you're right about the switches being nicer. I'll give it a go. Thanks!
To be fair, because of the enormous latency between issuing a command to the Born and it responding to say that it's accepted it, the template switches do behave a little weirdly. When you click on it, it moves briefly to "on" (which triggers the command to the car), but then returns to its original position and remains there until the car responds to accept the change, at which point the switch will move to the "on" position. The same then happens when you switch it off again. It really needs a three position switch with a "pending" state, but to be fair, I've not really looked into how this could be done although, knowing HA, someone out there will have done it!

Re: Cupra Born Support in Home Assistant

Posted: Wed May 03, 2023 7:17 am
by born_owner
Ah OK, makes sense. I've just installed slider-entity-row which looks like it could handle a tri-state setup - it's currently showing my zappi charging mode (four options), but it seems to act solely as an input selector to change the state, rather than reflecting the current state too. My zappi is charging at the moment, but the slider just shows the most recent value assigned to it, rather than the current state of the sensor:

Screenshot 2023-05-03 at 08.15.59.png