jussi24
Posts: 64
Joined: Fri Jul 26, 2013 11:30 am

Re: RPi Cam Web Interface

Thu Dec 10, 2015 1:25 pm

Hello all,

I assembled (another word for putting "stolen code" together) a file called cam_stream.php that takes care of the new AutoCamera_Interval parameter when accessing raspimjpeg with a view like vlc or tinyCam. See below.
It takes the AutoCamera_Interval parameter from the Edit schedule settings page and triggers the status_mjpeg.txt file that re-enables the camera if it was shutted down because of an interval timeout. This is done twice the interval period length.
Important: the status_mjpeg.txt file is now residing in /run/shm/mjpeg. I created a symlink from the /var/www folder to that place (I did the same for scheduleLog.txt to minimize write cycles to the flash). Direct access to /run/shm/mjpeg (no symlink) seems not to be possible for the php script. Maybe one could open the php base dirs for that but I cannot estimate possible security issues.
So put your viewer to http://[yourRaspi]/cam_stream.php and you're fine.

Code: Select all

<?php
//Blantly ripped off from https://github.com/donatj/mjpeg-php/blob/master/mjpeg.php
//And then modified to suit out needs

define('BASE_DIR', dirname(__FILE__));
require_once(BASE_DIR.'/config.php');


if (isset($_GET["pDelay"]))
   {
      $preview_delay = $_GET["pDelay"];
   } else {
      $preview_delay = 10000;
   }

writeLog("mjpeg stream with $preview_delay delay");

// Used to separate multipart
$boundary = "PIderman";

// We start with the standard headers. PHP allows us this much
header ("Content-type: multipart/x-mixed-replace; boundary=$boundary");
header ("Cache-Control: no-cache");
header ("Pragma: no-cache");
header ("Connection: close");

ob_flush();             //Push out the content we already have (gets the headers to the browser as quickly as possible)

set_time_limit(0); // Set this so PHP doesn't timeout during a long stream


define('SCHEDULE_CONFIG', 'schedule.json');
define('SCHEDULE_AUTOCAMERAINTERVAL', 'AutoCamera_Interval');

$schedulePars = array();
$schedulePars = loadPars(BASE_DIR . '/' . SCHEDULE_CONFIG);

$touch_file = "status_mjpeg.txt";

// update now and later all x seconds
touch($touch_file);
// trigger at least two times within AutoCamera_Interval with reserve
$touch_interval=$schedulePars[SCHEDULE_AUTOCAMERAINTERVAL] / 2;
if ($touch_interval >= 4)
{
   $touch_interval-=3;
}
 writeLog("touch_interval is $touch_interval seconds");
$next_touch_time = time()+$touch_interval;
// writeLog("Next touch trigger: $next_touch_time");

while(true)
{
        ob_start();
        if (time()>=$next_touch_time)
        {
            $next_touch_time = time()+$touch_interval;
// writeLog("next touch trigger: $next_touch_time");
            touch($touch_file);
        }

        echo "--$boundary\r\n";
        echo "Content-type: image/jpeg\r\n";

        $fileContents = file_get_contents("/dev/shm/mjpeg/cam.jpg");
        $fileLength = strlen($fileContents);

        echo "Content-Length:" . $fileLength . "\r\n";
        echo "\r\n";

        echo $fileContents;

        echo "\r\n";
        ob_end_flush();

        usleep($preview_delay);
}


function loadPars($config) {
 $pars = initPars();
 if (file_exists($config)) {
  try {
   //get pars from config file and update only values which exist in initPars
   $input = json_decode(file_get_contents($config), true);
   foreach($pars as $key => $value) {
    if (array_key_exists($key, $input)) {
     $pars[$key] = $input[$key];
    }
   }
  }
  catch (Exception $e) {
  }
 }
 return $pars;
}

function initPars() {
 $pars = array(
/*
 SCHEDULE_FIFOIN => BASE_DIR.'/FIFO1',
 SCHEDULE_FIFOOUT => BASE_DIR.'/FIFO',
 SCHEDULE_CMDPOLL => '0.03',
 SCHEDULE_MODEPOLL => '10',
 SCHEDULE_MANAGEMENTINTERVAL => '3600',
 SCHEDULE_MANAGEMENTCOMMAND => '',
 SCHEDULE_PURGEVIDEOHOURS => '0',
 SCHEDULE_PURGEIMAGEHOURS => '0',
 SCHEDULE_PURGELAPSEHOURS => '0',
 SCHEDULE_GMTOFFSET => '0',
 SCHEDULE_PURGESPACEMODE => '0',
 SCHEDULE_PURGESPACELEVEL => '10',
 SCHEDULE_DAWNSTARTMINUTES => '-180',
 SCHEDULE_DAYSTARTMINUTES => '0',
 SCHEDULE_DAYENDMINUTES => '0',
 SCHEDULE_DUSKENDMINUTES => '180',
 SCHEDULE_LATITUDE => '52.00',
 SCHEDULE_LONGTITUDE => '0.00',
 SCHEDULE_MAXCAPTURE => '0',
 SCHEDULE_DAYMODE => '1',
 SCHEDULE_AUTOCAPTUREINTERVAL => '0',
*/
 SCHEDULE_AUTOCAMERAINTERVAL => '99'
/*,
 SCHEDULE_TIMES => array("09:00","10:00","11:00","12:00","13:00","14:00"),
 SCHEDULE_COMMANDSON => array("ca 1","","","ca 1","","","","","","",""),
 SCHEDULE_COMMANDSOFF => array("ca 0","","","ca 0","","","","","","",""),
 SCHEDULE_MODES => array("","em night","md 1;em night","em auto","md 0;em night","","","","","","")
*/
 );
return $pars;
}


greg_ory
Posts: 3
Joined: Thu Mar 27, 2014 9:21 pm

Re: RPi Cam Web Interface

Fri Dec 11, 2015 3:04 pm

Hi there,

I am looking for some help on motion settings as my settings seem to be very sensitive. I am wondering if there are more detailed explanation to all the settings available?

Thank you in advance

Cheers.
Greg

jeromec
Posts: 130
Joined: Sun Apr 14, 2013 5:14 pm

Re: RPi Cam Web Interface

Fri Dec 11, 2015 8:35 pm

Hello
I used to use the classic RPi Cam web Interface (withoutout the pan-tilt function), I've purchased some servos and I would upgrade it to RPi_Cam_Web_Interface_ServoBlaster_pan_tilt.
I've followed this : https://github.com/skalad/RPi_Cam_Web_I ... r_pan_tilt

And it no longer works
my page shows me a loading sign and i have no streaming.

I thonk i've made something wrong but I can't get what.

now I have two folders : RPi_Cam_Web_Interface and RPi_Cam_Web_Interface_ServoBlaster_pan_tilt

Can someone help me please ? I really like this interface !
thank you
http://meteovictorhugo.ddns.net:1800/demo/

jeromec
Posts: 130
Joined: Sun Apr 14, 2013 5:14 pm

Re: RPi Cam Web Interface

Fri Dec 11, 2015 11:18 pm

I've tried with a previous image of my raspbian, and just update my version of rpi cam interface, i have the same loading sign and the five buttons but with no text in it ...
Maybe it's not important but i use nginx .

thanks in advance

jerome
http://meteovictorhugo.ddns.net:1800/demo/

jeromec
Posts: 130
Joined: Sun Apr 14, 2013 5:14 pm

Re: RPi Cam Web Interface

Sat Dec 12, 2015 10:43 am

jeromec wrote:I've tried with a previous image of my raspbian, and just update my version of rpi cam interface, i have the same loading sign and the five buttons but with no text in it ...
Maybe it's not important but i use nginx .

thanks in advance

jerome
ok, I've made it, i made a clean install of everything and it seems to work !!!
Have a nice day
http://meteovictorhugo.ddns.net:1800/demo/

Zombievirus
Posts: 19
Joined: Sun Sep 20, 2015 5:44 am

Re: RPi Cam Web Interface

Sat Dec 12, 2015 10:28 pm

Hi,

Can someone please upload a perfectly working motion.conf file

I have the following issues:
  • when i start motion it runs at 100% cpu usage!!
    RPi Cam Interface keeps detecting motion and recording videos even if never click the start motion detection button.
    the very fact that motion is running on the pi triggers motion detection and starts video recording in RPi Cam Interface.
the way i want it to work:
  • motion should not run at 100%
    even if motion daemon is running, RPI Cam interface should only start motion detection and video recording if i click the start motion detection button.
to start motion i just type the following in the command line:

Code: Select all

sudo motion
I have not setup autostart at boot for motion yet because of the 100% CPU Usage.

If you guys have motion up and running perfectly, please help me out with your motion.conf!

Thanks

rdmcginnes
Posts: 9
Joined: Thu Mar 21, 2013 10:08 am

Re: RPi Cam Web Interface

Mon Dec 14, 2015 4:19 pm

You can access your web server by name with no worry about an IP address, even if it changes.

I got my first RaspberryPi about 6 months after they first started shipping. I now have six. I have web servers on 5 of them. My ISP uses DHCP to assign IP addresses to my routers so the WAN/internet IP address changes from time to time. I solved the problem of finding out their new/changed IP addresses by setting up a web site at a web hosting company at http://host-ed.me. My RPi's have a cron job which periodically acceses my host-ed web site. The HTTP protocol gives the web site the WAN IP address of my RPi. The web site then creates a web page containing that WAN address and a link to it which I can access at any time to get to my Raspberry Pi's. I have been using it for two years and the only problem is that sometimes I have to wait for the cron job on my RPi's to send their new IP address to the Host-ed web site.

About a month ago I decided to create a multi-user version of this web site so I could share it with other RPi users. My thinking is to make it available to a few people on this forum so we can find and fix any bugs and then announce it on the Maggpi Magazine.

If you would like to try it go to http://eazyip.com, read the "Guide" and sign up. My intent is that every thing you need to know to use it is supplied by the web site. It's really a quite simple process:
1. You pick a username which you will use to access your Raspberry Pi (and you account on eazyip.com).
2. You tell me your email address so I can contact you if I need to. Also so that it might help keep undesirables from using the site. I promise I won't share your email address with anyone. Just so we both know that you have entered the correct email address, I email you a code which you must enter on the next web page.
3. You give me your name or whatever you would like to be called.
4. You tell me the the port number of your RPi web server.

You can optionally tell me your Host name and LAN/internal IP address and I will use it and your WAN/internet IP address to temporarily set up your web page that you will use to access your web server. You can try out this web page before you add three statements (which the eazyip.com web site provides)to your cronfile to automate the process.

If you have any problems or comments you can contact me [email protected].
Last edited by rdmcginnes on Mon Dec 14, 2015 10:53 pm, edited 2 times in total.

rdmcginnes
Posts: 9
Joined: Thu Mar 21, 2013 10:08 am

Re: RPi Cam Web Interface

Mon Dec 14, 2015 4:45 pm

Zombievirus wrote:Hi,

Can someone please upload a perfectly working motion.conf file

I have the following issues:
  • when i start motion it runs at 100% cpu usage!!
    RPi Cam Interface keeps detecting motion and recording videos even if never click the start motion detection button.
    the very fact that motion is running on the pi triggers motion detection and starts video recording in RPi Cam Interface.
the way i want it to work:
  • motion should not run at 100%
    even if motion daemon is running, RPI Cam interface should only start motion detection and video recording if i click the start motion detection button.
to start motion i just type the following in the command line:

Code: Select all

sudo motion
I have not setup autostart at boot for motion yet because of the 100% CPU Usage.

If you guys have motion up and running perfectly, please help me out with your motion.conf!

Thanks


I tried the external motion with RPi Cam Web Interface and was not happy with it. I use the internal motion detection and I find it does most of what I want.

To use "internal motion":
1. Install RPi Web Cam Interface and tell it to start automatically.
2. Reboot
3. Use your browser to bring up your web site, e.g. go to 192.168.2.200:8080
4. Click on camera settings and scroll to the bottom and change "motion detection" from "external" to "internal" and click "OK".
5. Reboot

I found that I improved motion detection by changing the new/internal motion settings.

The settings I use are:

Motion Vector Preview: Off
Noise level (1-255): 1010
Threshold (1-32000): 250
Mask Image:
Change Frames to start: 3
Still Frames to stop: 150
Save vectors to .dat : Off

Zombievirus
Posts: 19
Joined: Sun Sep 20, 2015 5:44 am

Re: RPi Cam Web Interface

Tue Dec 15, 2015 5:21 am

Hi,

I just can't get motion detection to work. I did:
  • a clean reinstall of raspbian wheezy
    a clean reinstall of rpi web cam interface
    changed the daemon parameter in /etc/default/motion to yes
    didn't even touch the motion.conf in /etc/motion/
    rebooted the pi
    checked in htop that motion was running (it was)
    surfed to rpi web interface page
    sacrificed a Lamb to Lord Satan himself !!!
    didn't change a single thing in any of the settings, everything is default (motion external as per default)
    clicked motion detection start
    waved my hand in front of the raspi camera
    no motion detected!!
    cried like a little girl...
Video recording and image snapshots working fine!

Can someone please tell me what i am doing wrong.

Thanks

BerryPicker
Posts: 177
Joined: Tue Oct 16, 2012 3:03 pm
Location: The East of England

Re: RPi Cam Web Interface

Tue Dec 15, 2015 10:12 am

Zombievirus wrote:I just can't get motion detection to work....Can someone please tell me what i am doing wrong.
For me also the default external motion does not work. But the internal motion does. To use the internal motion detection you have to change the camera setting "motion detection" from "external" to "internal" . For more information see the rdmcginnes post above and the RPi Cam Web Interface wiki page.

Zombievirus
Posts: 19
Joined: Sun Sep 20, 2015 5:44 am

Re: RPi Cam Web Interface

Tue Dec 15, 2015 10:40 am

Neither external nor internal motion detection works!

used all the settings stated above. internal motion not triggering recording :(

I am on Raspbian wheezy not jessie. could that be a problem?

BerryPicker
Posts: 177
Joined: Tue Oct 16, 2012 3:03 pm
Location: The East of England

Re: RPi Cam Web Interface

Tue Dec 15, 2015 2:17 pm

Zombievirus wrote:I am on Raspbian wheezy not jessie. could that be a problem?
I too am using wheezy. Maybe try setting preview to look at the motion vector magnitudes. They should show up as moving bright areas in the otherwise black viewing display.

herious89
Posts: 6
Joined: Sun Nov 29, 2015 10:57 pm

Re: RPi Cam Web Interface

Wed Dec 16, 2015 2:16 am

Where is the script to turn the motion detection on/off from terminal in RPi?

deedesie
Posts: 5
Joined: Fri Nov 27, 2015 5:59 am

Re: RPi Cam Web Interface

Wed Dec 16, 2015 5:03 am

btidey wrote:
deedesie wrote:
thanks. So i followed your instructions, set it to internal(1), all settings as you indicate for motion and scheduler(1,2) set up. but in step (3), when I click on the "start motion" , the "recording video..." button is permanently greyed out, so is the "stop camera" and "record video stop". Basically the video camera seems to be running permanently even if there is no motion. The annotation constantly shows 0000 for %f and %c runs around 425. see attachment. not sure what is going on, but it just does not seem right? any other pointers or help gladly appreciated.
The attachment 2015-12-09 10-23-02 PM.jpg is no longer available
The screen shot shows that motion trigger has started a recording, but I guess that it is not seeing a sufficiently still scene to stop.

The %c value of 425 is above the trigger threshold. Try bumping the threshold up to a higher value e.g. 1000

Recordings triggered can get in the way of adjusting settings. One little trick is to temporarily remove the ca 1 and ca 0 from the scheduler settings. That way one can play around with the values and see in the logs when triggers occur without recordings taking place.

The other thing worth checking is using the motion vector preview under motion settings. This displays the vector data being generated by the camera that is used to detect motion. For still scenes it should be mainly black. One thing that can give a busy image is if you have any mains driven illumination being seen directly by the camera. This can be picked up as flicker and give a 'busy' image. You can increase the 1010 value up higher to increase the filtering applied.
Thanks it's all working. it seems that the indoor lighting makes it difficult for the motion detector to work properly. By the way, the code snippet seems to be wrong that you added here, or the description in the interface is wrong..
motion_noise 1010
motion_threshold 250
motion_startframes 3
motion_stopframes 150
see attached.

but again, thank you so much for all you help and great software!
Attachments
2015-12-15 9-01-16 PM.jpg
2015-12-15 9-01-16 PM.jpg (52.08 KiB) Viewed 5828 times

Zombievirus
Posts: 19
Joined: Sun Sep 20, 2015 5:44 am

Re: RPi Cam Web Interface

Wed Dec 16, 2015 9:38 am

Hi,

Did another clean install of Raspbian and RPi Web Interface but still no success with Internal Motion Detection

Here is the Log:

Code: Select all

{2015/12/16 10:23:39} Internal motion detection started
{2015/12/16 10:23:39} recommended video buffers 1
{2015/12/16 10:23:39} h264 buffers set to recommended 1
{2015/12/16 10:23:39} Set up internal detect width=121 height=68
{2015/12/16 10:24:01} send smd 1
{2015/12/16 10:24:27} Change: vector_preview = 1
{2015/12/16 10:24:27} recommended video buffers 1
{2015/12/16 10:24:27} h264 buffers set to recommended 1
{2015/12/16 10:24:27} Set up internal detect width=121 height=68
{2015/12/16 10:24:49} Internal motion detection stopped
{2015/12/16 10:24:49} recommended video buffers 1
{2015/12/16 10:24:49} h264 buffers set to recommended 1
{2015/12/16 10:24:49} Set up internal detect width=121 height=68
{2015/12/16 10:27:27} Change: vector_preview = 0
{2015/12/16 10:27:27} recommended video buffers 1
{2015/12/16 10:27:27} h264 buffers set to recommended 1
{2015/12/16 10:27:27} Set up internal detect width=121 height=68
{2015/12/16 10:28:10} RaspiMJPEG Version 5.2.12
{2015/12/16 10:28:10} recommended video buffers 1
{2015/12/16 10:28:10} h264 buffers set to recommended 1
{2015/12/16 10:28:10} Set up internal detect width=121 height=68
{2015/12/16 10:28:10} MJPEG streaming, ready to receive commands
{2015/12/16 10:28:10} send smd 9
[2015/12/16 10:28:11] RaspiCam support started
[2015/12/16 10:28:11] Capture Pipe already exists /var/www/dietpicam/FIFO1
[2015/12/16 10:28:11] Scheduler loop is started
[2015/12/16 10:28:12] New period detected 0
[2015/12/16 10:28:12] Scheduled management tasks. Next at 1450261692
{2015/12/16 10:28:48} Internal motion detection started
{2015/12/16 10:28:48} recommended video buffers 1
{2015/12/16 10:28:48} h264 buffers set to recommended 1
{2015/12/16 10:28:48} Set up internal detect width=121 height=68
{2015/12/16 10:28:54} Internal motion detection started
{2015/12/16 10:28:54} recommended video buffers 1
{2015/12/16 10:28:54} h264 buffers set to recommended 1
{2015/12/16 10:28:54} Set up internal detect width=121 height=68
{2015/12/16 10:29:24} Internal motion detection stopped
{2015/12/16 10:29:24} recommended video buffers 1
{2015/12/16 10:29:24} h264 buffers set to recommended 1
{2015/12/16 10:29:25} Set up internal detect width=121 height=68
The Preview in Web Interface is set to 1024 x 576.

I couldn't find the internal detect width anywhere in the .conf file. Where can i modify all these settings? and what does send smd 9 mean?

Can someone please help me out with a fully functional raspimjpeg conf file.

I really want the internal motion detection to work but something is going horribly wrong and i am not even aware of it.

Regards

BerryPicker
Posts: 177
Joined: Tue Oct 16, 2012 3:03 pm
Location: The East of England

Re: RPi Cam Web Interface

Thu Dec 17, 2015 2:55 pm

deedesie wrote:By the way, the code snippet seems to be wrong
motion_noise 1010
Not wrong. See the wiki
http://elinux.org/RPi-Cam-Web-Interface
Look under 'Alternate algorithm'

Zombievirus
Posts: 19
Joined: Sun Sep 20, 2015 5:44 am

Re: RPi Cam Web Interface

Thu Dec 17, 2015 5:10 pm

Hi,

Well Internal motion just didn't want to work so i tried to look for alternatives and found this.

I modified the script to save all the media to the same directory as of Rpi Cam Interface. I just can't get the preview.php file to include these recordings on the webpage. It just displays the recordings done by RPi Cam Interface.

Can someone help me out with the php modifications? The Python script also saves the videos in .mp4.

Thanks

bshure
Posts: 10
Joined: Fri Oct 30, 2015 3:40 am

Re: RPi Cam Web Interface & Pi-Pan

Fri Dec 18, 2015 1:41 pm

Things were working well and I was feeling pretty proud of myself.

Then the servos and pi-light stopped working in the RPi Cam Web Interface.

All of the tests and programs in the pi-pan directory work fine.

I'm running jessie and I am current on firmware, software and OS updates.

I tried reinstalling, file permissions and checking the log.

A permissions problem caused the servos to stop working a few weeks ago, but the pi-light still worked.

Any guidance or ideas would bet greatly appreciated.

Cheers!

shh200
Posts: 9
Joined: Tue Dec 30, 2014 9:33 pm

Re: RPi Cam Web Interface

Sat Dec 19, 2015 7:58 am

Hi,

Wiki instructions for password protected website doesnt work anymore.
Remote access to website with User/Pass and changing port

http://www.raspberrypi.org/forums/viewt ... 60#p500460
I cannot find these lines at /etc/apache2/sites-enabled/000-default or default.conf
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
Is there updated instructions somewhere?
I managed to change port but couldnt password protect site.

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

Re: RPi Cam Web Interface

Sat Dec 19, 2015 12:56 pm

Zombievirus wrote:Neither external nor internal motion detection works!

used all the settings stated above. internal motion not triggering recording :(

I am on Raspbian wheezy not jessie. could that be a problem?
Both external and internal motion detection do work if the config is correct.

External Motion
1. Do not install motion separately, do not start motion separately, do not configure motion start ups, daemon modes or anything like that. RPi_Cam installs motion with its own /etc/motion/motion.conf file and it starts and stops the motion program when it is needed.

2. With external motion and motion detect started then you should be able to click on motion settings and see a table of parameters. This indicates that motion has been started OK by RPi Cam.

3. Check in particular netcam_url (http://localhost/cam_pic.php), on_event_start (echo -n '1' > /var/www/FIFO1), and on_event_stop (echo -n '0' > /var/www/FIFO1). The first is how motion gets a feed of images, the other two are how motion sends triggers into the RPi Cam system

4. If you are using security (username and password) then the motion config needs to know this so it can still fetch the image data OK. This should have been set up during the install into the netcam_userpass value

Internal Motion
1. Doesn't use a separate motion process. Even though motion has been installed, it will not be started or used. Do not start motion separately.

2. It produces the same triggers as external into the FIFO1 queue

Both
1. The triggers by themselves do not start and stop video recordings. That is handled by the scheduler. It can do different things depending on its set up.

2. Simplest scheme is to use the All Day and make sure Start has ca 1 and stop has ca 0. These should be there by default.

3. The log in the scheduler should show motion triggers when motion is detected and the actions like video recording following on from the triggers. So if anything is not working check this log to see what is happening.

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

Re: RPi Cam Web Interface

Sat Dec 19, 2015 1:09 pm

shh200 wrote:Hi,

Wiki instructions for password protected website doesnt work anymore.
Remote access to website with User/Pass and changing port

http://www.raspberrypi.org/forums/viewt ... 60#p500460
I cannot find these lines at /etc/apache2/sites-enabled/000-default or default.conf
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
Is there updated instructions somewhere?
I managed to change port but couldnt password protect site.
If you use the ./install.sh method you can just enter port, user, password in there.
The apache settings are now in a file called raspicam.conf

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

Re: RPi Cam Web Interface & Pi-Pan

Sat Dec 19, 2015 1:13 pm

bshure wrote:Things were working well and I was feeling pretty proud of myself.

Then the servos and pi-light stopped working in the RPi Cam Web Interface.

All of the tests and programs in the pi-pan directory work fine.

I'm running jessie and I am current on firmware, software and OS updates.

I tried reinstalling, file permissions and checking the log.

A permissions problem caused the servos to stop working a few weeks ago, but the pi-light still worked.

Any guidance or ideas would bet greatly appreciated.

Cheers!
How did the permissions problem get reported? The servo works by writing to /dev/servoblaster This must be writable by user www-data

bshure
Posts: 10
Joined: Fri Oct 30, 2015 3:40 am

Re: RPi Cam Web Interface

Sat Dec 19, 2015 2:35 pm

Thanks.

servoblaster permissions are okay:

prw-rw-rw- 1 root root 0 Dec 19 04:09 servoblaster
-rw-r--r-- 1 root root 103 Dec 19 04:09 servoblaster-cfg

If these permissions were wrong then the light would still work, wouldn't it?

Last time I looked at an "ls -lh" and noticed that one file in the last was owned by root. I changed it and the servos started working.

Thanks.

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

Re: RPi Cam Web Interface

Sat Dec 19, 2015 4:58 pm

bshure wrote:Thanks.

servoblaster permissions are okay:

prw-rw-rw- 1 root root 0 Dec 19 04:09 servoblaster
-rw-r--r-- 1 root root 103 Dec 19 04:09 servoblaster-cfg

If these permissions were wrong then the light would still work, wouldn't it?

Last time I looked at an "ls -lh" and noticed that one file in the last was owned by root. I changed it and the servos started working.

Thanks.
Although the servoblaster method bypasses the original pipan control for the pan/tilt function, the light still uses that so the FIFO_pipan control path must be present and set up as per wiki with the right permissions.

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

Re: RPi Cam Web Interface

Mon Dec 21, 2015 12:51 pm

Has the install script been modified for the use with Jessie yet?
3b+, 2b, b+, b, Zero & Zero-W

Return to “Camera board”