I started a new thread on this subject, to avoid derailing this one.boomlikethat wrote:if there's a set of instructions on how you got to that demo video point with OpenCV, let me know. It really is cool, good work!
Re: another use for RPi Cam Web Interface
Re: RPi Cam Web Interface
Olegg had made a useful pull request adding support for a second camera if using the compute module not a standard Pi.
I have added this with a slight tweak so it is hidden for normal Pi users who won't see any difference.
The raspimjpeg config has a new variable (camera_num). This is 0 by default which means first camera and hide the selection. 1 and 2 select the first or second camera and expose a new camera setting on the main page to allow switching between them.
I have added this with a slight tweak so it is hidden for normal Pi users who won't see any difference.
The raspimjpeg config has a new variable (camera_num). This is 0 by default which means first camera and hide the selection. 1 and 2 select the first or second camera and expose a new camera setting on the main page to allow switching between them.
-
- Posts: 327
- Joined: Thu Oct 11, 2012 11:52 am
- Location: Cheshire, UK
Re: RPi Cam Web Interface
### Feature Request ###
I've now had motion running constantly for 3 days, so as you can imagine I've got 387 motion videos and the used space is 61.8% of 29135 (MB). At some point I'm going to hit 100% if I don't remove files and if motion isn't turned off
Could options be created to be able to:
a) When hit (Value)%, start to automatically delete the oldest file(s)
b) Delete file(s) between from (Date, Time) - to (Date, Time) e.g. from (2015-06-29, 00:01) - to (2015-06-29, 23:59)
I've now had motion running constantly for 3 days, so as you can imagine I've got 387 motion videos and the used space is 61.8% of 29135 (MB). At some point I'm going to hit 100% if I don't remove files and if motion isn't turned off
Could options be created to be able to:
a) When hit (Value)%, start to automatically delete the oldest file(s)
b) Delete file(s) between from (Date, Time) - to (Date, Time) e.g. from (2015-06-29, 00:01) - to (2015-06-29, 23:59)
3b+, 2b, b+, b, Zero & Zero-W
Re: RPi Cam Web Interface
As far I know that feature is already there. But I am not sure.
However in my opinion it is not a good Idee to write constantly the motion clips to an SD card. Sooner or later the SD card will fail. I am trying since a few days to write the motion clips to an attached USB stick with no luck. I used the way in wiki.
Is there any one out there who hat more luck?
However in my opinion it is not a good Idee to write constantly the motion clips to an SD card. Sooner or later the SD card will fail. I am trying since a few days to write the motion clips to an attached USB stick with no luck. I used the way in wiki.
Is there any one out there who hat more luck?
Re: RPi Cam Web Interface
Yes i have. I write clips in to external usb HDD. and working fine.rmjspa wrote:As far I know that feature is already there. But I am not sure.
However in my opinion it is not a good Idee to write constantly the motion clips to an SD card. Sooner or later the SD card will fail. I am trying since a few days to write the motion clips to an attached USB stick with no luck. I used the way in wiki.
Is there any one out there who hat more luck?
Right now i develop in installer possibility change location where clips saved but there more problems. Main problem is installer already have to lot of yes no questions. Right now i think maby is smart in install time do basic default configuration. Extra tweak options going already in to new option "configure" where we can change port; where clips saved and so on.
Yes that is correct SD cards not last long when constantly overwriting.
Re: RPi Cam Web Interface
Check out scheduler purge features. One can set a duration on a recording so that it is purged after this time and one can also set purging if space drops below a value or recordings go above a value. I haven't manually deleted a recording on one of my cameras in over a month now.Gary Littlemore wrote:### Feature Request ###
I've now had motion running constantly for 3 days, so as you can imagine I've got 387 motion videos and the used space is 61.8% of 29135 (MB). At some point I'm going to hit 100% if I don't remove files and if motion isn't turned off
Could options be created to be able to:
a) When hit (Value)%, start to automatically delete the oldest file(s)
b) Delete file(s) between from (Date, Time) - to (Date, Time) e.g. from (2015-06-29, 00:01) - to (2015-06-29, 23:59)
The base technology of USB Flash and SD is very similar. There are differences between manufacturers with some having better levelling and wear protection. Obviously if the media is on the OS SD then a full failure can mean a re-install. I have been using Sandisk SD on Raspberries for over 2 years now and not had a failure so far.
Re: RPi Cam Web Interface
What am I supposed to see in this page to edit motion settings?
Maybe do I have some files with either the wrong path inside, permissions or user:group that needs to be fixed?
Maybe do I have some files with either the wrong path inside, permissions or user:group that needs to be fixed?
- Attachments
-
- Screenshot from 2015-07-02 12-19-33.png (13.39 KiB) Viewed 3925 times
Salvatore La Bua - www.slblabs.com
DICGIM - University of Palermo, Italy
DICGIM - University of Palermo, Italy
Re: RPi Cam Web Interface
I figured it out. I was using the directive "control_authentication" which RPi Cam Web Interface is not able to workaround, so I had to disable it :\slabua wrote:What am I supposed to see in this page to edit motion settings?
Maybe do I have some files with either the wrong path inside, permissions or user:group that needs to be fixed?
Is there any way to make it work?
Salvatore La Bua - www.slblabs.com
DICGIM - University of Palermo, Italy
DICGIM - University of Palermo, Italy
Re: RPi Cam Web Interface
You should see a table of motion settings that you can edit and save.slabua wrote:What am I supposed to see in this page to edit motion settings?
Maybe do I have some files with either the wrong path inside, permissions or user:group that needs to be fixed?
This table is built by using the motion API that responds to http requests on port 6642
This is set up in the default motion.conf file in /etc/motion/motion.conf
Code: Select all
############################################################
# HTTP Based Control
############################################################
# TCP/IP port for the http server to listen on (default: 0 = disabled)
control_port 6642
# Restrict control connections to localhost only (default: on)
control_localhost on
# Output for http server, select off to choose raw text plain (default: on)
control_html_output off
Check the motion.conf file is OK and can be read by motion. It should be owned by www-data.
Re: RPi Cam Web Interface
OK. You added a username / password onto the motion control port. That will block the web site from picking up the settings and there is currently no support for this. It would need to be added in motion.php and then one gets into a spiral of where you configure that.slabua wrote:I figured it out. I was using the directive "control_authentication" which RPi Cam Web Interface is not able to workaround, so I had to disable it :\slabua wrote:What am I supposed to see in this page to edit motion settings?
Maybe do I have some files with either the wrong path inside, permissions or user:group that needs to be fixed?
Is there any way to make it work?
The thinking here was that we set by default control_localhost on which means that this port and API can only be accessed by processes running on the local host Pi which is making it relatively secure anyway.
Re: RPi Cam Web Interface
A question has been raised that we don't explicitly install php-cli which is true. I find on my machines that this has got installed anyway but I wanted to check if this was OK. If somebody could open up a cmd and try php --version on a machine with just basic install then it should return a version message if the cli is working.
-
- Posts: 327
- Joined: Thu Oct 11, 2012 11:52 am
- Location: Cheshire, UK
Re: RPi Cam Web Interface
I've got configured:btidey wrote:Check out scheduler purge features. One can set a duration on a recording so that it is purged after this time and one can also set purging if space drops below a value or recordings go above a value. I haven't manually deleted a recording on one of my cameras in over a month now.Gary Littlemore wrote:### Feature Request ###
I've now had motion running constantly for 3 days, so as you can imagine I've got 387 motion videos and the used space is 61.8% of 29135 (MB). At some point I'm going to hit 100% if I don't remove files and if motion isn't turned off
Could options be created to be able to:
a) When hit (Value)%, start to automatically delete the oldest file(s)
b) Delete file(s) between from (Date, Time) - to (Date, Time) e.g. from (2015-06-29, 00:01) - to (2015-06-29, 23:59)
The base technology of USB Flash and SD is very similar. There are differences between manufacturers with some having better levelling and wear protection. Obviously if the media is on the OS SD then a full failure can mean a re-install. I have been using Sandisk SD on Raspberries for over 2 years now and not had a failure so far.
PurgeSpace_ModeEx [Min Space %]
PurgeSpace_Level [15] (Available)
Is that all I need to do to stop it going no lower than 15% and it will automatically delete the oldest file first?
3b+, 2b, b+, b, Zero & Zero-W
Re: RPi Cam Web Interface
Yes. With those setting then every Management_Interval (default 1 hour). It will check the media and delete files as necessary starting with the oldest until there is at least 15% of the volume storage available.Gary Littlemore wrote:
I've got configured:
PurgeSpace_ModeEx [Min Space %]
PurgeSpace_Level [15] (Available)
Is that all I need to do to stop it going no lower than 15% and it will automatically delete the oldest file first?
There will be log events when it does purges.
-
- Posts: 327
- Joined: Thu Oct 11, 2012 11:52 am
- Location: Cheshire, UK
Re: RPi Cam Web Interface
Great thanksbtidey wrote:Yes. With those setting then every Management_Interval (default 1 hour). It will check the media and delete files as necessary starting with the oldest until there is at least 15% of the volume storage available.Gary Littlemore wrote:
I've got configured:
PurgeSpace_ModeEx [Min Space %]
PurgeSpace_Level [15] (Available)
Is that all I need to do to stop it going no lower than 15% and it will automatically delete the oldest file first?
There will be log events when it does purges.
3b+, 2b, b+, b, Zero & Zero-W
Re: RPi Cam Web Interface
Hi Robert,btidey wrote:A question has been raised that we don't explicitly install php-cli which is true. I find on my machines that this has got installed anyway but I wanted to check if this was OK. If somebody could open up a cmd and try php --version on a machine with just basic install then it should return a version message if the cli is working.
There we go:
Code: Select all
$ php --version
PHP 5.4.41-0+deb7u1 (cli) (built: Jun 7 2015 23:27:41)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
Re: RPi Cam Web Interface
Hi Robert,
Just to let you know that I was not able to change any values from the 'Edit Motion Settings' page. This has been happening with Google Chrome and Safari.
The odd thing is that I have tried, for istance, to edit in the /etc/motion/motion.conf the line
but to not avail. I mean when I get back to the 'Edit Motion Settings' page, the value 'none' is still shown in the field 'on_motion_detected '.
When you get a chance could you please have look at it?
Many thanks for that!
PS:All sorted, a simple reboot did the trick. Working like a charm, as expected!
Just to let you know that I was not able to change any values from the 'Edit Motion Settings' page. This has been happening with Google Chrome and Safari.
The odd thing is that I have tried, for istance, to edit in the /etc/motion/motion.conf the line
Code: Select all
on_motion_detected mail -s “WebCam Motion Detected” my@email.co.uk
When you get a chance could you please have look at it?
Many thanks for that!
PS:All sorted, a simple reboot did the trick. Working like a charm, as expected!
-
- Posts: 33
- Joined: Thu Jul 02, 2015 11:49 pm
Re: RPi Cam Web Interface
Installing the package from the pi, i was prompted for a username and password.
could i please get the log in details? thanks a million!
could i please get the log in details? thanks a million!

