Gary Littlemore
Posts: 327
Joined: Thu Oct 11, 2012 11:52 am
Location: Cheshire, UK

Re: RPi Cam Web Interface

Thu Aug 11, 2016 11:49 am

Cheers, I've been looking to do this also. As a number of people have requested it, couldn't it be something built into the software when installed?
btidey wrote:
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.
3b+, 2b, b+, b, Zero & Zero-W

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

Re: RPi Cam Web Interface

Thu Aug 11, 2016 2:33 pm

My cache problem doesn't come from the web browser.
I try on safari/chrome/firefox / clear cache / ctrl+fr or cmd+r / At home and at work.

So the problem comes from the server.

Its caches all fils. Php, Css, Js.

The only way i found to clear the cache is to do "./RPi_Cam_Web_Interface_Installer.sh install" > "Step 1" > "Install Apache".
After that, sometines, its erases the cache.

So, maybe it comes from Apache2 or Php5 config
Or from my provider/router that keeps a cache
Or from the custom port

But its really anoying to resinstall apache server every time i change the index.php or script.js or ES_Default.css.

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

Re: RPi Cam Web Interface

Thu Aug 11, 2016 2:52 pm

Gary Littlemore wrote:Cheers, I've been looking to do this also. As a number of people have requested it, couldn't it be something built into the software when installed?
I have included the min.php in the install set so you can use this by browsing to that.

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

Re: RPi Cam Web Interface

Thu Aug 11, 2016 3:06 pm

Superpicsou wrote:My cache problem doesn't come from the web browser.
I try on safari/chrome/firefox / clear cache / ctrl+fr or cmd+r / At home and at work.

So the problem comes from the server.

Its caches all fils. Php, Css, Js.

The only way i found to clear the cache is to do "./RPi_Cam_Web_Interface_Installer.sh install" > "Step 1" > "Install Apache".
After that, sometines, its erases the cache.

So, maybe it comes from Apache2 or Php5 config
Or from my provider/router that keeps a cache
Or from the custom port

But its really anoying to resinstall apache server every time i change the index.php or script.js or ES_Default.css.
I don't understand that. Any change made to the php or javascript on the server takes immediate effect without even restarting Apache. Every time a php file is requested by a client it is interpreted at the server and becomes an html page which is then delivered to the client. So there is nowhere the php can get cached.

Note that changing the php or javascript in the RPi_Cam_Web_Interface folder will have no effect on the runtime system. Those are just the base install files which get copied to the actual web hosting folder (e.g. /var/www/html) during the install process. If you want to change something in say index.php then you have to modify the runtime version.

Any changes you make will get overwritten next time you do an install. If there is something generally useful then post the change or make a pull request on github and it may get incorporated.

Re-running the installer does not normally re-install any of the basic software like Apache. It just checks to make sure it is up to date.

I recommend using the ./install.sh method now.

Gary Littlemore
Posts: 327
Joined: Thu Oct 11, 2012 11:52 am
Location: Cheshire, UK

Re: RPi Cam Web Interface

Thu Aug 11, 2016 10:15 pm

Great stuff, thanks
btidey wrote:
Gary Littlemore wrote:Cheers, I've been looking to do this also. As a number of people have requested it, couldn't it be something built into the software when installed?
I have included the min.php in the install set so you can use this by browsing to that.
3b+, 2b, b+, b, Zero & Zero-W

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

Re: RPi Cam Web Interface

Fri Aug 12, 2016 6:00 am

Oh God ok, i'am stupid. I was indeed working in the RPi_Cam_Web_Interface folder :(.

Granpino
Posts: 7
Joined: Thu Jun 04, 2015 8:26 am

Re: RPi Cam Web Interface

Sat Aug 13, 2016 3:02 am

There are 2 things I want to do and I need help. How do I control one of the GPIO pins to turn a relay ON and OFF with a button. I don't understand how servoblaster is used. Secondly, I want to play a sound file with a button. The idea is to turn a light ON and also play a recorded message or siren sound on request. I was able to do this with Webiopi but it is now very outdated. This is my first post and I hope I'm in the right place.

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

Re: RPi Cam Web Interface

Sun Aug 14, 2016 4:36 pm

Granpino wrote:There are 2 things I want to do and I need help. How do I control one of the GPIO pins to turn a relay ON and OFF with a button. I don't understand how servoblaster is used. Secondly, I want to play a sound file with a button. The idea is to turn a light ON and also play a recorded message or siren sound on request. I was able to do this with Webiopi but it is now very outdated. This is my first post and I hope I'm in the right place.
Just want to make sure what you are asking here.

You are running the RPi Cam Web Interface and you want to use servoblaster and also to add extra buttons on the RPi Cam Web interface to control a light / play a sound. Is that right?

Servoblaster is used here to control a pan tilt mechanism for the camera. You install use 2 servos to operate the pan and tilt. Mounting hardware for the camera is available on-line. You install the servoblaster software and then enable control in the web interface by renaming the file in the web folder servo_off to servo_on. 4 buttons then appear to operate the servos.

There is also support for pilight. This is enabled by renaming the pilight_off file to pilight_on. However, this enables on/off and colour controls under camera settings. If you wanted a button separately then this would need to be moved inside the index.php page.

Similarly if you want further buttons to do custom things then you would need to add those in index.php and further add javascript to send a command from the button and some server side (php) to action the command, e.g. control a relay or play a file.

Gary Littlemore
Posts: 327
Joined: Thu Oct 11, 2012 11:52 am
Location: Cheshire, UK

Re: RPi Cam Web Interface

Sun Aug 14, 2016 5:02 pm

btidey wrote:
Gary Littlemore wrote:Cheers, I've been looking to do this also. As a number of people have requested it, couldn't it be something built into the software when installed?
I have included the min.php in the install set so you can use this by browsing to that.
Could you make to stream clickable so it goes full screen please?
3b+, 2b, b+, b, Zero & Zero-W

Ik0adr
Posts: 50
Joined: Fri Jul 12, 2013 6:32 pm

Re: RPi Cam Web Interface

Sun Aug 14, 2016 10:00 pm

Sorry to bother, but after upgrading to 6.2.10 I cannot change the annotation and rotate the image.
I tried to uninstall and install again, but no result.
Does anyone else have this problem or there is something wrong in my system?
RPi 1B..

Thanks,

--Federico

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

Re: RPi Cam Web Interface

Sun Aug 14, 2016 11:23 pm

Anyone have an idea how to fix this issue with the scheduler not able use the fifo folder or saying cannot find the macros? So far I have verified that the folder has proper permissions.
cgyt3ch wrote: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.

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

Re: RPi Cam Web Interface

Mon Aug 15, 2016 8:35 am

Ik0adr wrote:Sorry to bother, but after upgrading to 6.2.10 I cannot change the annotation and rotate the image.
I tried to uninstall and install again, but no result.
Does anyone else have this problem or there is something wrong in my system?
RPi 1B..

Thanks,

--Federico
Just checked on my 6.2.14 which I expect to be same as 6.2.10 in this area and both annotation and rotate are working OK.

Do other camera settings work or is it just those 2? SchedulerLog should show settings being changed and the new settings should be stored in uconfig file in the web folder.

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

Re: RPi Cam Web Interface

Mon Aug 15, 2016 8:45 am

cgyt3ch wrote:Anyone have an idea how to fix this issue with the scheduler not able use the fifo folder or saying cannot find the macros? So far I have verified that the folder has proper permissions.
cgyt3ch wrote: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
You are trying to execute a macro called 600. So there should be a file called just 600 in the /var/www/html/macros folder. Normally I would have named the macros with a .sh if they are a shell command file but this isn't necessary. However the name you use in the exec_macro must be the full name whatever it is.

What is the issue with scheduler FIFO support? From the log above Scheduler events have time codes in [] and raspimjpeg in {}. So the scheduler does management task and does a sy 600 which is the scheduler writing the command to the FIFO pipe. The Can't find macro log is from raspimjpeg which is a result of it processing the sy 600 command which it must have read from the FIFO.

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

Re: RPi Cam Web Interface

Mon Aug 15, 2016 9:02 am

Gary Littlemore wrote:
btidey wrote:
Gary Littlemore wrote:Cheers, I've been looking to do this also. As a number of people have requested it, couldn't it be something built into the software when installed?
I have included the min.php in the install set so you can use this by browsing to that.
Could you make to stream clickable so it goes full screen please?
Done

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

Re: RPi Cam Web Interface

Mon Aug 15, 2016 4:07 pm

