Overall Details.
Normally you have an off-grid system that can, if necessary, be powered by a battery charger from the power grid. If there is less sun in the winter transition periods, the battery voltage drops due to discharging during the shade periods.
For example, you can store an entry in the configuration as follows.
An inverted hysteresis 23v-27v, which means switching the charger on at 23v and switching it off again at 27v. best during the bright times of the day.
A hysteresis of 24V to 27V can be set for one consumer, the same for the next consumer, but with the first consumer being ON and a delay of 10 minutes. The result is a gentle cascade.
1. this Source Code uses "Fritz Smart Home" Api. (DECT Switched Sockets, managed in Fritzbox Webinterface) Change a few Lines to Switch Tasmota Sockets or other HTTP Request based WLAN Sockets.
1.1 Login Credentials, Session Handling and Switchon/Off using Library "ArduinoFritzApi"
2. TCP Modbus Request IP, UnitID 100, Holding Register 840 (Battery System Voltage)
2.1 Used Library "esp32ModbusTCP"
3. Webinterface, Simple Configuration Management using "Json-Form". Json-Form is a Javascript Formular Engine. Json Document->Formular View in Browser->Formular Post->Json-Document parsed in and out by Arduino-json in ESP32.
3.1 Used Librarys: ArduinoJson.h, JSON-Form
4. Easy Webserver managed by ESPAsyncWebServer Library to post and get Ajax Calls in ESP32.