EVSE Keba P30 integration

I have newly installed electric vehicle charger Keba P30 which has Ethernet port with simple communication protocol. I would like to be able to read charging statistics and dynamically set maximal charging limit to protect my main fuses (if the consumption in my household is high set down the charging current).
Would be nice for direct integration to home assistant or any other software allowing it.

Hi, I know it is a quite old thread but I am working on such an integration for my BMW wallbox, which is a Keba P30 internally.
Currently working: extraction of all data in a structured way
TODOs: service calls for starting/stopping, setting max energy/current

In total 70% is done. Hopefully the code quality is good in enough for acceptance of a pull request after I finished the services :wink: In case you are still interessted in testing, please contact me.
BR
Philipp

Implementation is finished and now waiting for getting merged at GitHub:

1 Like

Fantastic work!
I just tried it out, and it is working perfectly.

1 Like

With which wallbox have you tested it? Keba P20, P30 or the BMW?

I have tested it on a P30x.
Is there a way to adjust the charging current? I use OpenHAB today to set the current using a slider in the UI.

I just realized there is a service to set the charging current, and it works as it should.

1 Like

@dannerph Great work! It works flawless with my P30c.

The sensors are a little hard to find because they don’t have a common prefix. It would be useful, if the wallbox could be named and if the name would be prefix for all the sensors. This would also make sense if multiple wallboxes are connected.

1 Like

A prefix “keba_” is not wanted by the main developers (that was my initial implementation), but an optional name from the config file might be fine. I will check this, should be only a few lines of code.

Very useful component! However, it would be even better if you could make the service calls accept strings, since that’s what the template engine produces. This would allow for more advanced automations.

I would for example like to be able to write rules similar to

  - data_template:
      current: > 
        {{ (states("sensor.max_current") | float ) + 2.0 }}
    service: keba.set_current

I suppose this could be achieved by modifying the actual service calls from

await self.set_current(current)

to

await self.set_current(float(current))

Hi matli,

glad to hear that my component is not only used by me :wink: Your suggestion makes sense and should be fixed quite easy.

Let me summarize the requested changes in this post so that I only need one PR for all features:

  • Add a name for the wallbox to improve discoverability of the sensors

  • Fix service calls to parse string inputs to float before passing value to keba_kecontact library

  • Change config schema to enable multiple wallboxes

  • Add home assistant config flow (via UI, it is only required to add the IP address and a name of the wallbox)

For the last two features, a reconfiguration might be required.

There was also the request to use the UDP broadcast messages of the wallbox via GitHub. In my opinion, it is not worth to stick into this as the response improvement will be quite small. The wallbox already requires some seconds to react on the sent commands until it updates its internal state. I implemented a fast polling interval of 2 seconds, just like in the official Android app in order to update the state faster.

BR
dannerph

1 Like

Hi all,
an optional device name in the config file and fixing the parameters for the service calls is now in the following PR: https://github.com/home-assistant/home-assistant/pull/30125

EDIT: The naming of the entities will be generated using the product classification (Keba P30, P20 or BMW Wallbox) and there will be a breaking change for the unique_id of the entities (more future proof generation of the unique_id).

UPDATE: PR is merged!

have a nice XMAS!
dannerph

1 Like

My current setup using some automations to set the charging power to use maximum PV power, maximum power at my grid connection point without burning the fuse (failsafe mode on) or manual. In addition, a charging operation is automatically authenticated, if my car is at home.

Any other ideas for cool features with our charging station?

Hi all and thanks for a great integration!

I’m struggling a bit with Automation.
Here I’m trying to limit the current if i measure to high power drawn from the main supply to the house.
However the keba.set.current do not like if i enter 8, 8.0 “8.0” etc…what is the correct format?


image

cheers

Forgot to mentioned that i also tried
Current: 8.0

still no luck…

Any input is welcome :slight_smile:

This is how my automation for the same purpose looks:

Got it working now, thanks!

I was thinking that the charging parameters in the web interface would change as well, but it does not. No big deal :slight_smile:

Would be interesting to see Lovelace integrations, statistical charge info etc

cheers