The only 2 macros I have in my macro folder are test.sh and error_hard.sh
btidey wrote:
cgyt3ch wrote:Anyone have an idea how to fix this issue with the scheduler not able use the fifo folder or saying cannot find the macros? So far I have verified that the folder has proper permissions.
cgyt3ch wrote: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
You are trying to execute a macro called 600. So there should be a file called just 600 in the /var/www/html/macros folder. Normally I would have named the macros with a .sh if they are a shell command file but this isn't necessary. However the name you use in the exec_macro must be the full name whatever it is.

What is the issue with scheduler FIFO support? From the log above Scheduler events have time codes in [] and raspimjpeg in {}. So the scheduler does management task and does a sy 600 which is the scheduler writing the command to the FIFO pipe. The Can't find macro log is from raspimjpeg which is a result of it processing the sy 600 command which it must have read from the FIFO.

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

Re: RPi Cam Web Interface

Mon Aug 15, 2016 4:32 pm

where can i find the release notes of RPi Cam Web Interface ?

quavoce
Posts: 109
Joined: Fri Nov 27, 2015 9:11 am

Re: RPi Cam Web Interface

Mon Aug 15, 2016 8:01 pm

noxx wrote:where can i find the release notes of RPi Cam Web Interface ?
ditto - would it be possible to include a release-notes.txt file in the git download please so we can see what's changed between versions, along with the date it was released?

quavoce
Posts: 109
Joined: Fri Nov 27, 2015 9:11 am

Re: RPi Cam Web Interface

Mon Aug 15, 2016 8:08 pm

btidey wrote:
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.
Hi Robert,

I seem to be having a similar issue. After I add my masking file and start Internal motion, it seems to mess the settings up. The annotation disappears and it bombs out of motion detection. I can't then record any images or videos. This is the first time I've tried using a mask file so I may have messed up somewhere.

I'm using a fresh install with the latest v6.2.16. Removing uconfig makes it work again.

Following the mask instructions, I took a copy of cam.jpg and then traced the area I wanted to detect motion in GIMP in a new layer. I then painted the motion area in white with the rest in black. I scaled the image to 82x61 for a 1296x972 (because I have Max View set) and saved as PGM.

Is my mask file perhaps corrupt? I've included it here for you to look at please.
The attachment cam-mask2.pgm.zip is no longer available
cam-mask2.pgm.zip
(591 Bytes) Downloaded 303 times

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

Re: RPi Cam Web Interface

Mon Aug 15, 2016 10:36 pm

quavoce wrote:
noxx wrote:where can i find the release notes of RPi Cam Web Interface ?
ditto - would it be possible to include a release-notes.txt file in the git download please so we can see what's changed between versions, along with the date it was released?
If you click on the Github Commits link then it shows the history of all the commits and a comment on what was in that commit. If you want to see what has actually changed then you can click on a particular commit and it will show all the file changes.

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

Re: RPi Cam Web Interface

Mon Aug 15, 2016 10:48 pm

quavoce wrote:
btidey wrote:
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.
Hi Robert,

I seem to be having a similar issue. After I add my masking file and start Internal motion, it seems to mess the settings up. The annotation disappears and it bombs out of motion detection. I can't then record any images or videos. This is the first time I've tried using a mask file so I may have messed up somewhere.

I'm using a fresh install with the latest v6.2.16. Removing uconfig makes it work again.

Following the mask instructions, I took a copy of cam.jpg and then traced the area I wanted to detect motion in GIMP in a new layer. I then painted the motion area in white with the rest in black. I scaled the image to 82x61 for a 1296x972 (because I have Max View set) and saved as PGM.

Is my mask file perhaps corrupt? I've included it here for you to look at please.
cam-mask2.pgm.zip
cam-mask.pgm.zip
A quick look at your mask seemed to indicate it as OK. I'll run some further tests using it to see what may be going wrong.

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

Re: RPi Cam Web Interface

Mon Aug 15, 2016 10:59 pm

cgyt3ch wrote:The only 2 macros I have in my macro folder are test.sh and error_hard.sh
btidey wrote:
cgyt3ch wrote:Anyone have an idea how to fix this issue with the scheduler not able use the fifo folder or saying cannot find the macros? So far I have verified that the folder has proper permissions.
I think you must have 600 in the Management_Command field in the Scheduler settings. When this is non blank then every Management_Interval (default 1 hour) then the Scheduler will issue a sy command with whatever is in the Management_Command entry. THis will cause raspimjpeg to try to run a macro of that filename located in the macros folder.

For example, I could create a macro shell script file called doStuffEveryHour.sh in the macros folder and then put doStuffEveryHour.sh in the Management_Command field of Scheduler (Save Settings). The Scheduler will then cause this macro file to be called every hour and do whatever is in that shellscript. Files in the macros folder should have their ownership as www-data and be given execute permissions.

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

Re: RPi Cam Web Interface

Wed Aug 17, 2016 2:20 pm

btidey wrote:
quavoce wrote:
btidey wrote: Hi Robert,

I seem to be having a similar issue. After I add my masking file and start Internal motion, it seems to mess the settings up. The annotation disappears and it bombs out of motion detection. I can't then record any images or videos. This is the first time I've tried using a mask file so I may have messed up somewhere.

I'm using a fresh install with the latest v6.2.16. Removing uconfig makes it work again.

Following the mask instructions, I took a copy of cam.jpg and then traced the area I wanted to detect motion in GIMP in a new layer. I then painted the motion area in white with the rest in black. I scaled the image to 82x61 for a 1296x972 (because I have Max View set) and saved as PGM.

Is my mask file perhaps corrupt? I've included it here for you to look at please.
A quick look at your mask seemed to indicate it as OK. I'll run some further tests using it to see what may be going wrong.
Your mask file is OK and works for me.
I think the problem is with the motion mask config. The settings need the full path to the mask file e.g. /var/www/html/mask.pgm. If you just put mask.pgm then it is crashing the raspimjpeg process and giving the systems you saw.

One can recover from such a crash by sudo nano /var/www/html/uconfig and deleting the motion_image setting and then doing a ./stop.sh followed by a ./start.sh in the RPI_Cam install folder.

I am looking at how to stop this type of config crashing the process.

Edit: The error caused by not using a full path is now handled and logged. Full path is still needed.

quavoce
Posts: 109
Joined: Fri Nov 27, 2015 9:11 am

Re: RPi Cam Web Interface

Wed Aug 17, 2016 5:48 pm

btidey wrote:
Your mask file is OK and works for me.
I think the problem is with the motion mask config. The settings need the full path to the mask file e.g. /var/www/html/mask.pgm. If you just put mask.pgm then it is crashing the raspimjpeg process and giving the systems you saw.

One can recover from such a crash by sudo nano /var/www/html/uconfig and deleting the motion_image setting and then doing a ./stop.sh followed by a ./start.sh in the RPI_Cam install folder.

I am looking at how to stop this type of config crashing the process.

Edit: The error caused by not using a full path is now handled and logged. Full path is still needed.
Fantastic, thanks very much for looking into this. I can confirm it works ok for me by entering the full path.

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

Re: RPi Cam Web Interface

Wed Aug 17, 2016 6:50 pm

(1) Is there any way to have the "UPTIME" displayed on the Web Cam Interface?

(2) Is it possible to create an additional user for webserver auth that have only pre-defined privileges? I would like to create additional users and define something like:

User Alice should be allowed only to view the live preview
User Bob should be allowed to view the live preview and to browse the recorded media (read-only)
User Charlie should be allowed to view the live preview, browse recorded media (r+w) but should not be able to change camera/motion/scheduler settings.

quavoce
Posts: 109
Joined: Fri Nov 27, 2015 9:11 am

Re: RPi Cam Web Interface

Wed Aug 17, 2016 6:53 pm

Pangu wrote:(1) Is there any way to have the "UPTIME" displayed on the Web Cam Interface?

(2) Is it possible to create an additional user for webserver auth that have only pre-defined privileges? I would like to create additional users and define something like:

User Alice should be allowed only to view the live preview
User Bob should be allowed to view the live preview and to browse the recorded media (read-only)
User Charlie should be allowed to view the live preview, browse recorded media (r+w) but should not be able to change camera/motion/scheduler settings.
I've often thought it would be nice to have user login forms - it would be easier to log in using password managers for example, and allow different user access as Pangu mentions. I imagine it's quite a bit of work to implement fully though, but perhaps worth starting with the basics first?

Return to “Camera board”