Charging openHAB with OCPP

Please check logs, and if there are any errors copy them. I’ve tested binding only with simulator as I had no access to real hardware.

Just in case logging category is org.connectorio.addons.binding.ocpp.

OK, there are some errors in the log:

2022-12-16 17:49:44.066 [ERROR] [eu.chargetime.ocpp.WebSocketListener] - On error (resource descriptor: not defined (webSocket is null)) triggered: Cannot assign requested address: bind
	at Method) ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at org.java_websocket.server.WebSocketServer.doSetupSelectorAndServerThread( [bundleFile:?]
	at [bundleFile:?]
	at [?:?]

One thing which I have been wondering about my OH3 version. When I start OH3 the Karaf window says 3.3.0 but in Help & About page in the MainUI the version seems to be 3.2.0. I had to install OCPP version 3.2.

Can you tell me how an kar file can be added in OpenHAB, normally I have jar files.

kar files are a “collection” of jar files ( see KAR ).
They can be added in the same way as jar files.

Indeed, main difference is - KAR files can ship more JAR files than just one. They supplement local “system” directory with more libraries if needed. Please be aware that binding just launches OCSP 1.6J server to which charging station can be connected. It does not offer much beyond that.

I noticed that OH 3.2+ introduced some more strict validation of configuration options as well as channels which lead to some troubles in other bindings I made. If you spot any issues do not be surprised and please report it back.
I’ll be doing some testing with simulators early next year and try to add some channels in.


Hello, is still a Version for 3.4 available?

Not yet, but I think that 3.3 version is employable with 3.4 too. Please give it a try. I am still working on integration tests which will let me cross check builds against multiple releases.

So, one step forward :smile:

OCPP from Wallbox is connected to OH, and my Wallbox was automatically discovered.
3 properties are discovered, but thing stay in status initializing, connector in status error bridge.

Are the any channels planed for this binding to steer the Wallboxes?


Maybe change download link…

I put the kar file on my addons, getting the ocpp server thing! But there are not channels available. I am using Fronius Wattpilot OCPP 1.6J.
there I have to configure the connection wss:// is this without user and password just the server IP of openhab? wss:// for example?
Charger is initializing, connector is error:bridge (charger). where can I define user password for ocpp server?

I think wss stands for web socket secure with TLS encryption which is equal to having certificate. Can you try with ws:// alone?

There are no channels and real data exchange support yet.


Thanks! With ws://IP:8887/myName it connects to openhab.
In Openhab I can find a charging instance. I added and got initializing, but no running.

Thing initialization logic is missing so I need to add it. I need another round over occp library and protocol to see how it should go. From what I remember server (openhab) can ask charger about its properties and based on that we shall be able to dynamically allocate channels supported by devices.

Hi are youn planning too contribute this as opensource Binding in the official addons repositiory so someone can Help you to Maintain it?

Binding sources are available at github connectorio-addons/bundles/org.connectorio.addons.binding.ocpp at master · ConnectorIO/connectorio-addons · GitHub, hence you can see how it is made. You can build your own version too (there are per version branches).

This binding is going to stay a third party addon. I am not sure if there is anyone else in community working on integration of ocpp. This binding is still in an prototype phase.

Hi Lukasz, any plans to make openhab4 compatible version?

I would be a willing tester, though can not make any sensible input in java programming.

I am doing some cleanups on all bindings I maintain, as soon as I am done with it I will make a build targeting OH 4.0 runtime.

1 Like

Hey Klaus, which WallBox are oyu using?
I have a fronius wattpilot which wants a similar url but it is not connecting.
You said “ws://IP:8887/myName” is working for you.
What do you mean with “myName” ?

@splatch are you still interested in developing this binding?
I have some programming knowledge and I am interested in reading out all available data of my wallbox.

I am still interested, but I miss access to hardware. I am locked down with basic simulators I found around.
If you’re interested you can test library which I started with GitHub - ChargeTimeEU/Java-OCA-OCPP: Open source client and server library of Open Charge-Point Protocol (OCPP) defined by (OCA).

will be looking forward and will join testing.