A Home Security System GUI built using JavaFX, simulating a real-time home security system with camera monitoring, sensor management, and system control functionality.
This project provides a GUI-based simulation of a home security system:
- Displays camera images and dynamically updates system status.
- Detects cats in the camera feed (simulated) and triggers alerts.
- Provides user interface to manage sensors and control system arming status.
- Fully interactive GUI using JavaFX.
-
Camera Simulation
- Switch between
cat_placeholder.pngandno_cat_placeholder.png. - System status updates automatically:
- No cat: "System Status: Cool and Good"
- Cat detected: "System Status: DANGER - CAT DETECTED"
- Scan Picture button shows corresponding alerts.
- Switch between
-
System Control
- Disarm, Armed-Home, Armed-Away options.
- Changes system state dynamically.
-
Sensor Management
- Add new sensors (Door, Window, Motion).
- Activate/Deactivate sensors.
- Remove sensors from the system.
SecurityService/ │ ├─ src/ │ ├─ main/ │ │ ├─ java/ │ │ │ └─ com/udasecurity/gui/SecurityGUI.java │ │ │ └─ com/udasecurity/security/SecurityService.java │ │ │ └─ com/udasecurity/security/ArmingStatus.java │ │ │ └─ com/udasecurity/imageservice/ImageService.java │ │ └─ resources/ │ │ └─ images/ │ │ ├─ no_cat_placeholder.png │ │ └─ cat_placeholder.png │ └─ target/
- Java 17 or higher
- JavaFX 21 (Download here)
- IDE: IntelliJ, Eclipse, VSCode (recommended)
- Clone the repository:
git clone <repository-url>
cd SecurityService
Compile the project:
bash
Copy code
javac --module-path "C:\path\to\javafx-sdk-21.0.9\lib" --add-modules javafx.controls,javafx.fxml -d target\classes src\main\java\com\udasecurity\gui\SecurityGUI.java src\main\java\com\udasecurity\security\*.java src\main\java\com\udasecurity\imageservice\*.java
Run the application:
bash
Copy code
java --module-path "C:\path\to\javafx-sdk-21.0.9\lib" --add-modules javafx.controls,javafx.fxml -cp target\classes com.udasecurity.gui.SecurityGUI
🎮 Usage
Refresh Camera: Switches between images and updates system status.
Scan Picture: Shows alert matching current image (Everything is fine! / Cat detected!).
System Control: Toggle Disarm / Armed-Home / Armed-Away.
Add Sensor: Input name and type, click "Add New Sensor".
Toggle Sensor: Activate / Deactivate sensors.
Remove Sensor: Delete sensors from the list.