User avatar
gigpi
Posts: 17
Joined: Thu May 14, 2015 12:23 pm

Re: RPi Cam Web Interface

Tue Jun 07, 2016 9:19 pm

anglaborg wrote:Here's my result from the commands:
Configuration seems ok to me, the only difference i see is the filesystem type, you have a fat formatted usb while i use an ext4 usb. Note that raspberry root "/" is ext4 too. Maybe binding a vfat with ext4 isn't good?
If i were you i would try 2 different path to solve the problem:
1. Format my usb disk in ext4 and change the fstab accordingly
or
2. Check if my usb alone would be mounted in fat, so removing from fstab the last line with bind option in and giving "mount -a" again

You didn't answered if motion captures are saved normally in "/var/www/html/media" when you don't use usb at all, like in a fresh install.
Let me know, so we can keep out some variables from the problem ;)

sj_Rpi
Posts: 12
Joined: Wed Jun 08, 2016 6:53 pm

Re: RPi Cam Web Interface

Wed Jun 08, 2016 7:40 pm

Hello, Im having some problems with my setup, hopefully someone can help. I originally installed Rpi Cam Web Interface with no problems. I could type in my IP address:port # and camera feed would appear, all was ok. Then I decided to try out this tutorial https://www.raspberrypi.org/learning/lamp-web-server-with-wordpress/worksheet/ and this is where the problems came up. I ended up uninstalling Apache2 because I couldn't get the default web page to show when typing in my IP address like the instructions called for.

After my original installation of RCWI, if I only typed in my IP w/o a port number I would get page not found error. I then re-installed RCWI. Now when I type in my IP address w/o the port #, instead of getting a page not found error, it displays a broken camera feed page with only the buttons and alot of gibberish . Another thing that happened to change was in order to view the camera feed I now need to type in the IP address:port #/html to access it. Not adding the /html after the port # gives me a page not found error now. Im a bit confused as to why I need the /html now and not before.

I am trying to learn more about the LAMP stack. I was able to get WebIOPi to work also, which then brought me to the tutorial I linked above. Ultimately what I am trying to do is have the RCWI working along with another server to talk to an Arduino I have connected via USB to my Pi.(https://www.youtube.com/watch?v=M2-nXbi3qmk) Any help understanding what's going on really appreciated.

anglaborg
Posts: 15
Joined: Thu Jun 02, 2016 4:53 pm

Re: RPi Cam Web Interface

Thu Jun 09, 2016 1:18 pm

gigpi wrote: You didn't answered if motion captures are saved normally in "/var/www/html/media" when you don't use usb at all, like in a fresh install.
Let me know, so we can keep out some variables from the problem ;)
I will try to change the format to ext4!

If I remember correctly the captured files were in the "/var/www/html/media" when the USB wasn't mounted. There were 1 extra file for every video, think it was a thumbnail or something.

anglaborg
Posts: 15
Joined: Thu Jun 02, 2016 4:53 pm

Re: RPi Cam Web Interface

Sat Jun 11, 2016 6:52 pm

gigpi wrote: 1. Format my usb disk in ext4 and change the fstab accordingly
Haven't managed to format the USB to ext4...
I did "sudo mkfs -t ext4 /dev/sda1"

But then the USB disappear from the list when i execute "sudo blkid"

So I put the USB into my PC and formatted it. Only had the options NTFS and exFAT... It usually are more options like FAT32 and so on....

Help :? :roll:

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

Re: RPi Cam Web Interface

Sat Jun 11, 2016 11:08 pm

Update: I reinstalled the interface with the new method and it now works fine with V2 camera.

I am just wondering is there a straight way to switch to MJPEG streaming as default without users' click on web interface?

cgyt3ch
Posts: 9
Joined: Sun Jun 12, 2016 11:03 pm

Re: RPi Cam Web Interface

Sun Jun 12, 2016 11:06 pm

Has anyone managed to get the images and videos to record to a windows shared drive? I've got my shared drive mounted on raspian and proper permissions set, I can write files to it but after setting the storage location of RPi Cam Web Interface to my mounted drive when I click on "record image" or "record video" it does nothing and the files aren't recording. Any idea?

cgyt3ch
Posts: 9
Joined: Sun Jun 12, 2016 11:03 pm

