Closed sea-blorin closed 2 years ago
I too have encountered the same problem, also I would like to understand how to integrate the reading of MeterValues in the example script
It is possible from CS, starts the Remote Transaction?
The central system can request a charge point to start a transaction using a RemoteStartTransactionRequest
message.
The library itself only transports the messages though. It is up to your application to actually start the transaction on the charge point.
The exact intended behavior is described in the OCPP specs, and summarized in the library's godoc.
Did I misunderstand your question? If so, please let me know, otherwise I'll close this issue.
I too have encountered the same problem, also I would like to understand how to integrate the reading of MeterValues in the example script
Are you referring to https://github.com/lorenzodonini/ocpp-go/blob/master/example/1.6/cs/handler.go#L90?
The example is not meant to give you a full implementation, but just to show you the boilerplate code, so you can easily start your own implementation. It is up to your central system to read the meter values, received from the charge point, and handle them how you see fit (write to a DB, send them to another microservice, and so on).
Meter values come in batches (therefore an array), each of which contains sampled values collected by the charge point. Every sampled value contains the value and the metadata to describe it (e.g. the Measurand
field tells you what type of reading it is).
Which values are contained in each batch, how many and in which interval is entirely implementation-specific (and based on hardware/configuration). I recommend reading the OCPP specs, if you need more information about this.
How I can try the "Unlock connector" remotly?
How I can try the "Unlock connector" remotly?
Like this:
myCallback := func(confirmation *core.UnlockConnectorConfirmation, err error) {
if err != nil {
// Handle error
} else if confirmation.Status == core.UnlockStatusUnlockFailed {
// Unlock failed
} else if confirmation.Status == core.UnlockStatusNotSupported {
// Unlock not supported by charge point
} else {
// Success
}
}
err := centralSystem.UnlockConnector("1234", myCallback, 1)
if err != nil {
log.Printf("error sending message: %v", err)
}
Thanks
It is possible from CS, starts the Remote Transaction?