Re: RPi Cam Web Interface
hi , I am trying to install RPi cam web interface for a usb attached camera , I have followed all the steps listed on your blog,
I keep getting error alerts when I access my IP on a browser. It comes with an alert " error in raspiMJPeg...,restart whole RPi"
Any ideas what could be wrong ?
I keep getting error alerts when I access my IP on a browser. It comes with an alert " error in raspiMJPeg...,restart whole RPi"
Any ideas what could be wrong ?
Re: RPi Cam Web Interface
Not quite sure where you were prompted for username and password. By default we do not use extra username and password.netromaster wrote:Installing the package from the pi, i was prompted for a username and password.
could i please get the log in details? thanks a million!
You log into the pi in the normal fashion (default pi:raspberry). When you install RPi_Cam_Web_Interface one of the questions asked is whether you want to turn on Web security. If you answer No then after the install you can freely browse to the Pi host address to access the camera system. If you answer Yes the it will ask for the username and password which you want to use. The install then sets up the Apache Web server so that you will be prompted for a username and password when you try to access the web site. You use the same values you entered during the install. This helps control access particularly if you plan to make the web site accessible from the internet by port forwarding.
Re: RPi Cam Web Interface
Thanks for the clarification. Yes, I was also using motion independently, so I guess I'll make two config files and let this use the one which sets control_localhost on.btidey wrote: OK. You added a username / password onto the motion control port. That will block the web site from picking up the settings and there is currently no support for this. It would need to be added in motion.php and then one gets into a spiral of where you configure that.
The thinking here was that we set by default control_localhost on which means that this port and API can only be accessed by processes running on the local host Pi which is making it relatively secure anyway.
Salvatore La Bua - www.slblabs.com
DICGIM - University of Palermo, Italy
DICGIM - University of Palermo, Italy
Re: RPi Cam Web Interface
Is there any known issue in handling annotations with leading spaces?
The picture shows my current working setting, though sometimes the leading spaces disappear (I haven't tested yet which cases broke it, whether the use of the web interface or the likes).
The picture shows my current working setting, though sometimes the leading spaces disappear (I haven't tested yet which cases broke it, whether the use of the web interface or the likes).
- Attachments
-
- Screenshot from 2015-07-03 02-35-45.png (57 KiB) Viewed 3737 times
Salvatore La Bua - www.slblabs.com
DICGIM - University of Palermo, Italy
DICGIM - University of Palermo, Italy
Re: RPi Cam Web Interface
There is not a specific problem with leading spaces. However, from the look of it you are adding on a lot of spaces at the start to force to the right, and a lot of spaces in the middle to force a wrap to second line and also to position to the right. That means you maybe exceeding the maximum length of annotation string. The web side and raspimjpeg allow up to 253 characters to be handled. The MMAL camera layer can restricts this further. I believe initially this was 64 characters, then got extended up to 128. Testing with latest v4 shows that it can now handle the maximum we can throw at it. If you have an older OS version then a rpi-update may help.slabua wrote:Is there any known issue in handling annotations with leading spaces?
The picture shows my current working setting, though sometimes the leading spaces disappear (I haven't tested yet which cases broke it, whether the use of the web interface or the likes).
Re: RPi Cam Web Interface
Thanks for the reply, yes I add leading spaces and spaces in the middle, but still within the limits.btidey wrote:There is not a specific problem with leading spaces. However, from the look of it you are adding on a lot of spaces at the start to force to the right, and a lot of spaces in the middle to force a wrap to second line and also to position to the right. That means you maybe exceeding the maximum length of annotation string. The web side and raspimjpeg allow up to 253 characters to be handled. The MMAL camera layer can restricts this further. I believe initially this was 64 characters, then got extended up to 128. Testing with latest v4 shows that it can now handle the maximum we can throw at it. If you have an older OS version then a rpi-update may help.
My issue is actually simpler than it sounds, I suppose. Basically, the annotation line I set, at some point changes from my previous screenshot, to this. Everything is still fine, only the leading spaces are removed, as if the web interface (or the config file created from it) would need some kind of space, or maybe a way to enclose it in quote marks (I'm just throwing it there, I don't know the details).
- Attachments
-
- Screenshot from 2015-07-03 12-01-19.png (33.51 KiB) Viewed 3682 times
Salvatore La Bua - www.slblabs.com
DICGIM - University of Palermo, Italy
DICGIM - University of Palermo, Italy
Re: RPi Cam Web Interface
The web interface just passes the annotation template string as it exists through to the raspimjpeg process whenever you change it so it isn't dynamically involved. The raspimjpeg process interprets the string for every jpeg live image requested. The processed string just gets sent into the MMAL annotation call.slabua wrote:Thanks for the reply, yes I add leading spaces and spaces in the middle, but still within the limits.btidey wrote:There is not a specific problem with leading spaces. However, from the look of it you are adding on a lot of spaces at the start to force to the right, and a lot of spaces in the middle to force a wrap to second line and also to position to the right. That means you maybe exceeding the maximum length of annotation string. The web side and raspimjpeg allow up to 253 characters to be handled. The MMAL camera layer can restricts this further. I believe initially this was 64 characters, then got extended up to 128. Testing with latest v4 shows that it can now handle the maximum we can throw at it. If you have an older OS version then a rpi-update may help.
My issue is actually simpler than it sounds, I suppose. Basically, the annotation line I set, at some point changes from my previous screenshot, to this. Everything is still fine, only the leading spaces are removed, as if the web interface (or the config file created from it) would need some kind of space, or maybe a way to enclose it in quote marks (I'm just throwing it there, I don't know the details).
At the moment I don't see any place where the number of spaces would change on our side.
Is the date in your second shot wrapped on to the second line? That would imply that maybe it is the wrapping logic of the Annotation process could be sensitive to the content. It is always a bit risky to rely on spaces to control this sort of thing as I suspect Annotation was intended as a 1 liner and you are relying on side effects.
It might be worth posting the question in the thread viewtopic.php?f=43&t=97929
Re: RPi Cam Web Interface
Hi Robert,harlock74 wrote:Hi Robert,
Just to let you know that I was not able to change any values from the 'Edit Motion Settings' page. This has been happening with Google Chrome and Safari.
The odd thing is that I have tried, for istance, to edit in the /etc/motion/motion.conf the line
but to not avail. I mean when I get back to the 'Edit Motion Settings' page, the value 'none' is still shown in the field 'on_motion_detected '.Code: Select all
on_motion_detected mail -s “WebCam Motion Detected” my@email.co.uk
When you get a chance could you please have look at it?
Many thanks for that!
PS:All sorted, a simple reboot did the trick. Working like a charm, as expected!
Unfortunately I have been experiencing the same issue today. I can't change any values at all. I tried to reboot but to no avail.
Is there anything I can check?
Thanks a lot!