Enable the SyncEV chargepoint to work. #49
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I had to make a small change to allow this plugin to work with a SyncEV CP (EVCP-7KW-SIPH32A).
The data received from the WS was being treated as a Buffer and the parsing in ocpp-server.js was failing.
console.log(msgId) before:
<Buffer 5b 32 2c 22 78 2b 39 43 69 43 74 70 6b 6d 54 6d 32 52 67 4c 37 4b 57 6f 53 6a 55 39 47 74 38 59 35 34 5a 41 6c 32 53 71 22 2c 22 48 65 61 72 74 62 65 ... 7 more bytes>
after:
[2,"x+9CiCtpkmTm2RgL7KWoSjU9Gt8Y54ZAl2Sq","Heartbeat",{}]
cs.log before:
5/6/2023, 11:31:20 AM node: CS type: undefined data:
after:
5/6/2023, 11:33:20 AM node: CS type: received data: [2,"x+9CiCtpkmTm2RgL7KWoSjU9Gt8Y54ZAl2Sq","Heartbeat",{}]