Sephiron
Posts: 13
Joined: Fri Mar 27, 2015 11:10 am

Re: RPi Cam Web Interface

Tue Apr 07, 2015 9:07 am

2btidey
Thanks again for the great work. After a bit of fiddling around I found where the error with the servos was (wrong address of python script at startup), so I got everything working with the old version.

For some reason, when I update to the newest version, the program starts complaining about permissions:
PHP Warning: fopen(scheduleLog.txt): failed to open stream: Permission denied in /var/www/config.php on line 46
PHP Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/config.php on line 48
PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /var/config.php on line 49
and it keeps repeating these messages. How to fix that?

Also, at one point the camera stopped recording altogether. The page was there and video feed from camera came, but even with motion detection on, it wouldn't start recording when something moved (it ran properly for around a day before that happened).

P.S. Is there any chance you would modify your distribution, so that when I refresh the webpage and try moving the camera (with servos), it wouldn't return to neutral position? I have the code to fix the issue, but I have to rewrite it again after updates, since part of it is in index.php. I can repost updated version here if it helps.

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

Re: RPi Cam Web Interface

Tue Apr 07, 2015 10:17 am

Sephiron wrote:2btidey
Thanks again for the great work. After a bit of fiddling around I found where the error with the servos was (wrong address of python script at startup), so I got everything working with the old version.

For some reason, when I update to the newest version, the program starts complaining about permissions:
PHP Warning: fopen(scheduleLog.txt): failed to open stream: Permission denied in /var/www/config.php on line 46
PHP Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/config.php on line 48
PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /var/config.php on line 49
and it keeps repeating these messages. How to fix that?

Also, at one point the camera stopped recording altogether. The page was there and video feed from camera came, but even with motion detection on, it wouldn't start recording when something moved (it ran properly for around a day before that happened).

P.S. Is there any chance you would modify your distribution, so that when I refresh the webpage and try moving the camera (with servos), it wouldn't return to neutral position? I have the code to fix the issue, but I have to rewrite it again after updates, since part of it is in index.php. I can repost updated version here if it helps.
All 3 errors occur from the same fault. The writeLog function in config.php is failing to write to scheduleLog.txt. raspimjpeg also is writing to this file now so that both sets of log messages are in the one file.

I suspect the error maybe triggered if raspimjpeg creates the file first and the permissions are wrong. I thought I had arranged that to be Ok and it seemed to work for me, but it is possible there is something wrong there.

I'll check it out further. Try a couple of things. First just manually remove the file sudo rm /var/www/scheduleLog.txt and see if error re-occurs. If it does then change log_file in /etc/raspimjpeg to something else like scheduleLog1.txt. This will keep the raspimjpeg logging separate from the schedule logging. The raspimjpeg logging won't show up in the Show Log in the browser but they shouldn't be getting in the way of each other.

Zip the neutral servo changes and attach to a post here.

Edit: Just tried out logging with all 3 possible sources creating the file (web-schedule.php, background-schedule.php and raspimjpeg) and I don't see the problem at the moment. Make sure after an update that you stop and start schedule from its main page as an old version could still be running.

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

Re: RPi Cam Web Interface

Tue Apr 07, 2015 10:40 am

btidey wrote:
piecam wrote: I am just wondering whether you may have a hint of what might cause this problem.
thanks
raspimjpeg was changed to create files with 666 permissions, i.e. without executable permission. This shouldn't have impacted in any way access to these files as they are not 'executed' just read or written and just tightens up security a bit if these don't have execute permission.

I suppose it is conceivable that is having some effect when cross mounted to windows systems.

I can prepare a test version of raspimjpeg for you to try with it set back to 777 to see if that makes a difference.
Attached here is a test version that uses 777 permissions. Stop the system and sudo copy the raspimjpeg in the zip into /opt/vc/bin
Attachments
raspimjpeg777.zip
(19.62 KiB) Downloaded 74 times

cazz
Posts: 220
Joined: Wed Nov 14, 2012 9:01 pm
Location: Sweden

Re: RPi Cam Web Interface

Tue Apr 07, 2015 9:04 pm

Hi
I was thinking maybe try a thing but I need help :)
There I have RPi Cam I also have IR detector for Nexa that I control with SwitchKing to turn on and off light and that.

So I was thinking I maybe can do one or two way to make it better security for me

I can see I can push the button to record a video, is that any way I can run a bash script that start recording about 30 sec or so and then stop recording?
I was thinking if someone is at my place my IR detector is going to notice and then I can start recording.
I can make it send a email to me that someone have been at my place so I can surf in and watch the recording.

But that I really curious to try is the IR detector tell RPi to record image (I can see it can do that) and send it to a e-mail address.
My SwitchKing can send email to notice if someone is at my place but I like it to attach a image (one or several) to my phone when I'm not home.
I know here the image is store but I have to tell RPi to take image from a bash file or something.

The build inside motion detection if nice but if I can connect the RPi to my other system it going to be great.
/Cazz

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

Re: RPi Cam Web Interface

Tue Apr 07, 2015 10:50 pm

cazz wrote:Hi
I was thinking maybe try a thing but I need help :)
There I have RPi Cam I also have IR detector for Nexa that I control with SwitchKing to turn on and off light and that.

So I was thinking I maybe can do one or two way to make it better security for me

I can see I can push the button to record a video, is that any way I can run a bash script that start recording about 30 sec or so and then stop recording?
I was thinking if someone is at my place my IR detector is going to notice and then I can start recording.
I can make it send a email to me that someone have been at my place so I can surf in and watch the recording.

But that I really curious to try is the IR detector tell RPi to record image (I can see it can do that) and send it to a e-mail address.
My SwitchKing can send email to notice if someone is at my place but I like it to attach a image (one or several) to my phone when I'm not home.
I know here the image is store but I have to tell RPi to take image from a bash file or something.

The build inside motion detection if nice but if I can connect the RPi to my other system it going to be great.
If your bash script is fired by the IR then you can take a single image by

Code: Select all

echo -n 'im' >/var/www/FIFO
Similarly you can start and stop a video recording by

Code: Select all

echo -n 'ca 1' >/var/www/FIFO
echo -n 'ca 0' >/var/www/FIFO

qtruong1996
Posts: 3
Joined: Tue Apr 07, 2015 11:22 pm

Re: RPi Cam Web Interface

Tue Apr 07, 2015 11:27 pm

How do I change the image and video directory to USB because I don't want the files to clog my SD card which I use for other stuff on the Pi.

User avatar
blachanc
Posts: 458
Joined: Sat Jan 26, 2013 5:03 am
Location: Quebec,canada(french)

Re: RPi Cam Web Interface

Tue Apr 07, 2015 11:42 pm

Robert,
Have you considered starting a new thread where you would own the first post?

That way you could edit the first post to keep it up to date with your improvements.

Ben

Ps: I did no try your interface yet, but your project(or your fork) is next on my list.
I am amazed by the level & quality of the support you are providing.
Autism/Asperger syndrome: what is your score on this quiz?
http://www.raspberrypi.org/forums/viewtopic.php?f=62&t=70191

piecam
Posts: 84
Joined: Mon Feb 23, 2015 12:55 am

Re: RPi Cam Web Interface

Wed Apr 08, 2015 12:19 am

btidey wrote:
piecam wrote:HI Robert,

I put back my /var/www/media to NAS link again. However, even though I granted nas folder to guest accessible, it's not allowed for me to access and it complained no rights to open folder.

When I took a look at my NAS folder, it seems new folder and subfolder are created without "x".
drwxrwxrwx 7 cam users 4096 Apr 2 19:22 2015-04-02
drwxrwxrwx 3 cam users 4096 Apr 5 16:10 2015-04-05
drw-rw-rw- 3 cam users 4096 Apr 6 02:33 2015-04-06

Apr 2 is the working one with necessary attributes. I modified Apr 5 to get it accessible and Ap6 is the one not accessible until I change mode. However, as soon as another file is put there, it's changed again.

Any ideas? Have we changed code in this regard?
or it has nothing to do with your code. I just found out that
drwxrwxrwx 3 cam users 4096 Apr 6 02:33 2015-04-06
-rw-r--r-- 1 cam users 76001 Apr 6 14:10 2015-04-06@Driveway_NoIR@im_0200_20150406_141003.jpg.i0200.th.jpg

