GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - electricalgorithm/home-security-system: An AI-powered security system that automatically detects and captures images of intruders — only when the owner is away. It leverages smart presence detection to distinguish between authorized users and potential threats, ensuring efficient and privacy-aware monitoring.

BranchesTags
Open more actions menu

Latest commit

 

History

34 Commits
34 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
core
core
 
 
models
models
 
 
system
system
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
hss.py
hss.py
 
 
pyproject.toml
pyproject.toml
 
 
requirements-dev.txt
requirements-dev.txt
 
 
requirements.txt
requirements.txt
 
 
servicer.py
servicer.py
 
 

Repository files navigation

Home Security System

DOI

This project is a home security system that uses a Raspberry Pi and a camera, which detects human presence and sends a message with a picture of the intruder. The system checks connected mac addresses, and if a protector (household member) is home, closes the home security system.

Hardware Requirements

  • Raspberry Pi (an embedded computer)
  • Camera (can be anything, I use an old webcam)

Installation

$ sudo apt install -y python3-picamera2 libsystemd-dev
$ virtualenv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ python hss.py

Create a .config.json file in the root directory with the following content:

{
    "main_settings": {
        "recievers": [
            {
                "name": "[RECEIVER NAME 1]",
                "tel_no": "[RECEIVER TEL NO 1]",
                "callmebot_key": "[CALLMEBOT_KEY 1]"
            }
        ],
        "protectors": [
            {
                "name": "[PROTECTOR NAME 1]",
                "address": "[PROTECTOR MAC/IP ADDR 1]"
            }
        ]
    },
    "strategy_settings": {
        [...IF NEEDED]
    },
    "file_io_key": "[FILE_IO_KEY]"
}

System Design

---
title: Smart Security System UML Diagram
---

classDiagram

    class IDetectorStrategy {
        <<interface>>
        + detect_humans(ndarry) bool
    }

    IDetectorStrategy <|-- EfficientDetStrategy
    IDetectorStrategy <|-- HOGDescriptorStrategy

    class IEyeStrategy {
        <<interface>>
        + set_detector(IDetectorStrategy): void
        + get_detector() IDetectorStrategy
        + get_frame() ndarray
        + check_if_detected() bool
        - detect_humans() DetectorResults
    }

    IEyeStrategy <|-- PiCameraStrategy
    IEyeStrategy <|-- USBCameraStrategy
    IEyeStrategy *-- IDetectorStrategy

    class INotifierStrategy {
        <<interface>>
        - recievers
        + add_receiver(NotifierReciever) void
        + notify_all(String) void
    }

    INotifierStrategy <|-- WhatsAppStrategy
    INotifierStrategy <|-- TelegramStrategy

    class IWifiStrategy {
        <<interface>>
        - protectors
        + add_protector(Protector) void
        + remove_protector(Protector) void
        + check_protectors() WiFiStrategyResult
    }

    IWifiStrategy <|-- AdminPanelStrategy
    IWifiStrategy <|-- IpAddressStrategy
    IWifiStrategy <|-- MacAddressStrategy


    class ISubject {
        <<interface>>
        - observers: List[IObserver]
        - current_state: ObserverStates
        + attach(IObserver) void
        + detach(IObserver) void
        + notify() void
        + get_state() ObserverStates
        + set_state(ObserverStates)
        + get_default_state() ObserverStates
        + run() void
    }

    ISubject <|-- EyeSubject
    ISubject <|-- WifiSubject

    EyeSubject *-- IEyeStrategy
    WifiSubject *-- IWifiStrategy

    class IObserver {
        <<interface>>
        + update(ISubject)
    }

    class HSSObserver {
        + wifi_state: ObserverStates
        + eye_state: ObserverStates
        - notifier: INotifierStrategy
        + update(ISubject) void
        + set_notifier(INotifierStrategy) void
    }

    IObserver <|-- HSSObserver
    HSSObserver *-- INotifierStrategy

    ISubject "1" o--> "1..*" IObserver
Loading

Advice

You can use service file provided to run the script with systemd. It would make it run on startup, and restart it if it crashes.

About

An AI-powered security system that automatically detects and captures images of intruders — only when the owner is away. It leverages smart presence detection to distinguish between authorized users and potential threats, ensuring efficient and privacy-aware monitoring.

Topics

camerahuman-detectionrasperry-pisecuritysmart-hometinyml

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

1 watching

Forks

0 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.