KEBA Binding - Does not refresh

Hi Micael,

thank for your reply. I use the debian packages for installing, and have now switched to the actual snapshot. The binding is now 2.4.0-snapshot and is still not working.


So you probably need the one from the repository; for some reason the working/updated binding never reaches the snapshots. Every now and then I have tested the snapshot versions, but always need to go back to the repo one. You need to find a ready built jar of it somewhere, or build it yourself.

First uninstall the binding in/from the main distribution/snapshot
Then you need to put the binding from the repo into your addons folder, and

Hi Micael,

building the jar File is beyond my knowledge.
I have just Setup the System from scratch. But now with the openhabian-config. This alone does not make it running. I had to deactivate IPv6 in the System, for what ever reason.
Now I have the Situation, that the Keba binding fires a Java Exeption that the Charing Stations firmware is not valid. This is a situation that I know from my last Installation, that crashes.
The binding is here also here stopping to send request to the Wallbox, but I send it manually via a Cronjob every minute.
The UDP-Answer from the Charging Station is then processed by the binding, so I get the right values in the Sitemap. Not nice, but works !

I would really hope that someone will fix this at sometime.

Thanks for your help.

Hi there,
i still have a similar problem!

  • Raspberry Pi B01

  • OpenHABian, openHAB 2.4.0-1

  • Binding.keba-2.4.0

  • Keba-Wallbox P30 v 3.08.4

  • Keba.things
    Thing keba:kecontact:1 [ ipAddress=“”, refreshInterval=30 ]

  • Keba.items
    Dimmer KebaCurrentRange {channel=“keba:kecontact:1:maxpresetcurrentrange”, autoupdate=“false”}
    Switch KebaSwitch {channel=“keba:kecontact:1:enabled”, autoupdate=“false”}
    Switch Fahrzeug_eingesteckt {channel=“keba:kecontact:1:vehicle”}
    Number KebaPower {channel=“keba:kecontact:1:power”}
    Number KebaSessionEnergy {channel=“keba:kecontact:1:sessionconsumption”}
    Number KebaTotalEnergy {channel=“keba:kecontact:1:totalconsumption”}

When i installed KEBA-Binding, all worked well! But one day later, i had no kontakt to the wallbox, log-file shows no error:
2019-03-25 19:36:22.578 [ome.event.ItemCommandEvent] - Item ‘KebaSwitch’ received command OFF

2019-03-25 19:37:57.736 [ome.event.ItemCommandEvent] - Item ‘KebaCurrentRange’ received command 37
The “KebaSwitch” and the Dimmer “KebaCurrentRange” dit not change anything. In Paper.Ui the KeContact EV Charging Station is shown as online. After disabling and enabling again this thing, the binding is working perfekt, but only for a wile!
2019-03-25 19:39:13.117 [hingStatusInfoChangedEvent] - ‘keba:kecontact:1’ changed from UNINITIALIZED (DISABLED) to INITIALIZING
2019-03-25 19:39:13.124 [INFO ] [nternal.handler.KeContactTransceiver] - Listening for incoming data on /0:0:0:0:0:0:0:0:7090
2019-03-25 19:39:13.150 [hingStatusInfoChangedEvent] - ‘keba:kecontact:1’ changed from INITIALIZING to ONLINE

2019-03-25 19:39:36.812 [ome.event.ItemCommandEvent] - Item ‘KebaSwitch’ received command OFF
2019-03-25 19:39:37.137 [vent.ItemStateChangedEvent] - KebaSwitch changed from ON to OFF

2019-03-25 19:41:19.922 [ome.event.ItemCommandEvent] - Item ‘KebaCurrentRange’ received command 39
2019-03-25 19:41:42.389 [vent.ItemStateChangedEvent] - KebaCurrentRange changed from 14 to 39

I have no idea how to fix this and would be thankfull for help

Hi AndiEi,
as I have a similar Problem like you, but no idea about programming anything; I want to ask you for help! How dit you make this cronjob? Can you give me an example?
Would be glad about help

Nobody out there to help???

I have just installed the KEBA binding 2.5 and get no response from the Wallbox at all.
I’ve successfully tried the TCP/UDP binding… the wallbox is responding correctly.
However, I have no idea whats wrong with the KEBA binding!?
Can anybody help to solve this problem?

Same here…

I have completely avoided the KEBA binding and communicate with the wallbox via TCO/UDP binding

The problem with me was that the binding was not updated after losing contact with the wallbox.
My Fritz box disconnects and connects the contact to the wall box, since the binding is not updated - no communication with the wall box.
I solved the problem with a rule, see: KEBA Binding Restart after connection-error

Did not work for me…

Will check it out when time allows.

Hi Pirx, I can’t get it work with the UDP binding. Could you post an example for one or two of your items, e.g. how to read the power consumption. i would appreciate it

Hi guys,

just got my keba P30 x-series today, connected via Wifi. Thing in PaperUi shows online status, but I do not receive any values. Any ideas?


Hi Herbert

have you looked at the log files? mine is also online but it seems that the binding cannot establish a connection to the box. I finde something like this in my logs