these thumbnails can be accessed easily.
This line is still same in /etc/fstab as before,
//192.168.100.10/Recording /var/www/media cifs username=cam,password=xxxxx,workgroup=workgroup,users,auto,user_xattr 0 0

I am just wondering whether you may have a hint of what might cause this problem.
thanks

thanks
raspimjpeg was changed to create files with 666 permissions, i.e. without executable permission. This shouldn't have impacted in any way access to these files as they are not 'executed' just read or written and just tightens up security a bit if these don't have execute permission.

I suppose it is conceivable that is having some effect when cross mounted to windows systems.

I can prepare a test version of raspimjpeg for you to try with it set back to 777 to see if that makes a difference.
HI Robert,

Here are a few screen capture. I was actually using linux, Nemo file manager (similar to Gnome Nautilius) to browse the NAS SMB folder and encountered problem. It either says no permission or empty folder.

I think that we may need to grant folder with "x", for these file manager to browse it. It essentially executes "cd and delete ".

Hope that makes sense. For the file itself under home folder, it seems that it's fine without "x". I can access it and delete it.
-rw-r--r-- 1 cam users 68935 Apr 7 18:40 2015-04-07@Frontdoor@vi_0269_20150407_184058.mp4.v0269.th.jpg
-rw-r--r-- 1 cam users 67679 Apr 7 18:58 2015-04-07@Frontdoor@vi_0269_20150407_185859.mp4.v0269.th.jpg
-rw-r--r-- 1 cam users 68152 Apr 7 19:35 2015-04-07@Frontdoor@vi_0269_20150407_193554.mp4.v0269.th.jpg

However, for the file under sub folders, without "x", it seems that I can not delete it as well.

Let me know if you can make some adjustment. I haven't tested your customised raspmjpeg bin file, as I believe this is the cause.

Thanks and Best regards,
Attachments
Screenshot1000.png
Screenshot1000.png (26.09 KiB) Viewed 3272 times
Last edited by piecam on Wed Apr 08, 2015 12:27 am, edited 1 time in total.

piecam
Posts: 84
Joined: Mon Feb 23, 2015 12:55 am

Re: RPi Cam Web Interface

Wed Apr 08, 2015 12:21 am

drw-rw-rw- 3 cam users 4096 Apr 7 00:41 2015-04-07
root@NAS:/media/d36f7185-011f-4261-a123-3a46f98e9ea0/Recording# ls -la 2015-04-07/
total 780
drw-rw-rw- 3 cam users 4096 Apr 7 00:41 .
drwxrwsr-x 17 root users 786432 Apr 7 20:00 ..
drwxr-sr-x 2 cam users 4096 Apr 7 00:41 Driveway_NoIR
root@NAS:/media/d36f7185-011f-4261-a123-3a46f98e9ea0/Recording# ls -la 2015-04-07/Driveway_NoIR/
total 3592
drwxr-sr-x 2 cam users 4096 Apr 7 00:41 .
drw-rw-rw- 3 cam users 4096 Apr 7 00:41 ..
-rw-r--r-- 1 cam users 3669733 Apr 7 00:41 tl_0227_0001_20150407_004106.jpg
root@NAS:/media/d36f7185-011f-4261-a123-3a46f98e9ea0/Recording# ls -la 2015-04-02/
total 796
drwxrwxrwx 7 cam users 4096 Apr 2 19:22 .
drwxrwsr-x 17 root users 786432 Apr 7 20:00 ..
drwxrwxrwx 2 cam users 4096 Apr 2 22:24 Backdoor
drwxrwxrwx 2 cam users 4096 Apr 2 22:26 Backwindow
drwxrwxrwx 2 cam users 4096 Apr 2 22:52 Driveway_IR
drwxrwxrwx 2 cam users 4096 Apr 2 16:49 Driveway_NoIR
drwxrwxrwx 2 cam users 4096 Apr 2 09:58 Frontdoor
root@NAS:/media/d36f7185-011f-4261-a123-3a46f98e9ea0/Recording# ls -la 2015-04-02/Frontdoor/
total 186816
drwxrwxrwx 2 cam users 4096 Apr 2 09:58 .
drwxrwxrwx 7 cam users 4096 Apr 2 19:22 ..
-rw-r--r-- 1 cam users 31273891 Apr 2 08:47 vi_0248_20150402_084553.mp4
-rw-r--r-- 1 cam users 11949168 Apr 2 08:47 vi_0249_20150402_084626.mp4
-rw-r--r-- 1 cam users 30536003 Apr 2 09:31 vi_0250_20150402_092954.mp4
-rw-r--r-- 1 cam users 72935382 Apr 2 09:58 vi_0251_20150402_095704.mp4
-rw-r--r-- 1 cam users 44580864 Apr 2 09:58 vi_0252_20150402_095754.mp4.h264
root@NAS:/media/d36f7185-011f-4261-a123-3a46f98e9ea0/Recording#
root@NAS:/media/d36f7185-011f-4261-a123-3a46f98e9ea0/Recording#
root@NAS:/media/d36f7185-011f-4261-a123-3a46f98e9ea0/Recording# chmod +x 2015-04-07
root@NAS:/media/d36f7185-011f-4261-a123-3a46f98e9ea0/Recording# ls -la 2015-04-07/
total 780
drwxrwxrwx 3 cam users 4096 Apr 7 00:41 .
drwxrwsr-x 17 root users 786432 Apr 7 20:00 ..
drwxr-sr-x 2 cam users 4096 Apr 7 00:41 Driveway_NoIR
root@NAS:/media/d36f7185-011f-4261-a123-3a46f98e9ea0/Recording# ls -la 2015-04-07/
total 780
drwxrwxrwx 3 cam users 4096 Apr 7 00:41 .
drwxrwsr-x 17 root users 786432 Apr 7 20:00 ..
drwxr-sr-x 2 cam users 4096 Apr 7 00:41 Driveway_NoIR
root@NAS:/media/d36f7185-011f-4261-a123-3a46f98e9ea0/Recording
Attachments
Screenshot1005.png
Screenshot1005.png (5.17 KiB) Viewed 3270 times
Screenshot1001.png
Screenshot1001.png (49.62 KiB) Viewed 3270 times

Sephiron
Posts: 13
Joined: Fri Mar 27, 2015 11:10 am

Re: RPi Cam Web Interface

Wed Apr 08, 2015 8:41 am

btidey wrote: I suspect the error maybe triggered if raspimjpeg creates the file first and the permissions are wrong. I thought I had arranged that to be Ok and it seemed to work for me, but it is possible there is something wrong there.

I'll check it out further. Try a couple of things. First just manually remove the file sudo rm /var/www/scheduleLog.txt and see if error re-occurs. If it does then change log_file in /etc/raspimjpeg to something else like scheduleLog1.txt. This will keep the raspimjpeg logging separate from the schedule logging. The raspimjpeg logging won't show up in the Show Log in the browser but they shouldn't be getting in the way of each other.

Edit: Just tried out logging with all 3 possible sources creating the file (web-schedule.php, background-schedule.php and raspimjpeg) and I don't see the problem at the moment. Make sure after an update that you stop and start schedule from its main page as an old version could still be running.
Removing schedule Log did not help.
What do you mean when you say 'change log in etc/raspimjpeg'? There isn't anything about log there.
One thing I noticed is that after updating the camera stops updating the preview picture and the error messages start only after I reboot the raspberry.

P.S. As for the changes for servos:
add this function to the start of index.php:

Code: Select all

function initCamPos(){
      $tr = fopen("FIFO_pipan", "r");
      if($tr){
	while(($line = fgets($tr)) != false){
	  $vals = explode(" ", $line);
	  if($vals[0] == "servo"){
	      echo '<script type="text/javascript">init_pt(',$vals[1],',',$vals[2],');</script>';
	  }
	}
      }
}
and call it at the start of pipan_controls(). Then add this small function to pipan.js:

Code: Select all

function init_pt(p,t){
  pan = p;
 tilt = 2*t-240;
}

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

Re: RPi Cam Web Interface

Wed Apr 08, 2015 11:26 am

Sephiron wrote:
btidey wrote:
Removing schedule Log did not help.
What do you mean when you say 'change log in etc/raspimjpeg'? There isn't anything about log there.
One thing I noticed is that after updating the camera stops updating the preview picture and the error messages start only after I reboot the raspberry.

P.S. As for the changes for servos:
add this function to the start of index.php:

Code: Select all

function initCamPos(){
      $tr = fopen("FIFO_pipan", "r");
      if($tr){
	while(($line = fgets($tr)) != false){
	  $vals = explode(" ", $line);
	  if($vals[0] == "servo"){
	      echo '<script type="text/javascript">init_pt(',$vals[1],',',$vals[2],');</script>';
	  }
	}
      }
}
and call it at the start of pipan_controls(). Then add this small function to pipan.js:

Code: Select all

function init_pt(p,t){
  pan = p;
 tilt = 2*t-240;
}
I have added the extra pi_pan changes in now. Should there be a fclose($tr); in there. I've added one but it can be commented if not required (let me know).

On the log changes: I added into raspimjpeg on the 4th April the ability to log its activity to a file. The destination is controlled by the config variable log_file which is in the install etc/raspimjpeg.1 but if just an update is done rather than an install this wouldn't be put in. The default rapimjpeg log_file is the same as the scheduler (schedulerLog.txt) so that the raspimjpeg entries show up in there.

Do a ls -l /var/www/schedulerLog.txt to see what the permissions and ownership of that file is.

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

Re: RPi Cam Web Interface

Wed Apr 08, 2015 11:34 am

piecam wrote:
Let me know if you can make some adjustment. I haven't tested your customised raspmjpeg bin file, as I believe this is the cause.

Thanks and Best regards,
Yes. the customised one should have worked. One of the changes I made had the side effect of setting created sub-folder permissions wrong so I have reverted those out in the updated github now.

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

Re: RPi Cam Web Interface

Wed Apr 08, 2015 11:47 am

qtruong1996 wrote:How do I change the image and video directory to USB because I don't want the files to clog my SD card which I use for other stuff on the Pi.
Check the wiki item 10
http://elinux.org/RPi-Cam-Web-Interface

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

Re: RPi Cam Web Interface

Wed Apr 08, 2015 11:52 am

blachanc wrote:Robert,
Have you considered starting a new thread where you would own the first post?

That way you could edit the first post to keep it up to date with your improvements.

Ben

Ps: I did no try your interface yet, but your project(or your fork) is next on my list.
I am amazed by the level & quality of the support you are providing.
Thanks, I did consider that but felt at the moment it was best not to split the thread, although I understand the number of posts makes it difficult to gather all the details. The readme at my Github contains all changes as they are put in and the pdf has an overall description / screenshots etc.

qtruong1996
Posts: 3
Joined: Tue Apr 07, 2015 11:22 pm

Re: RPi Cam Web Interface

Wed Apr 08, 2015 11:56 am

btidey wrote:
qtruong1996 wrote:How do I change the image and video directory to USB because I don't want the files to clog my SD card which I use for other stuff on the Pi.
Check the wiki item 10
http://elinux.org/RPi-Cam-Web-Interface
Sorry, I forgot about that. I have tried that method, but it's weird. It seems like every time I reboot it, the Pi goes back to the default SD card and I have to manually run the Sudo bind command again. Also another weird thing is, I do see my files in my USB, but they are unreadable. They are simply blank images and videos with 0Kb size I tried with Paint&Windows Image Viewer for the images(jpeg) and VLC & Windows Media Player for the videos(mp4). None of them could read.

silvanmelchior
Posts: 76
Joined: Mon Nov 25, 2013 5:56 pm

Re: RPi Cam Web Interface

Wed Apr 08, 2015 12:53 pm

Hello everybody

It's been a long time and I saw that there was a lot going on here, so thanks for all the great work. Special thanks to Robert for his big and usefull changes.

I have a suggestion: Instead of having multiple projects and confusing a lot of people, why not merging it back into one project? I would offer to make some of you to collaborators on my github-project (people who forked my project or did push-requests in the past), so the source-code could be changed by a lot of people without waiting until I slowly react to your posts/issues/etc. Additionally, the first post of this toppic could be replaced to a link to the wiki, so everybody could add important information directly.

I think if we combine all the workforce here and make it easily accessible to everyone, we can develop the RPi Cam Web Interface even further than it is now.

So, what do you guys think?

Thanks again

Silvan

qtruong1996
Posts: 3
Joined: Tue Apr 07, 2015 11:22 pm

Re: RPi Cam Web Interface

Wed Apr 08, 2015 1:52 pm

silvanmelchior wrote:Hello everybody

It's been a long time and I saw that there was a lot going on here, so thanks for all the great work. Special thanks to Robert for his big and usefull changes.

I have a suggestion: Instead of having multiple projects and confusing a lot of people, why not merging it back into one project? I would offer to make some of you to collaborators on my github-project (people who forked my project or did push-requests in the past), so the source-code could be changed by a lot of people without waiting until I slowly react to your posts/issues/etc. Additionally, the first post of this toppic could be replaced to a link to the wiki, so everybody could add important information directly.

I think if we combine all the workforce here and make it easily accessible to everyone, we can develop the RPi Cam Web Interface even further than it is now.

So, what do you guys think?

Thanks again

Silvan

Totally agree

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

Re: RPi Cam Web Interface

Wed Apr 08, 2015 3:17 pm

silvanmelchior wrote:Hello everybody

It's been a long time and I saw that there was a lot going on here, so thanks for all the great work. Special thanks to Robert for his big and usefull changes.

I have a suggestion: Instead of having multiple projects and confusing a lot of people, why not merging it back into one project? I would offer to make some of you to collaborators on my github-project (people who forked my project or did push-requests in the past), so the source-code could be changed by a lot of people without waiting until I slowly react to your posts/issues/etc. Additionally, the first post of this toppic could be replaced to a link to the wiki, so everybody could add important information directly.

I think if we combine all the workforce here and make it easily accessible to everyone, we can develop the RPi Cam Web Interface even further than it is now.

So, what do you guys think?

Thanks again

Silvan
Sounds good to me. I'd love to push this further. Top of my wish list at the moment was to get circular buffering into raspimjpeg so as to effectively get video right from start of a motion detect or even a bit before.

How do you want to go about this to get a baseline?

All my changes on the web side / installer are on my github https://github.com/roberttidey/RPi_Cam_Web_Interface

All my raspimjpeg source code changes are in my userland github https://github.com/roberttidey/userland. I forked that from recent raspberry userland in order to get V3 annotation in.

silvanmelchior
Posts: 76
Joined: Mon Nov 25, 2013 5:56 pm

Re: RPi Cam Web Interface

Wed Apr 08, 2015 7:05 pm

Great, I'd suggest the following:

1. I add you as a collaborator to my interface repository, so you can push all your commits easily. You would write in your repo that the newest version is in my repo.

2. We use your userland-repo, since my is way behind the official one and merging wouldn't be very funny. So I write in my repo that it isn't updated anymore and link to your repo and you could add me as collaborator there.

3. I change the first post to a single link to the wiki, where I add my actual first post as the first section, then we can edit is to be up-to-date.

What do you think? Is this ok for you or would you like to do it in another way?

Silvan

deanob82
Posts: 4
Joined: Wed Apr 08, 2015 7:14 pm

Re: RPi Cam Web Interface

Wed Apr 08, 2015 7:17 pm

Hi,

Total newbie to all the RPi stuff.

I've just installed the interface using the script done by Robert Tidey, all installed OK but when i navigate to my IP in my browser, i get the following error;

Forbidden
You don't have permission to access / on this server.
Apache/2.2.22 (Debian) Server at 192.168.X.XX Port 80


Any ideas?

Thanks

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

Re: RPi Cam Web Interface

Wed Apr 08, 2015 9:08 pm

silvanmelchior wrote:Great, I'd suggest the following:

1. I add you as a collaborator to my interface repository, so you can push all your commits easily. You would write in your repo that the newest version is in my repo.

2. We use your userland-repo, since my is way behind the official one and merging wouldn't be very funny. So I write in my repo that it isn't updated anymore and link to your repo and you could add me as collaborator there.

3. I change the first post to a single link to the wiki, where I add my actual first post as the first section, then we can edit is to be up-to-date.

What do you think? Is this ok for you or would you like to do it in another way?

Silvan
OK Sounds good to me. For most users the userland repo isn't something they'd be directly interested in as it is just the means to update raspimjpeg. So the fact they are separated doesn't really matter.

I have added you as collaborator to my userland. This is standard raspberry userland plus the raspimjpeg.c as you originally set it up. I made one minor tweak to buildme to allow it build on a Pi2 but it still works on Pi1 or external.

Once we have the interface repo updated then I'll probably strip it down to a readme and a link through to your common one.

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

Re: RPi Cam Web Interface

Wed Apr 08, 2015 9:19 pm

deanob82 wrote:Hi,

Total newbie to all the RPi stuff.

I've just installed the interface using the script done by Robert Tidey, all installed OK but when i navigate to my IP in my browser, i get the following error;

Forbidden
You don't have permission to access / on this server.
Apache/2.2.22 (Debian) Server at 192.168.X.XX Port 80


Any ideas?

Thanks
Sounds like either the Apache settings have been changed or a RPI cam interface config has been changed. The web site should be based off /var/www and shouldn't be going anywhere near root /.

I think I'd start by checking the Apache web site set up is OK. You can do this by adding a file like below into /var/www, call it test.html and then browse to http://camip/test.html (change camip to the ip of the Pi)

Code: Select all

<html>
<head><title>testing Apache</title></head>
<body><p>Apache is working!</p></body>
</html>
You should see Apache is working. If you still get an error then the Apache settings are wrong somewhere.

ianj
Posts: 21
Joined: Mon May 12, 2014 2:24 am

Re: RPi Cam Web Interface

Thu Apr 09, 2015 2:38 am

Has anybody had recent trouble with motion not triggering captures? Working with a Pi B, brand new install of Raspbian and the latest btidey version 4.4.2R.

My trouble:

-If I haven't clicked the motion capture button, going to edit motion settings page results in "Motion not running. Put in detection state"
-Going to edit motion settings after clicking motion detection start will bring me to a page after lots of waiting, with nothing on it. Just blank space. Takes a good 1-2 minutes.
-The log shows "motion detection started and stopped" as per the button clicking
-Set the schedule to AllDay

Motion doesn't seem to fire off a record. Sending video record commands (ca 0, 1) via console works, hitting the record video button works.
Last edited by ianj on Thu Apr 09, 2015 12:49 pm, edited 3 times in total.

Sephiron
Posts: 13
Joined: Fri Mar 27, 2015 11:10 am

Re: RPi Cam Web Interface

Thu Apr 09, 2015 9:34 am

btidey wrote: On the log changes: I added into raspimjpeg on the 4th April the ability to log its activity to a file. The destination is controlled by the config variable log_file which is in the install etc/raspimjpeg.1 but if just an update is done rather than an install this wouldn't be put in. The default rapimjpeg log_file is the same as the scheduler (schedulerLog.txt) so that the raspimjpeg entries show up in there.

Do a ls -l /var/www/schedulerLog.txt to see what the permissions and ownership of that file is.
I formatted the card, installed latest version of raspbian, then used these instructions http://elinux.org/RPi-Cam-Web-Interface to install everything (using latest version of your repo).
After making all the necessary adjustments and restarting raspberry, It starts to print the error.message continuously again.
It prints those messages even after I change permissions with "sudo chmod 666 /var/www/scheduleLog.txt".

Edit: I am getting a feeling that the error is caused by multiple files trying to open the logfile at the same time. Is there a reasonable way to check/fix that?

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

Re: RPi Cam Web Interface

Thu Apr 09, 2015 12:40 pm

qtruong1996 wrote:
silvanmelchior wrote:Hello everybody

It's been a long time and I saw that there was a lot going on here, so thanks for all the great work. Special thanks to Robert for his big and usefull changes.

I have a suggestion: Instead of having multiple projects and confusing a lot of people, why not merging it back into one project? I would offer to make some of you to collaborators on my github-project (people who forked my project or did push-requests in the past), so the source-code could be changed by a lot of people without waiting until I slowly react to your posts/issues/etc. Additionally, the first post of this toppic could be replaced to a link to the wiki, so everybody could add important information directly.

I think if we combine all the workforce here and make it easily accessible to everyone, we can develop the RPi Cam Web Interface even further than it is now.

So, what do you guys think?

Thanks again

Silvan

Totally agree
I agree also, I've got lost in this post so many times with the two projects going at the same time.
3b+, 2b, b+, b, Zero & Zero-W

Return to “Camera board”