Sign inSign up

jritsema/rpi-motion-mmal

By jritsema

Updated about 9 years ago

Image with motion-mmal setup and cofigured to support motion with the raspberry pi camera module

Image
2

1.6K

jritsema/rpi-motion-mmal repository overview

Use your raspberry pi with camera module as a surveillance system by running this container.

source code

supported tags

2.2 Dockerfile 2.1 Dockerfile 2.0 Dockerfile

usage
$ docker run --device /dev/vchiq -p 80:8081 -p 8080:8080 -v /home/pi:/home/pi jritsema/rpi-motion-mmal

or using docker-compose...

motion:
  container_name: driveway-motion
  image: jritsema/rpi-motion-mmal
  devices:
    - "/dev/vchiq"
  volumes:
    - /home/pi/motion:/home/pi
    - /home/pi/cam-driveway/motion-mmalcam.conf:/etc/motion.conf
  ports:
    - "80:8081"
    - "8080:8080"
  restart: always

Optionally, if you would like each motion event to be auto-tagged using Amazon's Rekognition service, you can add your AWS keys as environment variables and configure motion as follows.

motion:
  container_name: driveway-motion
  image: jritsema/rpi-motion-mmal
  environment:
    - "AWS_ACCESS_KEY_ID=xyz"
    - "AWS_SECRET_ACCESS_KEY=xyz"
  devices:
    - "/dev/vchiq"
  volumes:
    - /home/pi/motion:/home/pi
    - /home/pi/cam-driveway/motion-mmalcam.conf:/etc/motion.conf
  ports:
    - "80:8081"
    - "8080:8080"
  restart: always

motion.conf

on_picture_save rekognize %f > %f.json

And if you want to auto-email an event based on certain tags, you can use the following.

motion:
  container_name: driveway-motion
  image: jritsema/rpi-motion-mmal
  environment:
    - "AWS_ACCESS_KEY_ID=xyz"
    - "AWS_SECRET_ACCESS_KEY=xyz"
    - "REKOGNOTIFY_MATCH=Human,People,Person,Animal,Mammal"
    - "REKOGNOTIFY_HOST=smtp.server.net"
    - "[email protected]"
    - "REKOGNOTIFY_PASS=xyz"
    - "[email protected]>"
    - "[email protected]"
  devices:
    - "/dev/vchiq"
  volumes:
    - /home/pi/motion:/home/pi
    - /home/pi/cam-driveway/motion-mmalcam.conf:/etc/motion.conf
  ports:
    - "80:8081"
    - "8080:8080"
  restart: always

motion.conf

on_picture_save rekognize %f | tee %f.json | rekognotify %f

Tag summary

Content type

Image

Digest

Size

250 MB

Last updated

about 9 years ago

docker pull jritsema/rpi-motion-mmal