Pangu
Posts: 78
Joined: Tue Dec 18, 2012 5:30 pm

Re: RPi Cam Web Interface

Sat Aug 06, 2016 8:26 pm

I'm trying to figure out how motion can be configured properly. I did read this Wiki HowTo.

I am not sure what "noise level" and "change frames to START" does and how it affects the configuration.

Additionally I created a motion mask. I am using 1296x972 px for video (max view) so I entered temporarily this resolution as image resolution, too. Then I created a still image and downloaded it to my computer. I opened this file with GIMP and did these steps:

- I converted it to GREYSCALE.
- I drawed a selection around the area that should be ignored in motion processing and filled this area with a black color.
- I inverted the active selection and filled this area with white color.
- then I resized the original image size 1296x972 to the new size 82x61 px and afterwards..
- I saved it as "my_motion_mask.pgm"

But where on RPi do this file to be transferred? Should it reside in /var/www and do I need to do a "chown www-data. /var/www/my_motion_mask.pgm" afterwards? I cannot find any information about this step.

And it's not clear to me if it's advisable to use the new algorithm (value greater than 1000 in "noise level") or lower than 1000 ? what should I use and why?

any help appreciated.
Last edited by Pangu on Mon Aug 08, 2016 9:26 am, edited 1 time in total.

noxx
Posts: 17
Joined: Fri Oct 25, 2013 8:13 pm

Re: RPi Cam Web Interface

Sun Aug 07, 2016 11:40 am

