Door switch on external breaker box?

An easy way for a criminal to disable many security devices is to cut the power to the house. I would like to be notified if someone opens the cover on my external breaker box. Has anyone installed a magnetic switch on their breaker box cover? I’d like to do this, but want to make sure I install it in a safe and effective way. I think it should be pretty easy to install a switch inside the cover, but running a wire might be tricky. I don’t know if it would violate code to run the low-voltage alarm wire through the breaker box face plate, and into the high-voltage interior of the box. That sounds like it could be a safety issue. I doubt that a wireless sensor would work well inside the metal box. Thoughts? Other ideas?

Your power company definitely would not be happy with you modifying their box by running wires. I’d worry about them before I’d worry about code enforcement. :o If you have a spare z-wave wireless window/door sensor, you might want to give that a try and install a mains powered z-wave device as close to it as you possibly can. This one can act as a relay for that sensor and may be able to overcome possible interference by the housing.

I guess that would be worth a try. I looked at the box again, and I don’t see any reasonable way to route an alarm wire without passing into the high-voltage area. I’m pretty sure that wouldn’t be a good idea. FWIW, I don’t think this box is owned by the power company. It is downstream of the meter. There is no lock, anti-tamper tag, or warning sticker anywhere on it.

Thanks for the suggestion!