It does already check for all the folders down the path and only creates new ones as required.piecam wrote:HI Robert,
with regard to altering filename,location in /etc/raspmjpeg, I tried %Y%M%D and it worked. Then, I deleted existing %Y-%M-%D, it worked again.
I suspect that the problem is that, I may have existing directory (created by MotionPie) already each day, your RPI Web Interface finds out there's one already and quits.
Can you check whether script can be modified to check whether there's existing folder? if there's already one, just use it. Otherwise, create new one. Same for date folder and location folder, any folder?
www-data is normally used under apache as it offers the best security.piecam wrote:HI Robert,
I am using this on /etc/fstab,
//192.168.100.10/Recording /var/www/media cifs username=cam,password=xxx,workgroup=workgroup,users,auto,user_xattr 0 0
I would assume those files being written to NAS with this user/pass. Is this correct? Instead of www-data? just some thoughts. If you need some log, please let me know which file you need and I can get it for you.
Code: Select all
sudo killall raspimjpeg sudo cp ~/raspimjpeg /opt/vc/bin/raspimjpeg
Code: Select all
[2015/Mar/20 19:14:04] RaspiCam support started [2015/Mar/20 19:14:04] Capture Pipe already exists /var/www/FIFO1 [2015/Mar/20 19:14:04] Scheduler loop started [2015/Mar/20 19:14:04] New period detected 3 [2015/Mar/20 19:14:04] Send md 0 [2015/Mar/20 19:14:06] Send em night [2015/Mar/20 19:15:07] Saved schedule settings [2015/Mar/20 19:15:07] Send Schedule reset [2015/Mar/20 19:15:07] Reload parameters command requested [2015/Mar/20 19:15:07] Scheduler loop started [2015/Mar/20 19:15:07] New period detected 2 [2015/Mar/20 19:15:07] Send md 0 [2015/Mar/20 19:15:09] Send em auto [2015/Mar/20 19:15:11] Send md 1 [2015/Mar/20 19:15:13] Stop capture request ignored, already stopped [2015/Mar/20 19:15:13] Ignore FIFO char
Thanks for test. I have pushed this to git now.piecam wrote:HI Robert,
I had to add "chmod x" to the program; then it worked well and I have filed stored correctly to NAS.
You may push it to the git when you feel ready.
Thanks a lot.
The log is not showing any trigger commands being received from motion. When it is working you should seeharlock74 wrote: One final note. I would be grateful to you ,when you get a chance, if you could let me know how to get motion to work after setting up the security option. I have already tried twice today but with no avail.
As posted before I have followed this instructions:
http://www.raspberrypi.org/forums/viewt ... 60#p500460
Thanks a lot and really sorry to bother you again with same question!
Code: Select all
[2015/Mar/20 14:20:29] Start capture requested [2015/Mar/20 14:20:29] Send ca 1 [2015/Mar/20 14:20:34] Stop capture requested [2015/Mar/20 14:20:34] Send ca 0
Thanks for confirming rpi-update. Someone said this didn't seem to work for them so I double checked with 6by9 and it has definitely been updated with the flickering fix.harlock74 wrote: Just out of curiosity I have re-installed the raspbian image and I can confirm that running 'sudo rpi-update' did the trick for the flickering issue.
Its fixed for me. Thanks for all your hard work.btidey wrote: Thanks for confirming rpi-update. Someone said this didn't seem to work for them so I double checked with 6by9 and it has definitely been updated with the flickering fix.
Code: Select all
avconv -i in_%05d.jpeg -r 5 -vcodec libx264 -crf 20 -g 5 -vf crop=2592:1458,scale=1280:720 outFile
Confirmed. I can see motion among all the other processes.btidey wrote:
a) motion should be running when you have motion detect activated. (ps -A should show a motion process)
All confirmed. After inserting user/password I can see an image.btidey wrote: b) motion must be able to fetch new images from the web site . This is controlled by the settings in /etc/motion/motion.conf and also visible from the web motion page. The two critical items are
netcam_url http://localhost:port/cam_pic.php where port is the port number if you have changed it from default 80
netcam_userpass username:password where those are set up to be the same as when you secured the web site.
You can test that by closing a browser, re-opening it up and browsing to http://localhost:port/cam_pic.php You should have to enter name and password and then see an image
If you don't then there is something wrong with how you have set up the security
I have tried to change those parameters,as suggested, but with no avail.btidey wrote: c) motion trigger parameters must allow motion to see a difference between pictures when motion occurs. Set a low threshold and noise level to start to make sure triggers are generated (100 threshold, 20 noise)
All confirmed.btidey wrote: d) motion on_event_start and on_event_end should be set up (default) to echo '1' and '0' to FIFO1 which scheduler is monitoring. You can test the FIFO1 is working by manually doing a
echo -n '1' >/var/www/FIFO1 which should start a video recording and '0' to stop it.
Please find attached the file.btidey wrote: If none of this is making sense then maybe post your /etc/motion/motion.conf zipped up and with password xxx'd out
There are a few differences in there from the default. motion.conf.1 in install etcharlock74 wrote: Please find attached the file.
Once again many thanks for that!
Robert,btidey wrote: There are a few differences in there from the default. motion.conf.1 in install etc
videodevice /dev/video0 (commented out in default)
netcam_http 1.0 (commented out in default)
mysql_host localhost (commented out in default)
pgsql_host localhost (commented out in default)
pgsql_port 5432 (commented out in default)
The first one is probably problematic as it is telling motion to collect from a real video device whereas we want it to just use the netcam_url
Try using the default motion.conf as supplied and just change the netcam_userpass to match your security.
do you mean that I have to replace the motion.conf (installed with your version) with the motion.conf installed with the original software?btidey wrote: Try using the default motion.conf as supplied and just change the netcam_userpass to match your security.
The differences I pointed out were against the motion.conf supplied with my version of the software so I meant to use that.harlock74 wrote: Robert,
thanks for coming back to me.
When you say:do you mean that I have to replace the motion.conf (installed with your version) with the motion.conf installed with the original software?btidey wrote: Try using the default motion.conf as supplied and just change the netcam_userpass to match your security.
Thanks a lot!
Nexoru,Nexoru wrote:Hey ,
i secured the Interface with htaccess , because i forwarded it.
Now i recognized that with the htaccess function activated , the Motion Detection doesn't work anymore.
Is there an fix or an better solution for that ?
Once again, thanks a lot!harlock74 wrote: EDIT:
Good news Robert! I followed your recommended steps and everything worked like a charm! Motion is now working as expected even with the security option activated. Many thanks again for your kind and much appreciated help!
Code: Select all
# Command to be executed when an event starts. (default: none) # An event starts at first motion detected after a period of no motio$ # on_event_start echo '1' > /var/www/FIFO1 on_event_start echo 'ca 1' > /var/www/FIFO # Command to be executed when an event ends after a period of no moti$ # (default: none). The period of no motion is defined by option gap. # on_event_end echo '0' > /var/www/FIFO1 on_event_end echo 'ca 0' > /var/www/FIFO
First question is what are you trying to achieve?0lly wrote:Hi,
How to deactivate scheduler-autostart ?
How to get Motion working without scheduler ?
I need motion 24/7btidey wrote: First question is what are you trying to achieve?
thanks for the tip,maybe a option for autorun is better...btidey wrote: 2) Take the scheduler boot start up settings out of /etc/rc.local
Donebtidey wrote: The changes you posted are effectively step 1) but scheduler would still be running and could action any daily mode change commands. I'd recommend either doing what I said in first paragraph (All day mode) or removing scheduler operations by doing both 1) and 2).
I'm not sure which option you did. If you just needed motion detection 24 hours then rather than change around the basic scheduler operation I'd have done one of the following.0lly wrote:I need motion 24/7btidey wrote: First question is what are you trying to achieve?thanks for the tip,maybe a option for autorun is better...btidey wrote: 2) Take the scheduler boot start up settings out of /etc/rc.localDonebtidey wrote: The changes you posted are effectively step 1) but scheduler would still be running and could action any daily mode change commands. I'd recommend either doing what I said in first paragraph (All day mode) or removing scheduler operations by doing both 1) and 2).
I had this on my list of potential improvements so decided to give it a go.piecam wrote:HI Robert,
Boxing MP4, while continuing capturing H264.