Page 1 of 1

So erhalten Sie die OCPP -Ladestationsparameter

Posted: 08 Apr 2025, 12:48
by Anonymous
Ich bin neu bei OCPP (Open -Lad -Point -Protokoll), und ich habe erhebliche Schwierigkeiten, mit dem Tauchen mit dem Betreff zu beginnen. Jede Hilfe wird stark angeeignet. Zum Beispiel maximale Ladekraft, aktueller Ladeprozentsatz usw.
Ich verwende den Online-OCPP-Ladestation Emulator (https://cs.ocpp-css.com/ocpp (Login: Demo, Passwort: Demo), https://github.com/apostoldevel/ocpp-cs). OCPP. https://github.com/chargetimeeu/java-oca-ocpp sieht verlassen aus. Ich habe es ausprobiert, aber ich war nicht einmal in der Lage, eine Verbindung zum Emulator herzustellen. Nachdem ich die Verbindung hergestellt habe, bekomme ich sofort eine Trennung. Aber ich weiß nicht, was ich als nächstes tun soll. Wie bekomme ich Parameter?

Code: Select all

private static void testOcppConnection() throws ConnectException {
final var chargePointId = "EFACECQCTEST";
ChargePointOperations connection = ApiFactory.Companion.ocpp16ConnectionToCSMS(chargePointId,
"ws://ws.ocpp-css.com/ocpp",
TransportEnum.WEBSOCKET,
null,
null,
Collections.emptyList(),
new OcppCallbacks());

connection.connect();
final var idTag = "demo";
var authResponse = connection.authorize(new RequestMetadata(chargePointId, null), new AuthorizeReq(idTag)).getResponse();
if (authResponse.getIdTagInfo().getStatus() ==  AuthorizationStatus.Accepted) {
log.info("Auth accepted");
var transactionResponse = connection.startTransaction(new RequestMetadata(chargePointId, null), new StartTransactionReq(1, idTag, 0,
Instant.Companion.fromEpochSeconds(java.time.Instant.now().getEpochSecond(), 0), null)).getResponse();
var transactionId = transactionResponse.getTransactionId();
log.info("Start transaction: {}", transactionId);
log.info("{}", transactionResponse.getIdTagInfo());
//What to do next???
} else {
log.info("Auth rejected");
}
}