Integration of Elli / VW ID. Charger Pro

Hi,

I successfully integrated an Elli / VW ID. Charger Pro into HomeAssistant.

As there already is an integration for ioBroker and I am not able to program an integration for HomeAssistant myself, I used the following method:

  • install ioBroker add-on for HomeAssistant (see GitHub - MaxWinterstein/homeassistant-addons) or set up a separate ioBroker instance

  • important: if using the ioBroker add-on, go to the add-on configuration and set port 8087 to be forwarded

  • in ioBroker, install the vw-connect add-on and set it up

  • in ioBroker, install the simple-api add-on and set it up

  • in HomeAssistant, set up sensors for the parameters you wish to see.

I assume that your ioBroker instance is reachable at 192.168.178.50.
Here is my example for “config/includes/sensors/WeCharge.yaml” :

# WeCharge sensors - read from ioBroker-simple-API
# ioBroker address: http://IP_from_ioBroker:8087/getPlainValue/<Object_ID>

- platform: rest
  resource: http://192.168.178.50:8087/getPlainValue/vw-connect.0.wecharge.homecharging.records.latestItem.current_station_name
  name: "WeCharge - latest charging - current station name"
  
- platform: rest
  resource: http://192.168.178.50:8087/getPlainValue/vw-connect.0.wecharge.homecharging.records.latestItem.start_date_time
  name: "WeCharge - latest charging - start date"
 
- platform: rest
  resource: http://192.168.178.50:8087/getPlainValue/vw-connect.0.wecharge.homecharging.records.latestItem.stop_date_time
  name: "WeCharge - latest charging - end date"
  
- platform: rest
  resource: http://192.168.178.50:8087/getPlainValue/vw-connect.0.wecharge.homecharging.records.latestItem.total_energy_wh
  name: "WeCharge - latest charging - total energy (Wh)"
  unit_of_measurement: "Wh"

- platform: template
  sensors:
    wecharge_letzte_ladung_geladene_energie_kwh:
      friendly_name: "WeCharge - latest charging - total energy (kWh)"
      unit_of_measurement: 'kWh'
      value_template: "{{ ( states('sensor.wecharge_letzte_ladung_geladene_energie_wh') | int / 1000 ) | round(2) }}"
  
- platform: rest
  resource: http://192.168.178.50:8087/getPlainValue/vw-connect.0.wecharge.homecharging.stations.Home.connection_state
  name: "WeCharge - Wallbox - connection state"  

- platform: rest
  resource: http://192.168.178.50:8087/getPlainValue/vw-connect.0.wecharge.homecharging.stations.Home.lifecycle_state
  name: "WeCharge - Wallbox - activation state"

Please don’t forget to add the following lines to “configuration.yaml” (or alternatively, adapt the given paths to your needs):

sensor: !include_dir_merge_list includes/sensors/

Have fun,

David

2 Likes

Hi,

yesterday the ID Charger update with EEBUS support was released, any chance to integrate the box directly without using the ioBbroker add-on?

Thx and regards
Wolfgang

3 Likes

It’s been a couple of years - is this still the way to go to integrate ID Charger Pro to HA?

Just bought the charger (price was too good) and thinking about how to get the most value out of it…:slight_smile:

sadly i had to use https://evcc.io/ to integrate it into home assistant

Should be possible to communicate from ha to elli via modbus directly, but it has to be implemented =(

Thanks, this looks like an interesting choice, you can run it on docker I guess :thinking:

And you used this: GitHub - evcc-io/hassio-addon: Hass.io add-on for EVCC …to integrate it to HA?

Interested in the answer too…looking into that add-on, seems like it just installs evcc and nothing else. So I assume the integration to HA happens via MQTT. Evcc configuration has this section:

# mqtt message broker
mqtt:
  # broker: localhost:1883
  # topic: evcc # root topic for publishing, set empty to disable
  # user:
  # password:

No i am Using Home Assistant Docker => I used the docker evcc with this config:

# open evcc at http://evcc.local:7070
network:
  schema: http
  host: evcc.local # .local suffix announces the hostname on MDNS
  port: 7070

log: debug
levels:
  cache: error

# unique installation id
plant: xxx

interval: 10s # control cycle interval

meters:
- type: template
  template: shelly-pro-3em 
  usage: grid  
  host: 192.168.2.92  
  name: grid1

chargers:
- type: template
  template: ellipro 
  ski: X525 D213 FE23 ...
  ip: 192.168.2.94  
  name: wallbox1
  
vehicles:  
  type: template
  template: iso15118 
  title: xxx
  icon: car  
  capacity: 10.4  
  phases: 1  
  minCurrent: 5  
  name: ev1

loadpoints:
- title: Garage
  charger: wallbox1
  mode: off
  phases: 3
  mincurrent: 5
  maxcurrent: 16
#  resetOnDisconnect: false
  vehicle: ev1

site:
  title: Mein Zuhause
  meters:
    grid: grid1

eebus:
  certificate:
      private: |
          -----BEGIN EC PRIVATE KEY-----
          xxx
          -----END EC PRIVATE KEY-----
      public: |
          -----BEGIN CERTIFICATE-----
          xxx
          -----END CERTIFICATE-----
          
mqtt:
  broker: 127.0.0.1:1883
  topic: evcc # root topic for publishing, set empty to disable
  user: xxx
  password: xxx

But i would recommend another system to create your own one:

To get the entities in HA i have this packages/evcc.yaml file

mqtt:            
  select:
       
    - name: evcc_mode
      unique_id: uniqueid__evcc_mode_select
      icon: mdi:tune-variant
      state_topic: "evcc/loadpoints/1/mode"
      command_topic: "evcc/loadpoints/1/mode/set"
      availability_topic: "evcc/status"
      options:
        - "off"
        - "now"
        - "minpv"
        - "pv"  

    - name: evcc_phases
      unique_id: uniqueid__evcc_phases_select
      icon: mdi:backburger
      state_topic: "evcc/loadpoints/1/phasesEnabled"
      command_topic: "evcc/loadpoints/1/phasesEnabled/set"
      availability_topic: "evcc/status"
      options:
        - "0"
        - "1"
        - "3"

  #############################################################################

  sensor:
    - name: evcc_charge_power_w
      unique_id: uniqueid__evcc_charge_power_w
      icon: mdi:car-electric
      state_topic: "evcc/loadpoints/1/chargePower"
      value_template: "{{ value | round(0) }}"
      unit_of_measurement: "W"
      state_class: measurement
      availability_topic: "evcc/status"

    - name: evcc_charged_energy_kwh
      unique_id: uniqueid__evcc_charged_energy_kwh
      icon: mdi:battery-charging-high
      state_topic: "evcc/loadpoints/1/chargedEnergy"
      value_template: "{{ (value | float / 1000) | round(4) }}"
      unit_of_measurement: "kWh"
      availability_topic: "evcc/status"

    - name: evcc_charged_energy_self_kwh
      unique_id: uniqueid__evcc_charged_energy_self_kwh
      icon: mdi:battery-charging-high
      state_topic: "evcc/site/savingsSelfConsumptionCharged"
      value_template: "{{ value | round(1) }}"
      unit_of_measurement: "kWh"
      state_class: total_increasing
      device_class: energy
      availability_topic: "evcc/status"

    - name: evcc_charged_energy_grid_kwh
      unique_id: uniqueid__evcc_charged_energy_grid_kwh
      icon: mdi:battery-charging-high
      state_topic: "evcc/site/savingsGridCharged"
      value_template: "{{ value | round(1) }}"
      device_class: energy
      state_class: total_increasing
      unit_of_measurement: "kWh"
      availability_topic: "evcc/status"

    #############################################################################

    - name: evcc_phases_active
      unique_id: uniqueid__evcc_phases_active
      icon: mdi:backburger
      state_topic: "evcc/loadpoints/1/phasesActive"
      value_template: "{{ value | round(0) }}"
      availability_topic: "evcc/status"

    - name: evcc_charge_duration_s
      unique_id: uniqueid__evcc_charge_duration_s
      icon: mdi:timer-settings-outline
      state_topic: "evcc/loadpoints/1/chargeDuration"
      value_template: "{{ value | round(0) }}"
      unit_of_measurement: "s"
      availability_topic: "evcc/status"

    #############################################################################

    - name: evcc_charge_current_l1_a
      unique_id: uniqueid__evcc_charge_current_l1_a
      icon: mdi:current-ac
      state_topic: "evcc/loadpoints/1/chargeCurrents/l1"
      value_template: "{{ value | round(1) }}"
      unit_of_measurement: "A"
      availability_topic: "evcc/status"

    - name: evcc_charge_current_l2_a
      unique_id: uniqueid__evcc_charge_current_l2_a
      icon: mdi:current-ac
      state_topic: "evcc/loadpoints/1/chargeCurrents/l2"
      value_template: "{{ value | round(1) }}"
      unit_of_measurement: "A"
      availability_topic: "evcc/status"

    - name: evcc_charge_current_l3_a
      unique_id: uniqueid__evcc_charge_current_l3_a
      icon: mdi:current-ac
      state_topic: "evcc/loadpoints/1/chargeCurrents/l3"
      value_template: "{{ value | round(1) }}"
      unit_of_measurement: "A"
      availability_topic: "evcc/status"


    #############################################################################

  binary_sensor:
    - name: evcc_loadpoint_enabled
      unique_id: uniqueid__evcc_loadpoint_enabled
      icon: mdi:ev-station
      state_topic: "evcc/loadpoints/1/enabled"
      payload_on: "true"
      payload_off: "false"
      #device_class: problem
      availability_topic: "evcc/status"

    - name: evcc_loadpoint_connected
      unique_id: uniqueid__evcc_loadpoint_connected
      icon: mdi:ev-station
      state_topic: "evcc/loadpoints/1/connected"
      payload_on: "true"
      payload_off: "false"
      #device_class: problem
      availability_topic: "evcc/status"

    - name: evcc_loadpoint_charging
      unique_id: uniqueid__evcc_loadpoint_charging
      icon: mdi:ev-station
      state_topic: "evcc/loadpoints/1/charging"
      payload_on: "true"
      payload_off: "false"
      #device_class: problem
      availability_topic: "evcc/status"

  #############################################################################

  number:
    - name: evcc_min_current
      unique_id: uniqueid__evcc_min_current
      icon: mdi:current-ac
      state_topic: "evcc/loadpoints/1/minCurrent"
      command_topic: "evcc/loadpoints/1/minCurrent/set"
      availability_topic: "evcc/status"
      min: 5
      max: 16
      step: 0.25
      unit_of_measurement: "A"

    - name: evcc_max_current
      unique_id: uniqueid__evcc_max_current
      icon: mdi:current-ac
      state_topic: "evcc/loadpoints/1/maxCurrent"
      command_topic: "evcc/loadpoints/1/maxCurrent/set"
      availability_topic: "evcc/status"
      min: 5
      max: 16
      step: 0.25
      unit_of_measurement: "A"

    - name: evcc_buffer_soc
      unique_id: uniqueid__evcc_buffer_soc
      icon: mdi:label-percent-outline
      state_topic: "evcc/site/bufferSoc"
      command_topic: "evcc/site/bufferSoc/set"
      availability_topic: "evcc/status"
      min: 1
      max: 100
      unit_of_measurement: "%"

    - name: evcc_priority_soc
      unique_id: uniqueid__evcc_priority_soc
      icon: mdi:label-percent-outline
      state_topic: "evcc/site/prioritySoc"
      command_topic: "evcc/site/prioritySoc/set"
      availability_topic: "evcc/status"
      min: 1
      max: 100
      unit_of_measurement: "%"

    - name: evcc_residual_power
      unique_id: uniqueid__evcc_residual_power
      icon: mdi:label-percent-outline
      state_topic: "evcc/site/residualPower"
      command_topic: "evcc/site/residualPower/set"
      availability_topic: "evcc/status"
      min: -5000
      max: +5000
      unit_of_measurement: "W"

#############################################################################
homeassistant:
  customize:
    number.evcc_min_current:
      friendly_name: "Garage Wallbox Minimale Stromstärke"
    select.evcc_mode:
      friendly_name: "Garage EVCC Modus"

And include it this way in the config file:

homeassistant:
  packages: !include_dir_named packages

(It’s stolen from here and modified: https://community.home-assistant.io/t/evcc-integration-via-mqtt-sensor-entity-config/ )

Because of the enormous power usage when my car is connected i build into the wallbox a Shelly Plus 1 Mini which seperate the CP cable to simulate that the car isn’t connected…

And then I made an automation which take the shelly into account:

alias: wallbox - Auto laden hat sich geändert
description: ""
trigger:
  - platform: state
    entity_id:
      - input_select.auto_laden_kompliziert
    id: kompliziert
  - platform: state
    entity_id:
      - input_boolean.auto_laden
    id: einfach
  - platform: state
    entity_id:
      - select.evcc_mode
    id: evcc
condition: []
action:
  - alias: Status der Schalter abgleichen
    if:
      - condition: trigger
        id:
          - kompliziert
    then:
      - choose:
          - conditions:
              - condition: state
                entity_id: input_select.auto_laden_kompliziert
                state: Schnell
            sequence:
              - service: input_boolean.turn_on
                data: {}
                target:
                  entity_id: input_boolean.auto_laden
          - conditions:
              - condition: state
                entity_id: input_select.auto_laden_kompliziert
                state: Aus
            sequence:
              - service: input_boolean.turn_off
                data: {}
                target:
                  entity_id: input_boolean.auto_laden
          - conditions:
              - condition: state
                entity_id: input_select.auto_laden_kompliziert
                state: Langsam
            sequence:
              - service: input_boolean.turn_on
                data: {}
                target:
                  entity_id: input_boolean.auto_laden
    else:
      - if:
          - condition: trigger
            id:
              - einfach
        then:
          - choose:
              - conditions:
                  - condition: state
                    entity_id: input_boolean.auto_laden
                    state: "on"
                sequence:
                  - service: input_select.select_option
                    data:
                      option: Schnell
                    target:
                      entity_id: input_select.auto_laden_kompliziert
              - conditions:
                  - condition: state
                    entity_id: input_boolean.auto_laden
                    state: "off"
                sequence:
                  - service: input_select.select_option
                    data:
                      option: Aus
                    target:
                      entity_id: input_select.auto_laden_kompliziert
        else:
          - if:
              - condition: trigger
                id:
                  - evcc
            then:
              - choose:
                  - conditions:
                      - condition: state
                        entity_id: select.evcc_mode
                        state: now
                    sequence:
                      - service: input_boolean.turn_on
                        data: {}
                        target:
                          entity_id: input_boolean.auto_laden
                      - service: input_select.select_option
                        data:
                          option: Schnell
                        target:
                          entity_id: input_select.auto_laden_kompliziert
                  - conditions:
                      - condition: state
                        entity_id: select.evcc_mode
                        state: minpv
                    sequence:
                      - service: input_select.select_option
                        data:
                          option: Langsam
                        target:
                          entity_id: input_select.auto_laden_kompliziert
                  - conditions:
                      - condition: state
                        entity_id: select.evcc_mode
                        state: "off"
                    sequence:
                      - service: input_boolean.turn_off
                        data: {}
                        target:
                          entity_id: input_boolean.auto_laden
                      - service: input_select.select_option
                        data:
                          option: Aus
                        target:
                          entity_id: input_select.auto_laden_kompliziert
            else:
              - stop: Das war nicht erwartet
                error: true
  - if:
      - condition: state
        entity_id: input_boolean.auto_laden
        state: "off"
      - condition: state
        entity_id: input_select.auto_laden_kompliziert
        state: Aus
    then:
      - service: mqtt.publish
        data:
          topic: shelly1mini-6055f998957c/rpc
          payload: "{\"method\": \"Switch.Set\", \"params\": { \"id\": 0, \"on\":false }}"
          qos: "1"
        enabled: true
    else:
      - service: mqtt.publish
        data:
          topic: shelly1mini-6055f998957c/rpc
          payload: "{\"method\": \"Switch.Set\", \"params\": { \"id\": 0, \"on\":true }}"
          qos: "1"
        enabled: true
    alias: CP an oder aussschalten
  - choose:
      - conditions:
          - condition: state
            entity_id: input_boolean.auto_laden
            state: "on"
          - condition: state
            entity_id: input_select.auto_laden_kompliziert
            state: Schnell
        sequence:
          - service: mqtt.publish
            data:
              topic: evcc/loadpoints/1/mode/set
              payload: now
              qos: "1"
            enabled: true
      - conditions:
          - condition: state
            entity_id: input_select.auto_laden_kompliziert
            state: Langsam
        sequence:
          - service: mqtt.publish
            data:
              topic: evcc/loadpoints/1/mode/set
              payload: minpv
              qos: "1"
            enabled: true
      - conditions:
          - condition: state
            entity_id: input_select.auto_laden_kompliziert
            state: Aus
          - condition: state
            entity_id: input_boolean.auto_laden
            state: "off"
        sequence:
          - service: mqtt.publish
            data:
              topic: evcc/loadpoints/1/mode/set
              payload: "off"
              qos: "1"
            enabled: true
    enabled: true
    alias: EVCC Bescheid sagen
mode: single

I mostly only use this:
grafik

But I to be honest another docker with another System is for me a bit to much and as soon the wallbox can be integrated into ha, i would change…