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:

1 Like

First, great integration, I love it for my Keba P30!
It would be great if you could implement support for sending text to the display.
Information that would be interesting to read is for instance:

  • current charging power when plugged in
  • In the morning (fully charged, before unplugged) the display can show expected time to office.
  • current cost of electricity. The power providers usually can give hour based info like, high, medium or low cost of electricity.
    …obviously you could present other information like environmental like temp, humidity or time etc.
    All this would be pretty simple to achieve if you got access to writing text to the display :slight_smile:
2 Likes

If you help me with testing, we could try to add text messages! I have a BMW Walbox Plus, which does not have a display, so I can only follow the programming guidline of KEBA and someone needs to test it before I submit a Pull Request to the dev branch.
You should be able to install custom components to your home assistant in order to help me. If you know about what I am speaking, let me know so that we can start!

1 Like

I think it’s a great idea, so I will gladly help out with testing and debugging. I have a P30 with display, and know how to install custom components etc :slight_smile:

1 Like

Great and yes, I know how to do a custom component installation and will gladly help out :slight_smile:

FYI i have been playing around with the Node Red UDP component. It works great to send messages to the display using UDP messages “display 0 0 0 0 test text” to the Keba ip address at port 7090. However to do this i need first to turn off the HA Keba integration since it blocks the 7090 UDP port. I have also tried this successfully using the Android and Windows “UDP sender /receiver app”.