2020-10-19 02: 08: 20.056 [DEBUG] [ba.internal.handler.KeContactHandler] - Ping timed out after ‘3003’ milliseconds
2020-10-19 02: 08: 20.068 [TRACE] [nternal.handler.KeContactTransceiver] - There are now 0 KEBA KeContact handlers registered with the transceiver

For this reason I wanted to try using the TCP / UPD binding. So far without success.

Hi Oliver,

that’s in my logs (Level Trace)

2020-10-25 18:34:07.882 [DEBUG] [nternal.handler.KeContactTransceiver] - Starting the the KEBA KeContact transceiver

2020-10-25 18:34:07.883 [DEBUG] [nternal.handler.KeContactTransceiver] - Establishing the connection to the KEBA KeContact ‘keba:kecontact:b362ff1c’

2020-10-25 18:34:07.888 [hingStatusInfoChangedEvent] - ‘keba:kecontact:b362ff1c’ changed from INITIALIZING to ONLINE

2020-10-25 18:34:10.895 [DEBUG] [nternal.handler.KeContactTransceiver] - Stopping the the KEBA KeContact transceiver

2020-10-25 18:34:46.902 [TRACE] [nternal.handler.KeContactTransceiver] - There are now 0 KEBA KeContact handlers registered with the transceiver

Hi Oliver,

so far I managed to get some messages from the wallbox by using Hercules Setup Utility. I am trying to use the TCP/UDP binding, but no luck so far and I am a little bit lost.

Anyone any further ideas or a good tutorial for the udp binding?

@Pirx could you please share your configuration for the udp binding?


I’ll try to guide you through it.

First of all I use the tcp1-Binding. Create a tcp.cfg file with the following content:


Then create two items (“xxx” are the last digits of your KEBA ip address):

String fromUDPnode “fromUDPnode [%s]” {udp="<['REGEX((.))’]"}
String toUDPnode “toUDPnode” {udp=">[]"}

You can now i.e. send a request to KEBA every 5 second for “report 2” and then read the answer:

rule "ask Wallbox"
   Time cron "*/30 * * * * ?"	// check every 5 seconds
	toUDPnode.sendCommand("report 2")

rule "Receive messages from the KEBA Wallbox"
    Item fromUDPnode changed
    //  Messages, which starts with "TCH" anfangen will be skiped
    if (fromUDPnode.state.toString.substring(0,3) == "TCH" )

// requested reports always consists an "ID"

