Project Case Study

HomeSecurity

A centralized application for monitoring home security sensors. The system enables live monitoring of device statuses to support real-time home security awareness.

Project Overview

🛡️ Home Security

A centralized application for monitoring home security sensors. The system enables live monitoring of device statuses to support real-time home security awareness.

🌟 Overview

The Home Security System allows users to monitor events occurring within their home through a network of sensors connected to an Arduino device. The Arduino communicates with the home server via a serial connection. The application provides a comprehensive dashboard for live sensor data, system scheduling, and event notifications.

Key Features

  • Auditory Alarm: When a sensor is triggered, users are notified of the event and an alarm is activated.
  • Schedules: Users can schedule system actions, such as arming or disarming the system at specified times (for example, arm system at 08:00).
  • Notification System: Push notifications delivered through Element X.
  • Universal Access: Fully responsive design across all device sizes, ensuring a consistent experience on desktop and mobile devices.

Focusing on simplicity, usability, and a clean user experience.

Technology Stack

🛠️ Tech Stack

Backend

  • Java 25: Utilizing the latest LTS features for a modern development experience.
  • Spring Boot: The core framework for rapid application development.
  • Spring Security: Ensuring robust authentication and data protection.
  • Spring WebSocket: Enabling real-time bi-directional communication for sensor updates.

Hardware Integration

  • Arduino: Microcontroller for interfacing with physical sensors.
  • jSerialComm: Java library for platform-independent serial port access to communicate with the Arduino.

Frontend & Interactivity

  • Thymeleaf: Server-side Java template engine for seamless HTML rendering.
  • HTMX: Powering fast, AJAX-like interactivity without the complexity of heavy JavaScript frameworks.
  • JavaScript: Javascript is used to subscribe to the Websocket endpoint and update components for real-time updates.

Data & Storage

  • Hibernate / JPA: Standardized Object-Relational Mapping.
  • MySQL: Reliable relational database for structured sensor log storage.

Build & DevOps

  • Build Tool: Maven

Technical Documentation

📖 Documentation

Project Structure

The project follows a standard Spring Boot application structure:

  • src/main/java/com/example/HomeSecurity: Root package.
    • Controllers: Contains Spring MVC controllers for handling web requests and WebSocket endpoints.
    • Services: Houses business logic, such as processing sensor data and managing security states.
    • DTOs: Data Transfer Objects used to shape data for the views and API responses.
    • Components: Contains hardware integration components, like the ArduinoListener.
    • Models: JPA Entities representing database tables (e.g., Sensor).
  • src/main/resources:
    • static: For static assets like CSS, JavaScript, and images.
    • templates: Contains Thymeleaf HTML templates.
    • application.properties: For application configuration.

The Roadmap

🚀 Future Plans

We are constantly looking to evolve the Home Security System. Here is what is currently on our development roadmap:

📹 Enhanced Monitoring

  • Camera Integration: Support for IP cameras and RTSP streams to view live feeds alongside sensor data.
  • Floor Plan View: A visual representation of the home layout with real-time sensor status indicators.

🧠 Smart Features

  • AI Anomaly Detection: Machine learning models to learn routine patterns and alert on unusual activity.
  • Geofencing: Automatically arm/disarm the system based on the location of the user's mobile device.

📱 Connectivity

  • Mobile Application: A dedicated mobile app for push notifications and easier remote control.
  • Third-party Integration: Integration with Home Assistant, Google Home, or Alexa.

Video Demonstration

Walkthrough Video Coming Soon