OpenEVSE / ESP8266_WiFi_v2.x

ESP8266 WiFi for OpenEVSE Version 2.x
https://openevse.openenergymonitor.org
76 stars 46 forks source link

divert_current_loop issue (2.9.1) #263

Closed ayasystems closed 3 years ago

ayasystems commented 3 years ago

divert_update_state is called in the main loop each loop.

Sometimes charge take time to set as changing and divert_update_state is called agian doing a loop start / stop charge....

I think cold be better call to divert_update_state each 5 second to give enought time to change from waiting state to charging state when F1 command is sending from divert.ccp line 242 ( after send f1 could be sended FE from line 249 too quickly)

May be other solution could be wait 5 seconds after send F1 command before check if chargeStarted is true on line 249 of divert.ccp

Best regards