Skip to content

Commit

Permalink
Add future enhancements and script setup
Browse files Browse the repository at this point in the history
instructions
  • Loading branch information
infinitel8p committed Nov 13, 2023
1 parent 36cb41e commit af23130
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 20 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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._
Expand Down
2 changes: 1 addition & 1 deletion docs/HARDWARE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Continue to [WIFI.md](./WIFI.md) to set up the Raspberry Pi as an access point and connect to it.
40 changes: 22 additions & 18 deletions docs/SCRIPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <pre lang="json">{<br> "TARGET_BT_ADDRESSES": [<br> "12:34:56:78:9A:BC",<br> ],<br> "TARGET_AP_MAC_ADDRESSES": [<br> "A1:B2:C3:D4:E5:F6",<br> ]<br>}</pre> | <pre lang="json">{<br> "TARGET_BT_ADDRESSES": [<br> "12:34:56:78:9A:BC",<br> "DE:F1:23:45:67:89"<br> ],<br> "TARGET_AP_MAC_ADDRESSES": [<br> "A1:B2:C3:D4:E5:F6",<br> "F6:E5:D4:C3:B2:A1"<br> ]<br>}</pre> |

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
Expand Down Expand Up @@ -90,4 +73,25 @@ sudo pip3 install -r requirements.txt
1. Check if GPAC is installed
```bash
gpac
```
```
## 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 |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <pre lang="json">{<br> "TARGET_BT_ADDRESSES": [<br> "12:34:56:78:9A:BC",<br> ],<br> "TARGET_AP_MAC_ADDRESSES": [<br> "A1:B2:C3:D4:E5:F6",<br> ]<br>}</pre> | <pre lang="json">{<br> "TARGET_BT_ADDRESSES": [<br> "12:34:56:78:9A:BC",<br> "DE:F1:23:45:67:89"<br> ],<br> "TARGET_AP_MAC_ADDRESSES": [<br> "A1:B2:C3:D4:E5:F6",<br> "F6:E5:D4:C3:B2:A1"<br> ]<br>}</pre> |
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
```

0 comments on commit af23130

Please sign in to comment.