Nice piece of work, interested in making use of this in RIMS application and more than willing to pitch in
Having a look through the code can see in a few places where you are latching the relays low in one of the alarm conditions, can't for the life of me see where they are latched during...