Can we keep a dog as a pet to protect us

Our Ahadith stress on the fact that angels do not visit and enter homes that have dogs in it. Blessings do not enter homes with dogs. Alarm systems and security cameras can protect you and your home better than a dog.