Redeye
Lightweight self-hosted perimeter security system.
The Problem
For an apartment in Spain, my dad needed an alarm system that could detect if people were inside of our apartment. Spain currently has a problem where squatters occupy unmonitored properties. In a lot of cases, vacation home owners are victim of this because they can't monitor the property 24/7 as they live somewhere far away. We didn't want to risk this happening to us, because we already heard from other home owners from our block, that one apartment was dealing with squatters. Being notified on time is crucial, because if a home owner has proof that a squatter is present within 48 hours of entering, the police must intervene by law. If a report gets filed after those 48 hours, it becomes significantly more difficult to get squatters out with the help of police. In such cases you can make use of a service called Desokupa, which could easily run into thousands of Euros. My solution would notify the home owner from the moment a squatter enters the property. This way, no matter where you are, you can file a police report in a timely manner and your duty is done.
Architectural Challenges
The goal of this project was to keep it as simple and as cheap as possible, while still having a reliable alarm system. Before I could get to work, there were a couple of challenges that needed to be taken care of. One of the main challenges was that the apartment has no WiFi. The property is only occupied during the summer months, so during the off-season months it wouldn't make sense to have a monthly internet subscription just for the sake of keeping our alarm system running. But it needed to be done, so I got searching, and I decided on using a 4G router. With a 4G router we don't have to deal with monthly recurring costs anymore. The security system just uses the data whenever an intruder enters the property. This way we can just hook it up with the cheapest SIM card and we keep our maintenance costs low.
Having this problem solved. It was time to think about the stack. I created a list of all the things I needed to realize this project.
Hardware
- RaspberryPi
- Zigbee motion sensor
- Zigbee gateway
- ESP32CAM
- 4G Router
Software
- VueJS Frontend
- ElysiaJS Backend
- Zigbee2MQTT bridge
- MQTT broker
- SQLite
- ESP32CAM Firmware
- Telegram chatbot
