Hodofca
Posts: 7
Joined: Fri Oct 18, 2013 8:23 am

Re: RPi Cam Web Interface

Mon Feb 03, 2014 10:21 pm

Just installed it but i have one problem.
first i set it not to run at startup and rebooted.
Now when i start it manually i got:

Code: Select all

[email protected] ~ $ ./RPi_Cam_Browser_Control_Installer.sh start
Started
[email protected] ~ $ Error: Could not open/create status-file
Installed it outside any folder. Now i gave full permissions but nothing changed.
Using Raspbian 3.10.28+
Whats wrong?

apple1554
Posts: 8
Joined: Fri Jan 03, 2014 2:49 pm

Re: RPi Cam Web Interface

Tue Feb 04, 2014 12:35 am

samir_sogay wrote:For those folks living in the countries with power lines at 50hz, you can use the below mentioned raspimjpeg which shoots videos at 25 fps rather than the default 30 fps. Also, following is the video which demonstrates the effects of line frequency on video, shooting at 30 fps in fluorescent light driven by 50Hz line causes moving bands on the video.

https://dl.dropboxusercontent.com/u/92299797/raspimjpeg
http://www.youtube.com/watch?v=wa7UG4EAZNA
How do i replace the old one with this?

tigroz
Posts: 7
Joined: Fri Jan 31, 2014 4:26 pm

Re: RPi Cam Web Interface

Tue Feb 04, 2014 9:44 am

apple1554 wrote:
samir_sogay wrote:For those folks living in the countries with power lines at 50hz, you can use the below mentioned raspimjpeg which shoots videos at 25 fps rather than the default 30 fps. Also, following is the video which demonstrates the effects of line frequency on video, shooting at 30 fps in fluorescent light driven by 50Hz line causes moving bands on the video.

https://dl.dropboxusercontent.com/u/92299797/raspimjpeg
http://www.youtube.com/watch?v=wa7UG4EAZNA
How do i replace the old one with this?
it's in /opt/vc/bin/raspimjpeg
just rename the old raspimjpeg and use the one from the link, i can confirm, no more line frequency in the streaming video!

samir_sogay
Posts: 17
Joined: Tue Jun 18, 2013 9:05 am

Re: RPi Cam Web Interface

Tue Feb 04, 2014 12:32 pm

apple1554 wrote:
samir_sogay wrote:For those folks living in the countries with power lines at 50hz, you can use the below mentioned raspimjpeg which shoots videos at 25 fps rather than the default 30 fps. Also, following is the video which demonstrates the effects of line frequency on video, shooting at 30 fps in fluorescent light driven by 50Hz line causes moving bands on the video.

https://dl.dropboxusercontent.com/u/92299797/raspimjpeg
http://www.youtube.com/watch?v=wa7UG4EAZNA
How do i replace the old one with this?
The old one is at /opt/vc/bin. So if you go to /opt/vc/bin and run wget -N https://dl.dropboxusercontent.com/u/92299797/raspimjpeg, the old one should be replaced by new one. Also, take a backup of your current raspimjpeg just in case.

apple1554
Posts: 8
Joined: Fri Jan 03, 2014 2:49 pm

Re: RPi Cam Web Interface

Tue Feb 04, 2014 2:17 pm

Thanks. Anything after that? The camera doesn't seem to start now.
I'm using putty for the remote console on windows: LS in the directory displays the new file with white text, whereas the backed up file is green. :?:

samir_sogay
Posts: 17
Joined: Tue Jun 18, 2013 9:05 am

Re: RPi Cam Web Interface

Tue Feb 04, 2014 3:23 pm

apple1554 wrote:Thanks. Anything after that? The camera doesn't seem to start now.
I'm using putty for the remote console on windows: LS in the directory displays the new file with white text, whereas the backed up file is green. :?:
You will have to change the permissions of the file to make it executable.

apple1554
Posts: 8
Joined: Fri Jan 03, 2014 2:49 pm

Re: RPi Cam Web Interface

Tue Feb 04, 2014 5:26 pm

Thanks, it works now

itsmedoofer
Posts: 356
Joined: Wed Sep 25, 2013 8:43 am

Re: RPi Cam Web Interface

Tue Feb 04, 2014 5:34 pm

Hi,

How can I set a default rotation of 180 degrees ?
I use a PiBow mount for my camera and its always upside down.

Thanks.

unnamed7
Posts: 42
Joined: Mon Jun 18, 2012 8:44 pm

Re: RPi Cam Web Interface

Tue Feb 04, 2014 5:54 pm

tigroz wrote:
unnamed7 wrote:ok, i'll make a fix later, when i'am back home :)

edit//

i've tested my skin in chrome (v32.0.1700.102 on OSX Mavericks) and video starts fine for me. Settings were broken, but i took care of it now, and new files are uploaded to my webserver, same link as above.

