User avatar
bonzadog
Posts: 216
Joined: Wed Apr 25, 2012 9:40 am
Location: Rietberg/Germany

Re: RPi Cam Web Interface

Sun Jul 30, 2017 11:56 am

30.7.2017
RPI 3
Installing Debian 2017-07-05 and then installing the Webcam and ./start
caused a number of error messages
no motion
no php

After a ./stop
motion
./restart
I manged to get a video on screen.

Con someone please explain this ? I am rather puzzled.

Many thanks
B

encryptor
Posts: 44
Joined: Tue Sep 24, 2013 7:32 pm

Re: RPi Cam Web Interface

Sun Jul 30, 2017 2:48 pm

Mode: Fixed Times
Period: 9 to 9:59am
MotionStart: ca1
MotionStop: ca0

I had my camera board up and running and I was expecting at 9am video start recording and video end at 9:59am. However, when I checked Download Videos and Images there was no video. Any ideas why? I saved the setting for Fixed Times, so what more was there for me to do?

How can I view this video stream from outside my home network?

itsmedoofer
Posts: 268
Joined: Wed Sep 25, 2013 8:43 am

Re: RPi Cam Web Interface

Thu Aug 03, 2017 8:13 am

Hi,

Just thought I would share a little tweak I use to stop/start Apache as well as the camera when using the start stop scripts.... This could be useful if your cam interface is public facing and you want to shut down compleatly...

If you already manually start the cam interface you may want to also stop Apache starting at boot as well, you can do this with the following:-

Code: Select all

sudo systemctl disable apache2
If you change your mind later you can use this to re-enable it:-

Code: Select all

sudo systemctl enable apache2
First backup the original scripts...

Code: Select all

cp stop.sh stop.sh.orig
cp start.sh start.sh.orig
Edit the start script:-

Code: Select all

nano start.sh
After the lines.......

#start operation
fn_stop

Add:-

Code: Select all

sudo systemctl start apache2
Save

Edit the stop scriot

Code: Select all

nano stop.sh
After.....

sudo killall motion 2>/dev/null :-

Add:-

Code: Select all

sudo systemctl stop apache2
Save

Simple as.....

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

Re: RPi Cam Web Interface

Fri Aug 04, 2017 8:21 am

bonzadog wrote:
Sun Jul 30, 2017 11:56 am
30.7.2017
RPI 3
Installing Debian 2017-07-05 and then installing the Webcam and ./start
caused a number of error messages
no motion
no php

After a ./stop
motion
./restart
I manged to get a video on screen.

Con someone please explain this ? I am rather puzzled.

Many thanks
B
Do you mean Webcam? This software is only designed for the native Raspberry Pi camera module.

You do not need to start the motion process for this to work.

I am also puzzled by your reference to ./stop and ./restart as there are no such items in this software. There is ./start.sh and ./stop.sh

If you are using the Raspberry camera module then I would suggest starting again with a clean Jessie and following the instructions in the wiki.

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

Re: RPi Cam Web Interface

Fri Aug 04, 2017 8:38 am

encryptor wrote:
Sun Jul 30, 2017 2:48 pm
Mode: Fixed Times
Period: 9 to 9:59am
MotionStart: ca1
MotionStop: ca0

I had my camera board up and running and I was expecting at 9am video start recording and video end at 9:59am. However, when I checked Download Videos and Images there was no video. Any ideas why? I saved the setting for Fixed Times, so what more was there for me to do?

How can I view this video stream from outside my home network?
When you select Fixed times in the scheduler then you are just saying the day is to be split up into the fixed time periods that you can edit. That does not cause recording to happen.

When a time period changes then two things happen. First any commands in the Period start column are executed. Second it determines what commands to use whenever it receives a motion start and stop trigger. If you never get a motion trigger then no recording will happen.

You can use the Period start command to achieve what I think you want. If you have the Fixed Times set up so that there is one at 09:00 and another at 10:00, then you can put ca 1 (start recording) in the 09:00 Period start, and then you can put ca 0 (stop recording) in the 10:00 Period start. That would give you a 1 hour recording every day.

Note that you can also use the Video Split setting (under camera settings) if you want this recording split into a number of shorter recordings rather than 60 minutes.

To view outside your home network then you need to adjust your router settings so that a port is forwarded through to the internal IP address of the camera. So for example if you are using port 80 (default web port) then you would change the router to forward port 80 to the raspberry running the camera. From outside then browsing to your outward facing router IP address will connect to the camera. WHen you do this bear two other things in mind. First security is much more important when you expose the camera to the outside world. You really should use the password facility. Second your router IP address can sometimes change depending on your ISP. One can help deal with this by using dynamic DNS services which allow you to associate a real domain name with your router IP.

User avatar
bonzadog
Posts: 216
Joined: Wed Apr 25, 2012 9:40 am
Location: Rietberg/Germany

Re: RPi Cam Web Interface

Fri Aug 04, 2017 10:34 am

4.8.2017

I cannot seem to be able to reply to an existing reply. Only via the global "Post Reply"

RPI 3
Installing Debian 2017-07-05 and then installing the Webcam and ./start
caused a number of error messages
no motion
no php

After a ./stop
motion
./restart
I manged to get a video on screen.

Con someone please explain this ? I am rather puzzled.

Many thanks
B

Do you mean Webcam? This software is only designed for the native Raspberry Pi camera module.

You do not need to start the motion process for this to work.

I am also puzzled by your reference to ./stop and ./restart as there are no such items in this software. There is ./start.sh and ./stop.sh

If you are using the Raspberry camera module then I would suggest starting again with a clean Jessie and following the instructions in the wiki.

1) by ./start ./stop i meant the shell scripts ./start.sh and ./stop.sh
2) I am using the RPi Camera
3) I was using a fresh Jessie
4) Installed following Wiki.
5) I intend using using the Pimoroni Servo Hat for servo control.

I will now repeat all steps again and see what happens...I may have used ./install.sh instead of RPi_Cam_Web_Interface_Installer.sh
It appears that I am the only one which such problems, therefore the error must be in my install work.

Thank you for your help :!:

I will write a new comment when I get some new results.

UPDATE: Used a new 16GB SD Card (my Standard Card) and re installed using the script I used in the fist failed install and all
is now well.
One more final question: How can one get the Servos arrows to be depressed when clicked. I think that would look much better.
Last edited by bonzadog on Sat Aug 12, 2017 9:32 am, edited 2 times in total.

User avatar
Seiduna
Posts: 106
Joined: Wed Nov 20, 2013 4:12 pm

RPi Cam Web Interface breaks apache [solved]

Fri Aug 04, 2017 2:39 pm

Hello rpi people

I just got my zero w and camera v2, got jessie light on sd, wrote wpa_supplicant.cong and ssh in boot, and it worked as charm!
I took a picture, very nice.
Than I installed apache and php, works fine.
Here I should notice that
https://www.raspberrypi.org/documentati ... /apache.md
states that default directory is /var/www/html, not /var/www.

Than I installed git and installed RPi cam web interface,
http://elinux.org/RPi-Cam-Web-Interface

And here comes the problem, systemctl status apache2.service states that apache is running,
but in browser I get Problem loading page, Unable to connect.

I reinstalled rpi cam web interface, apache and it got messy, so I made new sd and started again.
I changed folder from html to camera, it installed in /var/www/camera, no go, browser unable to connect, apache running.
Anothed fresh sd, and this time I installed in /html/camera and again, browser unable to connect, apache running.

By now this took me over 6 hours...
any help is most welcome

Thank you

EDIT
My bad rpi people, I am so sorry if I have taken your time,
turns out I forgot to add port in url... :oops:
Now streams flawlessly
Gnu/Linux,
because I'd rather own a free OS
than steal one that's not worth paying for.

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

Re: RPi Cam Web Interface

Sat Aug 05, 2017 11:40 am

bonzadog wrote:
Fri Aug 04, 2017 10:34 am


I will now repeat all steps again and see what happens...I may have used ./install.sh instead of RPi_Cam_Web_Interface_Installer.sh
It appears that I am the only one which such problems, therefore the error must be in my install work.

Thank you for your help :!:

I will write a new comment when I get some new results.
You should use ./install.sh not RPi_Cam_Web_Interface_Installer.sh which is an older install method.

alfinsyuqra
Posts: 28
Joined: Wed Jul 26, 2017 2:55 pm

Re: RPi Cam Web Interface

Fri Aug 11, 2017 1:39 am

hy guys , i am actually have an ongoing project on my college , PI is new for me but after i learn , browse and practice it , now i have been already configured an http by webiopi using global scope IPV6 , although still getting an error like my post before ,

now i have bought an ip camera (TP-LINK TL-SC3171G) ,
my question is what step should i do to connect my IP Camera to webiopi , so i can take a picture by my IP camera and send that data to my webiopi (webiopi 0.7.1) , i hope someone will help me , because this project is the requirement to continue my study.
so much appreciated for the answer ,
thank you.

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

Re: RPi Cam Web Interface

Sat Aug 12, 2017 9:02 am

alfinsyuqra wrote:
Fri Aug 11, 2017 1:39 am
hy guys , i am actually have an ongoing project on my college , PI is new for me but after i learn , browse and practice it , now i have been already configured an http by webiopi using global scope IPV6 , although still getting an error like my post before ,

now i have bought an ip camera (TP-LINK TL-SC3171G) ,
my question is what step should i do to connect my IP Camera to webiopi , so i can take a picture by my IP camera and send that data to my webiopi (webiopi 0.7.1) , i hope someone will help me , because this project is the requirement to continue my study.
so much appreciated for the answer ,
thank you.
You need to ask this question on a different thread. The RPi Cam Web software is for native raspberry camera modules. It does not work for ip cameras.

encryptor
Posts: 44
Joined: Tue Sep 24, 2013 7:32 pm

Re: RPi Cam Web Interface

Sat Aug 12, 2017 12:08 pm

I'm getting familiar with Motion detect, camera record, and time lapse. However how do I combine commands, like "im qu 100 an test text" does a ; separate commands? How would i record for just 60s ca 1 [6000]? I don't know where to place ca 0 to close file. some example screen shots using fixed times would be helpful.

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

Re: RPi Cam Web Interface

Sat Aug 12, 2017 5:22 pm

encryptor wrote:
Sat Aug 12, 2017 12:08 pm
I'm getting familiar with Motion detect, camera record, and time lapse. However how do I combine commands, like "im qu 100 an test text" does a ; separate commands? How would i record for just 60s ca 1 [6000]? I don't know where to place ca 0 to close file. some example screen shots using fixed times would be helpful.
Yes, multiple commands may be executed by putting them in one string in the scheduler separated by ';'. They will be executed sequentially with a small time interval in between each command. If the commands are being written directly into the FIFO by another program (not the scheduler) then use a LF rather than a ';'

ca 1 just starts video recording and will continue until it gets a ca 0. You can optionally put a time period in seconds in the ca 1 command so ca 1 60 will start a video recording which will automatically terminate after 60 seconds and close the file without a ca 0 command.

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

Re: RPi Cam Web Interface

Tue Aug 15, 2017 8:20 pm

Hi Robert,

Is it possible to purge all files within the media folder when using the PurgeSpace_ModeEx option please? At the moment I think it only removes files either with a certain naming format or specific filename types created by the program.

I ask because I'm writing a script to capture photos every few seconds during the motion start/stop period when in monitor mode and storing them in the media folder. I would like the scheduler to clear these out along with the video files (I purge when free spaces hits 20%).

Thanks.

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

Re: RPi Cam Web Interface

Wed Aug 16, 2017 10:29 am

quavoce wrote:
Tue Aug 15, 2017 8:20 pm
Hi Robert,

Is it possible to purge all files within the media folder when using the PurgeSpace_ModeEx option please? At the moment I think it only removes files either with a certain naming format or specific filename types created by the program.

I ask because I'm writing a script to capture photos every few seconds during the motion start/stop period when in monitor mode and storing them in the media folder. I would like the scheduler to clear these out along with the video files (I purge when free spaces hits 20%).

Thanks.
OK. I'll have to think a bit about this.

Purging is based on checking thumbnails. These are always in the top level media folder even if the capture files are in sub-folders. The thumbnails allow finding the capture file no matter where it is. It also has the effect that other files placed in the media path are not touched which some may regard as a good thing. I.e. it is only going to purge files that it has captured itself and not inadvertently delete other stuff which might be valuable. If a script captures stuff using the built in pipe commands (e.g. im) then that will produce thumbnails which will then be eligible for purging.

From your description you want to purge stuff which has not been thumbnailed but only old stuff which may be needed to release space. Is that right?

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

Re: RPi Cam Web Interface

Wed Aug 16, 2017 11:10 am

btidey wrote:
Wed Aug 16, 2017 10:29 am
quavoce wrote:
Tue Aug 15, 2017 8:20 pm
Hi Robert,

Is it possible to purge all files within the media folder when using the PurgeSpace_ModeEx option please? At the moment I think it only removes files either with a certain naming format or specific filename types created by the program.

I ask because I'm writing a script to capture photos every few seconds during the motion start/stop period when in monitor mode and storing them in the media folder. I would like the scheduler to clear these out along with the video files (I purge when free spaces hits 20%).

Thanks.
OK. I'll have to think a bit about this.

Purging is based on checking thumbnails. These are always in the top level media folder even if the capture files are in sub-folders. The thumbnails allow finding the capture file no matter where it is. It also has the effect that other files placed in the media path are not touched which some may regard as a good thing. I.e. it is only going to purge files that it has captured itself and not inadvertently delete other stuff which might be valuable. If a script captures stuff using the built in pipe commands (e.g. im) then that will produce thumbnails which will then be eligible for purging.

From your description you want to purge stuff which has not been thumbnailed but only old stuff which may be needed to release space. Is that right?
ah yes that would work, I can run "echo 'im' > /var/www/html/FIFO" and use the photos it generates, knowing that these will be purged as usual.

It may still be worth considering this as a user-definable option to "purge all files in media folder" at a later date. As an example, a while ago I created a script to generate low res/quality versions of the videos so that I could stream them to my mobile (over poor data networks) whilst still keeping the high quality versions. I ended up abandoning it for a few reasons, but the main one was being unable to purge them automatically. If you could implement this feature it would be handy to have!

Thanks!!

davefi
Posts: 6
Joined: Fri Jan 27, 2017 9:26 pm

Re: RPi Cam Web Interface

Wed Aug 16, 2017 11:28 am

quavoce wrote:
Wed Aug 16, 2017 11:10 am
It may still be worth considering this as a user-definable option to "purge all files in media folder" at a later date. As an example, a while ago I created a script to generate low res/quality versions of the videos so that I could stream them to my mobile (over poor data networks) whilst still keeping the high quality versions. I ended up abandoning it for a few reasons, but the main one was being unable to purge them automatically. If you could implement this feature it would be handy to have!

Thanks!!
Thats a neat idea. I've had a few feature ideas aswell, and I'm going to try implementing them myself, but I don't know my way around Python very well yet, and have so many other projects I keep dipping into, my time is limited right now. But:

1. To allow scheduled conversion of the h264 files
2. To allow on demand conversion of the h264 files

For #1 the idea is to add "Scheduled" to the boxing option menu in the configuration. When this is set, then the boxing would execute on all .h264 files present, per the scheduled time from the scheduler. I am thinking for example, you could have a period in the scheduler for 02:00 (am) which would kick of all the conversions while there is no activity going on.

For #2 the idea is to add an icon/button to the thumbnails which when clicked, would convert that particular video to MP4.

My main reason is to stop hammering the SD card - half the time I get a whole load of clips (set to 30 seconds to keep them small enough to download on the mobile) and only 1 is of interest. Having such short clips also means the thumbnails are fairly representative of the motion, so its easy to pick which ones I actually want to view.

But it was to also do the conversion when its quiet, and cooler (over night), as my pi runs quite warm and when its all maxed out, the clips it captures sometimes stutter.


Having an additional option for creating low-res versions would also be quite cool as well :-)

Rasptony
Posts: 6
Joined: Mon Jun 12, 2017 11:58 am

Re: RPi Cam Web Interface

Sun Aug 20, 2017 11:42 am

Hi
New to all this but just set up Raspberry zero with it, it’s great.
I am sure through the Scheduler this would be possible, not sure how to.
I would like to record each day, to a separate file, a time-lapse picture session.
First schedule, about 30 min before sunrise and carry on for about an hour after sunrise.
Second the same but at dusk.
So I would end up with separate recording of sunrise, sunset for each day.

I understand that RPi-Cam-Web-Interface, calculate Dawn and Dusk from Geo settings, and I guess gets the time from the internet.
Once running, does the dawn and dusk times automatically change dynamical each day, if it is just kept running ?
Thanks in anticipation

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

Re: RPi Cam Web Interface

Sun Aug 20, 2017 1:02 pm

Rasptony wrote:
Sun Aug 20, 2017 11:42 am
Hi
New to all this but just set up Raspberry zero with it, it’s great.
I am sure through the Scheduler this would be possible, not sure how to.
I would like to record each day, to a separate file, a time-lapse picture session.
First schedule, about 30 min before sunrise and carry on for about an hour after sunrise.
Second the same but at dusk.
So I would end up with separate recording of sunrise, sunset for each day.

I understand that RPi-Cam-Web-Interface, calculate Dawn and Dusk from Geo settings, and I guess gets the time from the internet.
Once running, does the dawn and dusk times automatically change dynamical each day, if it is just kept running ?
Thanks in anticipation
Sunrise and sunset are dynamically calculated based on the latitude, longtitude, and date. So they will track throughout the year.

Dawn and Dusk are fixed offsets (set in the scheduler) from the calculated Sunrise and Sunset times so they will also track throughout the year. These offsets will not accurately reflect the duration of a true dawn period as that will itself change a bit during the year.

Similarly, Day Start and Day End are calculated as fixed offsets from Sunrise and Sunset

For what you want to do, start the time lapse at dawn (set 30 minutes before sunrise) and end at Day start (set 60 minutes after Sunrise). Similarly start a time lapse at Day End (set 30 minutes before sunset, a minus value) and end at Dusk set 1 hour after sunset.

Rasptony
Posts: 6
Joined: Mon Jun 12, 2017 11:58 am

Re: RPi Cam Web Interface

Sun Aug 20, 2017 3:16 pm

Thanks, understand “will track thought the year” and Dawn and Dusk offsets
What I do not know what to do is what to put into the scheduler boxes
There is Motion Start, & Motion Stop, & Perio Start box for Night, Dawn, Day and Dusk, can I use these to start a Timelapse ?
If so what txt do I put into them ?
Thanks.
Attachments
Sheduler Settings.jpg
Sheduler Settings.jpg (47.82 KiB) Viewed 3969 times

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

Re: RPi Cam Web Interface

Sun Aug 20, 2017 3:44 pm

Rasptony wrote:
Sun Aug 20, 2017 3:16 pm
Thanks, understand “will track thought the year” and Dawn and Dusk offsets
What I do not know what to do is what to put into the scheduler boxes
There is Motion Start, & Motion Stop, & Perio Start box for Night, Dawn, Day and Dusk, can I use these to start a Timelapse ?
If so what txt do I put into them ?
Thanks.
You can put any sequence of any commands in any of those boxes.

Commands in Motion Start are executed whenever a Motion start trigger is received in the period in question
Commands in Motion Stop are executed whenever a Motion Stop trigger is received in the period in question
Period Start commands are executed when the period starts

So in your case you want to put a tl 1 command in Dawn Period Start, a tl 0 in Day Period start, a tl 1 in Dusk Period start, and a tl 0 in Night Period start. The motion boxes should be left blank.

Rasptony
Posts: 6
Joined: Mon Jun 12, 2017 11:58 am

Re: RPi Cam Web Interface

Sun Aug 20, 2017 3:53 pm

Thanks, I understand, will have a go later.
Appreciate your help

jvdvegt
Posts: 1
Joined: Mon Aug 21, 2017 6:25 am

Re: RPi Cam Web Interface

Mon Aug 21, 2017 6:32 am

I'm trying to delay the video to like one image per 10 seconds, as the video will go over 4g internet and I like to save bandwidth. I just need the video to see the camera is working and still pointing in the right direction.

When playing with high divider values (e.g. 1024), that seemed to work. Soon however, I would not see any image at all any more. Only an cam.jpg.part would show up in /dev/shm/jpeg/, but the corresponding 'status' file would say the camera was 'ready'. Took me a while to figure out the high divider value was to blame.

I suppose I'll need to add an extra delay on the webpage somewhere to reach 10 seconds per frame?

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

Re: RPi Cam Web Interface

Mon Aug 21, 2017 10:48 am

jvdvegt wrote:
Mon Aug 21, 2017 6:32 am
I'm trying to delay the video to like one image per 10 seconds, as the video will go over 4g internet and I like to save bandwidth. I just need the video to see the camera is working and still pointing in the right direction.

When playing with high divider values (e.g. 1024), that seemed to work. Soon however, I would not see any image at all any more. Only an cam.jpg.part would show up in /dev/shm/jpeg/, but the corresponding 'status' file would say the camera was 'ready'. Took me a while to figure out the high divider value was to blame.

I suppose I'll need to add an extra delay on the webpage somewhere to reach 10 seconds per frame?
There is no specific limit on the value of the divider number.

I have just tried it with a value of 1024 and it has been running for over an hour OK with a delay of around 40 seconds between each update. Use a value of 250 with a fps of 25 to get 10 seconds.

However, I did this using the 'Default Streaming method' where each update is specifically requested unlike the MJPEG method where a single request is made followed by a stream. This may have problems with large dividers due to time-outs.

To set this make sure the button under System says MJPEG-Stream indicating th esystem is in default stream mode.

You can also turn on developer tools in the browser to see the requests being made for each frame. You should see something like
cam_pic.php?time=1503312023210&pDelay=40960000 being requested where the pDelay value is the delay in microseconds between frame updates.

MyNameWolfgangS
Posts: 12
Joined: Wed Oct 01, 2014 4:15 pm

Re: RPi Cam Web Interface

Thu Aug 31, 2017 10:17 am

Hi,

what have I to do, to get a stream working in Kodi? Kodi 17 is running on a second raspberry with OS LibreElec. Several cameras are running on raspberries Pi1, Pi2 and Pi 3.

Thanks a lot
Wolfgang (NOOB)

wpballa1
Posts: 40
Joined: Sat Jun 27, 2015 12:49 am

Re: RPi Cam Web Interface

Wed Sep 06, 2017 6:14 pm

Is there any way to enable/disable the end_box.sh macro remotely? I have a system far away that is generating too many messages from light changes as clouds go by.

Return to “Camera board”