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

Re: RPi Cam Web Interface

Tue Feb 17, 2015 1:52 pm

btidey wrote:
2) Now turn on motion detection from the web interface. Doing a second ps -A in the terminal window and you should now see motion in the list probably near the bottom. You can repeat turning detection on and off and motion should only be in the list with detection on. This proves that motion is being started and stopped OK by the camera interface.

.
no motion process is showing when the start motion button is pressed.
my setup is as follows, perhaps i'm missing something

Step 1: Install Noobs Raspbian and enable camera
Step 3:install apache
Sudo apt-get install apache2 -y

Step 4: Update your RPi with the following commands:
sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update

Step 5 Install Motion
Sudo Apt-get install motion
Sudo apt-get install libjpeg62


Step 6: Install Web Cam interface:
git clone https://github.com/silvanmelchior/RPi_C ... erface.git
cd RPi_Cam_Web_Interface
chmod u+x RPi_Cam_Web_Interface_Installer.sh
./RPi_Cam_Web_Interface_Installer.sh install

Reboot.

Step 7 Edit and change the following files:

Sudo nano /etc/default/motion
Change line to read
Start_motion_daemon=yes

Sudo nano /etc/motion/motion.conf

daemon on
logfile /tmp/motion.log
width 1280
height 720
framerate 2
;netcam_url http://127.0.0.1/cgi-bin/raspicam.sh (this url seems to be excluded from running with the ; prefix)
ffmpeg_video_codec msmpeg4
stream_localhost off
stream_auth_method 0

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

Re: RPi Cam Web Interface

Tue Feb 17, 2015 3:25 pm

I found the solution to my motion detection problm.
I have been having problems with the wlan0 adapter disappearing from the wpa_gui and not connecting.
I decided to restart from scratch and reinstall Noobs, this time working on the Lan. I tidied up my install procedure and came up with the one below. I found the motion detection worked from the get go, I then got to work on the wifi solution, A solution I found was to edit network/interfaces and replace auto lo with auto wlan0. As soon as I changed the auto lo to auto wlan0 in the interfaces and rebooted, the wifi worked but the motion stopped working. Reverting the interface setting back got the motion to work again. I then added the auto lo entry to be included with auto wlan0
Problem solved

Thanks for helping in the interim

Step 1: Install Raspbian on your Rpi and enable camera
Step 2: Update your RPi with the following commands:
sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update

Step 3:install apache
Sudo apt-get install apache2 -y

Step 4Install Motion
Sudo Apt-get install motion


Step 5: Install Web Cam interface:
git clone https://github.com/silvanmelchior/RPi_C ... erface.git
cd RPi_Cam_Web_Interface
chmod u+x RPi_Cam_Web_Interface_Installer.sh
./RPi_Cam_Web_Interface_Installer.sh install

Step 6: Disable the camera LED
sudo nano /boot/config.txt
Add the following line at the end of the script
disable_camera_led=1


REBOOT

ludespeedny
Posts: 103
Joined: Mon Oct 01, 2012 6:55 pm

Re: RPi Cam Web Interface

Tue Feb 17, 2015 3:32 pm

Here is my network config and works with wired or wireless and hotplugging. I can provide the wpa_supplicant.conf settings if you want to know how that is set up:

auto lo

iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
post-up ifdown eth0
iface default inet dhcp

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

Re: RPi Cam Web Interface

Tue Feb 17, 2015 4:03 pm

ludespeedny wrote:Here is my network config and works with wired or wireless and hotplugging. I can provide the wpa_supplicant.conf settings if you want to know how that is set up:

auto lo

iface lo inet loopback
with it set like that the motion detection worked but then every so often my wlan0 adapter would not appear in the wpa_gui and also not connect to the wifi.
I had to include auto wlan0 this allowed both the wifi to always connect and motion detection to work,

auto wlan0
auto lo

iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

If you can provide me with supplicant.conf settings, maybe it is a better solution

.

old man noob
Posts: 2
Joined: Sun Jan 11, 2015 7:06 am

Re: RPi Cam Web Interface

Tue Feb 17, 2015 6:45 pm

Roddy after you install the pi light bash in the same directory as all your other pi-pan software you have to reboot your pi.

cd pi-pan (or what ever directory you installed your pi-pan software in)
sudo ./install-pilight.bash
sudo shutdown -r now

ludespeedny
Posts: 103
Joined: Mon Oct 01, 2012 6:55 pm

Re: RPi Cam Web Interface

Tue Feb 17, 2015 6:54 pm

scanner wrote:
ludespeedny wrote:Here is my network config and works with wired or wireless and hotplugging. I can provide the wpa_supplicant.conf settings if you want to know how that is set up:

auto lo

iface lo inet loopback
with it set like that the motion detection worked but then every so often my wlan0 adapter would not appear in the wpa_gui and also not connect to the wifi.
I had to include auto wlan0 this allowed both the wifi to always connect and motion detection to work,

auto wlan0
auto lo

iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

If you can provide me with supplicant.conf settings, maybe it is a better solution

.
Here is mine with my ssid and psk removed:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
ssid="Network ID"
psk="password"
id_str="Name Your Network"
}

plasma69
Posts: 5
Joined: Tue Feb 17, 2015 9:11 pm

Re: RPi Cam Web Interface

Tue Feb 17, 2015 9:15 pm

Is it possible to use RPi Cam Web Interface with a USB camera?

Sorry if its a noob question!

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

Re: RPi Cam Web Interface

Tue Feb 17, 2015 11:04 pm

Added a Get Zip button onto preview. This now downloads 1 zip containing all selected recordings. The preview.php now contains all the download functionality and download.php is not used.

Updated code is at https://github.com/roberttidey/RaspiCam

I'll check on a pull request but I think I'll have to properly fork the whole original, as up to now I've just been locally editing the preview.php
Attachments
preview3.jpg
preview3.jpg (38.41 KiB) Viewed 4657 times

Kanga-Who
Posts: 4
Joined: Thu Feb 12, 2015 3:15 am

Re: RPi Cam Web Interface

Wed Feb 18, 2015 2:38 am

Mettauk wrote:
Kanga-Who wrote: Also, I use the 'myipaddress:port/clean.php' and it works on my B+, but the same address on the B2 does not work, is there a work around for this? Loving the B2 so far!
Not sure clean.php exists any more but look at
http://elinux.org/RPi-Cam-Web-Interface ... n_homepage
You can create your own!
Thanks for the reply, I have read this a few time, and I have no idea :(

I am a total nOOb when it comes to Linux, so I have no idea how to make this work. Essentially, all I would like to do is be able to view my cam, in a browser, using the /clean.php extension like previously worked.

I have looked through the files on my B+ and can not find a "clean.php" file to be able to copy to my B2. Any help with this would be appreciated.

Kanga-Who
Posts: 4
Joined: Thu Feb 12, 2015 3:15 am

Re: RPi Cam Web Interface

Wed Feb 18, 2015 4:10 am

Kanga-Who wrote:
Mettauk wrote:
Kanga-Who wrote: Also, I use the 'myipaddress:port/clean.php' and it works on my B+, but the same address on the B2 does not work, is there a work around for this? Loving the B2 so far!
Not sure clean.php exists any more but look at
http://elinux.org/RPi-Cam-Web-Interface ... n_homepage
You can create your own!
Thanks for the reply, I have read this a few time, and I have no idea :(

I am a total nOOb when it comes to Linux, so I have no idea how to make this work. Essentially, all I would like to do is be able to view my cam, in a browser, using the /clean.php extension like previously worked.

I have looked through the files on my B+ and can not find a "clean.php" file to be able to copy to my B2. Any help with this would be appreciated.
Figured out my own problem!

I found that the only difference between the B+ and B2's files in /var/www/ were "clean.php" & "script_min.js". Obviously these files were written from a previous version of RPI_Cam, so were still in the /var/www/ directory.

Copied them from B+ to the B2, rebooted and worked like a charm! If anyone would like these files, they are attached to DL.
Attachments
Missing Files.zip
(760 Bytes) Downloaded 82 times

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

Re: RPi Cam Web Interface

Wed Feb 18, 2015 12:48 pm

Couple more adjustments to my preview.php mods.

Allows display size of preview and thumbnail to be set. This is cookie based so should be adjustable from
different devices.

Moved buttons around a bit so less space taken up and no scroll needed to get to them.
Attachments
preview4.jpg
preview4.jpg (22.82 KiB) Viewed 4571 times

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

Re: RPi Cam Web Interface

Wed Feb 18, 2015 1:24 pm

Just when I thought I had it all sussed out
the rpi webcam is always detecting motion even though the /etc/raspimjpeg has motion_detection false
when motion is detected the record button on the webpage indicates activity and then stops once it stops detecting.
if I press stop recording it stops but then starts again on motion detection
Any suggestions on where to resolve this

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

Re: RPi Cam Web Interface

Wed Feb 18, 2015 1:32 pm

You probably still have a copy of motion running. raspimjpeg starts one when motion start is pressed and kills it when stopped.

If notion is still running then it will still issue video capture commands which raspimjpeg will obey.

Check in a terminal and issue sudo killall motion to make sure it is dead. Then try starting and stopping from the web and make sure it starts up and closes down.

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

Re: RPi Cam Web Interface

Wed Feb 18, 2015 1:58 pm

Hi btidey,

What files need updating to get your latest preview page into my RPi Cam Web Interface?
btidey wrote:Couple more adjustments to my preview.php mods.

Allows display size of preview and thumbnail to be set. This is cookie based so should be adjustable from
different devices.

Moved buttons around a bit so less space taken up and no scroll needed to get to them.
3b+, 2b, b+, b, Zero & Zero-W

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

Re: RPi Cam Web Interface

Wed Feb 18, 2015 2:02 pm

btidey wrote:You probably still have a copy of motion running. raspimjpeg starts one when motion start is pressed and kills it when stopped.

If notion is still running then it will still issue video capture commands which raspimjpeg will obey.

Check in a terminal and issue sudo killall motion to make sure it is dead. Then try starting and stopping from the web and make sure it starts up and closes down.
Thanks that worked.
how do stop other copies of motion from running or find the one causing the issue.
if I reboot i'm back to continuous motion

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

Re: RPi Cam Web Interface

Wed Feb 18, 2015 4:37 pm

Gary Littlemore wrote:Hi btidey,

What files need updating to get your latest preview page into my RPi Cam Web Interface?
In the /var/www folder the preview.php needs to be replaced and 2 icon files added. These 3 files are under the www folder on the github link.

Easiest procedure is to
Download zip from github link and extract the 3 files from the www folder. Then sudo cp them into /var/www. You don't need to restart anything, any changes take immediate effect next time you access the preview page.

E.g. from home folder

Code: Select all

wget https://github.com/roberttidey/RaspiCam/archive/master.zip -O master.zip
unzip master.zip
cd RaspiCam-master/www
sudo cp * /var/www/
Last edited by btidey on Wed Feb 18, 2015 5:01 pm, edited 1 time in total.

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

Re: RPi Cam Web Interface

Wed Feb 18, 2015 4:46 pm

scanner wrote: how do stop other copies of motion from running or find the one causing the issue.
if I reboot i'm back to continuous motion
Sounds to me you have somehow installed motion so that it starts by itself on boot. You should not normally install motion separately. The RaspiCam Installer script puts it in and then only starts and stops motion as needed.

There are several different ways this might have been done. Any idea which one was used?

When you have it sorted and if you want motion detection scheduled automatically then check out the python helper program which is also on that github.

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

Re: RPi Cam Web Interface

Wed Feb 18, 2015 5:16 pm

btidey wrote:
scanner wrote:

There are several different ways this might have been done. Any idea which one was used?

When you have it sorted and if you want motion detection scheduled automatically then check out the python helper program which is also on that github.
this was my procedure
do you suggest removing motion or starting with clean install, I'm no expert on RPi
Thanks

Step 1: Install Raspbian on your Rpi and enable camera
Step 2: Update your RPi with the following commands:
sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update

Step 3:install apache
Sudo apt-get install apache2 -y

Step 4Install Motion
Sudo Apt-get install motion


Step 5: Install Web Cam interface:
git clone https://github.com/silvanmelchior/RPi_C ... erface.git
cd RPi_Cam_Web_Interface
chmod u+x RPi_Cam_Web_Interface_Installer.sh
./RPi_Cam_Web_Interface_Installer.sh install

Step 6: Disable the camera LED
sudo nano /boot/config.txt
Add the following line at the end of the script
disable_camera_led=1


REBOOT

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

Re: RPi Cam Web Interface

Wed Feb 18, 2015 6:16 pm

Steps 3 and 4 are redundant because they are done by the script in step 5. I think the idea is that apart form the initial update the script does everything you need.

However, it shouldn't have mattered if motion and apache2 were already installed. So I can't see that would have triggerred motion to start up by itself.

There is a command switch option on raspimjpeg itself to default into motion_detection but that is not the default mode.

I think before trying to get too deep into the diagnosis, I would do the following

1) Run the script ./RPi_Cam_Web_Interface_Installer.sh remove
This will uninstall everything including Apache2 and motion

2) Reboot and check motion is not running as a process

3) Rerun the script with install to re-install everything by itself.

4) Reboot and check

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

Re: RPi Cam Web Interface

Wed Feb 18, 2015 7:28 pm

I've moved my web preview changes into a proper fork of the original.

https://github.com/roberttidey/RPi_Cam_Web_Interface

That contains everything and any further changes will be made there. If it proves OK then I'll do a pull request to see how that goes.

I have removed the web parts from the other github https://github.com/roberttidey/RaspiCam which still has the python helper for automation of camera configuration.

Putting in the new preview should now be the same process as a normal update or the zip can be retrieved as before and the 3 files copied into /var/www. The modified version has the motion.config changes to optimise thumbnail generation for motion detected captures. If the 3 files are just replaced then the existing motion.conf needs to be edited as explained in the README to avoid the thumbnail generation delay on these files.

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

Re: RPi Cam Web Interface

Thu Feb 19, 2015 9:57 am

btidey wrote:Steps 3 and 4 are redundant because they are done by the script in step 5. I think the idea is that apart form the initial update the script does everything you need.

1) Run the script ./RPi_Cam_Web_Interface_Installer.sh remove
This will uninstall everything including Apache2 and motion

2) Reboot and check motion is not running as a process

3) Rerun the script with install to re-install everything by itself.

4) Reboot and check
Thanks a lot for that It works as it should. I guess when I installed it for the first time and no web page worked I assumed apache wasn't installed and then trying to get it to work by mixing the old and new method didn't help either.
Now to start working on getting this to work on another RPi using a USB cam

plasma69
Posts: 5
Joined: Tue Feb 17, 2015 9:11 pm

Re: RPi Cam Web Interface

Thu Feb 19, 2015 2:02 pm

Could anyone tell me please how to make this excellent software work with a USB camera. I need to place a camera away from the Rpi and a usb camera is the only option. If it can, where are the modifications done.

Thank You

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

Re: RPi Cam Web Interface

Thu Feb 19, 2015 2:20 pm

plasma69 wrote:Is it possible to use RPi Cam Web Interface with a USB camera?

Sorry if its a noob question!
plasma69 wrote:Could anyone tell me please how to make this excellent software work with a USB camera. I need to place a camera away from the Rpi and a usb camera is the only option. If it can, where are the modifications done.

Thank You
A USB web cam doesn't work with this interface, it's only the RPi Camera.
3b+, 2b, b+, b, Zero & Zero-W

plasma69
Posts: 5
Joined: Tue Feb 17, 2015 9:11 pm

Re: RPi Cam Web Interface

Thu Feb 19, 2015 3:40 pm

Thank you Gary for your answer. I do realize that this interface doesn't work with a USB camera, thus the reason for my question. I was wondering if its a matter of changing some configurations within the code, or its more complicated or not possible to do it.

Thanks

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

Re: RPi Cam Web Interface

Thu Feb 19, 2015 4:03 pm

plasma69 wrote:Thank you Gary for your answer. I do realize that this interface doesn't work with a USB camera, thus the reason for my question. I was wondering if its a matter of changing some configurations within the code, or its more complicated or not possible to do it.

Thanks
I was looking at the same thing as I have two other RPi's I want to run with USP webcam, I came across this site where a webcam was used with motion and the default motion.conf file. http://www.instructables.com/id/Raspber ... /?ALLSTEPS
I then found a default motion.conf file here, http://marc.merlins.org/linux/motion.conf which references the webcam, perhaps there is a way to integrate the two files, I have no idea how (just stabbing in the dark),

Return to “Camera board”