Re: RPi Cam Web Interface

Sun Jun 12, 2016 11:38 pm

Anyone has managed to get the the RPI Cam Web Interface to upload to a CIFS network drive?

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

Re: RPi Cam Web Interface

Mon Jun 13, 2016 12:04 am

I've attempted to search this thread but haven't been able to find relevant results because of the clunkiness of it.

Has anybody run into the failed motion settings that result in a white page, unable to change or view them? I've tried reinstalling and removing to no avail. It always results in the same white page with a long load time. As a result, I'm unable to click either record video start or timelapse, as they're both greyed out when motion is enabled. I've ps'd it and it is running.

I'm running on Jessie and RPiCam 4.4.2R and camera module V2 FYI. Any help steering me in the right path would be much appreciated. Thanks :lol:

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

Re: RPi Cam Web Interface

Mon Jun 13, 2016 1:05 pm

cgyt3ch wrote:Anyone has managed to get the the RPI Cam Web Interface to upload to a CIFS network drive?
The easiest way of using external drives or shares is to leave the RPI Cam Web Interface storing in its normal media location and then linking the external storage to that location so that the physical files reside there.

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

Re: RPi Cam Web Interface

Mon Jun 13, 2016 1:13 pm

ianj wrote:I've attempted to search this thread but haven't been able to find relevant results because of the clunkiness of it.

Has anybody run into the failed motion settings that result in a white page, unable to change or view them? I've tried reinstalling and removing to no avail. It always results in the same white page with a long load time. As a result, I'm unable to click either record video start or timelapse, as they're both greyed out when motion is enabled. I've ps'd it and it is running.

I'm running on Jessie and RPiCam 4.4.2R and camera module V2 FYI. Any help steering me in the right path would be much appreciated. Thanks :lol:
I assume you mean the external motion settings here.

When you click on edit motion settings then you may get a message saying 'Motion not running. Put into detection state'. That is normal as external motion only runs when detection is active and the settings page relies on a running motion process to retrieve its settings.

If you are getting a completely blank page and no response at all then something else is happening. Probably the motion set up has got confused. It is important that you let the installer put motion on and not install it separately. If you want to post a zip here of your /etc/motion/motion.conf file I can check it out.

The other strategy is to use the built in internal motion detection which is much easier to use and can give good results. Just switch from external to internal under Camera settings.

cgyt3ch
Posts: 9
Joined: Sun Jun 12, 2016 11:03 pm

Re: RPi Cam Web Interface

Mon Jun 13, 2016 1:22 pm

btidey wrote:
cgyt3ch wrote:Anyone has managed to get the the RPI Cam Web Interface to upload to a CIFS network drive?
The easiest way of using external drives or shares is to leave the RPI Cam Web Interface storing in its normal media location and then linking the external storage to that location so that the physical files reside there.
What do you mean?

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

Re: RPi Cam Web Interface

Mon Jun 13, 2016 1:57 pm

cgyt3ch wrote:
btidey wrote:
cgyt3ch wrote:Anyone has managed to get the the RPI Cam Web Interface to upload to a CIFS network drive?
The easiest way of using external drives or shares is to leave the RPI Cam Web Interface storing in its normal media location and then linking the external storage to that location so that the physical files reside there.
What do you mean?
Linux allows you to bind one location to another so that a different physical location is used for the storage. See the wiki section on moving location. To make the bind permanent you edit the /etc/fstab. There are lots of tutorials on doing that.

Cubytus
Posts: 135
Joined: Thu Dec 05, 2013 6:13 pm

Re: RPi Cam Web Interface

Tue Jun 14, 2016 12:01 am

Another question here, what is the correct way to automatically delete older recordings when space is getting low, in RPi Cam Web Interface? It seems the wiki isn't clear about the eventuality.

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

Re: RPi Cam Web Interface

Tue Jun 14, 2016 12:06 am

btidey wrote:
ianj wrote:I've attempted to search this thread but haven't been able to find relevant results because of the clunkiness of it.

Has anybody run into the failed motion settings that result in a white page, unable to change or view them? I've tried reinstalling and removing to no avail. It always results in the same white page with a long load time. As a result, I'm unable to click either record video start or timelapse, as they're both greyed out when motion is enabled. I've ps'd it and it is running.

