EVSE Keba P30 integration

@matli Maybe add this text to issue #17 on github?

2 Likes

Hm, i can choose all the stuff and push also the button (Dienst AusfĂŒhren), but nothing happens on my Keba Wall Box. What do I wrong?
Latest Home Assistant and Keba Integration is installed.

1 Like

Matli, I runned also in to same behavior with a BMW Connect charger. After authentication was disabled (on the chargers webUI) charger started as soon cable was connected, and if I stopped charging with HA-app it just started again and again.
The solution to this was automatization.
So basically how my integration is setup:
When connected, do nothing.
When disconnect set curr to 6A.
Charging is later done ether manually by setting a current (6A-16A) or setting up a start time in a schedule card.

First post/answer here at community, I have however read almost everything on this page because I was stuck with a BMW connect (Keba P30) charger that was kind of useless after our beloved car brand decide to drop all support for it.
So I want to send big thank you to you, dannerph and all other contributors on KEBA integration.
With your help my charger works better than it ever could even with BMWs app.

1 Like

Hey,

Did anyone manage to connect the BMW wall box gen4?
link for reference

Does it work with the input number number.abc_charging_current (“Ladestrom setzen”) ?
Maybe 22kW is too much for your model?

Is the new Keba P40 supported?

I don’t think so. The P40 doesn’t have an UDP interface which the core integration uses.
But it has Modbus TCP, or at least it will get it with a future update, so should be able to use that.

I have a P30 that sometimes works and sometimes doesn’t. When it doesn’t work, I get the following message:

Could not find a charging station at 10.0.51.155

After turning on debug logging, I think I know what’s going on:

2024-08-08 20:22:55.873 DEBUG (MainThread) [keba_kecontact.keba_protocol] Asyncio UDP connection setup complete.
2024-08-08 20:22:55.879 DEBUG (MainThread) [keba_kecontact.keba_protocol] Send report 1
2024-08-08 20:22:55.991 DEBUG (MainThread) [keba_kecontact.keba_protocol] Send report 2
2024-08-08 20:22:56.095 DEBUG (MainThread) [keba_kecontact.keba_protocol] Send report 3
2024-08-08 20:22:56.218 ERROR (MainThread) [homeassistant.components.keba] Could not find a charging station at 10.0.51.155
2024-08-08 20:22:56.219 ERROR (MainThread) [homeassistant.setup] Setup failed for 'keba': Integration failed to initialize.
2024-08-08 20:22:56.408 DEBUG (MainThread) [keba_kecontact.keba_protocol] Datagram received.
2024-08-08 20:22:56.409 DEBUG (MainThread) [keba_kecontact.keba_protocol] Execute callback
2024-08-08 20:22:56.409 DEBUG (MainThread) [homeassistant.components.keba] Notifying 0 listeners

It looks like the response is received too late. My P30 is sadly only connected via WiFi, so I can’t really do anything to test that theory.

Since this appears to be some kind of timeout, is there a way to increase it a bit?

1 Like

Hi matli,
I’m currently working on a python script that starts charging when api prices are low. I believe you have done the same and I am wondering if you could share how you achieved that?

I have the same problem. The integration with my P30 worked. But since today I always get the error message “homeassistant.components.keba] Could not find a charging station at xxx”

My Keba P30 is still reachable via the IP Adresse (Web UI) and also via the Keba Portal. So the connection might be slow but without any problems.

I raised an issue on GitHub, but it doesn’t look like the situation will change anytime soon: Keba: "Slow" response leads to "Could not find a charging station" · Issue #124129 · home-assistant/core · GitHub

@vossibaer1978 The set charging power function will only work if the charging process is athenticated and if voltage measurements of the phases are available. Set_current will always work.

Fixed in latest update upstream in the official home assistant integration and since longer time also in the beta version (custom integration)

There seems to be a REST API mentioned in the Keba P40 docs here (14.8 “Smart Home interface”), does anybody know more about that? I can’t find any details.

The API will come with an update just like modbus iirc.
Wanted to check the 80 and 443 ports but now our wallbox doesnt want to connect with our LAN

Yes, I found it here: What additional features will be available in futures updates for the P40? - “first quarter of 2025” for Modbus support with release 1.2.0 .

@dannerph I just got started with Home Assist and this wonderful integration. Works like a charm. However I would like to use your dashboard that you created. Since I’m new I have no idea on how to integrate these in my HA setup.

Hi @kurt-Biesemans
nice that it is working for you.

