Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PiSpy

PiSpy is a home security application that uses a Raspberry Pi to monitor an environment and stream captured images/video to a mobile app. The mobile app is built with Flutter (Dart) and a lightweight Python Flask server (smartserver.py) runs on the Raspberry Pi to receive and serve media captured by Motion.

Features

  • Motion-triggered capture (images, video) and livestream using Motion (https://motion-project.github.io/)
  • Mobile client built with Flutter for Android/iOS
  • Small Flask-based server to receive media and provide access to the stream

Repository structure

  • android/, ios/ — Flutter platform folders
  • lib/ — Flutter app source (main.dart and view components)
  • resources/ — app resources and assets
  • smartserver.py — simple Flask server used on the Raspberry Pi to serve captured media
  • pubspec.yaml / pubspec.lock — Flutter package configuration

Requirements

  • Flutter SDK (for building/running the mobile app): https://flutter.dev
  • Python 3.7+ (for the Flask server)
  • motion (Motion) installed on the Raspberry Pi to capture motion-triggered images/video and streaming

Installation & Running

On the Raspberry Pi (server + Motion):

  1. Install Motion and configure it to capture images/video and provide a stream. See Motion docs: https://motion-project.github.io/

  2. Ensure Python 3 is installed. Install Flask if not already available:

    pip3 install flask

  3. Place or run smartserver.py on the Pi. Example:

    python3 smartserver.py

    The server will listen on the host and port defined in smartserver.py (edit the file if you need to change host/port).

On your development machine (mobile app):

  1. Install Flutter following the official guide: https://flutter.dev/docs/get-started/install

  2. Fetch dependencies and run the app:

    flutter pub get flutter run

  3. Configure the app (in the Flutter code) to point to your Raspberry Pi's server address so it can retrieve images, video, and stream.

Configuration

  • Motion: configure the target directory where Motion saves captured images and video, and the stream URL. The Flask server expects to be able to read or serve files from the locations motion uses.
  • smartserver.py: open the file and adjust settings such as host/port or directories if needed.

Notes & Troubleshooting

  • This repository provides a proof-of-concept Flutter client and a minimal Flask server. Production deployments should secure the server (HTTPS, authentication), harden Motion configuration, and verify file permissions.
  • If the stream or captured files are not visible in the app, verify that Motion is running, that files are being written to the expected directory, and that the Flask server has permission to read those files.

Contributing

Contributions are welcome — please open issues or pull requests with improvements, bug fixes, or documentation updates.

License

This project does not include a license file. If you intend to share or accept contributions, consider adding a LICENSE (for example MIT or Apache-2.0).


Maintainer: Novacane01

About

Raspberry Pi Home Security Mobile Application

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages