Closed angaaron closed 6 years ago
You get this error because there is no server listening for the client to connect to. There is no public OCPP server that accepts connections that I know of, so the README uses an example that does not work unless you set up a server yourself.
If you want to get the client to connect without writing any code, you can use the example server. Run this in one terminal to start the server:
sbt "project example-json-server" run
and this in another terminal to start the client connecting to it:
sbt "project example-json-client" "run 01234567 ws://localhost:2345/ 1.5"
The client and server will then exchange a few messages. The server should print something like:
Example server listening at port 2345. Press ENTER to exit.
Received incoming connection from 01234567
Received request BootNotificationReq(The New Motion,Lolo 47.6,Some(123456),None,None,None,None,None,None) from client 01234567
Charge point 01234567 responded to GetConfiguration: GetConfigurationRes(List(),List())
Received request HeartbeatReq from client 01234567
[ForkJoinPool-1-worker-9] WARN com.thenewmotion.ocpp.json.api.CentralSystemOcppConnectionComponent$CentralSystemOcppConnection - Exception processing OCPP request Heartbeat: OcppException com.thenewmotion.ocpp.json.PayloadErrorCode$NotImplemented$@20dad6a4: Request type not implemented
Disconnected client 01234567
and the client prints only this:
Connected using OCPP version V15
WebSocket disconnect
Trying to run the example-json-client test.
Running into a websocket error.
Has anyone run into this or have a solution.