OCPP-J 1.6 Gateway for EMQX that implement the Central System for OCPP-J protocol.
In EMQX 4.x, OCPP-J Gateway implement as a protocol Plugin and protocol Module (enterprise only).
All Charge Point connected to OCPP-J Gateway will be treat as a normal Client (like MQTT Client) in EMQX, you can manage it in Dashboard/HTTP-API/CLI by charge point identity.
The Client Info mapping in OCPP-J Gateway:
As mentioned in the ocpp-j-1.6 specification, Charge Point can use HTTP Basic for authentication. OCPP-J Gateway extracts the username/password from it and fetches an approval through EMQX's authentication hooks.
That is, the OCPP-J Gateway uses EMQX's authentication plugin to authorize the Charge Point login.
+----------------+ upstream publish +---------+
+--------------+ Req/Resp | OCPP-J Gateway | -----------------> | Third |
| Charge Point | <------------> | over | over Topic | Service |
+--------------+ over ws/wss | EMQX | <----------------- | |
+----------------+ dnstream publish +---------+
Charge Point and OCPP-J Gateway communicate through the specifications defined by OCPP-J. It is mainly based on Websocket or Websocket TLS.
The OCPP-J Gateway publishes all Charge point messages through EMQX, which are called Up Stream. It consists of two parts:
Topic: the default topic structure is ocpp/${clientid}/up/${type}/${action}/${id}
request, response, errorBootNotification.Payload: JSON string defined ocpp 1.6 edtion 2. i.e:
{"chargePointVendor":"vendor1","chargePointModel":"model1"}
The OCPP-J Gateway receives commands from external services by subscribing to EMQX topics and routing them down to the Charge Point in the format defined by OCPP-J, which are called Down Stream. It consists of two parts:
Topic: the default topic structure is ocpp/${clientid}/dn/${type}/${action}/${id}
ocpp/${clientid}/dn/+/+/+
for each Charge point client.Payload: JSON string defined ocpp 1.6 edtion 2. i.e:
{"currentTime": "2022-06-21T14:20:39+00:00", "interval": 300, "status": "Accepted"}
TODO
ocpp.awaiting_timeout = 30s
ocpp.retry_interval = 30s
TODO
#ocpp.message_format_checking = all
#ocpp.json_schema_dir = ${application_priv}/schemas
#ocpp.json_schema_id_prefix = urn:OCPP:1.6:2019:12: