From af2313008b1884bd57b3ed5ebe8ecece50d977d0 Mon Sep 17 00:00:00 2001 From: Ludo Date: Mon, 13 Nov 2023 15:58:37 +0100 Subject: [PATCH] Add future enhancements and script setup instructions --- README.md | 5 ++++- docs/HARDWARE.md | 2 +- docs/SCRIPT.md | 40 ++++++++++++++++++++++------------------ 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 0988baa..d0c9dab 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,10 @@ The following sections will explain how to set up the Raspberry Pi Zero W. It is Once the script is running, the Raspberry Pi will start recording a video when the magnetic reed switch is triggered (the door is opened) and the smartphone is not connected to the Raspberry Pi (bluetooth and/or WiFi). The recording will stop when the magnetic reed switch is triggered again (the door is closed). ## Future Enhancements -- **Web Interface**: A user-friendly interface to view recorded videos. +- **Web Interface**: A user-friendly interface to view recorded videos. **_WIP_**. +- **Captive Portal**: Captive portal to open Web Interface when connecting to the Raspberry Pi's WiFi. +- **System Monitor**: A system monitor to view the status of the Raspberry Pi (e.g., CPU temperature, CPU usage, RAM usage, etc.). +- **Improved Error Handling**: Improved error handling to prevent the script from crashing, server from freezing, etc. ## Troubleshooting _This section will be populated with common issues and their solutions as they are identified._ diff --git a/docs/HARDWARE.md b/docs/HARDWARE.md index 4be6747..c6b020c 100644 --- a/docs/HARDWARE.md +++ b/docs/HARDWARE.md @@ -308,4 +308,4 @@ The pinout on the DS3231 module is shown below. With the RTC module connected and configured, the Raspberry Pi will now use the RTC module to keep track of the time even when it is turned off. -Continue to [WIFI.md](WIFI.md) to set up the Raspberry Pi as an access point and connect to it. \ No newline at end of file +Continue to [WIFI.md](./WIFI.md) to set up the Raspberry Pi as an access point and connect to it. \ No newline at end of file diff --git a/docs/SCRIPT.md b/docs/SCRIPT.md index fa42e9a..3a046f8 100644 --- a/docs/SCRIPT.md +++ b/docs/SCRIPT.md @@ -30,23 +30,6 @@ sudo pip3 install -r requirements.txt - Trust the device using: `trust XX:XX:XX:XX:XX:XX`. - `exit` from `bluetoothctl`. -## Setup -1. #### Modify the Script - - Open the `config.json` file. - - Replace XX:XX:XX:XX:XX:XX with the Bluetooth MAC address of your device (e.g., your smartphone). - - Replace XX:XX:XX:XX:XX:XX with the WiFi MAC address of your device (e.g., your smartphone). - - Your `config.json` could look like this: - | example 1 | example 2 | - | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - |
{
"TARGET_BT_ADDRESSES": [
"12:34:56:78:9A:BC",
],
"TARGET_AP_MAC_ADDRESSES": [
"A1:B2:C3:D4:E5:F6",
]
}
|
{
"TARGET_BT_ADDRESSES": [
"12:34:56:78:9A:BC",
"DE:F1:23:45:67:89"
],
"TARGET_AP_MAC_ADDRESSES": [
"A1:B2:C3:D4:E5:F6",
"F6:E5:D4:C3:B2:A1"
]
}
| - -2. #### Run the Script - - Start the security camera script with the following command: - ```bash - python3 main.py - ``` - ## Install Node.js - Install Node.js with the following commands: 1. Update the Raspberry Pi @@ -90,4 +73,25 @@ sudo pip3 install -r requirements.txt 1. Check if GPAC is installed ```bash gpac - ``` \ No newline at end of file + ``` + +## Script Setup +1. #### Modify the Script + - Open the `config.json` file. + - Replace XX:XX:XX:XX:XX:XX with the Bluetooth MAC address of your device (e.g., your smartphone). + - Replace XX:XX:XX:XX:XX:XX with the WiFi MAC address of your device (e.g., your smartphone). + + Your `config.json` could look like this: + | example 1 | example 2 | + | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + |
{
"TARGET_BT_ADDRESSES": [
"12:34:56:78:9A:BC",
],
"TARGET_AP_MAC_ADDRESSES": [
"A1:B2:C3:D4:E5:F6",
]
}
|
{
"TARGET_BT_ADDRESSES": [
"12:34:56:78:9A:BC",
"DE:F1:23:45:67:89"
],
"TARGET_AP_MAC_ADDRESSES": [
"A1:B2:C3:D4:E5:F6",
"F6:E5:D4:C3:B2:A1"
]
}
| + +2. #### Run the Script + - Start the security camera script from within the `Security-Cam/` folder with thefollowing command: + ```bash + python3 main.py + ``` + - Now startt the server with the following command: + ```bash + node ./server/server.js + ```