Phoenix Contact EV Charger with Modbus TCP (2902802)

Hello, I want to share complete integration of EV Charger AC - EM-CP-PP-ETH - 2902802 by Phoenix Contact.
https://www.phoenixcontact.com/online/portal/gb/?uri=pxc-oc-itemdetail:pid=2902802
This post is based on “EV Charger control with Modbus TCP”, but my controller is using different addresses/registers.

I want to write guide for newbies, because I spent hours with finding good section for pasted code and so on.

In your configuration.yaml put:

modbus:
  - name: evmiki
    type: tcp
    host: 192.168.50.66
    port: 502

To sensor section add:

  - platform: modbus
    scan_interval: 5
    registers:
    - name: EVMikiChargeTime
      hub: evmiki
      unit_of_measurement: s
      slave: 180
      register: 102
      register_type: input
      data_type: int
    - name: EVMikiChargeCurrent
      hub: evmiki
      slave: 180
      register: 300
      register_type: holding
      scale: 1
      data_type: int
      unit_of_measurement: A
    - name: EVMikiStateDec
      hub: evmiki
      slave: 180
      register: 100
      register_type: input
      

  - platform: template
    sensors:
      evmikistatetxt:
        friendly_name: "EV Miki Charger State"
        value_template: >-
          {% if is_state('sensor.evmikistatedec', '65') %}
            Disconnected
          {% elif is_state('sensor.evmikistatedec', '66') %}
            Connected
          {% elif is_state('sensor.evmikistatedec', '67') %}
            Charging
          {% elif is_state('sensor.evmikistatedec', '68') %}
            With ventilation
          {% elif is_state('sensor.evmikistatedec', '69') %}
            No energy
          {% elif is_state('sensor.evmikistatedec', '70') %}
            Error
          {% else %}
            failed
          {% endif %}
      

To switch section add:

  - platform: modbus
    scan_interval: 5
    coils:
    - name: EVMikiChargerEnable
      hub: evmiki
      slave: 180
      coil: 400
    - name: EVMikiChargerReset
      hub: evmiki
      slave: 180
      coil: 413

Create helper (number) called “EVMikiRequestedCurrent” min:0 max:32 step:1 unit:A
In automations section add:

- id: '1598715668668'
  alias: G EV Miki Set Current - Off
  description: ''
  trigger:
  - entity_id: input_number.evmikirequestedcurrent
    platform: state
  condition:
  - below: '6'
    condition: numeric_state
    entity_id: input_number.evmikirequestedcurrent
  action:
  - data: {}
    entity_id: switch.evmikichargerenable
    service: switch.turn_off
  mode: single
- id: '1598715830222'
  alias: G EV Miki Set Current - 6-32A
  description: ''
  trigger:
  - entity_id: input_number.evmikirequestedcurrent
    platform: state
  condition:
  - above: '5'
    condition: numeric_state
    entity_id: input_number.evmikirequestedcurrent
  action:
  - data: {}
    entity_id: switch.evmikichargerenable
    service: switch.turn_on
  - data_template:
      address: 300
      hub: evmiki
      unit: 180
      value: '{{ states(''input_number.evmikirequestedcurrent'') | int }}'
    service: modbus.write_register
  mode: single

Now you can control you EV charger by changing value of “EVMikiRequestedCurrent”. If current is <6A then charging station is disabled, whe is >6A charging station is enabled and requested current is send. After 5s (when data are read back to HA) you can see change on “EVMikiChargeCurrent”.

I hope, that I didn’t forgot to anythng…

2 Likes

Hello Michal,
The charger looks good and the fact that it has modbus on it means that you are guaranteed to be able to chat to it.
But do you have any idea if this charger can charge multiple car brands? So for example an EV6 from KIA?
And can you start the charger by hand in HA? Or are there only sensors available?

Hello, this is car independent charger. It can be used for AC charging with “type 2” connector (maximum is 32A/20kW). Current is car dependent (it only allows maximum current to car). Wiring is easy.
I tested it with Tesla only. Kia EV6 look like type2/CSS combo connector so it can be used.

You can remotely enable charger (on/off) and set maximum current (6-32A).
I use this with Phoenix electricity meter to limit maximum current of house (charging = power supply - home consumption).

I can post newer version of YAML (this is old version).