Safari (v7.0.1 (9537.73.11)) on OSX Mavericks looks good, video feed is centered for me.

dunno why it's not ok for You :(
ok just a cache clean and the video recorded works now on chrome (v32.0.1700.102 on OSX Mavericks) .
the video it's decentered:
https://www.dropbox.com/s/oog6xvcc6z0sy ... .48.21.png
ok, i fixed it, new files are under same link, only css file changed.

HeikoG
Posts: 12
Joined: Wed Oct 16, 2013 11:53 am

Re: RPi Cam Web Interface

Tue Feb 04, 2014 7:13 pm

I tried to protect Apache's DocumentRoot via .htaccess. It is working but motion detection is not working anymore. Any idea?

unnamed7
Posts: 42
Joined: Mon Jun 18, 2012 8:44 pm

Re: RPi Cam Web Interface

Tue Feb 04, 2014 7:48 pm

i can make proper authentication based on zend framework 2 when i get a bit free time at weekend if anyone interested but it will require fully configured webserver with mysql.

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

Re: RPi Cam Web Interface

Tue Feb 04, 2014 10:02 pm

samir_sogay wrote:For those folks living in the countries with power lines at 50hz, you can use the below mentioned raspimjpeg which shoots videos at 25 fps rather than the default 30 fps. Also, following is the video which demonstrates the effects of line frequency on video, shooting at 30 fps in fluorescent light driven by 50Hz line causes moving bands on the video.

https://dl.dropboxusercontent.com/u/92299797/raspimjpeg
http://www.youtube.com/watch?v=wa7UG4EAZNA
Thanks for the vid, it helped show that the banding I'm experiencing is different to that fixed by changing the frame rate. I was able to confirm this by using your version of raspimjpeg which for me still had an issue (maybe I did compile it correctly earlier then! :) ).

I'll experiment with different power sources and camera cable positioning, etc to see what may be my issue.

tigroz
Posts: 7
Joined: Fri Jan 31, 2014 4:26 pm

Re: RPi Cam Web Interface

Tue Feb 04, 2014 10:13 pm

unnamed7 wrote:
tigroz wrote:
unnamed7 wrote:ok, i'll make a fix later, when i'am back home :)

edit//

i've tested my skin in chrome (v32.0.1700.102 on OSX Mavericks) and video starts fine for me. Settings were broken, but i took care of it now, and new files are uploaded to my webserver, same link as above.

Safari (v7.0.1 (9537.73.11)) on OSX Mavericks looks good, video feed is centered for me.

dunno why it's not ok for You :(
ok just a cache clean and the video recorded works now on chrome (v32.0.1700.102 on OSX Mavericks) .
the video it's decentered:
https://www.dropbox.com/s/oog6xvcc6z0sy ... .48.21.png
ok, i fixed it, new files are under same link, only css file changed.
Yep ☺☺:) it's ok now!! Thanks

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

Re: RPi Cam Web Interface

Tue Feb 04, 2014 10:21 pm

lagurus wrote:
jarrah31 wrote: On another note, when I take pictures the whole sensor appears to be used, yet the streaming video only shows a portion of that. Is this normal or can I tweak something to show the whole sensor area in the streaming video?
It's "normal" status. Now is no way to change.
Just out of interest does anyone know why it's technically not possible to watch a video feed showing the whole camera sensor using raspimjpeg please? Does raspivid also have the same problem?

It just niggles me that I can't watch the whole picture as such. :)

User avatar
acombs1793
Posts: 17
Joined: Sun Feb 02, 2014 7:13 am

Re: RPi Cam Web Interface

Wed Feb 05, 2014 4:38 am

I am a complete beginner on the Pi but I was able to get this running and this is truly an awesome program. Can someone please point me in the direction of being able to view this feed privately from anywhere I am, not just on the local network?

tigroz
Posts: 7
Joined: Fri Jan 31, 2014 4:26 pm

Re: RPi Cam Web Interface

Wed Feb 05, 2014 7:22 am

acombs1793 wrote:I am a complete beginner on the Pi but I was able to get this running and this is truly an awesome program. Can someone please point me in the direction of being able to view this feed privately from anywhere I am, not just on the local network?
forward port 80 to the raspberry ip on the router

miji
Posts: 1
Joined: Tue Feb 04, 2014 3:09 pm

Re: RPi Cam Web Interface

Wed Feb 05, 2014 8:41 am

This is a fantastic piece of software!

Works great, also with the visual additions for /var/www posted some days ago.

One question though: is it normal that the CPU temperature goes up from around 50 degrees C to around 70 as soon as I start the camera?

I've tested other programs for the RaspiCam and with none I could observe this increase in temperature.

Thanks

itsmedoofer
Posts: 356
Joined: Wed Sep 25, 2013 8:43 am

Re: RPi Cam Web Interface

Wed Feb 05, 2014 8:55 am

Post by acombs1793 » Wed Feb 05, 2014 5:38 am
I am a complete beginner on the Pi but I was able to get this running and this is truly an awesome program. Can someone please point me in the direction of being able to view this feed privately from anywhere I am, not just on the local network?
Hi,

Like Tigorz said firstly if you don’t already you need to understand Port Forwarding, (Assuming you are at home connecting to the internet via a router)

http://portforward.com/english/routers/port_forwarding/

A thing to note is that some ISP’s will not let you forward the standard Port used for webserver connections (Port 80), you did mention about being private as well so it maybe a good idea to use a port other than 80 anyway...

I put together my own notes on changing the Port used to connect to the Pi and as some rudimentary security for this app, they are a bit rough because they are only suppose to be a guide for me in case I need to make a new image....

--------------------------------------

Changing the default Port of the Pi web server (Apache2):-

For your New_Port choose a random number above 1025, New_Port is also the port that you will need to set your router to forward.

sudo nano /etc/apache2/ports.conf

change the :- NameVirtualHost *:80

to :- NameVirtualHost *:New_Port

Change:- Listen 80

to:- Listen New_Port

And save.

sudo nano /etc/apache2/sites-enabled/000-default

edit the line that says:- <VirtualHost *:80>

to:- <VirtualHost *:New_Port>

And Save

Restart Apache:-

sudo /etc/init.d/apache2 restart

Open a browser and check that you can connect on the new port

In case you don’t know the address would be http://<pi-ip-address:New_Port> http://12.34.56.78:9010

If you plan on using motion detection you will also need to alter the motion.conf file to point at the new port.
sudo nano /etc/motion/motion.conf

Find the line:-
netcam_url http://localhost/cam_pic.php
and change to:-
netcam_url http://localhost:[new_port]/cam_pic.php

-----------------------------------------
Next to add some basic security you can use a thing called an .htaccess file:-

Create a file called .htaccess in the directory that you need to protect

For the whole website use:-

sudo nano /var/www/.htaccess

Paste the following text into nano

AuthName "Restricted Area"
AuthType Basic
AuthUserFile /usr/local/.htpasswd
AuthGroupFile /dev/null
Require valid-user


And Save....
-----------------------------

AuthUserFile: This line designates the server path to the .htpasswd file.

AuthGroupFile: This line can be used to convey the location of the .htgroup. As we have not created such a file, we can leave /dev/null in place.

AuthName: This is text that will be displayed at the password prompt. You can put anything here.

AuthType: This refers to the type of authentication that will be used to the check the passwords. The passwords are checked via HTTP and the keyword Basic should not be changed.

Require valid-user: This line represents one of two possibilities. “Require valid-user” tells the .htaccess file that there are several people who should be able to log into the password protected area. The other option is to use the phrase “require user username” to indicate the specific permitted person.

-----------------------------

Create a .htpasswd file in the location shown in AuthUserFile

sudo htpasswd -c /usr/local/.htpasswd PiCam <PiCam is the username you can use your own>

Enter a Password when promted.

To change the password:-

sudo htpasswd /usr/local/.htpasswd PiCam

To add a new user:-

sudo htpasswd -c /usr/local/.htpasswd PiCam_New

The contents of the .htpasswd file will look something like this......

PiCam:lsjhfvldhbvkjewbvkjebvkjeb

-----------------------------

Change the default site file to enable the use of .htaccess

sudo nano /etc/apache2/sites-enabled/000-default

Look for:-

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

Change:- AllowOverride None

to:- AllowOverride All

And Save...

-----------------------------

Again, if you plan on using motion detection you will also need to alter the motion.conf file with the password details

sudo nano /etc/motion/motion.conf

Find the line:-
; netcam_userpass value

and replace with:-
netcam_userpass user:pass (username and password specified above)

Restart Apache....

sudo /etc/init.d/apache2 restart

Now when you go to the website you should be asked for a username password......

I would also google some key phrases used here so you can get a better understanding on what is being done.

Edits:- Updated with motion detail.
Last edited by itsmedoofer on Tue Mar 25, 2014 3:19 pm, edited 2 times in total.

User avatar
acombs1793
Posts: 17
Joined: Sun Feb 02, 2014 7:13 am

Re: RPi Cam Web Interface

Wed Feb 05, 2014 12:03 pm

@itsmedoofer

Wow thanks so much for the great post. When I get home form work tonight I will be trying this out. I am definitely going to be doing some research about my situation and hopefully what you posted will be of help to me. Thank you for breaking it down so well, being a beginner and raised on non Linux based computers its taking me a while to get a footing in the terminal and its commands. Again, thanks so much for your time.

itsmedoofer
Posts: 356
Joined: Wed Sep 25, 2013 8:43 am

Re: RPi Cam Web Interface

Wed Feb 05, 2014 12:44 pm

