While trying to setup my Foscam (FI9900P) as motionsensor in order to trigger a switch in Domoticz, installation of the "motion" package is required. I'm hoping someone could help me out on - probably basic Linux knowledge - setting up the motion package properly.
Being absolutely no expert in Linux, i however did succeed on installing motion, but when i start/restart motion (sudo /etc/init.d/motion restart), it seems i must have missed something.
I have motion config setup (/etc/motion/motion.conf), below is part of the config file which i think is related to the issue:
Code: Select all
# Target base directory for pictures and films
# Recommended to use absolute path. (Default: current working directory)
# target_dir /var/www # this returned the same error
target_dir /domoticz/www
# File path for snapshots (jpeg or ppm) relative to target_dir
# Default: %v-%Y%m%d%H%M%S-snapshot
# 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'
#snapshot_filename %v-%Y%m%d%H%M%S-snapshot
snapshot_filename cam/foscam
Here's the logfile:
Code: Select all
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motion/motion.conf
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "netcam_http"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "despeckle"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "gap"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "max_mpeg_time"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "output_all"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "output_normal"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "output_motion"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "ppm"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "ffmpeg_cap_new"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "ffmpeg_cap_motion"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "locate"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "jpeg_filename"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_quality"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_motion"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_maxrate"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_localhost"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_limit"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "control_localhost"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "control_html_output"
Apr 3 11:19:34 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Sun Apr 3 11:21:04 2016 [try http://www.rsyslog.com/e/2007 ]
Apr 3 11:22:00 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Sun Apr 3 11:23:30 2016 [try http://www.rsyslog.com/e/2007 ]
Apr 3 11:23:23 raspberrypi systemd[1]: Stopping LSB: Start Motion detection...
Apr 3 11:23:23 raspberrypi motion[2672]: Stopping motion detection daemon: motionNo /usr/bin/motion found running; none killed.
Apr 3 11:23:23 raspberrypi motion[2672]: .
Apr 3 11:23:23 raspberrypi systemd[1]: Starting LSB: Start Motion detection...
Apr 3 11:23:23 raspberrypi motion[2678]: Starting motion detection daemon: motion.
Apr 3 11:23:23 raspberrypi systemd[1]: Started LSB: Start Motion detection.
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] conf_load: Processing thread 0 - config file [b][color=#FF0000]/etc/motion/motion.conf[/color][/b]
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "netcam_http"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "despeckle"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "gap"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "max_mpeg_time"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "output_all"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "output_normal"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "output_motion"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "ppm"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "ffmpeg_cap_new"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "ffmpeg_cap_motion"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "locate"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "jpeg_filename"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_quality"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_motion"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_maxrate"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_localhost"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "webcam_limit"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "control_localhost"
Apr 3 11:23:24 raspberrypi motion: [0] [ALR] [ALL] conf_cmdparse: Unknown config option "control_html_output"
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] motion_startup: Using default log level (NTC) (6)
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] motion_startup: Motion 3.2.12+git20140228 Started
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] motion_startup: Logging to syslog
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] motion_startup: Using default log type (ALL)
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] motion_startup: Using log type (ALL) log level (NTC)
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ENC] ffmpeg_init: ffmpeg LIBAVCODEC_BUILD 3670016 LIBAVFORMAT_BUILD 3670272
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] main: Thread 1 is from /etc/motion/motion.conf
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] main: Thread 1 is device: http://192.168.2.99:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=username&pwd=password input -1
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] main: Stream port 0
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] main: Waiting for threads to finish, pid: 2684
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [ALL] motion_init: Thread 1 started , motion detection Enabled
Apr 3 11:23:24 raspberrypi motion: [1] [ALR] [NET] netcam_start: Network Camera thread starting... for url (http://192.168.2.99:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=username&pwd=password)
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Non-streaming camera (keep-alive not set)
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Content-length present
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Found Conn: close header ('Connection: close')
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_setup_html: connected, going on to read image.
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: disconnecting netcam since keep-alive not set.
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: leaving netcam connected.
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [ALL] image_ring_resize: Resizing pre_capture buffer to 1 items
Apr 3 11:23:24 raspberrypi motion: [1] [ALR] [NET] netcam_handler_loop: Camera handler thread [2] started
Apr 3 11:23:24 raspberrypi motion: [1] [WRN] [NET] netcam_next: called with no data in buffer
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Non-streaming camera (keep-alive not set)
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Content-length present
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Found Conn: close header ('Connection: close')
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: disconnecting netcam since keep-alive not set.
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: leaving netcam connected.
Apr 3 11:23:25 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Non-streaming camera (keep-alive not set)
Apr 3 11:23:25 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Content-length present
Apr 3 11:23:25 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Found Conn: close header ('Connection: close')
Apr 3 11:23:25 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: disconnecting netcam since keep-alive not set.
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] motion_startup: Logging to syslog
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] motion_startup: Using default log type (ALL)
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] motion_startup: Using log type (ALL) log level (NTC)
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ENC] ffmpeg_init: ffmpeg LIBAVCODEC_BUILD 3670016 LIBAVFORMAT_BUILD 3670272
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] main: Thread 1 is from /etc/motion/motion.conf
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] main: Thread 1 is device: http://192.168.2.99:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=marmachine&pwd=637800mvw input -1
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] main: Stream port 0
Apr 3 11:23:24 raspberrypi motion: [0] [NTC] [ALL] main: Waiting for threads to finish, pid: 2684
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [ALL] motion_init: Thread 1 started , motion detection Enabled
Apr 3 11:23:24 raspberrypi motion: [1] [ALR] [NET] netcam_start: Network Camera thread starting... for url (http://192.168.2.99:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=marmachine&pwd=637800mvw)
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Non-streaming camera (keep-alive not set)
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Content-length present
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Found Conn: close header ('Connection: close')
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_setup_html: connected, going on to read image.
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: disconnecting netcam since keep-alive not set.
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: leaving netcam connected.
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [ALL] image_ring_resize: Resizing pre_capture buffer to 1 items
Apr 3 11:23:24 raspberrypi motion: [1] [ALR] [NET] netcam_handler_loop: Camera handler thread [2] started
Apr 3 11:23:24 raspberrypi motion: [1] [WRN] [NET] netcam_next: called with no data in buffer
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Non-streaming camera (keep-alive not set)
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Content-length present
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Found Conn: close header ('Connection: close')
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: disconnecting netcam since keep-alive not set.
Apr 3 11:23:24 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: leaving netcam connected.
Apr 3 11:23:25 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Non-streaming camera (keep-alive not set)
Apr 3 11:23:25 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Content-length present
Apr 3 11:23:25 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Found Conn: close header ('Connection: close')
Apr 3 11:23:25 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: disconnecting netcam since keep-alive not set.
Apr 3 11:23:25 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: leaving netcam connected.
Apr 3 11:23:26 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Non-streaming camera (keep-alive not set)
Apr 3 11:23:26 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Content-length present
Apr 3 11:23:26 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Found Conn: close header ('Connection: close')
Apr 3 11:23:26 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: disconnecting netcam since keep-alive not set.
Apr 3 11:23:26 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: leaving netcam connected.
Apr 3 11:23:27 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Non-streaming camera (keep-alive not set)
Apr 3 11:23:27 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Content-length present
Apr 3 11:23:27 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Found Conn: close header ('Connection: close')
Apr 3 11:23:27 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: disconnecting netcam since keep-alive not set.
Apr 3 11:23:27 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: leaving netcam connected.
Apr 3 11:23:28 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Non-streaming camera (keep-alive not set)
Apr 3 11:23:28 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Content-length present
Apr 3 11:23:28 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Found Conn: close header ('Connection: close')
Apr 3 11:23:28 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: disconnecting netcam since keep-alive not set.
Apr 3 11:23:28 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: leaving netcam connected.
Apr 3 11:23:29 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Non-streaming camera (keep-alive not set)
Apr 3 11:23:29 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Content-length present
Apr 3 11:23:29 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Found Conn: close header ('Connection: close')
Apr 3 11:23:29 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: disconnecting netcam since keep-alive not set.
Apr 3 11:23:29 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: leaving netcam connected.
Apr 3 11:23:30 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Non-streaming camera (keep-alive not set)
Apr 3 11:23:30 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Content-length present
Apr 3 11:23:30 raspberrypi motion: [1] [NTC] [NET] netcam_read_first_header: Found Conn: close header ('Connection: close')
Apr 3 11:23:30 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: disconnecting netcam since keep-alive not set.
Apr 3 11:23:30 raspberrypi motion: [1] [NTC] [NET] netcam_read_html_jpeg: leaving netcam connected.
Apr 3 11:23:30 raspberrypi motion: [1] [ERR] [ALL] create_path: [color=#FF0000][b]Problem creating directory /domoticz:[/b][/color]
Apr 3 11:23:30 raspberrypi motion: [1] [ERR] [ALL] put_picture: [color=#FF0000][b]Can't write picture to file /domoticz/www/cam/foscam.jpg - check access rights to target directory#012Thread is going to finish due to this fatal error[/b][/color]:
Apr 3 11:23:30 raspberrypi motion: [1] [ERR] [EVT] event_image_snapshot: Could not create symbolic link [cam/foscam.jpg]:
Apr 3 11:23:30 raspberrypi motion: [1] [NTC] [ALL] motion_loop: Thread exiting
Apr 3 11:23:30 raspberrypi motion: [1] [ALR] [NET] netcam_handler_loop: netcam camera handler: finish set, exiting
Apr 3 11:23:31 raspberrypi motion: [0] [NTC] [ALL] main: Threads finished
Apr 3 11:23:32 raspberrypi motion: [0] [NTC] [ALL] main: [color=#FF0000][b]Motion terminating[/b][/color]