User avatar
gatherer
Posts: 14
Joined: Sat Oct 17, 2015 2:31 pm

Re: RPi Cam Web Interface

Sat Oct 17, 2015 8:38 pm

btidey wrote:
jussi24 wrote:
bonzadog wrote:Thank you for that tip.
Just one more thing I have just loaded the new Debian Jessie
and want to try that with RPi Cam Web.
I assume that will work on the Rpis B, B+ and 2.
I'm not sure if that combination works. Raspimjpeg makes use of the officially added tools/kernel drivers in raspbian for the camera/GPU, as far as I know. I didn't hear about experiences concerning raspimjpeg on top of other linux distributions until now.
I have had a go with Jessie and got it to work.

There are some changes that will need some installer work to make it easy. These are primarily due to changes on the Apache side and also to the www-data user set up. Apache now has a default web file location of /var/www/html and the www-data has nologin set up. Also the default Apache site-locations file has changed.

To make it work I set the subdirectory in the install to html to make it compatible with the Apache default. I then edited the /etc/passwd file

www-data:x:33:33:www-data::/usr/sbin/nologin
changed to
www-data:x:33:33:www-data:/var/www:/bin/bash

I then separately installed libav-tools

sudo apt-get install libav-tools

With these changes it seems to be working OK

Edit: Made a few changes to installer which should help with Jessie installs
Edit1: Reverted those changes which weren't working
Hi,
I tried this but when starting it to run, it coments "/bin/bash cannot be executed.
How can this be fixer?

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

Re: RPi Cam Web Interface

Sun Oct 18, 2015 9:13 am

gatherer wrote:
btidey wrote: To make it work I set the subdirectory in the install to html to make it compatible with the Apache default. I then edited the /etc/passwd file

www-data:x:33:33:www-data::/usr/sbin/nologin
changed to
www-data:x:33:33:www-data:/var/www:/bin/bash
Hi,
I tried this but when starting it to run, it coments "/bin/bash cannot be executed.
How can this be fixer?
By default now Jessie doesn't configure bash shells for most users. www-data (Apache user) does need bash to operate RPi Cam. That was the purpose of the changes to the /etc/passwd file. Double check upu have made that change and reboot.

miraaz
Posts: 34
Joined: Tue May 19, 2015 9:28 am

Re: RPi Cam Web Interface

Sun Oct 18, 2015 8:26 pm

Ok. I have very limited time but try help you out about that JESSIE support.
So please send to me one Rasp 2 more and microsd card. I no want kill my working system when i developing that... lol :D.
Tnx btidey about hints what needed todo. That www-root is in new place, i already founded, but that www-user hint was useful.

User avatar
gatherer
Posts: 14
Joined: Sat Oct 17, 2015 2:31 pm

Re: RPi Cam Web Interface

Sun Oct 18, 2015 9:06 pm

btidey wrote:
gatherer wrote:
btidey wrote: To make it work I set the subdirectory in the install to html to make it compatible with the Apache default. I then edited the /etc/passwd file

www-data:x:33:33:www-data::/usr/sbin/nologin
changed to
www-data:x:33:33:www-data:/var/www:/bin/bash
Hi,
I tried this but when starting it to run, it coments "/bin/bash cannot be executed.
How can this be fixer?
By default now Jessie doesn't configure bash shells for most users. www-data (Apache user) does need bash to operate RPi Cam. That was the purpose of the changes to the /etc/passwd file. Double check upu have made that change and reboot.
Thank you. I checked it, but that was as suggested.

Now got it running with wheezy.

Static ip wlan0 is working but with a static one and a dynamic one. (Any hints?)

Noip registerd but not working. Who knows a good instruction?
Thanks

jenswaelkens
Posts: 12
Joined: Thu Sep 24, 2015 12:33 pm

Re: RPi Cam Web Interface

Tue Oct 20, 2015 8:47 pm

I also tried out all the suggestions on the wiki for Jessie but the system does not work any longer (it worked fine before on Wheezy).
I think it would be better to advise potential users _not_ to use it under Jessie yet as this might be a very disappointing experience and this software is so great it deserves better publicity.

kind regards,
Jens

tianheng123
Posts: 13
Joined: Mon Aug 03, 2015 4:14 pm

Re: RPi Cam Web Interface

Tue Oct 20, 2015 9:52 pm

btidey wrote:
tianheng123 wrote:
Hi thanks for the information! Do you know is there anyone who I should turn to if i want to add this function to the current web interface?

Sorry I don't have much programming experience so it might be difficult for me to fork the project
The relevant MMAL parameter seems to be MMAL_PARAMETER_CAPTURE_STATS_PASS but it is not obvious what to do with this.

I have added into the latest version a new Camera Setting (Camera Statistics) which controls a new variable stat_pass. This is then is then sent into the camera control port at the start of each still image capture.

It seems to be harmless at least, but I don't know if it is effective for you as I don't really see this effect myself.

Hi there! Thank you so much! I have tested it and it works perfectly.
Really appreciate for your timely reply and update!!!
Really illustrated the beauty of open source software.

Image

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

Re: RPi Cam Web Interface

Wed Oct 21, 2015 10:39 am

jenswaelkens wrote:I also tried out all the suggestions on the wiki for Jessie but the system does not work any longer (it worked fine before on Wheezy).
I think it would be better to advise potential users _not_ to use it under Jessie yet as this might be a very disappointing experience and this software is so great it deserves better publicity.

kind regards,
Jens
The intention is to make it install just as easily on Jessie. I did make it work for me, but you have to use the html folder only at the moment.

To help progress let us know exactly what is not working. In particular do you get any web screen at all even if 'Loading'. Also see if raspimjpeg is running (ps -A) and if the log contains anything.

jenswaelkens
Posts: 12
Joined: Thu Sep 24, 2015 12:33 pm

Re: RPi Cam Web Interface

Wed Oct 21, 2015 1:47 pm

Hello again,
Here is some information which might be helpful to solve the issues with Jessie:

Code: Select all

 ps aux|grep -i apache
root       582  0.2  4.9  93232 18840 ?        Ss   15:35   0:00 /usr/sbin/apache2 -k start
www-data   593  0.0  1.6  93484  6412 ?        S    15:35   0:00 /usr/sbin/apache2 -k start
www-data   594  0.0  1.6  93288  6112 ?        S    15:35   0:00 /usr/sbin/apache2 -k start
www-data   595  0.0  1.4  93256  5520 ?        S    15:35   0:00 /usr/sbin/apache2 -k start
www-data   596  0.0  1.4  93256  5520 ?        S    15:35   0:00 /usr/sbin/apache2 -k start
www-data   597  0.0  1.4  93256  5520 ?        S    15:35   0:00 /usr/sbin/apache2 -k start
www-data   763  0.0  1.4  93256  5524 ?        S    15:35   0:00 /usr/sbin/apache2 -k start
www-data   764  0.0  1.4  93256  5524 ?        S    15:35   0:00 /usr/sbin/apache2 -k start
www-data   765  0.0  1.4  93256  5524 ?        S    15:35   0:00 /usr/sbin/apache2 -k start
and

Code: Select all

pi@picam1 ~ $ ps uax|grep -i raspimjpeg 
www-data   577  0.0  0.4   3116  1664 ?        S    15:35   0:00 raspimjpeg
But when surfing to 8080 I get the Apache Debian Default page
with "It works" on it. I guess index.html file in /var/www/html should be replaced by another one, where can I find one?

kind regards,
Jens

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

Re: RPi Cam Web Interface

Wed Oct 21, 2015 3:21 pm

jenswaelkens wrote: But when surfing to 8080 I get the Apache Debian Default page
with "It works" on it. I guess index.html file in /var/www/html should be replaced by another one, where can I find one?

kind regards,
Jens
If you are changing port from default 80 to 8080 then that indicates you are trying to change settings via the installer which won't work at the moment.

The only combo that I got to work at the moment with the current installer is to install into subdir html and not change port or security.

The changes don't work because the Apache default files have been changed in Jessie. By using the method above the Apache is left at its normal defaults.

The other mods after install for www-data bash etc are still needed at the moment.

If you still get the default Apache page that might be because it is using index.html rather than index.php as the base page. I might have deleted the index.html on mine. Try that or browse to site/index.php

I think in principle one could make it work with different ports and add security but that would require editing the Apache files by hand. A bit like the earlier days here when the installer didn't support ports / security!!

jenswaelkens
Posts: 12
Joined: Thu Sep 24, 2015 12:33 pm

Re: RPi Cam Web Interface

Wed Oct 21, 2015 4:42 pm

btidey wrote:
jenswaelkens wrote: But when surfing to 8080 I get the Apache Debian Default page
with "It works" on it. I guess index.html file in /var/www/html should be replaced by another one, where can I find one?

kind regards,
Jens
If you are changing port from default 80 to 8080 then that indicates you are trying to change settings via the installer which won't work at the moment.
I don't get it, when installing I'm told I have to change the settings (e.g. change /var/www/ to /var/www/html/), I tried out all combinations with or without changing the port, port 80, port 8080, tried to install with nginx instead of apache, nothing works.
I'm going back to Wheezy.
The only combo that I got to work at the moment with the current installer is to install into subdir html and not change port or security.

The changes don't work because the Apache default files have been changed in Jessie. By using the method above the Apache is left at its normal defaults.

The other mods after install for www-data bash etc are still needed at the moment.
adding index.php doesn't help neither, anyway, I'm going back to Wheezy.

kind regards,
Jens
If you still get the default Apache page that might be because it is using index.html rather than index.php as the base page. I might have deleted the index.html on mine. Try that or browse to site/index.php

I think in principle one could make it work with different ports and add security but that would require editing the Apache files by hand. A bit like the earlier days here when the installer didn't support ports / security!!

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

Re: RPi Cam Web Interface

Thu Oct 22, 2015 11:51 am

RPI Cam Web Interface does not work with Jessie at the moment, do NOT try to install on Jessie

Hopefully this will help people having an issue using Jessie. Maybe this message should be added to the first original post.
3b+, 2b, b+, b, Zero & Zero-W

miraaz
Posts: 34
Joined: Tue May 19, 2015 9:28 am

Re: RPi Cam Web Interface

Thu Oct 22, 2015 8:08 pm

Jessie coming. Please give to me little more time. All what i need is time! Working 14-16h every day!
Directory support already added and today added autostart changes. After merge its live.
Needed work user permissions...
BTW where is my Rasp2 where i can test and develop? :lol:
I cant test right now my changes. So please report if you find something going wrong.
Also if you already have Jessie installed then please report to me /etc/issue content.
Currently i know only how Raspbian looks like but around more Jessie versions...

Code: Select all

Raspbian GNU/Linux 8 \n \l
Webport for Jessie not working right now also.

wiimo
Posts: 3
Joined: Fri Oct 23, 2015 3:08 pm

Re: RPi Cam Web Interface

Fri Oct 23, 2015 3:46 pm

Hi all,

After installation I can see my cam in my browser, but its only updates one time per 40 sec. i am not able to change any settings. if I debug i can see this: Could not open PIPE. And yes, I am a noob. Please see picture
Attachments
Capture.PNG
Could not find pipe
Capture.PNG (38.91 KiB) Viewed 3302 times

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

Re: RPi Cam Web Interface

Fri Oct 23, 2015 5:52 pm

wiimo wrote:Hi all,

After installation I can see my cam in my browser, but its only updates one time per 40 sec. i am not able to change any settings. if I debug i can see this: Could not open PIPE. And yes, I am a noob. Please see picture
I am guessing you have installed that on the Jessie version of Raspbian judging by the fact there are references to the html folder.

The original Raspbian was Wheezy and RPiCam was developed for that. Jessie has changed a few things around and the current installer won't get you a working system at least not without quite a bit of fiddling around after.

I'd recommend starting from the Wheezy version of the OS for the moment whilst we sort out the installer etc. for Jessie.

The error woul also seem to indicate the installer didn't complete properly. If you check in the install folder you should see a pipe 'file' called FIFO and one called FIFO1. If the first doesn't exist then that would explain the error.

Zombievirus
Posts: 19
Joined: Sun Sep 20, 2015 5:44 am

Re: RPi Cam Web Interface

Fri Oct 23, 2015 8:43 pm

Is it normal for the camera led to be on the entire time?

This wasn't the case before i installed the rpi cam web interface.

I tried to use raspivid and it tells me

Code: Select all

mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates
I guess this is because rpi cam web interface locks the camera the entire time.

How can i configure rpi cam web interface to use the camera only when the interface is in use via web??

Thanks.

User avatar
DougieLawson
Posts: 35542
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: RPi Cam Web Interface

Fri Oct 23, 2015 9:46 pm

Zombievirus wrote:Is it normal for the camera led to be on the entire time?
If you haven't disabled it in your /boot/config.txt the LED will lit whenever the camera is active and capturing any image or video.

Code: Select all

disable_camera_led=1
turns it off completely.
Note: Having anything remotely humorous in your signature is completely banned on this forum. Wear a tinfoil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

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

Re: RPi Cam Web Interface

Fri Oct 23, 2015 10:37 pm

Zombievirus wrote:Is it normal for the camera led to be on the entire time?

How can i configure rpi cam web interface to use the camera only when the interface is in use via web??

Thanks.
RPi_Cam_Web is normally used to monitor a location even when nobody is actively watching it via the web. So, for example, if motion detection is used then videos continue to be captured even when no browser is attached.

You can manually turn the camera on and off via the browser. So you can leave it off and then turn it on from the browser as required.

If you want it to automatically turn on only when the browser is active then there is no way to do that at the moment. In principle it could be done by detecting preview requests at the web server and using that to turn the camera on. That would need to be complemented by some time out mechanism at the server that turned the camera off if no preview requests were received for a period. That could be achieved just in the web software but would need to be a bit careful about when using the full mjpeg streaming case. A better method might be to check the regular request for status which is done about every 3 seconds.

miraaz
Posts: 34
Joined: Tue May 19, 2015 9:28 am

Re: RPi Cam Web Interface

Fri Oct 23, 2015 10:58 pm

Ok got it working in JESSIE. And now i already know what needed dodo...
I short it out soon, but today i need to sleep. 2AM already. Little more patience please.

tianheng123
Posts: 13
Joined: Mon Aug 03, 2015 4:14 pm

Re: RPi Cam Web Interface

Sat Oct 24, 2015 12:00 am

Is there anyway to start MJPEG streaming automatically without clicking on browser? :)
I cannot believe I just discover this different streaming mode recently.

Zombievirus
Posts: 19
Joined: Sun Sep 20, 2015 5:44 am

Re: RPi Cam Web Interface

Sat Oct 24, 2015 12:20 am

Hmmm...

Well what i am looking for is a possibility to stream and snap pictures simultaneously. This is the only thing i have seen so far which is capable to do that.

How do i implement this feature on my own webpage. i have a stream running (UV4L). Below the stream i have 2 Buttons. Capture Image and Record Video. i would like the respective things to happen when i click on the buttons. How to do that?

The raspivid and raspistill commands do work but the UV4L Stream stops and resumes again after the picture has been taken or the video has been recorded. But i don't want the Stream to stop. RPi Cam Web Interface does just that.

I am using UV4L because it just activates the camera when the stream is running. As soon as i deactivate the stream by closing the tab or the browser, the camera switches off. This is what i like the most.

There are pros and cons to both softwares. And i wish to combine the pros on my own webpage.

Thank You.

wiimo
Posts: 3
Joined: Fri Oct 23, 2015 3:08 pm

Re: RPi Cam Web Interface

Sat Oct 24, 2015 10:50 am

Hi,

do anyone know where I can get the Sever blaster pi Pan/light kit? the link does not work.

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

Re: RPi Cam Web Interface

Sat Oct 24, 2015 11:04 am

tianheng123 wrote:Is there anyway to start MJPEG streaming automatically without clicking on browser? :)
I cannot believe I just discover this different streaming mode recently.
The stream mode (default-repeating jpeg, or MJPEG) is selected by the button under system on the main page. It is then stored locally in a cookie. So it should be remembered and set back to the last state evry time you start the browser up on that platform.

If you are using multiple browsers then you need to do it once for each browser but then it should be remembered. It was done like this because MJPEG is not necessarily suitable for all browsers.

If this is not working or you then check cookies are enabled.

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

Re: RPi Cam Web Interface

Sat Oct 24, 2015 11:14 am

Zombievirus wrote:Hmmm...

Well what i am looking for is a possibility to stream and snap pictures simultaneously. This is the only thing i have seen so far which is capable to do that.

How do i implement this feature on my own webpage. i have a stream running (UV4L). Below the stream i have 2 Buttons. Capture Image and Record Video. i would like the respective things to happen when i click on the buttons. How to do that?

The raspivid and raspistill commands do work but the UV4L Stream stops and resumes again after the picture has been taken or the video has been recorded. But i don't want the Stream to stop. RPi Cam Web Interface does just that.

I am using UV4L because it just activates the camera when the stream is running. As soon as i deactivate the stream by closing the tab or the browser, the camera switches off. This is what i like the most.

There are pros and cons to both softwares. And i wish to combine the pros on my own webpage.

Thank You.
The capture during video stream works in RPi_Cam because the raspimjpeg core opens up multiple channels to the camera.

You have a number of choices here, but I think you probably want to use the raspimjpeg core to achieve this.

1) Build your own web pages around raspimjpeg and use the camera on and off commands supported by raspimjpeg to turn on and off when the pages are active. The embedding RPi_Cam material on the wiki describes how to get a simple video stream into a browser. You would then need to add buttons to send the still image capture commands in. It would need a similar infrastructure to the RPi_Cam web interface in using the raspijpeg command FIFO

2) If the RPi_Cam interface is OK for your needs but you just want camera on/off automated then I think that can be achieved as described by having an 'Auto' option that then allowed the server to monitor status requests from a browser and use those to turn the camera on and off.

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

Re: RPi Cam Web Interface

Sat Oct 24, 2015 11:32 am

wiimo wrote:Hi,

do anyone know where I can get the Sever blaster pi Pan/light kit? the link does not work.
openelectrons merged with mindsensors. Links on wiki now updated.

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

Re: RPi Cam Web Interface

Sat Oct 24, 2015 8:04 pm

btidey wrote:
Zombievirus wrote:
I am using UV4L because it just activates the camera when the stream is running. As soon as i deactivate the stream by closing the tab or the browser, the camera switches off. This is what i like the most.

There are pros and cons to both softwares. And i wish to combine the pros on my own webpage.

Thank You.
2) If the RPi_Cam interface is OK for your needs but you just want camera on/off automated then I think that can be achieved as described by having an 'Auto' option that then allowed the server to monitor status requests from a browser and use those to turn the camera on and off.
I have made a change to schedule part of RPi_Cam which achieves this.

There is a new setting on Scheduler page called AutoCamera_Interval. If set to 0 (default) then behaviour is as before. If set to a number of seconds (e.g. 20) then it turns on AutoCamera on/off functionality. The number of seconds determines the time when there is no main page actively viewing a preview before the camera turns off. The camera will turn back on shortly after returning to main page. Note that this timeout also applies if switching to one of the other sub-pages like download or schedule itself.

The setting should be left at 0 if you are using the RPi_Cam in its normal role of continuous monitoring independent of browser activity.

Return to “Camera board”