Skip to content

Latest commit

 

History

History
153 lines (129 loc) · 4.59 KB

motionplus-config.md

File metadata and controls

153 lines (129 loc) · 4.59 KB

Configure MotionPlus

Step 1 - Configure motionplus

sudo vi /etc/motionplus/motionplus.conf

Update the motionplus service configuration. Change the following placeholders for your configuration.

Determine the values for the following settings. They will be required and referred to in some next steps.

  1. Replace <WEBCONTROL_PASSWORD> with the webcontrol password.
  2. Replace <DATABASE_TYPE> with the type of database software (e.g. mariadb).
  3. Replace <DATABASE_SERVER> with the database server's IP address or hostname.
  4. Replace <DATABASE_PORT> with the database server's port (e.g. MySQL and MariaDB's port is 3306).
  5. Replace <DATABASE_USERNAME> with the database configuration's username (e.g. motionplus).
  6. Replace <DATABASE_PASSWORD> with the database configuration's password.
  7. Replace <DATABASE_NAME> with the database configuration's database name (e.g. motionplus).
; This config file was generated by motionplus 0.2.0-git-20240802-2b7b758
; Documentation:  /usr/local/share/doc/motionplus/motionplus_guide.html
;
; This file contains only the basic configuration options to get a
; system working.  There are many more options available.  Please
; consult the documentation for the complete list of all options.
;

;*************************************************
;*****   System
;*************************************************
daemon off
log_file /var/log/motionplus/motionplus.log
log_level 6
log_type ALL
pid_file /var/log/motionplus/motionplus.pid
target_dir /home/motion

;*************************************************
;*****   Camera
;*************************************************
;device_name
;device_id
;target_dir

;*************************************************
;*****   Source
;*************************************************
;v4l2_device /dev/video0
;netcam_url

;*************************************************
;*****   Image
;*************************************************
width 640
height 480
framerate 15

;*************************************************
;*****   Overlays
;*************************************************
text_right %Y-%m-%d\n%T
text_scale 5

;*************************************************
;*****   Method
;*************************************************
emulate_motion off
threshold 1500

;*************************************************
;*****   Masks
;*************************************************
noise_level 32
despeckle_filter EedDl

;*************************************************
;*****   Detection
;*************************************************
minimum_motion_frames 1
event_gap 60
pre_capture 60
post_capture 60

;*************************************************
;*****   Scripts
;*************************************************
on_event_start
on_event_end

;*************************************************
;*****   Picture
;*************************************************
picture_output off
picture_filename %v-%Y%m%d%H%M%S-%q

;*************************************************
;*****   Movie
;*************************************************
movie_output on
movie_output_motion off
movie_max_time 300
movie_quality 45
movie_container mkv
movie_filename %v-%Y%m%d-%H%M%S
movie_passthrough on

;*************************************************
;*****   Web Control
;*************************************************
webcontrol_port 8080
webcontrol_ipv6 on
webcontrol_localhost off
webcontrol_parms 0
webcontrol_auth_method basic
webcontrol_authentication admin:<WEBCONTROL_PASSWORD>
#webcontrol_tls on
webcontrol_lock_attempt 3
webcontrol_lock_minutes 5


;*************************************************
;*****   Web Stream
;*************************************************
stream_preview_scale 25
stream_preview_method combined

;*************************************************
;*****  Database
;*************************************************
database_type     <DATABASE_TYPE>
database_host     <DATABASE_SERVER>
database_port     <DATABASE_PORT>
database_user     <DATABASE_USERNAME>
database_password <DATABASE_PASSWORD>
database_dbname   <DATABASE_NAME>

;*************************************************
; Device config files - One for each device.
;*************************************************
camera /etc/motionplus/camera1.conf
; camera /usr/local/etc/motionplus/camera2.conf
; camera /usr/local/etc/motionplus/camera3.conf
sound /etc/motionplus/sound.conf

;*************************************************
; Directory to read '.conf' files for devices.
;*************************************************
; config_dir /usr/local/etc/motionplus/conf.d

Next Step: Configure Camera