I'm running on Jessie and RPiCam 4.4.2R and camera module V2 FYI. Any help steering me in the right path would be much appreciated. Thanks :lol:
I assume you mean the external motion settings here.

When you click on edit motion settings then you may get a message saying 'Motion not running. Put into detection state'. That is normal as external motion only runs when detection is active and the settings page relies on a running motion process to retrieve its settings.

If you are getting a completely blank page and no response at all then something else is happening. Probably the motion set up has got confused. It is important that you let the installer put motion on and not install it separately. If you want to post a zip here of your /etc/motion/motion.conf file I can check it out.

The other strategy is to use the built in internal motion detection which is much easier to use and can give good results. Just switch from external to internal under Camera settings.
I don't get that message when choosing 'motion detection start', as it should behave, however the page that loads is blank and takes like 1 minute and results in nothing. I left everything at default during installation, so I'm not sure where it would have changed the motion config.

Also, there's no internal motion option in camera settings, did you add this in a specific version?

I could upload the motion.conf, but I'm ready to just delete and set it to defaults - is there an easy solution with the installer to reset everything / remove everything fully and start from scratch?

Thank you for your help

donster22
Posts: 19
Joined: Sat Nov 09, 2013 3:35 pm

Re: RPi Cam Web Interface

Tue Jun 14, 2016 7:00 pm

Hi. I have a python script monitoring people coming and going from my house (checking for mobile phones on the network with nmap). If everyone is out I would like it to activate the "motion detection start" capability of RPi Cam Web Interface. Is it possible to do this via a script (python or otherwise) instead of having to press the button on the control interface? Thanks, Don

donster22
Posts: 19
Joined: Sat Nov 09, 2013 3:35 pm

Re: RPi Cam Web Interface

Tue Jun 14, 2016 7:22 pm

Hi.

I might have figured this out so thought I'd post my findings in case anyone else found them useful.

By inspecting the elements of the page in Google Chrome i spotted the command sent over the network when I clicked the button on the interface.

http://192.168.1.20/html/cmd_pipe.php?cmd=md%201 - starts motion detection
http://192.168.1.20/html/cmd_pipe.php?cmd=md%200 - stops motion detection

i'll just add these to my python script to be actioned if no one is home and when someone comes home. if anyone spots any problems with this approach please let me know.

Cheers
Don

grumpytwig
Posts: 2
Joined: Fri Jul 17, 2015 9:44 pm

Re: RPi Cam Web Interface

Sat Jun 18, 2016 10:38 pm

Just done a brand new fresh install of raspbian and RPi Cam (been using it a long time now), noticed something odd in that it was really chewing systemd a new one.

Not really a RPi Cam problem but more motion as if you check [journalctl -f] you might see it spamming messages at what seems to be the same interval as motions frame rate. referring to:

"netcam_read_first_header ....."

Talking about keep alive not being enabled etc. etc. and thought I'd just post in case anyone else has the issue, you need to change the log levels of motion in motion.conf (seems you can't disable logging completely).

Now it's a bit happier :)

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

Re: RPi Cam Web Interface

Mon Jun 20, 2016 9:41 am

grumpytwig wrote:Just done a brand new fresh install of raspbian and RPi Cam (been using it a long time now), noticed something odd in that it was really chewing systemd a new one.

Not really a RPi Cam problem but more motion as if you check [journalctl -f] you might see it spamming messages at what seems to be the same interval as motions frame rate. referring to:

"netcam_read_first_header ....."

Talking about keep alive not being enabled etc. etc. and thought I'd just post in case anyone else has the issue, you need to change the log levels of motion in motion.conf (seems you can't disable logging completely).

Now it's a bit happier :)
Strange. I don't normally use external motion now, but did a switch to it to see this and I am not seeing any regular extra logging activity journalctl or syslog.

Which OS (jessie or wheezy) and which install method did you use? install.sh only changes stuff in motion.conf and the netcam_http setting is off by default.

donster22
Posts: 19
Joined: Sat Nov 09, 2013 3:35 pm

Re: RPi Cam Web Interface

Mon Jun 20, 2016 10:04 am

donster22 wrote:Hi.

