I'm glad you clarified.4 because you would be in big trouble with your insurance company if you were relying on homemade smoke detectors I would have a close look at home assistant if I were you. You can get most of what you want off the shelf. You can even buy zigbee components for it. Also look at ESPHome to go along with it. You can even use the latter without home assistant but oh boy you'll find your life really improves when you install that too. "You should sit in nature for 20 minutes a day. Unless you are busy, then you should sit for an hour" - Zen Proverb