i dont know what is wrong, 2-3 times at one day crashed RPI CAM....
crash at 12:05:05 :-(

Code: Select all

{2016/08/07 12:07:54} send smd 1
[2016/08/07 12:07:54] Start capture requested from Pipe
[2016/08/07 12:07:54] Send ca 1
{2016/08/07 12:07:54} Capturing started
{2016/08/07 12:08:14} Watchdog detected problem. Stopping{2016/08/07 12:08:14} SIGINT/SIGTERM received, stopping
[2016/08/07 13:03:56] Scheduled management tasks. Next at 1470571436

cgyt3ch
Posts: 9
Joined: Sun Jun 12, 2016 11:03 pm

Re: RPi Cam Web Interface

Sun Aug 07, 2016 6:39 pm

Unfortunately that also doesn't work
btidey wrote:
cgyt3ch wrote:
I've tried to setup the scheduler to record 1 hour videos at a time and clean up when it reaches 10% free space but it won't record anything, this is my config, anything wrong?

Parameter Value Parameter Value
PurgeSpace_ModeEx Select Mode PurgeSpace_Level
10
DawnStart_Minutes
-180
DayStart_Minutes
0
DayEnd_Minutes
0
DuskEnd_Minutes
180
Latitude
52.00
Longtitude
0.00
Max_Capture
3600
DayMode Select Mode
AutoCapture_Interval
3600
AutoCamera_Interval
600
AutoCapture_Interval sends the start command at 3600 second intervals. Max_Capture will terminate a video recording after 3600 seconds.

You need to make the Max_Capture a little less than the AutoCapture_interval so that the video is stopped before the next one is due to start. otherwise the new start may get ignored as a recording is currently in progress.

So Interval 3600 and Max 3599 should work OK. To test it do Interval 10 and max_capture 9 so you can see the sequence is working quickly.

AutoCamera_Interval is something completely unrelated. It is to do with only turning camera on when there is an active browser connected. Leave this at 0 for your purposes. I see that this parameter is not in wiki at the moment. I'll add that.

btidey
Posts: 1614
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Mon Aug 08, 2016 8:41 am

thsBavR10 wrote:
Many thanks! I've tested it.
- In the line

Code: Select all

server.document-root      = "/var/www/html>
in the config file there is a missing " at the end of the line.
- the string

Code: Select all

server.port
occurs at multiple locations,
(also in line

Code: Select all

include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port

so the so subsequent spaces must be recognized.

I modified fn_lighttpd () a little bit:


Is that correct?
Thanks. I have corrected the missing quote. I changed the match to only be beginning of line to avoid the other substitutions.

btidey
Posts: 1614
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Mon Aug 08, 2016 8:44 am

Pangu wrote:I am aware of

http://rpicam-ip/cam_pic.php

is there a similar URL that I can access to get the live preview of the rpi cam? I want to have a URL which is showing just the live preview WITHOUT any buttons or configuration options. I want to give this URL to "restricted" users who should only be able to VIEW but not change any settings.
Check the wiki for how to embed preview only in a web page. That shows the page code needed which could be put on the server and then accessed with a URL.

btidey
Posts: 1614
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Mon Aug 08, 2016 9:14 am

Pangu wrote:I'm trying to figure out how motion can be configured properly. I did read this Wiki HowTo but it's not clear to me how these settings work and should be modified each other.

Anyone can explain what exactly "Noise Level", "Threshold" and "Change Frames to start" and "Still frames to stop" behave? I did realize that a value of "Still frames to stop = 300" is something like 10seconds recording after motion was detected. The main issue I have is: how do I configure motion detection to work properly so it suit my needs?

What does "Noise Level", *HOW* should I determine a good value for "threshold" and how "Change frames to start" affects motion detection? I tried to use the motion preview but without the knowledge of these configuration options I am not able to set up a good configuration. So any help really appreciated.

I also need to create a motion mask and I was not able to do so according the tutorial. Is there any other good explanation with a step-by-step tutorial?Maybe a youtube video or something like that that explains how to use a motion mask ? I want to define a certain area that should be monitored for motion, the rest of the area should be ignores. How?

And it's not clear to me if it's advisable to use the new algorithm (value greater than 1000) or lower than 1000 ? what should I use and why?
I use the new > 1000 internal motion detection for all my needs.

The older internal method (<1000) counts vector changes in each frame which are above the 'noise setting' and if the total is above the threshold then it is a changed frame. If there is a sequence of changed frames more than the 'change frames to start' then a start trigger occurs. Reverse applies to generate a stop trigger.

The newer method (>1000) has quite a few optimisations. First it applies a simple 2d filter to changes so that only larger moving objects contribute to the detection. Second, the noise level now controls a moving average time filter to all the vector changes to smooth out the changes. Any frame which now has the smoothed vector change greater than the threshold now is a changed frame. The trigger logic on change frames is similar to the older method.

Starting from defaults (Second algorithm internal) decreasing the noise level (but still above 1000) lowers the amount of smoothing applied. This makes it more responsive to quick changes but can lead to unnecessary 'false' triggers. Similarly increasing this will apply more smoothing making it more necessary for a change to be sustained before a trigger occurs.

Increasing or decreasing the threshold changes the sensitivity to when a particular change level is regarded as a changed frame.

Change frames to start or stop then apply a secondary filter before triggers occur. Higher start numbers mean movement must be sustained longer before a start is generated. Higher stop numbers mean stillness must be sustained longer before a stop is generated. It is normally good to have a highish number for the stop as that means if there is a pause in movement and it restarts then the capture continues in one recording.

Use the %c and %f variables in the annotation string to see what is going on. %c is showing the filtered change level. When it exceeds the threshold then the frame counter %f ticks up until it exceeds the start frame trigger point. Similarly it ticks up for values below the threshold when trying to detect the end of motion.

For the mask generation.

Grab a still image at the same aspect ratio of the video format you are using. E.g. if using 1296 x 972 video then grab an image at the same resolution.

Download the jpg and load it into an image editor (PaintShopPro, Irfanview, Gimp). Resize the image to be the same as the mask image (Log will show that). So for 1296x972 the mask is 82x61. Now use the image editor to paint the areas looking for change to be white and the areas to be ignored to be black. Convert the image to 8bit gray scale and save as a portable greymap file (*.pgm).

btidey
Posts: 1614
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Mon Aug 08, 2016 9:22 am

cgyt3ch wrote:Unfortunately that also doesn't work
Can you clear the log, set interval to be 11, max capture to be 9 and then post a bit of the log?

I get

Code: Select all

[2016/08/08 10:17:40] Autocapture request.
[2016/08/08 10:17:40] Start triggered by autocapture
[2016/08/08 10:17:40] Send ca 1
{2016/08/08 10:17:40} Capturing started
[2016/08/08 10:17:51] Maximum Capture reached. Sending off command
[2016/08/08 10:17:51] Send ca 0
{2016/08/08 10:17:51} Capturing stopped
{2016/08/08 10:17:51} Add /var/www/media/vi_0010_20160808_101740.mp4 to Box Queue at pos 1
{2016/08/08 10:17:51} Start boxing /var/www/media/vi_0010_20160808_101740.mp4.h264 to /var/www/media/vi_0010_20160808_101740.mp4 Queue pos 1
{2016/08/08 10:17:52} Finished boxing /var/www/media/vi_0010_20160808_101740.mp4 from Box Queue at pos 1
{2016/08/08 10:17:52} Removed item from Box Queue
[2016/08/08 10:17:53] Autocapture request.
[2016/08/08 10:17:53] Start triggered by autocapture
[2016/08/08 10:17:53] Send ca 1
{2016/08/08 10:17:53} Capturing started
[2016/08/08 10:18:04] Maximum Capture reached. Sending off command
[2016/08/08 10:18:04] Send ca 0
{2016/08/08 10:18:04} Capturing stopped
{2016/08/08 10:18:04} Add /var/www/media/vi_0011_20160808_101753.mp4 to Box Queue at pos 2
{2016/08/08 10:18:04} Start boxing /var/www/media/vi_0011_20160808_101753.mp4.h264 to /var/www/media/vi_0011_20160808_101753.mp4 Queue pos 2
{2016/08/08 10:18:05} Finished boxing /var/www/media/vi_0011_20160808_101753.mp4 from Box Queue at pos 2
{2016/08/08 10:18:05} Removed item from Box Queue
[2016/08/08 10:18:06] Autocapture request.

Pangu
Posts: 78
Joined: Tue Dec 18, 2012 5:30 pm

Re: RPi Cam Web Interface

Mon Aug 08, 2016 10:03 am

btidey wrote:I use the new > 1000 internal motion detection for all my needs.

I am not sure what the default value was because I played around with this setting, so I'd like to know what "usual" values are if the new algorithm is used. Is it something like 1005 or 1100 or 2000 or more ?
btidey wrote:For the mask generation.

Grab a still image at the same aspect ratio of the video format you are using. E.g. if using 1296 x 972 video then grab an image at the same resolution.

Download the jpg and load it into an image editor (PaintShopPro, Irfanview, Gimp). Resize the image to be the same as the mask image (Log will show that). So for 1296x972 the mask is 82x61. Now use the image editor to paint the areas looking for change to be white and the areas to be ignored to be black. Convert the image to 8bit gray scale and save as a portable greymap file (*.pgm).
I am using 1296x927 (max view) in video. I modified the image resolution temporarily to that same resolution and grabbed an image.

Is there a difference between:

(A) FIRST resize/downsample the original image of 1296x927 to 82x61 and THEN draw the desired area and fill it with white/black and save the file

(B) FIRST draw the areas on the 1296x927 image and fill them with white+black and THEN downsize it to 82x61

?

the most important question on that is: where does "mymotionmask.pgm" file needs to be transferred on the RPi and what owner/file mode does it need to function properly? My RPi Web Interface works in /var/www (not /var/www/html because I changed it) and my mask file is named "mymotionmask.pgm". Should I place that file in /var/www and "chown www-data." or "chmod <foo>" ? in RPi Cam Web Interface Motion configuration, do I need to enter the filename with the full path e.g. "/var/www/motionmask" or maybe I even need to add the file suffix as well e.g. "/var/www/motionmask.pgm" or maybe "motionmask.pgm" or "motionmask" ?

What is the correct way?

EDIT: Also I like to know what is the best way to execute a command *before* RPi Web Cam Interface starts operating. Is there any script in RPi Web Cam Interface where I just could insert a command e.g. "mount /some/thing" in the beginning of the RPi Web Cam Initialization?
Last edited by Pangu on Mon Aug 08, 2016 2:25 pm, edited 2 times in total.

burnhaj
Posts: 24
Joined: Sun Mar 09, 2014 3:43 am

Re: RPi Cam Web Interface

Mon Aug 08, 2016 1:00 pm

Last evening I tried setting up a mask and using it. I believe that I followed the instructions closely and put the mask image in the /var/www/html/ folder and referenced that path in the internal motion settings setup. Following that I successfully tripped the motion detection and captured a video. Now this morning, nothing seems to be working. When I check the log, it appears that the camera keeps reloading every few seconds. I have tried disabling the mask in the Motion settings but nothing seems to stick when I make a change. I have tried changing to External Motion in the Camera Settings but the screen only blinks once and stays on the Internal Motion.

See the attached log file.

Any suggestions on how to get it functional again? Any ideas on what I may have done to it that caused this behavior?

Thank you

Jim

cgyt3ch
Posts: 9
Joined: Sun Jun 12, 2016 11:03 pm

Re: RPi Cam Web Interface

Mon Aug 08, 2016 1:42 pm

Seem's like it can't find macros... have you ever seen this? See below:

[2016/08/08 07:37:08] Saved schedule settings
[2016/08/08 07:37:08] Send Schedule reset
[2016/08/08 07:38:22] RaspiCam support started
[2016/08/08 07:38:22] Capture Pipe already exists /var/www/html/FIFO1
[2016/08/08 07:38:22] Scheduler loop is started
[2016/08/08 07:38:22] Reload parameters command requested
[2016/08/08 07:38:22] Scheduler loop is started
[2016/08/08 07:38:23] New period detected 0
[2016/08/08 07:38:23] Scheduled management tasks. Next at 1470663514
[2016/08/08 07:38:23] exec_macro: 600
[2016/08/08 07:38:23] Send sy 600
{2016/08/08 07:38:23} Can't find macro /var/www/html/macros/600
[2016/08/08 07:38:35] Scheduled management tasks. Next at 1470663526
[2016/08/08 07:38:35] exec_macro: 600
[2016/08/08 07:38:35] Send sy 600
{2016/08/08 07:38:35} Can't find macro /var/www/html/macros/600
[2016/08/08 07:38:47] Scheduled management tasks. Next at 1470663538
[2016/08/08 07:38:47] exec_macro: 600
[2016/08/08 07:38:47] Send sy 600
{2016/08/08 07:38:47} Can't find macro /var/www/html/macros/600
[2016/08/08 07:38:59] Scheduled management tasks. Next at 1470663550
[2016/08/08 07:38:59] exec_macro: 600
[2016/08/08 07:38:59] Send sy 600
{2016/08/08 07:38:59} Can't find macro /var/www/html/macros/600
[2016/08/08 07:39:11] Scheduled management tasks. Next at 1470663562
[2016/08/08 07:39:11] exec_macro: 600
[2016/08/08 07:39:11] Send sy 600
{2016/08/08 07:39:11} Can't find macro /var/www/html/macros/600
[2016/08/08 07:39:23] Scheduled management tasks. Next at 1470663574
[2016/08/08 07:39:23] exec_macro: 600
[2016/08/08 07:39:23] Send sy 600
{2016/08/08 07:39:23} Can't find macro /var/www/html/macros/600
[2016/08/08 07:39:35] Scheduled management tasks. Next at 1470663586
[2016/08/08 07:39:35] exec_macro: 600
[2016/08/08 07:39:35] Send sy 600
{2016/08/08 07:39:35} Can't find macro /var/www/html/macros/600
[2016/08/08 07:39:47] Scheduled management tasks. Next at 1470663598
[2016/08/08 07:39:47] exec_macro: 600
[2016/08/08 07:39:47] Send sy 600
{2016/08/08 07:39:47} Can't find macro /var/www/html/macros/600
[2016/08/08 07:39:59] Scheduled management tasks. Next at 1470663610
[2016/08/08 07:39:59] exec_macro: 600
[2016/08/08 07:39:59] Send sy 600
{2016/08/08 07:39:59} Can't find macro /var/www/html/macros/600
[2016/08/08 07:40:11] Scheduled management tasks. Next at 1470663622
[2016/08/08 07:40:11] exec_macro: 600
[2016/08/08 07:40:11] Send sy 600
{2016/08/08 07:40:11} Can't find macro /var/www/html/macros/600
[2016/08/08 07:40:23] Scheduled management tasks. Next at 1470663634
[2016/08/08 07:40:23] exec_macro: 600
[2016/08/08 07:40:23] Send sy 600
{2016/08/08 07:40:23} Can't find macro /var/www/html/macros/600
[2016/08/08 07:40:35] Scheduled management tasks. Next at 1470663646
[2016/08/08 07:40:35] exec_macro: 600
[2016/08/08 07:40:35] Send sy 600
{2016/08/08 07:40:35} Can't find macro /var/www/html/macros/600
[2016/08/08 07:40:47] Scheduled management tasks. Next at 1470663658
[2016/08/08 07:40:47] exec_macro: 600
[2016/08/08 07:40:47] Send sy 600
{2016/08/08 07:40:47} Can't find macro /var/www/html/macros/600
[2016/08/08 07:40:59] Scheduled management tasks. Next at 1470663670
[2016/08/08 07:40:59] exec_macro: 600
[2016/08/08 07:40:59] Send sy 600
{2016/08/08 07:40:59} Can't find macro /var/www/html/macros/600
[2016/08/08 07:41:11] Scheduled management tasks. Next at 1470663682
[2016/08/08 07:41:11] exec_macro: 600
[2016/08/08 07:41:11] Send sy 600
{2016/08/08 07:41:11} Can't find macro /var/www/html/macros/600
[2016/08/08 07:41:23] Scheduled management tasks. Next at 1470663694
[2016/08/08 07:41:23] exec_macro: 600
[2016/08/08 07:41:23] Send sy 600
{2016/08/08 07:41:23} Can't find macro /var/www/html/macros/600
[2016/08/08 07:41:35] Scheduled management tasks. Next at 1470663706
[2016/08/08 07:41:35] exec_macro: 600
[2016/08/08 07:41:35] Send sy 600
{2016/08/08 07:41:35} Can't find macro /var/www/html/macros/600
[2016/08/08 07:41:47] Scheduled management tasks. Next at 1470663718
[2016/08/08 07:41:47] exec_macro: 600
[2016/08/08 07:41:47] Send sy 600
{2016/08/08 07:41:47} Can't find macro /var/www/html/macros/600

btidey wrote:
cgyt3ch wrote:Unfortunately that also doesn't work
Can you clear the log, set interval to be 11, max capture to be 9 and then post a bit of the log?

I get

Code: Select all

[2016/08/08 10:17:40] Autocapture request.
[2016/08/08 10:17:40] Start triggered by autocapture
[2016/08/08 10:17:40] Send ca 1
{2016/08/08 10:17:40} Capturing started
[2016/08/08 10:17:51] Maximum Capture reached. Sending off command
[2016/08/08 10:17:51] Send ca 0
{2016/08/08 10:17:51} Capturing stopped
{2016/08/08 10:17:51} Add /var/www/media/vi_0010_20160808_101740.mp4 to Box Queue at pos 1
{2016/08/08 10:17:51} Start boxing /var/www/media/vi_0010_20160808_101740.mp4.h264 to /var/www/media/vi_0010_20160808_101740.mp4 Queue pos 1
{2016/08/08 10:17:52} Finished boxing /var/www/media/vi_0010_20160808_101740.mp4 from Box Queue at pos 1
{2016/08/08 10:17:52} Removed item from Box Queue
[2016/08/08 10:17:53] Autocapture request.
[2016/08/08 10:17:53] Start triggered by autocapture
[2016/08/08 10:17:53] Send ca 1
{2016/08/08 10:17:53} Capturing started
[2016/08/08 10:18:04] Maximum Capture reached. Sending off command
[2016/08/08 10:18:04] Send ca 0
{2016/08/08 10:18:04} Capturing stopped
{2016/08/08 10:18:04} Add /var/www/media/vi_0011_20160808_101753.mp4 to Box Queue at pos 2
{2016/08/08 10:18:04} Start boxing /var/www/media/vi_0011_20160808_101753.mp4.h264 to /var/www/media/vi_0011_20160808_101753.mp4 Queue pos 2
{2016/08/08 10:18:05} Finished boxing /var/www/media/vi_0011_20160808_101753.mp4 from Box Queue at pos 2
{2016/08/08 10:18:05} Removed item from Box Queue
[2016/08/08 10:18:06] Autocapture request.

Pangu
Posts: 78
Joined: Tue Dec 18, 2012 5:30 pm

Re: RPi Cam Web Interface

Mon Aug 08, 2016 2:54 pm

burnhaj wrote:Last evening I tried setting up a mask and using it. I believe that I followed the instructions closely and put the mask image in the /var/www/html/ folder and referenced that path in the internal motion settings setup. Following that I successfully tripped the motion detection and captured a video. Now this morning, nothing seems to be working. When I check the log, it appears that the camera keeps reloading every few seconds. I have tried disabling the mask in the Motion settings but nothing seems to stick when I make a change. I have tried changing to External Motion in the Camera Settings but the screen only blinks once and stays on the Internal Motion.

See the attached log file.

Any suggestions on how to get it functional again? Any ideas on what I may have done to it that caused this behavior?

Thank you

Jim
just realized exactly the same. No camera view any more and I cannot create still image for example. Seems that something crashed. Any clues how to fix that?

btidey
Posts: 1614
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Mon Aug 08, 2016 9:36 pm

burnhaj wrote:Last evening I tried setting up a mask and using it. I believe that I followed the instructions closely and put the mask image in the /var/www/html/ folder and referenced that path in the internal motion settings setup. Following that I successfully tripped the motion detection and captured a video. Now this morning, nothing seems to be working. When I check the log, it appears that the camera keeps reloading every few seconds. I have tried disabling the mask in the Motion settings but nothing seems to stick when I make a change. I have tried changing to External Motion in the Camera Settings but the screen only blinks once and stays on the Internal Motion.

See the attached log file.

Any suggestions on how to get it functional again? Any ideas on what I may have done to it that caused this behavior?

Thank you

Jim
It is unlikely the mask caused that. I don't see a log file. You need to zip it before attaching.

I assume you have tried a reboot.

triedonce
Posts: 12
Joined: Wed Jun 24, 2015 9:59 pm

Re: RPi Cam Web Interface

Mon Aug 08, 2016 9:51 pm

Is there a limit to the size the log gets or must I periodically clear it?
I have been clearing it regularly and it is becoming tedious hence the question.
I would like to have a way to turn it off when not needed as my system is running just fine 24/7.

burnhaj
Posts: 24
Joined: Sun Mar 09, 2014 3:43 am

Re: RPi Cam Web Interface

Tue Aug 09, 2016 2:32 am

20160808-075015-scheduleLog.txt.zip
log attachment
(1.9 KiB) Downloaded 309 times
btidey wrote:
burnhaj wrote:Last evening I tried setting up a mask and using it. I believe that I followed the instructions closely and put the mask image in the /var/www/html/ folder and referenced that path in the internal motion settings setup. Following that I successfully tripped the motion detection and captured a video. Now this morning, nothing seems to be working. When I check the log, it appears that the camera keeps reloading every few seconds. I have tried disabling the mask in the Motion settings but nothing seems to stick when I make a change. I have tried changing to External Motion in the Camera Settings but the screen only blinks once and stays on the Internal Motion.

See the attached log file.

Any suggestions on how to get it functional again? Any ideas on what I may have done to it that caused this behavior?

Thank you

Jim
It is unlikely the mask caused that. I don't see a log file. You need to zip it before attaching.

I assume you have tried a reboot.
Yes I have rebooted several times.

The zipped log file has been attached. Sorry.

thsBavR10
Posts: 233
Joined: Sat Jul 21, 2012 3:11 pm

Re: RPi Cam Web Interface

Tue Aug 09, 2016 7:02 am

btidey wrote:
thsBavR10 wrote: ... I modified fn_lighttpd () a little bit:
Is that correct?
Thanks. I have corrected the missing quote. I changed the match to only be beginning of line to avoid the other substitutions.
Can't find the modifications.
When I'm looking at https://github.com/silvanmelchior/RPi_Cam_Web_Interface, is this the right place?
Many thanks in advance!

btidey
Posts: 1614
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Tue Aug 09, 2016 3:22 pm

thsBavR10 wrote:
btidey wrote:
thsBavR10 wrote: ... I modified fn_lighttpd () a little bit:
Is that correct?
Thanks. I have corrected the missing quote. I changed the match to only be beginning of line to avoid the other substitutions.
Can't find the modifications.
When I'm looking at https://github.com/silvanmelchior/RPi_Cam_Web_Interface, is this the right place?
Many thanks in advance!
Should be there now.

btidey
Posts: 1614
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Tue Aug 09, 2016 3:27 pm

triedonce wrote:Is there a limit to the size the log gets or must I periodically clear it?
I have been clearing it regularly and it is becoming tedious hence the question.
I would like to have a way to turn it off when not needed as my system is running just fine 24/7.
Currently there is no limit to log file or the means to turn it off. I have it on my to-do list to add some automated log-maintenance. I'll add in a means to disable it altogether. One could use a macro to delete the log file using the scheduler management command.

btidey
Posts: 1614
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Tue Aug 09, 2016 3:38 pm

burnhaj wrote:
Yes I have rebooted several times.

The zipped log file has been attached. Sorry.
Log shows it is in some sort of crash loop as soon as it starts to set up motion detection. I haven't seen that before and am checking out how it could happen. It maybe some combination of settings causing it.

If you run ./stop.sh from the RPi installer then take a back up of uconfig and schedule.json from the web install folder then delete these files and then run ./start.sh does it start up Ok then?

Edit: It might be caused by the mask file although there is some protection against bad data. If you could zip that and post it I could check it out.

burnhaj
Posts: 24
Joined: Sun Mar 09, 2014 3:43 am

Re: RPi Cam Web Interface

Tue Aug 09, 2016 7:04 pm

btidey wrote:
burnhaj wrote:
Yes I have rebooted several times.

The zipped log file has been attached. Sorry.
Log shows it is in some sort of crash loop as soon as it starts to set up motion detection. I haven't seen that before and am checking out how it could happen. It maybe some combination of settings causing it.

If you run ./stop.sh from the RPi installer then take a back up of uconfig and schedule.json from the web install folder then delete these files and then run ./start.sh does it start up Ok then?

Edit: It might be caused by the mask file although there is some protection against bad data. If you could zip that and post it I could check it out.
I backed up and deleted the config and schedule.json files then ran ./start.sh. The program loads fine and motion detect works again.

triedonce
Posts: 12
Joined: Wed Jun 24, 2015 9:59 pm

Re: RPi Cam Web Interface

Tue Aug 09, 2016 7:51 pm

btidey wrote:
triedonce wrote:Is there a limit to the size the log gets or must I periodically clear it?
I have been clearing it regularly and it is becoming tedious hence the question.
I would like to have a way to turn it off when not needed as my system is running just fine 24/7.
Currently there is no limit to log file or the means to turn it off. I have it on my to-do list to add some automated log-maintenance. I'll add in a means to disable it altogether. One could use a macro to delete the log file using the scheduler management command.
Thanks, good idea, I had not thought of using a macro.

btidey
Posts: 1614
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Wed Aug 10, 2016 8:43 am

btidey wrote:
triedonce wrote:Is there a limit to the size the log gets or must I periodically clear it?
I have been clearing it regularly and it is becoming tedious hence the question.
I would like to have a way to turn it off when not needed as my system is running just fine 24/7.
Currently there is no limit to log file or the means to turn it off. I have it on my to-do list to add some automated log-maintenance. I'll add in a means to disable it altogether. One could use a macro to delete the log file using the scheduler management command.
I have now added some log maintenance in.

Camera settings has a log_size config which sets maximum number of log lines (default 5000). Scheduler checks this every management interval and removes old log lines as required.

If log_size is set to 0 then no logging is done.

In addition I have moved the download log and clear log buttons into main scheduler so that log can be downloaded and cleared without viewing it.

btidey
Posts: 1614
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Wed Aug 10, 2016 8:45 am

burnhaj wrote: I backed up and deleted the config and schedule.json files then ran ./start.sh. The program loads fine and motion detect works again.
That's good. If you find your mask file causes a problem then zip and post it so it can be checked.

Superpicsou
Posts: 3
Joined: Wed Aug 10, 2016 10:59 am

Re: RPi Cam Web Interface

Wed Aug 10, 2016 11:02 am

Piero1978 wrote:Hi, I want a web page with ONLY the streaming box, WITHOUT any command.
I've modified the INDEX.PHP file but the web page don't change.
What is the file I've to modify?
Thanks.
I have the same problem but i didn't find an anwser. Can someone help me ?
The .css files aren't changin too. I seems like the whole server has a cache that nevers end.
I've installed the server on port 4600 and its behind a router.

[EDIT]

I have to reinstall the server to see the modiciations. Any ideas ?

triedonce
Posts: 12
Joined: Wed Jun 24, 2015 9:59 pm

Re: RPi Cam Web Interface

Wed Aug 10, 2016 7:48 pm

btidey wrote:
btidey wrote:
triedonce wrote:Is there a limit to the size the log gets or must I periodically clear it?
I have been clearing it regularly and it is becoming tedious hence the question.
I would like to have a way to turn it off when not needed as my system is running just fine 24/7.
Currently there is no limit to log file or the means to turn it off. I have it on my to-do list to add some automated log-maintenance. I'll add in a means to disable it altogether. One could use a macro to delete the log file using the scheduler management command.
I have now added some log maintenance in.

Camera settings has a log_size config which sets maximum number of log lines (default 5000). Scheduler checks this every management interval and removes old log lines as required.

If log_size is set to 0 then no logging is done.

In addition I have moved the download log and clear log buttons into main scheduler so that log can be downloaded and cleared without viewing it.
Fantastic! Thanks, this is very much appreciated.

btidey
Posts: 1614
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Thu Aug 11, 2016 10:32 am

Superpicsou wrote:
Piero1978 wrote:Hi, I want a web page with ONLY the streaming box, WITHOUT any command.
I've modified the INDEX.PHP file but the web page don't change.
What is the file I've to modify?
Thanks.
I have the same problem but i didn't find an anwser. Can someone help me ?
The .css files aren't changin too. I seems like the whole server has a cache that nevers end.
I've installed the server on port 4600 and its behind a router.

[EDIT]

I have to reinstall the server to see the modiciations. Any ideas ?
The wiki has instructions on how to create a web page with just the streaming preview. See under 'Embed live-preview in own homepage'

From the normal install you can use the existing javascript file so create a file called min.php with

Code: Select all

<!DOCTYPE html>
<html>
  <head>
    <title>RPi Cam Preview</title>
    <script src="js/script.js"></script>
  </head>
  <body onload="setTimeout('init(0,25,1);', 100);">
    <center>
      <div><img id="mjpeg_dest" /></div>
    </center>
 </body>
</html>
Put this file in the web install folder (e.g. /var/www/html)

The a url http://picameraip:port/min.php will bring up a page with just the preview displayed.

I don't understand the comments about css or cache. Sometimes a browser can continue to use an old cached javascript file. Normaly a shift refresh sorts this but sometimes the cache needs to be cleared explicitly.

Return to “Camera board”