Addon to use a usb camera with motion detection, based on https://motion-project.github.io/
Currently only working for the first webcam found at /dev/video0
camera:
- platform: local_file
name: Living Room Cam
file_path: /share/motion/lastsnap.jpg
Optional
Path to a predefined motion.conf settings file
/dev/video0
640
Image width (pixels). Valid range: Camera dependent
480
Image height (pixels). Valid range: Camera dependent
2
Maximum number of frames to be captured per second.
Valid range: 2-100. Default: 100 (almost no limit).
%Y-%m-%d %T-%q
Draws the timestamp using same options as C function strftime(3)
Text is placed in lower right corner
%Y = year, %m = month, %d = date,
%H = hour, %M = minute, %S = second, %T = HH:MM:SS,
%v = event, %q = frame number, %t = camera id number,
%D = changed pixels, %N = noise level, \n = new line,
%i and %J = width and height of motion area,
%K and %L = X and Y coordinates of motion center
%C = value defined by text_event - do not use with text_event!
You can put quotation marks around the text to allow leading spaces
/share/motion
Target base directory for pictures and films
Use absolute path.
30
Make automated snapshot every N seconds (0 = disabled)
%v-%Y%m%d%H%M%S-snapshot
File path for snapshots (jpeg or ppm) relative to target_dir
Default value is equivalent to legacy oldlayout option
For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-snapshot
File extension .jpg or .ppm is automatically added so do not include this.
Note: A symbolic link called lastsnap.jpg created in the target_dir will always point to the latest snapshot, unless snapshot_filename is exactly 'lastsnap'
%Y = year, %m = month, %d = date,
%H = hour, %M = minute, %S = second, %T = HH:MM:SS,
%v = event, %q = frame number, %t = camera id number,
%D = changed pixels, %N = noise level, \n = new line,
%i and %J = width and height of motion area,
%K and %L = X and Y coordinates of motion center
%C = value defined by text_event - do not use with text_event!
You can put quotation marks around the text to allow leading spaces
on
Output 'normal' pictures when motion is detected
Valid values: on, off, first, best, center
When set to 'first', only the first picture of an event is saved.
Picture with most motion of an event is saved when set to 'best'.
Picture with motion nearest center of picture is saved when set to 'center'.
Can be used as preview shot for the corresponding movie.
%v-%Y%m%d%H%M%S-%q
File path for motion triggered images (jpeg or ppm) relative to target_dir
Default value is equivalent to legacy oldlayout option
For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-%q
File extension .jpg or .ppm is automatically added so do not include this
Set to 'preview' together with best-preview feature enables special naming convention for preview shots. See motion guide for details
%Y = year, %m = month, %d = date,
%H = hour, %M = minute, %S = second, %T = HH:MM:SS,
%v = event, %q = frame number, %t = camera id number,
%D = changed pixels, %N = noise level, \n = new line,
%i and %J = width and height of motion area,
%K and %L = X and Y coordinates of motion center
%C = value defined by text_event - do not use with text_event!
You can put quotation marks around the text to allow leading spaces