My current charging station card looks like the following (left with optimized charging off, right when optimized charging is on):

I have some automations and helper entities to calculate available surply PV production, control charging and stop charging when reaching SoC 90%. Depending on my “charging mode” and status of the charging station, different options are shown. During active charging, the UI changes as well, including the active charging power. Once the EV is plugged in, the cable is “rolled out” :wink:

You can check out the following configuration. It will not work out of the box as you probably do not have the exact same charging station and automation/helper entities in place. Still it might be helpful for inspiration.

Code for creating this card
type: vertical-stack
cards:
  - type: picture-elements
    elements:
      - type: image
        entity: binary_sensor.bmw_wallbox_plus_plugged_on_ev
        image: /local/blank.png
        style:
          top: 50%
          left: 50%
          width: 100%
        state_image:
          "on": /local/wallbox_plugged.png
          "off": /local/wallbox_not_plugged.png
      - type: state-icon
        entity: lock.bmw_wallbox_plus_authentication
        style:
          top: 10%
          left: 7%
        tap_action:
          action: toggle
      - type: state-icon
        entity: sensor.bmw_wallbox_plus_session_energy
        style:
          top: 76%
          left: 93%
      - type: state-label
        entity: sensor.bmw_wallbox_plus_session_energy
        style:
          top: 76%
          left: 80%
      - type: state-icon
        entity: sensor.bmw_wallbox_plus_total_energy
        style:
          top: 90%
          left: 93%
      - type: state-label
        entity: sensor.bmw_wallbox_plus_total_energy
        style:
          top: 90%
          left: 80%
      - type: state-label
        entity: sensor.bmw_wallbox_plus_status
        style:
          top: 90%
          left: 3%
          max-width: 1px
      - type: conditional
        conditions:
          - entity: binary_sensor.bmw_wallbox_plus_charging
            state: "on"
        elements:
          - type: state-icon
            entity: sensor.bmw_wallbox_plus_set_current
            style:
              top: 10%
              left: 93%
          - type: state-label
            entity: sensor.bmw_wallbox_plus_set_current
            style:
              top: 10%
              left: 84%
          - type: state-label
            entity: sensor.bmw_wallbox_plus_charging_power
            style:
              top: 35%
              left: 50%
              color: white
      - type: conditional
        conditions:
          - entity: automation.wallbox_steuerung
            state: "off"
        elements:
          - type: conditional
            conditions:
              - entity: binary_sensor.bmw_wallbox_plus_enable_user
                state: "off"
            elements:
              - type: state-icon
                entity: button.bmw_wallbox_plus_enable
                tap_action:
                  action: toggle
                style:
                  top: 10%
                  left: 16%
          - type: conditional
            conditions:
              - entity: binary_sensor.bmw_wallbox_plus_enable_user
                state: "on"
            elements:
              - type: state-icon
                tap_action:
                  action: toggle
                entity: button.bmw_wallbox_plus_disable
                style:
                  top: 10%
                  left: 16%
    image: /local/wallbox.png
  - type: vertical-stack
    cards:
      - type: entities
        entities:
          - entity: automation.stoppe_ladung_bei_90
            icon: mdi:battery-90
      - type: entities
        entities:
          - type: custom:multiple-entity-row
            entity: automation.wallbox_steuerung
            toggle: true
            entities:
              - entity: sensor.charging_possible
                name: PV Überschuss
      - type: conditional
        conditions:
          - entity: automation.wallbox_steuerung
            state: "on"
        card:
          type: vertical-stack
          cards:
            - type: entities
              entities:
                - type: custom:multiple-entity-row
                  entity: input_boolean.nachtabschaltung
                  toggle: true
                  entities:
                    - entity: sun.sun
                      attribute: next_setting
                      name: Stop
                      format: time
                    - entity: sun.sun
                      attribute: next_rising
                      name: Start
                      format: time
      - type: conditional
        conditions:
          - entity: automation.wallbox_steuerung
            state: "off"
        card:
          type: entities
          entities:
            - entity: number.bmw_wallbox_plus_charging_current

I have also attached the background images here (first one is the blank.png image, thus not visible :smiley: ):

Hi @vic I like your dashboard but I cannot get it to work. I get these errors in the dashboard.

Hi,

about the error messages you need to install the custom components slider-entity-row and button-card through HACS.

The warning messages are because the entities are not enabled on your integration.
You have to go to the setup and check the Keba integration. Some entities might be disabled by default. You have to manually enable them in case.

1 Like