@matrix @matrix In my apartment the smoke detectors are wired into mains and have a Li-ion battery backup to keep them powered for at least a few weeks without power. That's the way to do it.
In my last apartment the smoke detectors didn't have carbon monoxide detectors so I put my own up. The batteries lasted for years but eventually it started chirping. It took me a little while to figure out what was causing the noise but when I did I replaced the batteries right then.
@matrix @sjw Mine started chirping and I couldn't figure out how to open it. Tard raged it with a hammer to make it be quiet.