Hi,

No worries, the thanks is appreciated though. I've never really played with Linux, the closest I came was the Commodore Amigas, that's why I document things :)

Couple of things I did forget to mention in the first post...

1) To access the Pi from outside your network you will need to use the address that your router has been given by your ISP, while you are setting Port forwarding you should be able to find that info in your router, failing that you can go here

http://whatismyipaddress.com/

2) If this is to be a permanent fixture you may want to look at getting a dyndns (or similar) account, this will link an easy to remember host name to your IP address..... Get things working first though.

User avatar
Mrbcsimpson
Posts: 17
Joined: Tue Jan 07, 2014 9:29 pm
Location: Lincolnshire, UK
Contact: Website

Re: RPi Cam Web Interface

Wed Feb 05, 2014 9:23 pm

Next to add some basic security you can use a thing called an .htaccess file:-

Create a file called .htaccess in the directory that you need to protect

For the whole website use:-

sudo nano /var/www/.htaccess

Paste the following text into nano

AuthName "Restricted Area"
AuthType Basic
AuthUserFile /usr/local/.htpasswd
AuthGroupFile /dev/null
Require valid-user


And Save....
-----------------------------

AuthUserFile: This line designates the server path to the .htpasswd file.

AuthGroupFile: This line can be used to convey the location of the .htgroup. As we have not created such a file, we can leave /dev/null in place.

AuthName: This is text that will be displayed at the password prompt. You can put anything here.

AuthType: This refers to the type of authentication that will be used to the check the passwords. The passwords are checked via HTTP and the keyword Basic should not be changed.

Require valid-user: This line represents one of two possibilities. “Require valid-user” tells the .htaccess file that there are several people who should be able to log into the password protected area. The other option is to use the phrase “require user username” to indicate the specific permitted person.

-----------------------------

Create a .htpasswd file in the location shown in AuthUserFile

sudo htpasswd -c /usr/local/.htpasswd PiCam <PiCam is the username you can use your own>

Enter a Password when promted.

To change the password:-

sudo htpasswd /usr/local/.htpasswd PiCam

To add a new user:-

sudo htpasswd -c /usr/local/.htpasswd PiCam_New

The contents of the .htpasswd file will look something like this......

PiCam:lsjhfvldhbvkjewbvkjebvkjeb

-----------------------------

Change the default site file to enable the use of .htaccess

sudo nano /etc/apache2/sites-enabled/000-default

Look for:-

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

Change:- AllowOverride None

to:- AllowOverride All

And Save...

-----------------------------

Restart Apache....

sudo /etc/init.d/apache2 restart
Thanks to everyone that has made additions to this post. I now have a pretty well secured, bird feeder motion detecting camera with a stunning interface! All with the help of you kind people that are sharing your hard work and research.

Now if I could send an email when an image or video is saved.. ;)

User avatar
acombs1793
Posts: 17
Joined: Sun Feb 02, 2014 7:13 am

Re: RPi Cam Web Interface

Thu Feb 06, 2014 1:34 am

So I followed the steps, but I tried to send a link to my brother to try it out and he gets nothing. Am i missing something? I can still view it at home by typing the ip adress and the port i assigned to it, so why cant he?

itsmedoofer
Posts: 356
Joined: Wed Sep 25, 2013 8:43 am

Re: RPi Cam Web Interface

Thu Feb 06, 2014 7:24 am

Well sounds like you have got the Pi set up correctly so good job there.

I think the problem lies in either the address you gave your brother or with the port forwarding rules you set up in your router.

Need to know roughly what you set your router up with and what you sent Bro to really get a handle on it Don't mind looking if you want to pm me the info rather than carry on here.

Handy tip, you can always try things out by using turning of the wifi on your phone and using its data connection, quicker than sending Emails back and forward. ....

Edit:-

Just had a thought as the coffee started lubricating things.. If not done so already you will need to set your Pi to have the same IP address every time it boots or the port forwarding will fail. There are two ways to do this, you can configure the Pi it’s self to have a static address or you can use your router to do it by a method called DHCP Address Reservation. Personally I prefer DHCP Address Reservation as it allows you to use your Pi on any network without reconfiguration, the only downside is your Pi would have a different address depending on whether its connected via WiFi or LAN.....

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

Re: RPi Cam Web Interface

Thu Feb 06, 2014 11:30 am

Did you make sure that your brother is using a supported browser (Not Internet Explorer)

User avatar
acombs1793
Posts: 17
Joined: Sun Feb 02, 2014 7:13 am

Re: RPi Cam Web Interface

Fri Feb 07, 2014 12:50 am

Im a bone head, I needed to get the address from my router and send that along with the new port i made. Its all working great. Sorry about that. And now one final question. Lets say I want to create a website that just shows the feed, not the buttons for control, is this possible?

Return to “Camera board”