Java-OCA-OCPP icon indicating copy to clipboard operation
Java-OCA-OCPP copied to clipboard

OCPP 1.6 & 2.0 Both

Open haresh1288 opened this issue 4 years ago • 5 comments

Can you please provide the guide how to use 1.6 & 2.0 both OCPP version with single Server

haresh1288 avatar May 06 '21 14:05 haresh1288

Hi @haresh1288,

Sorry for the slow reply. Right now, it's only possible to run 1.6 and 2.0 in two different processes with individual ports if you want to have them on one server.

  • Thomas

TVolden avatar Jun 30 '21 13:06 TVolden

Hi Thomas.

What's causing this?

I see that https://github.com/ChargeTimeEU/Java-OCA-OCPP/blob/master/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/IServerAPI.java and https://github.com/ChargeTimeEU/Java-OCA-OCPP/blob/master/ocpp-v2_0/src/main/java/eu/chargetime/ocpp/IServerAPI.java are in the same package. Is this the only reason?

Cheers Andreas

bantu avatar Jul 19 '21 09:07 bantu

Hi @bantu,

Well to be honest I can't remember the exact reason. It's been so long since I worked on it, and I can't find anything in my notes. Sorry about that. I faintly remember some problems with choosing protocol maybe? How does the client tell the server which protocol it supports?

There is some overlaps with the class definitions/names if you load both libraries, but that should be possible to solve.

TVolden avatar Jul 20 '21 08:07 TVolden

Hello @TVolden. I was considering running an OCPP 1.6 and an OCPP 2.0 central system within the same JVM. In this case, the client could simply select which protocol to use by specifying the corresponding backend URL.

bantu avatar Jul 20 '21 08:07 bantu

FWIW, OCPP-J should even allow offering both under the SAME URL, as the supported OCPP versions are put in the WebSocket header.

robert-s-ubi avatar Sep 13 '22 14:09 robert-s-ubi