B0SC0
Posts: 22
Joined: Tue Jun 04, 2013 3:46 pm

Re: RPi Cam Web Interface

Sun Apr 13, 2014 6:09 pm

It seems I deleted the FIFO for raspimjpeg.

How do I re-create?

After I repair that I will look at FIFO_pipan

Also, should the user be root for both FIFO's?

Should pipan.php and pipan.js be root?

What directory should they be in?

I have FIFO_pipan, pipan.php, pipan.js in /var/www

rc.local in /etc

pi-pan is in /home/pi/pi-pan/


RPi Cam Web Interface is in /home/pi/RPi_Cam_Web_Interface

I am running SERVOBLASTER for the servo's and I have wiringPi installed.

I know that is a lot of info, but I trying to cover my bases here.

noob in learning mode :?

Marcel
Posts: 3
Joined: Fri Apr 04, 2014 7:56 pm

Re: RPi Cam Web Interface

Sun Apr 13, 2014 8:59 pm

DuctTape wrote:I just updated my the cam web interface and the automatic motion detection is working well, only problem is at night it fills up the SD card with pitch black video.

Whats the best way to have the pi disable motion at say 1am and enable it again at 5am?
I had the same problem here.
Making movies is not working with exposure mode "night". I've set exposure mode to "auto" to solve lots op wrong video's.
I don't know filming with night exposure yet. For me this is no problem because I have NoiR lens. I have to put on IR for vision.

User avatar
slabua
Posts: 95
Joined: Tue Sep 11, 2012 7:00 pm
Contact: Website

Re: RPi Cam Web Interface

Sun Apr 13, 2014 10:10 pm

B0SC0 wrote:It seems I deleted the FIFO for raspimjpeg.
How do I re-create?
Sorry, I don't have a pi-pan, though, to re-create the FIFO pipe please proceed as follows:

Code: Select all

sudo mknod /var/www/FIFO p
sudo chmod 666 /var/www/FIFO
Salvatore La Bua - www.slblabs.com
DICGIM - University of Palermo, Italy

B0SC0
Posts: 22
Joined: Tue Jun 04, 2013 3:46 pm

Re: RPi Cam Web Interface

Sun Apr 13, 2014 11:54 pm

Sorry, I don't have a pi-pan, though, to re-create the FIFO pipe please proceed as follows:

Code: Select all

sudo mknod /var/www/FIFO p
sudo chmod 666 /var/www/FIFO
[/quote]

Okay, no more errors. Thank You.

Now I can access the camera, but the pi-pan buttons do nothing.

Everything else is working.

Would having those files mentioned earlier being root cause this problem?

Ydo
Posts: 11
Joined: Sun Apr 06, 2014 12:57 pm
Location: Netherlands

Re: RPi Cam Web Interface

Mon Apr 14, 2014 6:24 pm

I re- installed Rasbean from ground zero with fresh downloaded .img file on SD card and some minor raspi-config settings.
The above mentioned problem persists.
"raspistill" works or "RPi Cam Control" with 0lly's instruction but not both with the same error report.
"./RPi_Cam_Web_Interface_Installer.sh stop" does not help so at the moment I have two SD's one with and one without RPi Cam Control

User avatar
slabua
Posts: 95
Joined: Tue Sep 11, 2012 7:00 pm
Contact: Website

Re: RPi Cam Web Interface

Mon Apr 14, 2014 7:07 pm

Ydo wrote:"raspistill" works or "RPi Cam Control" with 0lly's instruction but not both with the same error report.
It's not possible to use both raspimjpeg and raspistill/raspivid or any other command that uses the camera at the same time anytime the device is in use already.
Salvatore La Bua - www.slblabs.com
DICGIM - University of Palermo, Italy

0lly
Posts: 77
Joined: Sun Mar 02, 2014 5:07 pm

Re: RPi Cam Web Interface

Tue Apr 15, 2014 6:55 am

Ydo wrote: "./RPi_Cam_Web_Interface_Installer.sh stop" does not help
why not ?
if you want to use raspistill try

Code: Select all

./RPi_Cam_Web_Interface_Installer.sh stop
if you want to use the webinterface with raspimjpeg try

Code: Select all

./RPi_Cam_Web_Interface_Installer.sh start

saifrenz
Posts: 2
Joined: Tue Apr 15, 2014 7:31 am

Re: RPi Cam Web Interface

Tue Apr 15, 2014 7:52 am

hi sir
how can i record the ip camera files in my rpi can you please tell the what are the settings to be made

Ydo
Posts: 11
Joined: Sun Apr 06, 2014 12:57 pm
Location: Netherlands

Re: RPi Cam Web Interface

Tue Apr 15, 2014 12:02 pm

0lly wrote:
Ydo wrote: "./RPi_Cam_Web_Interface_Installer.sh stop" does not help
Sorry I did write "does" this should heven been "did".

The problem was caused by not stopping the Rpi Cam Control camera in the control panel before disconnecting from LAN. Command raspistill is working correct now as wel as RCC.
Thanks for your help.

Update:
I hailed to early.
After pushing the stop button in RCC I could log off LAN and execute raspistill but after logging on again RCC hung.
I got your commands working to make RCC active again:
RPi_Cam_Web_Interface_Installer.sh stop
RPi_Cam_Web_Interface_Installer.sh start

Now I am wondering why these commands are not executed automatically at LAN log on/off.
What is the function of:
RPi_Cam_Web_Interface_Installer.sh autostart_yes
RPi_Cam_Web_Interface_Installer.sh autostart_no ?
And should there not be an auto_stop function?

DanielvdTuin
Posts: 2
Joined: Tue Mar 25, 2014 8:04 pm

Re: RPi Cam Web Interface

Tue Apr 15, 2014 7:30 pm

Hello P(I)eople,

I had some problems to add a non-secured share to the PI, to save the data directly to the share. In my envoirment I am using a TP-LINK WDR3600n (which supports Samba) After a while it worked with the following commands:

To mount a non-secured share to the Pi:
1: run the command:

Code: Select all

sudo mount -t cifs -o sec=none //SERVER/SHARE /var/www/media/
To auto mount a non-secured share to the Pi:
1: run the command:

Code: Select all

sudo nano /etc/fstab
2: add this line:

Code: Select all

//SERVER/SHARE/ /var/www/media/ cifs sec=none 0 0
I like to have the option to detach the USB (3.0) device and attach it to a computer, so i can move it faster than using the TP-LINK WN725N at 150 Mbps * or the local ethernet port at 100 Mbps. The TP-LINK WDR3600 supports plug and play while the USB devices is shared.

It's sound strange, but when using the USB Wi-Fi module on the Pi, it's runs around * 5 Celcius cooler than using a networkcable.
Pi (kernel 10.3.36+) temperature in an envoirement around 20,8 Celsius (Pi not boxed)
= Idle temp using TP-LINK WN725: 54,5 Celsius avarage
= Idle temp using Ethernet: 60,2 Celsius avarage
The only poor thing is that the stream sucks when the signal is less then "two stripes" (20 Mbps or less).

* Raspberry Pi tested with data download/upload and the data rate was idle in full range at 96 Mbps.
* Depending if the /.RPI Cam is started/stopped

Has anyone else tested this project, when the PI was in a closed box/case? In the end I attached a 12v/0,15A 50mm fan to the GPIO pins to keep the Raspberry cool at 61,2 Celsius, when it was in a closed envoirment and the streaming was on.

yvonnezoe
Posts: 127
Joined: Thu Feb 14, 2013 2:10 am
Contact: Website

Re: RPi Cam Web Interface

Wed Apr 16, 2014 1:14 am

Hi I have a question here. I tried to implement the commands without the script.js as i was using jQuery. it seems to work a few times. however if a button is clicked for multiple times, the camera app crashes.
my jquery script is as follow:
Please tell me which part is not necessary. it seems to work without all the ajax and mjpeg_img, etc but the same problem would occur (crash if a button is clicked multiple times)

Code: Select all

<script>
					$(document).ready(function(){
					
						var mjpeg_img;
						var halted = 0;

						function reload_img () {
						  if(!halted) mjpeg_img.src = "cam_pic.php?time=" + new Date().getTime();
						  else setTimeout("reload_img()", 500);
						}

						function error_img () {
						  setTimeout("mjpeg_img.src = 'cam_pic.php?time=' + new Date().getTime();", 100);
						}

					
						
						$('#start_camera').click(function(){
							//$('#start_camera').prop('disabled', true);
							send_cmd("ru 1");
							halted = 1;
							
						});
						$('#stop_camera').click(function(){
							//$('#start_camera').prop('disabled', false);
							send_cmd("ru 0");
							halted = 0;
						});
						$('#start_md').click(function(){
							send_cmd("md 1");
							
						});
						$('#stop_md').click(function(){
							send_cmd("md 0");
							halted = 0;
						});
						$('#start_video').click(function(){
							send_cmd("ca 1");
						});
						$('#stop_video').click(function(){
							send_cmd("ca 0");
						});
						$('#capture').click(function(){
							send_cmd("im");
						});
						function reload_ajax (last) {
						  ajax_status.open("GET","status_mjpeg.php?last=" + last,true);
						  ajax_status.send();
						}


						//
						// Ajax Commands
						//
						var ajax_cmd;

						if(window.XMLHttpRequest) {
						  ajax_cmd = new XMLHttpRequest();
						}
						else {
						  ajax_cmd = new ActiveXObject("Microsoft.XMLHTTP");
						}

						function send_cmd (cmd) {
						  ajax_cmd.open("GET","cmd_pipe.php?cmd=" + cmd,true);
						  ajax_cmd.send();
						}

						//
						// Init
						//
						function init() {

						  // mjpeg
						  mjpeg_img = document.getElementById("mjpeg_dest");
						  mjpeg_img.onload = reload_img;
						  mjpeg_img.onerror = error_img;
						  reload_img();
						  // status
						  reload_ajax("");

						}
					});
				</script>
Just started my Raspberry Pi journey >> http://yvonnezoe.wordpress.com

jarrah31
Posts: 125
Joined: Wed Oct 10, 2012 10:16 am

Re: RPi Cam Web Interface

Thu Apr 17, 2014 8:04 pm

Update: I suppose I should RTFM. :) Pi-Pan website says
Pan: 180 degrees (from left to right)
Tilt: 110 degrees (top to bottom)
Must be a hardware limitation then - still I can't see why so I'll reach out to the developers for an answer.

Hi Silvan,

Have you been able to make the Pi-Pan turn more than the defined range?

For example, in pipan.php, the highest $max_pan value that pi-pan seems to recognise is 170. Reducing this number does decrease how far it turns left, but 180 or higher makes no difference to the maximum it can turn in a anti-clockwise direction.

Looking at the code I've tried to change various values that look like they may be related, but it made no difference
In /var/www/pipan.js I changed 190 to 290:

Code: Select all

function servo_left () {
  if(pan <= 190) pan += 10;
  pipan_servo();
}
I changed /home/pi/pipan/pipan.py from 250 to 290:

Code: Select all

# pan movement
    def do_pan(self, x):
        if ( x > 250 ):
            x = 250
        if ( x < 50 ):
            x = 50
        self.pwm (S4, int(x))
I've even removed pipan.pyc in case it was using the compiled version, plus a full reboot of the Pi. I don't think any values are stored in browser cache because I can change the pipan.php $max_pipan value and see the difference after running a ./RPi_Cam_Web_Interface_Installer.sh stop / start.

There's a limit somewhere but I can't find it in software (unless there's another module I've missed), or perhaps it's a hardware limit?
Last edited by jarrah31 on Thu Apr 17, 2014 8:21 pm, edited 1 time in total.

jarrah31
Posts: 125
Joined: Wed Oct 10, 2012 10:16 am

Re: RPi Cam Web Interface

Thu Apr 17, 2014 8:13 pm

yvonnezoe wrote:Hi I have a question here. I tried to implement the commands without the script.js as i was using jQuery. it seems to work a few times. however if a button is clicked for multiple times, the camera app crashes.
my jquery script is as follow:
Please tell me which part is not necessary. it seems to work without all the ajax and mjpeg_img, etc but the same problem would occur (crash if a button is clicked multiple times)
Sounds similar to an earlier post where someone created a visual pack using jquery, but when I recently tested it raspimjpeg would crash after pressing a button the second time.

http://www.raspberrypi.org/forums/viewt ... 21#p498821
Unfortunately I'm no web coder so can't help I'm afraid.

emporium
Posts: 3
Joined: Fri Mar 21, 2014 6:55 pm

Re: RPi Cam Web Interface

Fri Apr 18, 2014 11:49 am

DuctTape wrote:I just updated my the cam web interface and the automatic motion detection is working well, only problem is at night it fills up the SD card with pitch black video.

Whats the best way to have the pi disable motion at say 1am and enable it again at 5am?
I think the best way is using crontab:
1) Edit crontab:

Code: Select all

sudo crontab -e
2) Add the next line to the end to disable motion detection everyday at 1am:

Code: Select all

* 1 * * * /bin/echo "md 0" > /var/www/FIFO
3) Add the next line to the end to enable again motion detection everyday at 5am:

Code: Select all

* 5 * * * /bin/echo "md 1" > /var/www/FIFO
4) Press Ctrl + x to exit crontab

Please, let us know if it works correctly.

emporium
Posts: 3
Joined: Fri Mar 21, 2014 6:55 pm

Re: RPi Cam Web Interface

Fri Apr 18, 2014 11:55 am

Hello again,

I have two RPi with their cams running this amazing project. I can see every cam browsing the corresponding ip.

Now I would like being able to watch both cams in the same webpage. I have modified .html but I don't get both images.

Can anyone helping me in this task?

Thanks in advance.

elronno
Posts: 11
Joined: Sat Nov 09, 2013 10:36 am
Location: Europe
Contact: Website

Re: RPi Cam Web Interface

Fri Apr 18, 2014 1:59 pm

A great piece of software, thank you!

I've got a little problem though. Recorded videos are always [email protected], no matter what I set in the web interface. The values in the web interface do change the metadata in the recorded file, but not the file itself.
Attachments
videosize.jpg
videosize.jpg (48.42 KiB) Viewed 6710 times

elohab
Posts: 6
Joined: Sat Apr 12, 2014 1:18 am

Re: RPi Cam Web Interface

Fri Apr 18, 2014 2:28 pm

Hi,

I am using exposure mode "night" with RPi Cam Web Interface automatically. When i click "record video start" button
the exposure mode changes to "auto". I stop the recording but the exposure stays at auto again. So i can not record
and view the mjpeg stream at the same exposure. Same thing happens when i enable motion detection. But i can
capture images at the same exposure. Is there a way to record videos other than exposure mode "auto" ? I am using
Pi Noir camera. Thanks.

TristanK
Posts: 4
Joined: Fri Apr 18, 2014 4:37 pm

Re: RPi Cam Web Interface

Fri Apr 18, 2014 4:57 pm

Hello guys,

I am quite new to this forum and this topic, but I am already playing around with the raspi a while. I have a curious issue in my setup with the web cam interface.
I installed the package quite well including ssl access from the internet on my camera as well as user and password confirmation.

But the last small configuration "sending an email while motion detection" in motion.conf went wrong. Since then I am no longer able to activate the motion detection at all. I can turn on motion detection on the web side. The motion daemon is been started but no video processing starts. It seem to be that the command pipe is somehow broken. All other functions still work perfectly. I replaced the motion.conf but the issue is still there.
I had this problem once and I reinstalled the system from scratch and the problem disappeared. I hate to do it a second time and I 'd like to install the email warning.

I'd be very happy if some has an idea how to fix it?

Best regards

Tristan

B0SC0
Posts: 22
Joined: Tue Jun 04, 2013 3:46 pm

Re: RPi Cam Web Interface

Fri Apr 18, 2014 6:57 pm

2nd attempt:
I loaded a new 4gb sd card with rasbian and updated.
Installed RPi Cam Web Interface
Then I install pipan with a pilight.
My webpage works fine for everything except the pipan and pilight buttons.
Any idea's.
Pipan and pilight tested good with the included demo files.
Thanks

jarrah31
Posts: 125
Joined: Wed Oct 10, 2012 10:16 am

Re: RPi Cam Web Interface

Fri Apr 18, 2014 7:59 pm

B0SC0 wrote:2nd attempt:
I loaded a new 4gb sd card with rasbian and updated.
Installed RPi Cam Web Interface
Then I install pipan with a pilight.
My webpage works fine for everything except the pipan and pilight buttons.
Any idea's.
Pipan and pilight tested good with the included demo files.
Thanks
Have you changed the ownership of pipan files in /var/www to be owned by www-data? e.g.

Code: Select all

chown www-data:www-data pipan.*
My directory looks like this:

Code: Select all

[email protected] /var/www $ ls -al
total 88
drwxr-xr-x  3 www-data www-data  4096 Apr 17 19:51 .
drwxr-xr-x 12 root     root      4096 Apr 16 21:02 ..
-rw-r--r--  1 www-data www-data    87 Apr 16 21:05 cam_pic.php
-rw-r--r--  1 www-data www-data    88 Apr 16 21:05 cmd_pipe.php
-rw-r--r--  1 www-data www-data  1284 Apr 16 21:05 Copyright.txt
-rw-r--r--  1 www-data www-data   249 Apr 16 21:05 download.php
prw-rw-rw-  1 root     root         0 Apr 17 14:31 FIFO
prw-rw-rw-  1 root     root         0 Apr 17 20:17 FIFO_pipan
-rw-r--r--  1 root     root       123 Apr 17 14:41 .htaccess
-rw-r--r--  1 www-data www-data  9855 Apr 16 21:14 index.html
drwxr-xr-x  2 www-data www-data  4096 Apr 16 21:05 media
-rw-r--r--  1 www-data www-data  1383 Apr 17 19:13 pipan.js
-rw-r--r--  1 www-data www-data   854 Apr 17 19:51 pipan.php
-rw-r--r--  1 www-data www-data  1569 Apr 16 21:05 preview.php
-rw-r--r--  1 www-data www-data 14709 Apr 16 21:05 script.js
-rw-r--r--  1 www-data www-data   412 Apr 16 21:05 script_min.js
-rw-r--r--  1 www-data www-data   229 Apr 16 21:05 status_mjpeg.php
-rw-r--r--  1 www-data www-data     5 Apr 17 20:27 status_mjpeg.txt
-rw-r--r--  1 www-data www-data     4 Apr 16 21:05 Version.txt

B0SC0
Posts: 22
Joined: Tue Jun 04, 2013 3:46 pm

Re: RPi Cam Web Interface

Fri Apr 18, 2014 8:37 pm

jarrah31

Yes I did.

Here is my directory:
Attachments
varwww3.jpg
/var/www directory
varwww3.jpg (63.08 KiB) Viewed 6617 times

idahospud
Posts: 4
Joined: Fri Apr 18, 2014 8:51 pm

Re: RPi Cam Web Interface

Fri Apr 18, 2014 9:20 pm

I also am unable to have the pi-pan buttons activate the servos even though they are response from the command line to pan and tilt commands.

I do notice that the www-data files are not installed in my /var/www directory so there must be something I have not configured correctly.

Ideas?

robm99
Posts: 6
Joined: Sat Feb 22, 2014 1:20 am

Re: RPi Cam Web Interface

Fri Apr 18, 2014 9:32 pm

I just tried a completely fresh setup. New SD card, latest Raspbian, all updates, got the latest package from GitHub for this, and it looks great. Trouble is, while it works perfectly for video, when I try to capture and image it seems to hang!

Buttons grey out and says "recording image", but where that normally flashes up for a split second then reverts to all functions available, it doesn't seem to do anything, it just stays in that state...

Any ideas?

Thanks.

0lly
Posts: 77
Joined: Sun Mar 02, 2014 5:07 pm

Re: RPi Cam Web Interface

Fri Apr 18, 2014 11:33 pm

robm99 wrote: while it works perfectly for video, when I try to capture and image it seems to hang!
try this Firmware

Code: Select all

sudo rpi-update 8660fe5152f6353dec61422808835dbcb49fc8b2
and it works.
I have the same trouble with latest Firmware....

JonesThePi
Posts: 21
Joined: Tue Oct 23, 2012 1:08 pm

Re: RPi Cam Web Interface

Sat Apr 19, 2014 8:56 am

0lly wrote:
robm99 wrote: while it works perfectly for video, when I try to capture and image it seems to hang!
try this Firmware

Code: Select all

sudo rpi-update 8660fe5152f6353dec61422808835dbcb49fc8b2
and it works.
I have the same trouble with latest Firmware....
I have had a similar problem with capture image since the latest RPi Cam release. The buttons grey out and multiple malformed image files are written until I stop the process from the command line.

Changing the firmware as suggested does not work and file permissions in /var/www appear to be correct.

Glad to see its not just me but would like to know why its happening...

Return to “Camera board”