The randomly going off thing can be made better by more expensive detectors. Sure, you need an electrician.
This looks like lamenting the inconveniences of smoke detectors. My point is that hardwired smoke detectors function more consistently than battery powered ones.
Checks out