EVSE Keba P30 integration

The procedure sounds interesting and I don’t know how to do it. But it would be cool if it could be done that way. Please keep me informed :+1:

Hi @Wiedlisbacher,
the latest version upstream in home assistant is only able to operate one charging station. If you are familiar with custom integrations, you could try the latest beta release from here (integration via Config UI): https://github.com/dannerph/homeassistant-keba

Please provide feedback if it is working for you or not.

BR
Philipp

1 Like

Hi Philipp

I have installed the latest version and everything seems to be working so far :slight_smile:
Too bad that you can not integrate a second charging station.

Thanks from switzerland

Hi @Wiedlisbacher,
it should be possible to add multiple charging stations in the beta version from the above posted git repo using the config UI. However, I have not fully tested it as I have not yet had access to two real charging stations. If it is not working, please add an issue with a good problem description to the git repo (including logs).
BR
Philipp

Hello and thank you for your feedback
I have not found anywhere where I can enter a second host?

just add the integration a second time with the second IP adress (same as with all integrations if you want to integrate multiple devices) :slight_smile:

Manoman :face_with_monocle:

Sure, I just found it. Sure I can add a second charging station :+1:. Embarrassing :face_with_hand_over_mouth:

Hi,

beta integration works great with a P30 Master / Slave configuration. Even if I add only the Master the Slave is automatically pulled. Great Work !!

Does anyone know if there is a possibility to extract the session energy according rfid cards used for the charging session ?
Basically Iam looking for the values s. screenshot

1 Like

Hi @dannerph @bobkersten
i’d like to do pv excess loading as well. In my Case i’d like to check how much w/kw i’m exporting to the grid and manage the the load of the wallbox with the right ampere Settings.
Have you already realised this? I’m relatively new in the HA Sphere so my automation Levels are not at the best!

at the moment i have only one Automaten that checks the exported grid power and sets the keba box to 6A.

Perhaps you guys provide me with some samples?
My first challenge is to use only one single automation to set the charging Power… thats where i stuck.

here is my Automation in a first state. I know: I need to include the charging Power of the Wallbox with solaredge_m1_ac_power

alias: TEST
description: ''
trigger:
  - platform: numeric_state
    entity_id: sensor.solaredge_m1_ac_power
    for:
      hours: 0
      minutes: 5
      seconds: 0
    above: '2750'
condition:
  - condition: numeric_state
    entity_id: sensor.solaredge_battery1_state_of_charge
    above: '90'
action:
  - device_id: 03cf8f6cd4763f1e92109b4d57a531e9
    domain: number
    entity_id: number.keba_p30_charging_current
    type: set_value
    value: 6
mode: single

thank you & br
s_ash

Hi @realfire,
if the list you are showing is the same as for report 1xx (past 30 sessions), it could be fetched via udp as well, however, there is no appropriate data format in home assistant where the data could be stored. Thus we only fetch report 100 to get the RFID class/tag of the currently running chargig session, which could be used for some visualization.

Hi @s_ash,

I created a template sensor that calculates the possible charging power (you can also visualize this template sensor to see what could be charged now as it gets updated with every meter reading). The nice thing: This template sensor could also include if/else statements such as you have above with the 90% SoC of your stationary battery. (I created multiple such template sensors for different charging modes).
Then I have a script, that selects and sets the selected template sensor as charging current (I have a user input dropdown to choose the charging mode). The automation is for triggering of metering changes and just calls my script.

A slightly outdated documentation with missing template sensors (which is highly depending on your setup) can be found here: EV Green Charging – danner-web.de
I am still testing the new function (in the beta version) that allows to set kW values and automatically detects the number of phases that are charged and sets the current value accordingly. As I am able to charge at my employer for free, I do not have much tests at home :smiley:

1 Like

Nice, Thank you! :slight_smile:

That is exactly what i Need, i‘ll try to study your Post and change it to my needs

Hey @dannerph,
thanks again for your suggestions!
i’ve looked at your setup now and thats exactly what i want! Now i try to adapt your things to my needs, but… i stuck at the template sensors i understand the automation and the script but - how the values a calculated? Do you have some samples for you Grün oder extragrün charging?
Perhaps you could update your Blogpost to your actual setup?

