This project provides scripts to set up and manage an Arlo USB storage system on a Raspberry Pi.
The scripts handle tasks such as enabling mass storage (30GB), synchronizing clips, cleaning up old clips and optionally create a service for synchronizing clips with a Telegram Bot.
All clips are stored in /mnt/ArloExposed
. You need to access this folder to expose them on your preferred service (GDrive - Samba - Telegram - etc).
Two folders will be created in /mnt
- /arlo
and /ArloExposed
.
To avoid data corruption, DO NOT TOUCH the /arlo
one. It's a mount point for sync_clips.sh
.
If using Sync with Telegram Bot
double check your [api_token]
& [chat_id]
.
The program will not check them for you!
Any other OS's / Distros are untested mainly due to /boot/config.txt
position.
Tested on:
- Lexar 128GB SD Card
- RPi-4B 8GB and RPi-Zero2W
- Latest DietPi
- Arlo Pro 2 - Arlo Pro 3 Floodlight / Base station VMB4500r2 Firm - 1.24.0.1_4295_8938370
-
A root user account
-
A minimum of 64GB SD card
-
For RPi Zero/Zero2W:
- Connect the USB cable to the middle port from the RPi (Without the PWR label) to the USB of the station, Arlo base station itself is enough to power the Raspbery Pi.
-
For others RPi's:
- Connect the USB cable to any USB port of the RPi, you will need an external power source.
To clone this repository, use the following command:
git clone https://github.com/VincePuc99/ArloUSB-AnyRPi.git
cd ArloUSB-AnyRPi
sudo chmod +x *
This Python script telegram-sync.py
monitors /mnt/ArloExposed/arlo/000000
for new video files and sends them to your Telegram bot. It uses the bot's API token and the chat ID to send the videos.
For using it just add TelYes
during the first setup.
If you choose TelNo
, the telegram-sync.py
file will be automatically deleted.
- Python3
- A Telegram bot with the API token (created via BotFather)
- The chat ID of the Telegram chat where the videos will be sent.
sudo ./Arlo-Usb-Start.sh <max_power> <TelYes|TelNo> [api_token] [chat_id]
Where <max_power> is:
500
for Raspberry Pi 4200
for Raspberry Pi Zero 2100
for Raspberry Pi Zero
Example for Raspberry Pi 4 with Telegram Sync Enabled:
sudo ./Arlo-Usb-Start.sh 500 TelYes 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11 -zzzzzzzzzz
Example for Raspberry Pi 4 without Telegram Sync:
sudo ./Arlo-Usb-Start.sh 500 TelNo
After running Arlo-Usb-Start.sh
, the Raspberry Pi will reboot.
Upon reboot, check the connection to the base in Arlo Secure App.
-
Arlo-Usb-Start.sh
- This script installs necessary dependencies and runs the other scripts in the correct order. It ensures that the system is properly set up for USB mass storage and clip management. | Main script to start the setup process. -
cleanup_clips.sh
- Cleans up old clips from the storage directory. By default, it removes clips older than 14 days. -
enable_mass_storage.s
- Enables USB mass storage with the specified maximum power. -
sync_clips.sh
- Synchronizes clips from the USB storage to a shared directory. Ensures that the mount point is properly managed to avoid data corruption. -
arlo_usb_start.log
- Will be created on first run inside ArloUSB-AnyRP Main folder. Check it for any issue. -
telegram-sync.py
- (Optional) File service for synchronizing clips from the USB storage to a Telegram Bot.
The scripts require the following packages:
git
bash
findutils
util-linux
rsync
grep
coreutils
procps
kmod
python3
(Only For Telegram Sync)
The Arlo-Usb-Start.sh script will automatically check these dependencies if they are not already installed.
However, if the dependencies are not installed, the program will exit resulting in an error in LogFile.
This project is licensed under the MIT License.