Since the lithium batteries I'm using (Valence) don't have any protection built in (only cell balancing), I've designed a protection system. It will totally disconnect the battery bank from everything if things go awry. It will also turn on a compartment cooling fan or turn on a heat pad if called for.
I have it bread boarded and the code written. For you coders out there mine is probably a bit clunky but, it works.