Setting up USB camera with motion

Running hassio on a pi2 and hooked up a generic USB webcam. I then installed the Motion add on from https://github.com/HerrHofrat/hassio-addons and made the necessary adjustments in the config.yaml file.

Everything is working well and the cam is detecting motion and outputting the proper images. What I’m curious about is image caching and whether or not I need to be concerned about filling up my pi’s sd card. I don’t see an option anywhere to control how many images are kept in the local folder.

Any insights here?

The images are save default in /share/motion is see in the code.
So I think you can keep track of them manually of create some autopruning system

Checkout the following

I also use a command line sensor to read the last file captured. You could use a similar approach to delete images older than some date

I think this will be along the way I go.

Going to try using a large network drive for storage and then running a cronjob to clear out images after a certain point.

A usb stick on the Pi would be another way to go.
Ultimately I plan to use image classification to determine which images are worth displaying, eg if there’s a face just display the most clear shot from a sequence

Good thinking. That may be easier to implement than the network storage.

Can you explain a little more about what you’re trying to do? It sounds interesting!

I’m hoping to use my setup to pause a movie in plex when someone leaves the room. Getting the camera setup is just the first step.

Right now I have the camera pointed on a bird feeder. Motion triggers capture, and the next step is to apply a machine learning classifier (caffe or tensorflow) to identify the presence of a bird. Of course this is just a demonstrator, and the method is applicable to security, doorbell or another setup where you have a camera and something to detect in the image.

Hiya,

Anyone know how to stream the image (mjpg) from Hassio Motion add-on?