User avatar
jbeale
Posts: 3746
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: RPi Cam Web Interface

Mon Feb 23, 2015 4:13 am

Just installed the current code on a Pi 2. All worked OK except motion would continually retrigger even without anything changing. Edited /etc/motion/motion.conf to increase changed pixels threshold from 1500 to 2500 and lightswitch from 0 to 50. Now works ok.

EDIT: to handle the case of actually turning the light switch off in the room, I had to change to lightswitch 100.
Last edited by jbeale on Mon Feb 23, 2015 6:47 pm, edited 1 time in total.

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

Re: RPi Cam Web Interface

Mon Feb 23, 2015 9:14 am

ianj wrote:
btidey wrote:
Interesting tests, thanks for the help. Everything worked up to this part that I quoted. As suspected, motion isn't (for some reason) being detected. The file never gets created.
Just checking. Did the test on browsing to cam_pic.php also work OK?

metal-acido
Posts: 1
Joined: Mon Feb 23, 2015 11:23 am

Re: RPi Cam Web Interface

Mon Feb 23, 2015 11:29 am

Dear Friend

Your proyect is awesome, i understand the way to start timelapse from terminal linux echo for example"tl 1" but i need take a 2 samples per second is possible make this.

thanks for your hel in advance :mrgreen:

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

Re: RPi Cam Web Interface

Mon Feb 23, 2015 12:39 pm

metal-acido wrote: i understand the way to start timelapse from terminal linux echo for example"tl 1" but i need take a 2 samples per second is possible make this.
You can set the delay between time lapse recordings using the settings on the web browser (Time lapse interval). Internally this is converted into 0.1 second units. You can also set this via the command line by sending in 'tl n' where n is number of 0.1 sec units.

So tl 1 should be setting 0.1 as the delay (10 per second). However, I think that is a lot faster than this interface to the camera can take successive still recordings. I get about a max of about 1.5 still images per second.

It may be possible to do the equivalent by taking a video with much slower frame rate (fps).

You can adjust that in the web settings or use the px command

so 'px 1920 1080 01 30 2592 1944' which is equivalent of Std FOV x30 is recording at 1 fps but then encoding the video at 30 fps to give a x30 speed up. Putting in 02 instead of 01 would give 2 frames per second recording.

rahlquist
Posts: 149
Joined: Tue Jan 21, 2014 1:02 pm

Re: RPi Cam Web Interface

Mon Feb 23, 2015 12:51 pm

piecam wrote: I was just wondering whether it would be a good idea that you guys can consider. That is to have some coordinated effort with MotionPie developer, MiniBian developer, then, work out a best of all system.

In my opinion, it would be either with motionpie's system+yours or minibian+yours+motionpies. The GUi and light web interface from motionpie is pretty good.
Thats the beauty of open source, if anyone wants to work from someone the code someone else create they can. Though I don't see any real benefit from a merger of the two from a functionality standpoint.

bax5000
Posts: 2
Joined: Mon Feb 23, 2015 4:51 pm

Re: RPi Cam Web Interface

Mon Feb 23, 2015 5:00 pm

Hi!

