Just in case it helps someone else:
I have tried other pre-cooked KEBA Wallbox integrations but have failed in a setup with multiple wallboxes.
It turned out that using the ModBus integration was actually rather easy and works like a charm for me.
It consists of 3 elements:
- The actual Modus Configuration to read the sensors
- Some template sensors to translate sensor reading e.g. into readable text
- For write-only-registers in the wallboxes you can simply use the build in modbus service calls in your automations.
For reference please see my configuration. You have to copy the sections for each of your wallboxes and just put the IP address in and change name and sensor names accordingly. I show below just one station (I have 2).
I am still waiting for feedback from KEBA on how load balancing works if you write new values into the max charging current registers, but assume for now that those will be just a reduction of the max charging current for an individual callbox and load balancing works within the max current as set via the dip switches in the hardware of the master.
- Modbus section
Change the callbox name and sensor names as you like them
- name: "WallboxLinks"
close_comm_on_error: true
delay: 5
timeout: 5
type: tcp
host: xxx.xxx.xxx.xxx # your callbox IP address goes here
port: 502
sensors:
# Lesbare Sensoren
- name: WBLinks_charging_state
address: 1000
scan_interval: 30
data_type: uint32
- name: WBLinks_cable_state
address: 1004
scan_interval: 30
data_type: uint32
- name: WBLinks_error_code # 0=kein Error
address: 1006
scan_interval: 600
data_type: uint32
- name: WBLinks_charging_current_P1
address: 1008
scan_interval: 60
data_type: uint32
scale: 0.001
precision: 1
unit_of_measurement: "A"
device_class: current
- name: WBLinks_charging_current_P2
address: 1010
scan_interval: 60
data_type: uint32
scale: 0.001
precision: 1
unit_of_measurement: "A"
device_class: current
- name: WBLinks_charging_current_P3
address: 1012
scan_interval: 60
data_type: uint32
scale: 0.001
precision: 1
unit_of_measurement: "A"
device_class: current
- name: WBLinks_serial_number
address: 1014
scan_interval: 86400
data_type: uint32
- name: WBLinks_product_features
address: 1016
scan_interval: 86400
data_type: uint32
- name: WBLinks_firmware_version
address: 1018
scan_interval: 86400
data_type: uint32
- name: WBLinks_active_power
address: 1020
scan_interval: 60
data_type: uint32
scale: 0.001
precision: 1
unit_of_measurement: "W"
device_class: power
- name: WBLinks_total_energy
address: 1036
scan_interval: 600 # every 10 min
data_type: uint32
scale: 0.0001
unit_of_measurement: "kWh"
precision: 2
state_class: total_increasing
device_class: energy
- name: WBLinks_voltage_P1
address: 1040
scan_interval: 60
data_type: uint32
unit_of_measurement: "V"
device_class: voltage
- name: WBLinks_voltage_P2
address: 1042
scan_interval: 60
data_type: uint32
unit_of_measurement: "V"
device_class: voltage
- name: WBLinks_voltage_P3
address: 1044
scan_interval: 60
data_type: uint32
unit_of_measurement: "V"
device_class: voltage
- name: WBLinks_power_factor
address: 1046
scan_interval: 60
data_type: uint32
scale: 0.1
unit_of_measurement: "%"
- name: WBLinks_max_charging_current
address: 1100
scan_interval: 60
data_type: uint32
scale: 0.001
precision: 1
unit_of_measurement: "A"
device_class: current
- name: WBLinks_max_supported_charging_current
address: 1110
scan_interval: 86400 #*
data_type: uint32
scale: 0.001
unit_of_measurement: "A"
precision: 1
device_class: current
- name: WBLinks_session_energy
address: 1502
scan_interval: 600 #*
data_type: uint32
scale: 0.0001
precision: 2
unit_of_measurement: "kWh"
device_class: energy
- Template sensors
Not very efficient code but it does the job
# ****************************************************
# Wallboxen: Transform some sensors into text
# ****************************************************
- sensor:
- name: WBLinks_charging_state_text
state: >
{% if states('sensor.WBLinks_charging_state')|int == 0 %}
starting
{% else %}
{% if states('sensor.WBLinks_charging_state')|int == 1 %}
not ready
{% else %}
{% if states('sensor.WBLinks_charging_state')|int == 2 %}
ready
{% else %}
{% if states('sensor.WBLinks_charging_state')|int == 3 %}
charging
{% else %}
{% if states('sensor.WBLinks_charging_state')|int == 4 %}
error
{% else %}
{% if states('sensor.WBLinks_charging_state')|int == 5 %}
interrupted
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
- sensor:
- name: WBLinks_cable_state_text
state: >
{% if states('sensor.wblinks_cable_state')|int == 7 %}
cable_ready
{% else %}
cable_not_ready
{% endif %}
- syntax for writing registers for max charging current, enabling/disabling a station, setting a session target energy for the next loading session.
You have to just take the parts without the # and use it in automations. In my case I have created a helper for the max charging current which then gets written to the wallbox.
# WriteOnly Daten
# in Automationen wie folgt verwenden:
#
# **** maximalen Ladestrom auf den Wert setzen, der in "input_number.wallboxlinks_target_current" steht
# service: modbus.write_register
# data:
# address: 5004
# hub: WallboxLinks
# value: "{{states('input_number.wallboxlinks_target_current')}}". # or put a fixed value here
#
# **** Session Energie setzen
# service: modbus.write_register
# data:
# address: 5010
# hub: WallboxLinks
# value: # put value for session energy here
#
# **** Ladestation sperren oder einschalten (enable/disable)
# service: modbus.write_register
# data:
# address: 5014
# hub: WallboxLinks
# value: "0" # einschalten/enable mit "1"
Enjoy!