matth-x / MicroOcpp

OCPP 1.6 client for microcontrollers
MIT License
333 stars 143 forks source link

After OCPP Websocket connect getting Serial Monitor is printing Get Configuration Capacity #250

Open FlxMojojojo opened 8 months ago

FlxMojojojo commented 8 months ago

After WebSocket connect over to OCPP server getting Serial monitor is printing Get Configuration Capacity continuously. During this time the WebSocket connection closes every 30 seconds hence there is no heartbeat. Here is the log, Would you know why MicroOcpp prints this log ? And the reason for disconnection ? Can I print Websocket connection disconnection logs from Mircro OCPP ?

When we look at log

MicrosoftTeams-image (4) MicrosoftTeams-image (3)

It points to this part of the code -

image

@matth-x

matth-x commented 8 months ago

The GetConfiguration response is created at the moment when the OCPP lib tries to send it. If the WebSocket is not ready (and sendTXT returns false), then no attempt to send the response is made, but it stays in the queue. In the next loop calls, the OCPP lib retries sending the GetConfiguration response, leading to that flood of debug messages in the console.

Thanks for showing this. Normally all debug messages which could flood the console have debug level VERBOSE. I will change this message correspondingly.