Hi @dannerph,

I’m a happy user of the currently available beta and have P30X (master) and P30C (slave) at home.
I saw that there’s a comment that if I add master, both wallboxes are automatically added, which is not true in my case, and I’ll get to the issue I’m having.

For this demonstration purpose I’m starting from beginning. I removed keba integration.

  1. I add master 192.168.86.48 (Garage Nissan)

  2. I add slave 192.168.86.85 (Garage Tesla)
    (sidenote here, if I only add master OR slave, then I just get 1 device, but as soon as I add the second, I get a “dummy” device, total of 3)

  3. Dialog now demonstrates, as if it found 2 new devices

  4. I choose the first one as Garage Nissan, 2nd Garage Tesla and everything kinda looks after that OK. I do not have 3 devices, I only have 2 functional - it appears as if the 2nd device (which is actually the device added in step 1) is just a “placeholder” - if I remove the Garage Nissan is step1, the dummy device as picture number 2 gets broken.


(already errors of duplicated sensors is the log)

(sidenote - this works just fine, until the reboot)

  1. Reboot
  2. The 1st added wallbox (Garage Nissan) master has problem setting up with an error
Logger: homeassistant.config_entries
Source: custom_components/keba/__init__.py:65
Integration: Keba Charging Station
First occurred: 12:24:41 (1 occurrences)
Last logged: 12:24:41

Error setting up entry P30 for keba
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/keba/__init__.py", line 65, in async_setup_entry
    wallbox = await keba.setup_wallbox(entry.data["host"])
  File "/usr/local/lib/python3.9/site-packages/keba_kecontact/connection.py", line 69, in setup_wallbox
    device_info = await self.get_device_info(host)
  File "/usr/local/lib/python3.9/site-packages/keba_kecontact/connection.py", line 40, in get_device_info
    await self.send(host, "report 1")
  File "/usr/local/lib/python3.9/site-packages/keba_kecontact/connection.py", line 100, in send
    self._stream = await asyncio_dgram.bind(("0.0.0.0", UDP_PORT))
  File "/usr/local/lib/python3.9/site-packages/asyncio_dgram/aio.py", line 239, in bind
    transport, protocol = await loop.create_datagram_endpoint(
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1363, in create_datagram_endpoint
    raise exceptions[0]
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1347, in create_datagram_endpoint
    sock.bind(local_address)
OSError: [Errno 98] Address in use

Screenshot 2022-04-01 122909
(showing 2 devices)
Screenshot 2022-04-01 122928
(when I open 2nd one, it actually says there are 2 devices, making a total of 3)

While the problem is not severe, it’s very annoying that after each reboot, I need to remove keba integration, then go into each and enable sensors that I want knowing on next reboot I’ll need to do it again.

Please let me know if I can help further with the bug.

Hello,
I am new to this thread and wants to thanks for all hard work everybody is doing here.
Since 3 days I have a Keba P30 c-Series and I was really “pissed” that the WebUI does not show any information regarding RFID, MID and when someone has loaded a car. Have tried several things like evcc, but at the end I am here.
Have installed the lastest beta from GitHub - dannerph/homeassistant-keba: Beta version of keba integration - however, I have some questions:

  • Is there any chance to get the information of all RFID cards ?
  • Is there any chance to write in a database, which RFID has loaded which car at what time, and so on ?

Many thanks

HI dannerph,

hmmm… I see what you mean. That is indeed a pitty. Integrating the site via iFrame is a bit of pain need an nginx reverseproxy for SSL and because of Kebas strict csrftoken shit authentication process.

Kind regards

Chris

In regards to the bug with more than 1 keba, I found out, that I can disable the 2nd integration, and reenable it, then it works until next reboot.

1 Like

Here the same

@rscheffer This integration uses the udp API. Thus it is not possible to get all enabled RFID cards. Regarding your second question: there is a sensor for the RFID class (=color code) that is disabled by default in the beta release. You could enable it and write it to a influxdb (same as with power/energy values) and do some calculations there.

1 Like

@davrog10 @Wiedlisbacher I think I got it fixed in the latest beta release, please test it. Before installing, please remove all your existing keba devices in home assistant.