I have been playing with creating a self contained wired alarm system using an esp32 with esphome. All the logic happens on the esp32, which drastically improves the performance and stability of the system compared to having the logic in HA.
The new template alarm_control_panel in v0.105 makes this system fully functional.
My home assistant server can read the state of all the entities like motion detectors and door sensors. Home assistant can arm and disarm the system by providing a code to the device.
With this setup, one can also take advantage of a lot of the great possibilities of interegrating into HA like sending notifications, gathering pictures from cameras, etc.
I want to see if I can get a keypad integrated on device using this custom esphome library, although I’m quickly running out of GPIO pins to use. Separate codes could be used for separate users on the esp32 alarm. One could also imagine programming a dynamic code that expires for guests.
I need to test the robustness of the system to the brief wifi disconnections and sometimes device reboots that aren’t uncommon. So this is still very experimental. I would love to know if anyone has tips on this.
I did not use any of the end of line resistors to measure different states like circuit shorts, but is possible to integrate into this logic. Here is a great example DIY Replacement Alarm Panel.
The template alarm_control_panel doesn’t support some common states like
pending yet, so it currently throws an error in HA when the alarm is pending. But since all the logic is local on the esp32, this does not affect the functionality.