Control relays based on AH, voltage or time. Off grid

Hi Folks,

Just wanted to share this project. Get some tips, or ideas for improvement. It is working at the moment although I have spotted a mistake in the code so AC sockets will not switch back on after a dip in voltage until the next day. Any how the controller is in Spain and I cant change it at the moment.

-Mike