var String jvalue = transform("JSONPATH", "$.ID", fromUDPnode.state.toString)
if ( jvalue.substring(0,1) != "{" ) {
    WB_Message.postUpdate( jvalue )
     if (jvalue == "2") {                 // Report 2
        WB_Plug.postUpdate( transform("JSONPATH", "$.Plug", fromUDPnode.state.toString) )
        WB_Status.postUpdate( transform("JSONPATH", "$.State", fromUDPnode.state.toString) )
        WB_Error1.postUpdate( transform("JSONPATH", "$.Error1", fromUDPnode.state.toString) )
        WB_Error2.postUpdate( transform("JSONPATH", "$.Error2", fromUDPnode.state.toString) )
        WB_MaxCurr.postUpdate( Float.parseFloat(transform("JSONPATH", "$.['Max curr']", fromUDPnode.state.toString)) / 10000 )
        WB_X1Switch.postUpdate( transform("JSONPATH", "$.Input", fromUDPnode.state.toString) )
        WB_Sec.postUpdate( transform("JSONPATH", "$.Sec", fromUDPnode.state.toString) ) 
1 Like

you made my day @pirx - thank you very much! It’s working and I added some stuff (and some minor changes, because auf misspellings). Will post the config asap for others.

1 Like

so here my config - kudos to @Pirx


  • tcp1 binding
  • JSONPath Transformation
    -REGEX Transformation

Create udp.cfg (only tcp.cfg is automatically generated)

# all parameters can be applied to both the TCP and UDP binding unless
# specified otherwise

# Port to listen for incoming connections

# Cron-like string to reconnect remote ends, e.g for unstable connection or remote ends
#reconnectcron=0 0 0 * * ?

# Interval between reconnection attempts when recovering from a communication error,
# in seconds

# Queue data whilst recovering from a connection problem (TCP only)

# Maximum buffer size whilst reading incoming data

# Share connections within the Item binding configurations

# Share connections between Item binding configurations

# Share connections between inbound and outbound connections

# Allow masks in ip:port addressing, e.g.* etc

# Pre-amble that will be put in front of data being sent

# Post-amble that will be appended to data being sent

# Perform all write/read (send/receive) operations in a blocking mode, e.g. the binding
# will wait for a reply from the remote end after data has been sent

# timeout, in milliseconds, to wait for a reply when initiating a blocking write/read
#  operation

# Update the status of Items using the response received from the remote end (if the
# remote end sends replies to commands)

# Timeout - or 'refresh interval', in milliseconds, of the worker thread

# Timeout, in milliseconds, to wait when "Selecting" IO channels ready for communication

# Used character set

Rules (not yet finished - but my needs for report 2 and 3 mostly implemented)

    rule "Request Keba report"
       Time cron "*/30 * * * * ?"	// check every 5 seconds
    	Keba_send.sendCommand("report 2")
        Keba_send.sendCommand("report 3")

rule "Receive messages from the KEBA Wallbox"
    Item Keba_receive changed
    //  Messages, which starts with "TCH"  will be skipped
    if (Keba_receive.state.toString.substring(0,3) == "TCH" )

// requested reports always consists an "ID"

var String jvalue = transform("JSONPATH", "$.ID", Keba_receive.state.toString)
if ( jvalue.substring(0,1) != "{" ) {
    Keba_response.postUpdate( jvalue )
     if (jvalue == "2") {                 // Report 2
        KebaPlugState.postUpdate( transform("JSONPATH", "$.Plug", Keba_receive.state.toString) )
        KebaState.postUpdate( transform("JSONPATH", "$.State", Keba_receive.state.toString) )
        KebaSystemCurrent.postUpdate( Float.parseFloat(transform("JSONPATH", "$.['Max curr']", Keba_receive.state.toString)) / 1000 ) //reported in mA, transformed to Ampere
        KebaCurrent.postUpdate( Float.parseFloat(transform("JSONPATH", "$.['Curr HW']", Keba_receive.state.toString)) / 1000 ) //reported in mA, transformed to Ampere           
        KebaUptime.postUpdate( transform("JSONPATH", "$.Sec", Keba_receive.state.toString) ) 
     if (jvalue == "3") {                 // Report 3
        KebaI1.postUpdate( Float.parseFloat(transform("JSONPATH", "$.I1", Keba_receive.state.toString) ) / 1000 ) //reported in mA, transformed to Ampere
        KebaI2.postUpdate( Float.parseFloat(transform("JSONPATH", "$.I2", Keba_receive.state.toString) ) / 1000 )
        KebaI3.postUpdate( Float.parseFloat(transform("JSONPATH", "$.I3", Keba_receive.state.toString) ) / 1000 )
        KebaU1.postUpdate( transform("JSONPATH", "$.U1", Keba_receive.state.toString) )
        KebaU2.postUpdate( transform("JSONPATH", "$.U2", Keba_receive.state.toString) )
        KebaU3.postUpdate( transform("JSONPATH", "$.U3", Keba_receive.state.toString) )
        powKebaPower.postUpdate( Float.parseFloat(transform("JSONPATH", "$.P", Keba_receive.state.toString))/1000) //reported in mW, transformed to Watt
        eneKebaSessionEnergy.postUpdate( Float.parseFloat(transform("JSONPATH", "$.['E pres']", Keba_receive.state.toString))/10000) //reported in Wh + 1 decimal, transformed to Kilowatthours
        eneKebaTotalEnergy.postUpdate( Float.parseFloat(transform("JSONPATH", "$.['E total']", Keba_receive.state.toString))/10000) //reported in Wh +1 decimal, transformed to Kilowatthours

items added (please change to the IP of your wallbox)

String Keba_receive  "fromUDPnode [%s]" {udp="<[192.168.X.XXX:*:'REGEX((.*))']"}
String Keba_send    "toUDPnode" {udp=">[192.168.X.XXX:7090:]"}
String Keba_response	"Antwort [%s]"

Dimmer KebaCurrentRange "Max. Stromstärke [%.1f %%]" (gWallbox) 
Number KebaSystemCurrent "Max. Strom Hardware [%.1f A]" (gWallbox)  
   String KebaState "Wallbox [MAP(]" <wallbox> (gWallbox) 
   String KebaPlugState "Stecker: [MAP(]" (gWallbox)

DateTime KebaUptime "Uptime [%1$tY Y, %1$tm M, %1$td D,  %1$tT]" (gWallbox) 
Number KebaI1 "Phase 1 [%.1f A]" (gWallbox) 
Number KebaI2 "Phase 2 [%.1f A]" (gWallbox) 
Number KebaI3 "Phase 3 [%.1f A]" (gWallbox)
Number KebaU1 "Phase 1 [%.1f V]" (gWallbox) 
Number KebaU2 "Phase 2 [%.1f V]" (gWallbox) 
Number KebaU3 "Phase 3 [%.1f V]" (gWallbox) 
Number powKebaPower "Wallbox [%.1f W]" (gWallbox, gPower) 
Number eneKebaSessionEnergy "Session [%.1f kWh]" (gWallbox) 
Number eneKebaTotalEnergy "Gesamt [%.1f kWh]" (gWallbox, gEnergy)

1=Nicht bereit
5=Auth. Problem

0=nicht angesteckt
1=in der Ladestation
3=verriegelt in Ladestation
5=am Auto angesteckt
7=am Auto verriegelt

Hope it helps others. As next step I want to add a control (Dimmer item) for the current. As I am metering my total electricity consumption, I want to adapt the Current of the wallbox to not exceed a certain current for the whole house (could also be used for adapting the current to photovoltaics production.