Open Mustafa19981903 opened 1 week ago
At the moment, the EXI encoder does only support one type of ContractAuthenticationResponse: it says "authentication done". To support the RFID or similar check, we need two different cases, the "done" and the "ongoing" case. This needs:
myprogs code update void encodeContractAuthenticationResponse(void) { init_dinMessageHeaderWithSessionID(); init_dinBodyType(&dinDoc.V2G_Message.Body); dinDoc.V2G_Message.Body.ContractAuthenticationRes_isUsed = 1u; init_dinContractAuthenticationResType(&dinDoc.V2G_Message.Body.ContractAuthenticationRes); prepareGlobalStream();
int authStatus =getIntParam(0);
if(authStatus==1){
EVSEProcessing=dinEVSEProcessingType_Finished;
}
else{
EVSEProcessing=dinEVSEProcessingType_Ongoing;
}
g_errn = encode_dinExiDocument(&global_stream1, &dinDoc);
printGlobalStream();
sprintf(gInfoString, "encodeContractAuthenticationResponse finished");
}
fsmevse code uptade if (strConverterResult.find("ContractAuthenticationReq")>0): if self.rfid_check_successful: self.strAuthFinished="1" else: self.strAuthFinished="0"
msg = addV2GTPHeader(exiEncode("EDl"+self.strAuthFinished))
@uhi22 Are there any missteps?
Looks good, only the underline is missing after the EDI, to separate the parameter.
@uhi22 I am experiencing this issue every time I run the software. When I unplug and replug the Ethernet cable, the software continues to work. I have also changed my IP address within the software, but this issue persists. starting in EvseMode, simulated environment initializing pyPlcWorker [addressManager] we have local MAC D8:3A:DD:7C:4B:59. [addressManager] Found 0 link-local IPv6 addresses. [addressManager] Error: No local Ipv6 address was found. Exiting, because it does not make sense to continue without IPv6 address
What is your plan? If you want to run pyPLC against an other machine, the precondition is that an active ethernet connection to the modem is present and the operating system cared for assigning an IP address. Loss of IP adress should be checked in the OS (ipconfig or ifconfig or such things). If you want to run two instances of pyPLC at the same machine, without ethernet connected, you could try to comment-out the check in addressmanager, I'm not sure whether this solves the issue. Did not use this mode since a long time.
@uhi22 I encounter this error when I run Evse and Pev mode in simulation mode, and when I remove and plug the ethernet cable back in, the problem disappears. When the simulation software runs, after a certain period of time, it falls into the error from 14:WaitForCurrentDemandResponse entering 99:SequenceTimeout and the simulation charging process ends
Pressing the SPACE key does not end charging. [52309ms] [PEV] EVSE_Shutdown. Seems the user canceled the charging on the charger. [52320ms] [PEV] from 14:WaitForCurrentDemandResponse entering 88:UnrecoverableError [52360ms] [PEV] Safe-shutdown-sequence: setting state B [52361ms] [HARDWAREINTERFACE] Setting CP line into state B. [52361ms] [PEV] from 88:UnrecoverableError entering 111:SafeShutDownWaitForChargerShutdown
@uhi22 https://github.com/uhi22/pyPLC#example-flow I want to add an RFID or similar control at checkpoint 535, 536 and 538. msg = addV2GTPHeader(exiEncode("EDl")) # EDl for Encode, Din, ContractAuthenticationResponse how do I update this line of code