First thing: sorry for my english!! it's not my native language.
I installed everything as discribed in the Wiki ( http://elinux.org/RPi-Cam-Web-Interface ... d_Pi-Light ).

My problem is pilight.
when i install it with

Code: Select all

sudo ./install-pilight.bash
i get this:

Code: Select all

...
i2c-tools (3.1.0-2) wird eingerichtet ...
/run/udev or .udevdb or .udev presence implies active udev.  Aborting MAKEDEV invocation.
python-smbus (3.1.0-2) wird eingerichtet ...
sed: kann /etc/modprobe.d/raspi-blacklist.conf nicht lesen: Datei oder Verzeichnis nicht gefunden
-----------------------------
Pi-Light Install completed
-----------------------------
this means the script can't find /etc/modprobe.de/raspi-blacklist.conf.

the python-script to test pilight gives me this:

Code: Select all

root@picam:/home/pi/pi-pan# python ./check-pilight.py
Check that Pi-Light is working correctly
Traceback (most recent call last):
  File "./check-pilight.py", line 32, in <module>
    pl = pilight.PILIGHT()
  File "/home/pi/pi-pan/pilight.py", line 61, in __init__
    OpenElectrons_i2c.__init__(self, pilight_address >> 1)
  File "/home/pi/pi-pan/OpenElectrons_i2c.py", line 54, in __init__
    self.bus = smbus.SMBus(b)
IOError: [Errno 2] No such file or directory
root@picam:/home/pi/pi-pan#
What's wrong here? Some time ago i installed everything without problems and pi-pan and pi-light had worked.

Thx for any help!

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

Re: RPi Cam Web Interface

Mon Feb 23, 2015 8:03 pm

btidey wrote:
ianj wrote:
btidey wrote:
Interesting tests, thanks for the help. Everything worked up to this part that I quoted. As suspected, motion isn't (for some reason) being detected. The file never gets created.
Just checking. Did the test on browsing to cam_pic.php also work OK?
Yeah, without problems. I'm also able to take pictures and record video manually, both work. It's a bit weird, as I've used this a few versions ago on my previous Pi model B, and didn't have this much trouble.

Suppose I could wipe the card and do a fresh Raspbian install :(

user879
Posts: 32
Joined: Mon Sep 01, 2014 5:16 pm

Re: RPi Cam Web Interface

Mon Feb 23, 2015 8:32 pm

bax5000 wrote:Hi!

First thing: sorry for my english!! it's not my native language.
I installed everything as discribed in the Wiki ( http://elinux.org/RPi-Cam-Web-Interface ... d_Pi-Light ).

My problem is pilight.
when i install it with

Code: Select all

sudo ./install-pilight.bash
i get this:

Code: Select all

...
i2c-tools (3.1.0-2) wird eingerichtet ...
/run/udev or .udevdb or .udev presence implies active udev.  Aborting MAKEDEV invocation.
python-smbus (3.1.0-2) wird eingerichtet ...
sed: kann /etc/modprobe.d/raspi-blacklist.conf nicht lesen: Datei oder Verzeichnis nicht gefunden
-----------------------------
Pi-Light Install completed
-----------------------------
this means the script can't find /etc/modprobe.de/raspi-blacklist.conf.

the python-script to test pilight gives me this:

Code: Select all

root@picam:/home/pi/pi-pan# python ./check-pilight.py
Check that Pi-Light is working correctly
Traceback (most recent call last):
  File "./check-pilight.py", line 32, in <module>
    pl = pilight.PILIGHT()
  File "/home/pi/pi-pan/pilight.py", line 61, in __init__
    OpenElectrons_i2c.__init__(self, pilight_address >> 1)
  File "/home/pi/pi-pan/OpenElectrons_i2c.py", line 54, in __init__
    self.bus = smbus.SMBus(b)
IOError: [Errno 2] No such file or directory
root@picam:/home/pi/pi-pan#
What's wrong here? Some time ago i installed everything without problems and pi-pan and pi-light had worked.

Thx for any help!
Do you also have pi-pan and is it working?
There is a thread dedicated to pi-pan and pilight problems here: http://www.raspberrypi.org/forums/viewt ... 43&t=99662
Success is going from failure to failure without loss of enthusiasm - Winston Churchill

jeromec
Posts: 130
Joined: Sun Apr 14, 2013 5:14 pm

Re: RPi Cam Web Interface

Mon Feb 23, 2015 10:31 pm

hello
thank you for this great tutorial
I'm encoutering some problems
I've followed page 1 and page 14 , to install it on my ngix server
i have index.php nearly working except for the images
i can see the different icons, i can reboot or shutdown
But I have no images at the top of my webpage
but i haven't managed to record an image
when i use raspistill , i can

do you have an idea ?
maybe i did something wrong
i would like to restart from scratch , i don't know how to desinstall it

thank you
http://meteovictorhugo.ddns.net:1800/demo/

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

Re: RPi Cam Web Interface

Mon Feb 23, 2015 11:16 pm

jeromec wrote: i would like to restart from scratch , i don't know how to desinstall it

thank you
You can uninstall by running the script again with remove on the end

Code: Select all

./RPi_Cam_Web_Interface_Installer.sh remove

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

Re: RPi Cam Web Interface

Mon Feb 23, 2015 11:24 pm

I've been doing a bit of work to allow access to the motion.conf settings from the web interface instead of having to text edit the /etc/motion/motion.conf

An initial version is on my fork at https://github.com/roberttidey/RPi_Cam_Web_Interface

The index.php just has an extra button added and most of the work is in a new file motion.php. A couple of changes are also needed in motion.conf to get it working.

Code: Select all

control_port 6642
control_html_output off
As this is new I'd recommend taking a backup of your existing motion.conf file first.

It presents a filtered list of the more interesting values but the full list may also be shown. Values may then be edited and committed with the save button. Note motion detection must be running for this to work as it uses an API provided by the running motion process.
Attachments
motion2.jpg
motion2.jpg (49.05 KiB) Viewed 4302 times
motion1.jpg
motion1.jpg (9.88 KiB) Viewed 4302 times

bax5000
Posts: 2
Joined: Mon Feb 23, 2015 4:51 pm

Re: RPi Cam Web Interface

Tue Feb 24, 2015 7:17 am

Do you also have pi-pan and is it working?
There is a thread dedicated to pi-pan and pilight problems here: http://www.raspberrypi.org/forums/viewt ... 43&t=99662
Yes, pipan is running. Yesterday i installed the wheezy-image from openelectron with pipan and pilight preinstalled.
After install everythings is working. After "apt-get update" and "apt-get dist-upgrade" i get these errors again.

Thanks for the link! I will check it....

ragefan
Posts: 3
Joined: Tue Feb 24, 2015 9:07 pm

Re: RPi Cam Web Interface

Tue Feb 24, 2015 9:09 pm

Hi,
This project a really a good job !

I just commit a fix where motion was not stopping when stop command was triggered
will submit a push request (my first one !)
:)
Last edited by ragefan on Tue Feb 24, 2015 9:46 pm, edited 1 time in total.

jeromec
Posts: 130
Joined: Sun Apr 14, 2013 5:14 pm

Re: RPi Cam Web Interface

Tue Feb 24, 2015 9:21 pm

hello
i've tried to start it from scratch , and it's not working
that's what i get, i use nginx

Image


in var/www, i have this
Image

and in home/pi, where i install the git i have this
Image

is it normal ?

do you have an idea on how to make it works or where i made a mistakes ?

thank you

jerome
Attachments
homepi.PNG
homepi.PNG (11.47 KiB) Viewed 4156 times
Capture.PNG
Capture.PNG (14.93 KiB) Viewed 4156 times
var-www.PNG
var-www.PNG (16.92 KiB) Viewed 4156 times
http://meteovictorhugo.ddns.net:1800/demo/

ragefan
Posts: 3
Joined: Tue Feb 24, 2015 9:07 pm

Re: RPi Cam Web Interface

Tue Feb 24, 2015 9:45 pm

Hello

I just submitted a small push request to have a "clean" stop (see previous post).

Ragefan

ragefan
Posts: 3
Joined: Tue Feb 24, 2015 9:07 pm

Re: RPi Cam Web Interface

Tue Feb 24, 2015 9:51 pm

Hi,

I have got on question here :

Do you know why pre_capture and post_capture (motion options) are not taken into account when motion_capture is on ?
I only get one capture when motion is detected with the option "output_normal first"

Thx !

NeXCtP
Posts: 4
Joined: Sat Feb 14, 2015 6:47 pm

Re: RPi Cam Web Interface

Wed Feb 25, 2015 9:38 am

Hi.

Is it possible to specify another location for time-lapse images only?

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

Re: RPi Cam Web Interface

Wed Feb 25, 2015 12:32 pm

jeromec wrote:hello
i've tried to start it from scratch , and it's not working
that's what i get, i use nginx
Couple of things.

There is a load of stuff in /var/www that has nothing to do with the camera set up. Do you have some other site in there? It may be conflicting.

Your main screen shot shows the button but not the live picture instead there is the missing image indicator. This is filled in normally by a regular access to cam_pic.php so you could try browsing to http://cameraip/cam_pic.php You should get back a single image frame. If you don't get this then look in /dev/shm/mjpeg You should see a cam.jpg If that is not there then I would suspect the raspimjpeg process is not running for some reason. ps -A should show it in the list. If not there then maybe try starting it manually first.

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

Re: RPi Cam Web Interface

Wed Feb 25, 2015 12:38 pm

ragefan wrote:Hi,

I have got on question here :

Do you know why pre_capture and post_capture (motion options) are not taken into account when motion_capture is on ?
I only get one capture when motion is detected with the option "output_normal first"

Thx !
The pre and post capture options apply only when motion is doing the recording itself from a live video stream. That doesn't apply here. Motion is just analysing a stream of images mjpegs and then sending triggers back to raspimjpeg when it has detected movement. raspimjpeg then starts a real recording.

output_normal does just 1 image. It is intended to give a thumbnail/preview to be accompany the recording. I use that in my enhanced preview.php to thumbnail all recordings up.

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

Re: RPi Cam Web Interface

Wed Feb 25, 2015 12:52 pm

NeXCtP wrote:Hi.

Is it possible to specify another location for time-lapse images only?
The raspimjpeg main config file /etc/raspimjpeg has separate storage path settings for image and video. The raspimjpeg would need to be stopped and restarted for any change to take effect. The image path would apply to all image recordings both manual and time lapse.

However, I haven't tried this and I think it will break some aspects of the web site which expect everything in the media folder. It would certainly break my preview.php enhancements at the moment.

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

Re: RPi Cam Web Interface

Wed Feb 25, 2015 3:13 pm

HI Jbeale and all experts on this forum,

I have put a 4 my Pi B+ with motionpie (1 with Pi IR cam, 1 with Pi NoIR, 1 with Pi noIR+usb 9000, 1 with Pi noIR + usb c270). I have another Pi B+ with Pi NoIR cam running on Minibian+Pi Web Interface.

I'd like seek your help providing some recommendations or sample configurations for the following,
1. I would like to set up a motion detection surveillance like what Motionpie is current doing; however, with improvement of frame rate and image quality (big resolution). When it's started up, it's in motion detection mode.
2. Can you share your fine tuned motion configure that detects "human figure" size motion movement and save it as high resolution image?
3. Can I set up a network share like motionpie does, to put these "stills" directly on CIFS share?
4. I am thinking about add "motioneye" on top of this Rpi web interface. I was wondering whether you have tried this. It feels that "motioneye" is nice that integrates with "motion". In this scenario, RPI web interface feeds image to "motion" and "motion" interacts/controlled/configured. by "motioneye"

Do we have a central wiki place that you guys may have these info up already? tks

thanks in advance.

jeromec
Posts: 130
Joined: Sun Apr 14, 2013 5:14 pm

Re: RPi Cam Web Interface

Wed Feb 25, 2015 4:01 pm

btidey wrote:
jeromec wrote:hello
i've tried to start it from scratch , and it's not working
that's what i get, i use nginx
Couple of things.

There is a load of stuff in /var/www that has nothing to do with the camera set up. Do you have some other site in there? It may be conflicting.

Your main screen shot shows the button but not the live picture instead there is the missing image indicator. This is filled in normally by a regular access to cam_pic.php so you could try browsing to http://cameraip/cam_pic.php You should get back a single image frame. If you don't get this then look in /dev/shm/mjpeg You should see a cam.jpg If that is not there then I would suspect the raspimjpeg process is not running for some reason. ps -A should show it in the list. If not there then maybe try starting it manually first.
Thank you for your answer!
I have another site running with nginx listening on port 80 too. Can it be the problem?

How can I restart raspimjepg manually?

Thank you in advance?
http://meteovictorhugo.ddns.net:1800/demo/

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

Re: RPi Cam Web Interface

Wed Feb 25, 2015 4:59 pm

jeromec wrote:
Thank you for your answer!
I have another site running with nginx listening on port 80 too. Can it be the problem?

How can I restart raspimjepg manually?

Thank you in advance?
You can't normally have two web sites on the same port at the same host . You would normally give them different port numbers; one can stay at 80. So for example if you could the camera to port 9000 and then access it as http://cameraip:9000 To do this you need to change the apache2 and the motion.conf to use the selected port. Look on the wiki for a post on how to do that.

If both 'web sites' were under the same web host, i.e. both under Apache then you could sort of address the two parts by browsing to the explicit 'home page' like http://cameraip/index.php but you would have to be careful that no web pages clashed at all. If you are running two web host servers then they will fight over the same port number and all bets are off.

To run raspimjpeg then just type that at the command line.

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

Re: RPi Cam Web Interface

Wed Feb 25, 2015 8:23 pm

Just following up on my original problem... I've since formatted the MicroSD card, reinstalled Raspbian (not NOOBS) and started fresh with only the 3 update steps (update, dist-upgrade and rpi-update) on a Raspi2.

Motion detection doesn't work at the default settings with the interface. I'm lost at this point, as if it doesn't work with a brand new install, I don't know where to begin troubleshooting. :cry:
ianj wrote:
btidey wrote: Just checking. Did the test on browsing to cam_pic.php also work OK?
Yeah, without problems. I'm also able to take pictures and record video manually, both work. It's a bit weird, as I've used this a few versions ago on my previous Pi model B, and didn't have this much trouble.

Suppose I could wipe the card and do a fresh Raspbian install :(

scanner
Posts: 15
Joined: Tue Dec 23, 2014 4:25 pm

Re: RPi Cam Web Interface

Wed Feb 25, 2015 9:11 pm

I have a small problem with the settings page of the web interface,
I cannot replace or overwrite any numbers set in the fields especially the time laps. I want to set it to one pic every 60 seconds by cannot replace the 3.

Return to “Camera board”