I might have figured this out so thought I'd post my findings in case anyone else found them useful.

By inspecting the elements of the page in Google Chrome i spotted the command sent over the network when I clicked the button on the interface.

http://192.168.1.20/html/cmd_pipe.php?cmd=md%201 - starts motion detection
http://192.168.1.20/html/cmd_pipe.php?cmd=md%200 - stops motion detection

i'll just add these to my python script to be actioned if no one is home and when someone comes home. if anyone spots any problems with this approach please let me know.

Cheers
Don

Actually, forget this. If the camera is recording when your script sends the stop command things go badly wrong....
Has anyone got any other ideas that might allow me to achieve the same result of starting and stopping the motion detection element via a python script?

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

Re: RPi Cam Web Interface

Mon Jun 20, 2016 11:41 am

donster22 wrote:

Actually, forget this. If the camera is recording when your script sends the stop command things go badly wrong....
Has anyone got any other ideas that might allow me to achieve the same result of starting and stopping the motion detection element via a python script?
Yes, sending a motion detect start or stop whilst it is recording is likely to screw up the operation as this unilaterally closes the camera connection and then re-opens it.

Under normal operation this cannot happen as the user interface disables the motion button while recording and the scheduler also will wait till video recording is idle before actioning a motion detect operation. However, if you send in commands direct then it bypasses this logic.

If you want to make sure you don't get in this state you can check the status_mjpeg to make sure it is idle ('ready') before sending a motion command.

To protect against this I propose to change the code so it automatically stops any current video recording before actioning a change like this. That shouldn't impact on normal functionality.

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

Re: RPi Cam Web Interface

Mon Jun 20, 2016 12:08 pm

btidey wrote:
donster22 wrote:
Has anyone got any other ideas that might allow me to achieve the same result of starting and stopping the motion detection element via a python script?
To protect against this I propose to change the code so it automatically stops any current video recording before actioning a change like this. That shouldn't impact on normal functionality.
I have now made uploaded this change. Motion detect stop start and a few other operations like changing video resolution which involved stopping the camera will now automatically stop any currently active video recording.

wingers
Posts: 50
Joined: Wed Dec 31, 2014 8:31 pm

Re: RPi Cam Web Interface

Mon Jun 20, 2016 4:42 pm

Hi

Can anyone advise on how to fix this problem:

The time showing on the annotation / overlay on the preview is the correct time

But the filename/timestamp of the captured files is an hour out

Checked everywhere I can think (not used to linux, as use Windows for most things) but all seems okay, so not sure why time wrong on filenames

Thanks

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

Re: RPi Cam Web Interface

Mon Jun 20, 2016 5:06 pm

wingers wrote:Hi

Can anyone advise on how to fix this problem:

The time showing on the annotation / overlay on the preview is the correct time

But the filename/timestamp of the captured files is an hour out

Checked everywhere I can think (not used to linux, as use Windows for most things) but all seems okay, so not sure why time wrong on filenames

Thanks
Have you set the raspberry time zone correctly to match your locale?
sudo raspi-config

You should also put the time zone in the Scheduler settings if you want timing in there to be consistent.

wingers
Posts: 50
Joined: Wed Dec 31, 2014 8:31 pm

Re: RPi Cam Web Interface

Mon Jun 20, 2016 5:11 pm

btidey wrote:
Have you set the raspberry time zone correctly to match your locale?
sudo raspi-config

You should also put the time zone in the Scheduler settings if you want timing in there to be consistent.
Time zone is set correctly

Where in the scheduler settings do I put it - can only see latituide, longitude and GMToffset?

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

Re: RPi Cam Web Interface

Mon Jun 20, 2016 8:28 pm

wingers wrote:
btidey wrote:
Have you set the raspberry time zone correctly to match your locale?
sudo raspi-config

You should also put the time zone in the Scheduler settings if you want timing in there to be consistent.
Time zone is set correctly

Where in the scheduler settings do I put it - can only see latituide, longitude and GMToffset?
You can either put a number in GMTOffset or you can put in a time zone string (e.g. Europe/London)

I doubt whether the scheduler part would affect the filenames though, more just when scheduler actions happen.

What time zone are you in? A 1 hour difference sounds like a daylight savings offset.

Return to “Camera board”