This is a native HomeKit security system with ESP32 based on potential free contacts. It is working with the old and new HomeKit-Architecture (Changes in 2022/2023)
The following hardware is required:
- ESP32
- Resistors 10kOhm
- Potential free contacts (from your security system like ABUS Terxon)
Connection: ESP32 -> Potential free contact
3V3 -> Potential free contact
GPIO? -> Potential free contact
GPIO? -> 10kOhm -> GND
GPIO16 = homekit state away
GPIO17 = homekit state triggered
GPIO18 = homekit state night
GPIO19 = homekit state stay
This sketch is for following development environment
Arduino
Following libraries are required
https://github.com/HomeSpan/HomeSpan
Following Arduino->Tools settings should be used
Partition Scheme: Default 4MB with ffat
Following files needs to be uploaded to the ESP32
esp32-homekit-securitysystem.ino
DEV_Identify.h
DEV_SecuritySystems.h
Setup via Arduino serial monitor (115200 baud).
Configuration HomeKit code (123-55-222)
S 12355222
Configuration Wifi connection
W
In case of the ESP32 ist restarting/showing errors after doing some commands, try to disconnect the power source and boot it again.
The device can be added to homekit like every other homekit device, but with the help of the other devices search in home app.