You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, could you explain to me which function I must use to carry out the remoteStopTransaction / remoteStartTransaction commands via the central server?
I can't figure out how it works...
Thanks
The text was updated successfully, but these errors were encountered:
It sounds like you're talking specifically about OCPP version 1.6 ?
RemoteStartTransaction and RemoteStopTransaction are calls sent from the server to the client.
Here's an example of how to set up an OCPP1.6 server which sends a RemoteStartTransaction request whenever a client connects:
const{RPCServer}=require('ocpp-rpc');constserver=newRPCServer({protocols: ['ocpp1.6'],// server accepts ocpp1.6 subprotocol});server.on('client',async(client)=>{try{constresponse=awaitclient.call('RemoteStartTransaction',{connectorId: 1,// start on connector 1idTag: 'XXXXXXXX',// using an idTag with identity 'XXXXXXXX'});if(response.status==='Accepted'){console.log('Remote start worked!');}else{console.log('Remote start rejected.');}}catch(err){console.log('Remote start errored:',err.message);}});server.listen(80);// listen on port 80
Hello, could you explain to me which function I must use to carry out the remoteStopTransaction / remoteStartTransaction commands via the central server?
I can't figure out how it works...
Thanks
The text was updated successfully, but these errors were encountered: