DIY Smart Smoke Alarm Integration with ESP32

Hey everyone, I wanted to share my recent project where I integrated X-Sense smoke alarms with my smart home ecosystem using ESP32. This has been a fun and rewarding DIY journey, and I hope it can inspire others to explore similar solutions!

The Journey Begins
A few years ago, I invested in Nest Protect smoke alarms, but as they reached the end of their life cycle, I decided to explore more cost-effective and locally managed alternatives. After researching, I settled on X-Sense interconnected fire alarms. They checked all the boxes: affordability, reliability, and the ability to integrate with my existing smart home setup.

The Challenge
While these alarms are excellent for safety, they lack smart features out of the box. My goal was to make them compatible with my Home Assistant setup so I could monitor and control them through the platform. I decided to use ESP32 as the intermediary device to bridge the gap between the alarms and my smart home system.

The Solution

  1. Hardware Setup
  • I connected an ESP32 microcontroller to the alarm circuit to detect voltage changes when the alarm is triggered.
  • To ensure reliable communication, I used an optocoupler to isolate the low-voltage signal from the ESP32.
  • The ESP32 communicates with Home Assistant via MQTT, providing real-time updates on the alarm status.
  1. Software Configuration
  • I programmed the ESP32 to detect voltage spikes during an alarm trigger and send a corresponding signal to Home Assistant.
  • I set up a custom automation in Home Assistant to notify me through my preferred channels whenever an alarm is triggered.

The Results
After several weeks of testing, the system works flawlessly! I now have a fully integrated, cost-effective smoke alarm system that provides the same level of safety as my previous setup, with the added benefit of being fully customizable.

Lessons Learned

  • Always test your circuits thoroughly before finalizing your setup.
  • Optocouplers are invaluable for isolating sensitive components and preventing voltage spikes.
  • The ESP32 community is incredibly supportive, and there are countless resources available for troubleshooting and innovation.

Next Steps
I’m already brainstorming ways to expand this project. My next goal is to integrate carbon monoxide detection and potentially create a more comprehensive safety dashboard within Home Assistant.

If anyone has questions or would like more detailed instructions on any part of this project, feel free to reach out! I’d be happy to share my code and configurations. Happy tinkering! :rocket: