The regulation is done thanks to the rules of ESPEasy without the need of electronic regulator, if the battery voltage becomes under 4.1V, the ESP goes to sleep every 30 minutes, else the permanent consumption of the wifi prevents the battery to not exceed 4.1V (propertional to the dimensioning of the solar panel):
"on System#Boot do
timerSet,1,30
endon
On Rules#Timer=1 Do
if [Battery#Volts]<4.1
deepSleep,1800
endif
timerSet,1,300
endon"
This need a voltage divider bridge on TOUT input of Wemos for measure the voltage battery input named "Battery" and "Volts" for the unit case:
