stefan.knight
Posts: 24
Joined: Tue Dec 17, 2013 7:43 pm

Re: RPi Cam Web Interface

Mon Mar 10, 2014 10:05 pm

jarrah31 wrote:I've started up a wiki page on eLinux.org as a possible place to store all the useful bits of code and information found in this thread so that anyone can create an account and add content. Given that there's so much good stuff in here it would take ages to read up on 15 posts to find it so if you think it's a good idea please do contribute:

http://elinux.org/RPi-Cam-Web-Interface
I think this is a great idea. Thank you for doing this.

jonar
Posts: 9
Joined: Tue Mar 04, 2014 1:53 pm

Re: RPi Cam Web Interface

Mon Mar 10, 2014 11:09 pm

Hope it's OK, I've uploaded all the code to GitHub (kept up to date with recent changes also) the tarballs have been extracted so it's the content that is up there.

https://github.com/jfarcher/RPi_Cam_Browser_Control

One thing I've also done is modify the install script to work from a cloned repo, it works for me and I believe it would be easier to bring down or at least check for any updates. And will also allow for easier contribution to the project, for example the guy who created the snazzy bootstrap based interface, by simply forking and if needs push requests.

Hope this is ok with Silvan? I have kept his license/copyright intact.

kyle2k
Posts: 84
Joined: Tue Feb 19, 2013 2:47 pm

Re: RPi Cam Web Interface

Tue Mar 11, 2014 12:49 am

@jarrah31
This is a good idea and I will be sharing my hacks very soon (just html/php templates)

I think it would be a good idea to also link to silvanmelchior's github source code.

Kind regards :D

cica
Posts: 9
Joined: Mon Mar 03, 2014 1:45 am
Location: Boston, MA USA

Re: RPi Cam Web Interface

Tue Mar 11, 2014 12:53 am

I've been following along, but am still having difficulty merging my webpage into this project. Is it possible to add another button that would work with the current framework of index.html to execute a separate script? I think it would be cleaner to pass another parameter with the current ajax implementation rather that trying to add an html webform and add parameters to the url.

Specifically, I'm looking to add a button that would call a bash script or php file to execute some code without disrupting the video. Is this possible?

Thanks,
-Tom

User avatar
mad-hatter
Posts: 419
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside

Re: RPi Cam Web Interface

Tue Mar 11, 2014 12:10 pm

Hello,

I'm having problems getting this program to work.
Win 7 & Firefox or Seamonkey. Once out of 20-30 tries, it worked. Yes, I rebooted several times, also shut down
& removed power several times, even left it off overnight, no luck.
It comes up with the index page, but when I click 'start camera' the button toggles but there is no other response.
I noticed when setting the program up, there was a note about 'raspimjpeg'.

Code: Select all

[email protected] ~/browse_cam $ sudo ./RPi_Cam_Browser_Control_Installer.sh install
raspimjpeg: no process found
Reading package lists... Done
Building dependency tree       
Reading state information... Done
apache2 is already the newest version.
gpac is already the newest version.
libapache2-mod-php5 is already the newest version.
motion is already the newest version.
php5 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I'm running at 1000MHz. with force_turbo=1.
I've reinstalled several times.
Do I need to install the old program 'raspimjpeg'?

Regards

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

External Motion Detection

Tue Mar 11, 2014 2:40 pm

If you have multiple camera attached Raspberry Pis running RPi Cam Web Interface, I've just figured out that you can offload motion detection to a Windows machine using iSpy Connect!

I've been trying to figure out a way to link iSpy with Raspberry Pis for ages because it does a really good job of managing multiple camera sources and analysing them for motion, including sending email/text alerts, recording streams, offloading video to remote storage, linking separate audio feeds to a video (potential audio solution for the RPi Cam Web Interface), and loads more!

The program is Open Source as you can use most of the features on your internal network, but if you need external access such as sending motion alerts to a mobile then a subscription is available for online services.

I first started using iSpy back when it was in beta before the developer started to make a living from it by creating the subscription service, and I had various laptops with USB webcams hooked up around the house, but I haven't had a subscription for a couple of years now because that setup wasn't wife friendly, and to be honest it's quite expensive at $7.95 a month. However just using the non-subscription features should be doable as things like remote viewing of the stream can be done using IP Cam Viewer Pro for example.

Anyway, thanks to a post from Oke, I realised that iSpy can use the continually updated cam.jpg file in ramdisk as the video stream. With my Pi's on wifi (not all that close to the router), I get around 5fps which is plenty for motion detection - I'm sure it would be much higher on ethernet which I'll test later.

Enough waffling, here is how to make it work:

1. Download and install iSpy from http://www.ispyconnect.com/ on a Windows machine.
2. On the Pi, install RPi Cam Web Interface (http://www.raspberrypi.org/phpBB3/viewt ... 43&t=63276) and set the camera to start automatically (no need for motion detection)
3. Enter the following line of code on the Pi (it can be typed anywhere)

Code: Select all

ln -s /run/shm/mjpeg/cam.jpg /var/www/cam.jpg
4. Launch iSpy and click the Add button
5. Choose IP Camera from the drop-down list
6. Select the JPEG URL tab
7. In the JPEG URL box, enter the following along with your Pi's IP:

Code: Select all

http://<your_pi_ip>:<port>/cam.jpg
e.g.

Code: Select all

http://192.168.0.10:80/cam.jpg
8. If you have configured a user/pass as described in this post (http://www.raspberrypi.org/phpBB3/viewt ... 60#p500460), enter them in the relevant user/pass fields.
9. Press Ok.
10. There are now more options and tabs to configure motion detection and alerts, so you're best going to the iSpy Help pages to see what to use.

You should now see your camera on the iSpy interface!

Have fun!

silvanmelchior
Posts: 76
Joined: Mon Nov 25, 2013 5:56 pm

Re: RPi Cam Web Interface

Tue Mar 11, 2014 3:58 pm

@jonar: Thanks for your idea with the github. The problem is that I don't have access to it and to be honest I don't really like it if I have to do a push-request do publish updates for my own project. I hope you understand this. But jarrah31 is creating a wiki at the moment where anyone can publish his own extensions, projects, tutorials or code-changes. As soon as he publishs it, I'm going to add the link to my first post, so please feel free to use and edit the wiki instead of a github where you decide what's part of the project :).

cica
Posts: 9
Joined: Mon Mar 03, 2014 1:45 am
Location: Boston, MA USA

Re: RPi Cam Web Interface

Tue Mar 11, 2014 4:21 pm

Hi-
I had to move this program to port 81 because my ISP blocks port 80. Everything is working except motion detection. I have tried setting netcam_proxy to http://localhost:81 in /etc/motion/motion.conf, and the camera detects motion, but gets hung on "recording video..."

This is what I have in /var/log/user.log:

Code: Select all

Mar 11 12:10:09 raspberrypi motion: [0] Processing thread 0 - config file /etc/motion/motion.conf
Mar 11 12:10:09 raspberrypi motion: [0] Motion 3.2.12 Started
Mar 11 12:10:09 raspberrypi motion: [0] Motion running as daemon process
Mar 11 12:10:09 raspberrypi motion: [0] ffmpeg LIBAVCODEC_BUILD 3482368 LIBAVFORMAT_BUILD 3478785
Mar 11 12:10:09 raspberrypi motion: [0] Thread 1 is from /etc/motion/motion.conf
Mar 11 12:10:09 raspberrypi motion: [1] Thread 1 started
Mar 11 12:10:09 raspberrypi motion: [1] Resizing pre_capture buffer to 1 items
Any help would be greatly appreciated.
Thanks,
-Tom

jonar
Posts: 9
Joined: Tue Mar 04, 2014 1:53 pm

Re: RPi Cam Web Interface

Tue Mar 11, 2014 4:28 pm

Hi Silvan,
I did think of this, it being your project and all... I guess the best way around this would be for you to fork the repository then me delete mine and re-fork yours. That way you would have the master copy and it be I who sends the push requests. Thats if you would like to keep this in GitHub, personally I prefer it but thats my preference.

If you don't want to work in GitHub are you happy with me keeping my repository alive and up to date? it aids with the way I've set my Pi up.

Cudy789
Posts: 30
Joined: Thu Apr 04, 2013 10:16 pm

Re: RPi Cam Web Interface

Wed Mar 12, 2014 1:50 am

Amazing! Just what i have been looking for. May i suggest, when you can switch between video and camera, that instead of recording when motion is detected, for camera, have it be able to take a picture when motion is detected.

Thank you so much!

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

Re: RPi Cam Web Interface

Wed Mar 12, 2014 5:32 am

Cudy789 wrote:Amazing! Just what i have been looking for. May i suggest, when you can switch between video and camera, that instead of recording when motion is detected, for camera, have it be able to take a picture when motion is detected.
You can do that already by configuring "motion" to save the JPEG images without needing to change anything in raspimjpeg or the web interface. Here's how: http://www.raspberrypi.org/forum/viewto ... 75#p491013

Note that this only captures the lower-resolution MJPEG image, not a full 5 Mpixel still image. I don't know how to do a high-res still, that would have to be inside raspimjpeg I think.

silvanmelchior
Posts: 76
Joined: Mon Nov 25, 2013 5:56 pm

Re: RPi Cam Web Interface

Wed Mar 12, 2014 10:29 pm

New update:
- Timelapse possible, continous even if you close the web interface
- New autostart option: start with full sensor area-preview
- Wiki, check out first post

Pangu
Posts: 78
Joined: Tue Dec 18, 2012 5:30 pm

Re: RPi Cam Web Interface

Thu Mar 13, 2014 8:02 am

@silvanmelchior: I have already made some changes manually onto /var/www and my files (according to some improvements of several users on this thread). I am also using nginx as web browser.

Could you tell me which option I have to manually integrate your changes into my existing installation? I am quite sure I cannot just execute your installation script as it certainly will try to install apache2 and will maybe overwrite my index.html, oder index.php, oder index2.html, ....

woodside
Posts: 16
Joined: Mon Oct 22, 2012 7:42 am

Re: RPi Cam Web Interface

Thu Mar 13, 2014 9:48 am

I've tried several times to install RPi Cam Browser and now have the latest version installed. With the exception of 'motion', everything works, including time-lapse. Apart from the standard installation, is there anything I have to do to get motion working - at the moment I am getting 'failed to open camera - check your config and that netcamera is online' in syslog. Do I need to make any changes to motion.conf or rc.local ? I did try removing '-p' in rc.local, but that didn't seem to make any difference.
Many thanks for any help you can give.

jonar
Posts: 9
Joined: Tue Mar 04, 2014 1:53 pm

Re: RPi Cam Web Interface

Thu Mar 13, 2014 10:23 am

@woodside are you following the instructions exactly? did you run the script with the autostart_md option?

Are you trying to start motion yourself? if so, this may be where your problem lies, the web console/script does this for you.

cica
Posts: 9
Joined: Mon Mar 03, 2014 1:45 am
Location: Boston, MA USA

Re: RPi Cam Web Interface

Thu Mar 13, 2014 11:46 am

@Pangu - I ended up switching back to Apache for that very reason. I'm only looking at the web interface as a remote control panel so I'll be the only user, but I too would have liked to have kept nginx.

@woodside - I had the exact same problem about 6 posts back. I originally attributed it to changing the listening port. I'll do a clean reinstall and see if the problem persists on port 80 and report back.

-Tom

woodside
Posts: 16
Joined: Mon Oct 22, 2012 7:42 am

Re: RPi Cam Web Interface

Thu Mar 13, 2014 6:53 pm

Thank you both jonar and cica.
I am starting motion myself by clicking on the button 'motion detection start', which I thought would be Ok with the default installation.

When I installed the current version, I ran ./RPi_Cam_Browser_Control_Installer.sh remove, which I thought would do a complete uninstall, but I am however accessing the interface via port 8080 which makes me think that maybe something was left behind as the standard access seems to be via port 80. I can't now remember how I changed it to port 8080, but I think it was to do with port forwarding.

Probably a complete re install of Rasbian would sort it out, but unfortunately the little tag on the sd card has broken and it's become write only so far as windows is concerned! At the moment I don't have a spare card.

Thanks anyway for your suggestions.

pistoi0
Posts: 9
Joined: Sat Sep 01, 2012 4:50 pm

Re: RPi Cam Web Interface

Thu Mar 13, 2014 7:03 pm

@Mad-Hatter.... I had a similar problem (maybe not the same). I was using NOOBS and @ShortTie suggested using plain vanilla Raspbian. RPi Cam is working brilliantly.

User avatar
mad-hatter
Posts: 419
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside

Re: RPi Cam Web Interface

Thu Mar 13, 2014 7:19 pm

Hello pistoi0,

I did eventually get it all working. Had to play with my router settings.

Regards

cica
Posts: 9
Joined: Mon Mar 03, 2014 1:45 am
Location: Boston, MA USA

Re: RPi Cam Web Interface

Thu Mar 13, 2014 7:25 pm

@pistoi0 - I have been running the plain vanilla version of Raspian. I do believe the change from port 80 to a different port is the reason but I have yet to figure out how to move it off port 80. I have RCN as an ISP and they block port 80 outbound.

silvanmelchior
Posts: 76
Joined: Mon Nov 25, 2013 5:56 pm

Re: RPi Cam Web Interface

Thu Mar 13, 2014 7:53 pm

UPDATE:

Jonar updated the installer so that the files can be hosted on github now, instead of my private server. With the change to github it's easier to update, manage and overview the whole project. Additionally you can fork everything and maybe do a push-request for your changes.

I updated my first post, from now on everything works from github. For all of you who have the "old" interface (still the same, but from my private server), you can change to git with the following steps:

1. Delete the old installer "RPi_Cam_Browser_Control_Installer.sh" from your SD
2. Execute "Step 4" in my first post
3. Restart your Pi

That's all, you have now a cloned repo on your Pi and can experiment with it. Thanks to git, you can merge your personal changes with my updates. The interface itself should be the same.
Last edited by silvanmelchior on Thu Mar 13, 2014 9:26 pm, edited 1 time in total.

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

Re: RPi Cam Web Interface

Thu Mar 13, 2014 8:55 pm

Thanks Silvan!

However I think the Github credit goes to Jonar as it wasn't me who suggested that. :)
Last edited by jarrah31 on Thu Mar 13, 2014 9:42 pm, edited 2 times in total.

silvanmelchior
Posts: 76
Joined: Mon Nov 25, 2013 5:56 pm

Re: RPi Cam Web Interface

Thu Mar 13, 2014 9:27 pm

Of course, I'm sorry Jonar, copied the wrong name, the credit goes of course to you ;)

jonar
Posts: 9
Joined: Tue Mar 04, 2014 1:53 pm

Re: RPi Cam Web Interface

Thu Mar 13, 2014 10:57 pm

Thanks guys! Glad you are happy with the work I did in making it git friendly :)

Hopefully I can contribute some more, have a few ideas to play with so expect some pushes at some point...

ridgelift
Posts: 5
Joined: Sun Dec 23, 2012 9:44 pm

Re: RPi Cam Web Interface

Fri Mar 14, 2014 4:04 am

@silvanmelchior, Thanks for a great program for my raspicam!

I am also very pleased that RPi Cam Web Interface works fine with no conflicts with a stock installation of WebIOPi 0.7 .

I will be interested with some of merged offspring of these two great programs by those with better php and java scripting skills than me!

Return to “Camera board”