Security Cam is a Python and Android attachment for Motion. Motion is a program that monitors the video signal from cameras. The Security Cam application is a client-server architecture on top of Motion.
The Python server manages the Motion process and implements a REST API for controlling the server. The light-weight client runs on Android which is used to actively control the server.
- Start and stop motion detection remotely
- Display current camera snapshots
- Push notifications when motion is detected
- Retrieve camera snapshots that triggered motion
- Upload each snapshot directly to your Dropbox
-
Install Motion, either from package or from source (recommended).
-
Download the Android client from the Google Play Market.
-
Get the server Python package:
$ pip install security-cam
-
Get a GCM API Key (required for receiving push notifications)
- Go to GCM: Creating a Google API Project and follow the instructions
- Take note of the API key
-
Get a Dropbox API access (optional)
- Go to the Dropbox Apps Console and create a new app
- App type: Core API
- Permission: App folder
- Take note of the API key and App secret
-
Configure the server
/usr/local/etc/security-cam/
:- Rename
motion.conf.example -> motion.conf
- Rename
settings.cfg.example -> settings.cfg
- Edit the
settings.cfg
and configure it to your needs
- Rename
-
Start the server
$ ln -s /usr/local/lib/python/dist-packages/securitas/server.py /usr/bin/security-cam $ sudo chmod +x /usr/bin/security-cam $ security-cam
You will be prompted to authorize the application with your Dropbox account if you have followed step 5.
-
Launch the Android application
- Configure the settings to your needs
- Port: 4000
-
Enjoy!
Some ideas for the future development:
- Use Secure Socket Layer (SSL)
- Implement a snapshot picker