Most potentially devastating incident I've had

I'm still kind of in shock over what could have happened.
I was awake Saturday night around midnight and heard a loud pop. No motion detection on security cameras, didn't think much of it. Apex alarm goes off saying Alk is <7 so I go downstairs and smell something burning. Opened up tank cabinet and a big plume of black smoke comes out and I see fire on the controller board, about a square foot big. Ran to the sink to get a cup of water and just doused the whole thing. The battery in my KH Guardian had exploded causing the whole unit to catch fire along with other equipment wires. I talked to the company and they said CR2032 backup battery inside can do that if not replaced regularly. I'm kind of SOL warranty wise because I got it second hand and it's >6 years old. Now gotta spend hundreds on a new tester.
There's black particulates from the smoke all around sump area and the room. Grabbed some Cuprisorb from Neptune in case there's metals that got in the tank and running a lot of carbon. All the livestock looks ok except one dead bimac anthias (4 y/o) the next day, though can't say for sure it's related.
I keep thinking what could have happened if I wasn't awake. The fire could have easily spread to other equipment, then eventually the stand, then the house. Ordered a smoke detector to place above the tank and electronics area. When I think aquarium catastrophe it's usually flood related. Just another risk to mitigate since we're dealing with lots of electricity and water.
View attachment 79551View attachment 79552