stop equipment before reboot

This commit is contained in:
amarofarinha 2024-10-02 20:49:01 +01:00
parent ed912f349f
commit 7b3594c248
3 changed files with 13 additions and 5 deletions

View file

@ -344,7 +344,10 @@ void init_webserver() {
if (WEBSERVER_AUTH_REQUIRED && !request->authenticate(http_username, http_password))
return request->requestAuthentication();
request->send(200, "text/plain", "Rebooting server...");
//TODO: Should we handle contactors gracefully? Ifdef CONTACTOR_CONTROL then what?
//Equipment STOP without persisting the emergency state before restart
// Max Charge/Discharge = 0; CAN = stop; contactors = open
setBatteryPause(true, true, true, false);
delay(1000);
ESP.restart();
});