Send Motion-user mailing list submissions to
        motion-user@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/motion-user
or, via email, send a message with subject or body 'help' to
        motion-user-requ...@lists.sourceforge.net

You can reach the person managing the list at
        motion-user-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."


Today's Topics:

   1. Motion External Trigger (Chip Griffin)
   2. Re: Motion External Trigger (Colin Law)
   3. Re: Motion External Trigger (Mike Wilson)
   4. Re: Motion External Trigger (Chip Griffin)
   5. Re: Motion External Trigger (Colin Law)
   6. Re: Motion External Trigger (Chip Griffin)


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

Message: 1
Date: Fri, 03 Jun 2016 19:21:53 -0400
From: Chip Griffin <n1...@mac.com>
Subject: [Motion-user] Motion External Trigger
To: "motion-user@lists.sourceforge.net"
        <motion-user@lists.sourceforge.net>
Message-ID: <627c7f1a-8ac1-4791-8666-62c64ae15...@mac.com>
Content-Type: text/plain; charset=utf-8

I continue to struggle to get Motion to do the one thing I really want it to 
do. I know my setup is basically working because I can get it to take photos 
when it senses motion. But that?s not why I installed motion. I installed it to 
perform some actions in the system. For example I?d like it to tell 
xscreensaver to deactivate (use "xscreensaver-command -deactivate?). I?ve tried 
it direct. I?ve tried it via a shell script (which works when triggered from 
the command line). But no amount of efforts on my part have achieved the goal. 
At one point I stumbled across a thread which suggested it was a permissions 
issue, but I haven?t found a solution that will circumvent that problem (if it 
is the problem).

Any suggestions? Thank you in advance.


--
    Chip




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

Message: 2
Date: Sat, 4 Jun 2016 07:59:45 +0100
From: Colin Law <clan...@gmail.com>
Subject: Re: [Motion-user] Motion External Trigger
To: Motion discussion list <motion-user@lists.sourceforge.net>
Message-ID:
        <CAL=0glstsgqwmczczawvl5sfr-4ykecq2v5rw2ep9mp+kmb...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

On 4 June 2016 at 00:21, Chip Griffin <n1...@mac.com> wrote:
> I continue to struggle to get Motion to do the one thing I really want it to 
> do. I know my setup is basically working because I can get it to take photos 
> when it senses motion. But that?s not why I installed motion. I installed it 
> to perform some actions in the system. For example I?d like it to tell 
> xscreensaver to deactivate (use "xscreensaver-command -deactivate?). I?ve 
> tried it direct. I?ve tried it via a shell script (which works when triggered 
> from the command line). But no amount of efforts on my part have achieved the 
> goal. At one point I stumbled across a thread which suggested it was a 
> permissions issue, but I haven?t found a solution that will circumvent that 
> problem (if it is the problem).
>
> Any suggestions? Thank you in advance.

You have not told us exactly how you have tried to achieve this.

Colin



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

Message: 3
Date: Sat, 04 Jun 2016 08:35:44 +0000
From: Mike Wilson <knobby2...@gmail.com>
Subject: Re: [Motion-user] Motion External Trigger
To: Motion discussion list <motion-user@lists.sourceforge.net>
Message-ID:
        <CAAVeUCpbQyws=6ilqgqmjxzjfm5g5uuhdfcjs6ewzdfk5ij...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I would guess permission as well. Try running the script as the user
running motion. Tell us more about your setup and we can help more.
On Sat, Jun 4, 2016 at 3:02 AM Colin Law <clan...@gmail.com> wrote:

> On 4 June 2016 at 00:21, Chip Griffin <n1...@mac.com> wrote:
> > I continue to struggle to get Motion to do the one thing I really want
> it to do. I know my setup is basically working because I can get it to take
> photos when it senses motion. But that?s not why I installed motion. I
> installed it to perform some actions in the system. For example I?d like it
> to tell xscreensaver to deactivate (use "xscreensaver-command
> -deactivate?). I?ve tried it direct. I?ve tried it via a shell script
> (which works when triggered from the command line). But no amount of
> efforts on my part have achieved the goal. At one point I stumbled across a
> thread which suggested it was a permissions issue, but I haven?t found a
> solution that will circumvent that problem (if it is the problem).
> >
> > Any suggestions? Thank you in advance.
>
> You have not told us exactly how you have tried to achieve this.
>
> Colin
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> Motion-user mailing list
> Motion-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/motion-user
> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
>
-------------- next part --------------
An HTML attachment was scrubbed...

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

Message: 4
Date: Sat, 04 Jun 2016 14:29:49 -0400
From: Chip Griffin <n1...@mac.com>
Subject: Re: [Motion-user] Motion External Trigger
To: Motion discussion list <motion-user@lists.sourceforge.net>
Message-ID: <e2429f3e-201f-47d9-b87b-0c5b6af61...@mac.com>
Content-Type: text/plain; charset=utf-8

> On Jun 4, 2016, at 02:59, Colin Law <clan...@gmail.com> wrote:
> 
> You have not told us exactly how you have tried to achieve this.

Sorry, good point. What details do you need to know?

I?m running this on a Raspberry Pi 3 model B. I?m using the Raspberry Pi 
camera. This setup works fine for capturing images, so I know it works. Motion 
was installed using apt-get from the existing repository for Raspbian Jesse. 
I?m using a build from just after the 3 was released but I run update and 
upgrade every week or two, so generally I?ve got the latest of all that is 
installed.

I?ve tried to trigger using the following (these things tried independently, 
not at the same time; I?ve tried more, but these are just a few of the 
variations):

> on_event_start "/home/pi/bin/xsd.sh?

or
> on_event_start ?/usr/share/motion/xsd.sh?  (privileges are -rwxr-xr-x, owner 
> is motion)

or
> on_event_start "sudo xscreensaver-command -display :0.0 -deactivate?
or
> on_motion_detected /usr/bin/xscreensaver-command -display :0.0 -deactivate

The xsd.sh looks like this (and works 100% every time when run from the shell; 
there is a warning if I don?t specify the display, but it works either way from 
the shell and works in neither way from Motion):
> #!/bin/sh
> 
> /usr/bin/xscreensaver-command -deactivate

What I see in the log looks like this:
> [1] [NTC] [EVT] [Jun 04 13:58:24] event_new_video FPS 2
> [1] [NTC] [ALL] [Jun 04 13:58:24] motion_detected: Motion detected - starting 
> event 1400
> [1] [NTC] [ALL] [Jun 04 13:59:26] motion_loop: End of event 1400


> On Jun 4, 2016, at 04:35, Mike Wilson <knobby2...@gmail.com> wrote:
> 
> I would guess permission as well. Try running the script as the user running 
> motion. Tell us more about your setup and we can help more.

If it?s permissions, how do I fix? How do I run it as motion? I tried ?su 
motion? but it want?s a password for motion and I have no idea what that is (I 
tried a few obvious things without luck). See above for additional setup items.


--
    Chip




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

Message: 5
Date: Sat, 4 Jun 2016 21:10:08 +0100
From: Colin Law <clan...@gmail.com>
Subject: Re: [Motion-user] Motion External Trigger
To: Motion discussion list <motion-user@lists.sourceforge.net>
Message-ID:
        <CAL=0gLvaYw_YghtTMciE_XvzGk2O2zbM0MqMF2K7=f0bzqc...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

On 4 June 2016 at 19:29, Chip Griffin <n1...@mac.com> wrote:
>> On Jun 4, 2016, at 02:59, Colin Law <clan...@gmail.com> wrote:
>>
>> You have not told us exactly how you have tried to achieve this.
>
> Sorry, good point. What details do you need to know?
>
> I?m running this on a Raspberry Pi 3 model B. I?m using the Raspberry Pi 
> camera. This setup works fine for capturing images, so I know it works. 
> Motion was installed using apt-get from the existing repository for Raspbian 
> Jesse. I?m using a build from just after the 3 was released but I run update 
> and upgrade every week or two, so generally I?ve got the latest of all that 
> is installed.
>
> I?ve tried to trigger using the following (these things tried independently, 
> not at the same time; I?ve tried more, but these are just a few of the 
> variations):
>
>> on_event_start "/home/pi/bin/xsd.sh?
>
> or
>> on_event_start ?/usr/share/motion/xsd.sh?  (privileges are -rwxr-xr-x, owner 
>> is motion)
>
> or
>> on_event_start "sudo xscreensaver-command -display :0.0 -deactivate?
> or
>> on_motion_detected /usr/bin/xscreensaver-command -display :0.0 -deactivate
>
> The xsd.sh looks like this (and works 100% every time when run from the 
> shell; there is a warning if I don?t specify the display, but it works either 
> way from the shell and works in neither way from Motion):
>> #!/bin/sh
>>
>> /usr/bin/xscreensaver-command -deactivate
>
> What I see in the log looks like this:
>> [1] [NTC] [EVT] [Jun 04 13:58:24] event_new_video FPS 2
>> [1] [NTC] [ALL] [Jun 04 13:58:24] motion_detected: Motion detected - 
>> starting event 1400
>> [1] [NTC] [ALL] [Jun 04 13:59:26] motion_loop: End of event 1400
>
>
>> On Jun 4, 2016, at 04:35, Mike Wilson <knobby2...@gmail.com> wrote:
>>
>> I would guess permission as well. Try running the script as the user running 
>> motion. Tell us more about your setup and we can help more.
>
> If it?s permissions, how do I fix? How do I run it as motion? I tried ?su 
> motion? but it want?s a password for motion and I have no idea what that is 
> (I tried a few obvious things without luck). See above for additional setup 
> items.

First, if you have not already done so, put some logging in your
script (add a message to a log file for example) to check that the
script is running.

Next, I see from the description of xscreensaver-command that it may
output to stdout and stderr, so redirect those to a file in your
script to see if it says anything useful.

Colin



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

Message: 6
Date: Sat, 04 Jun 2016 20:31:36 -0400
From: Chip Griffin <n1...@mac.com>
Subject: Re: [Motion-user] Motion External Trigger
To: Motion discussion list <motion-user@lists.sourceforge.net>
Message-ID: <b7a1ab35-814c-442a-8d86-0f5591bc9...@mac.com>
Content-Type: text/plain; charset=utf-8

On Jun 4, 2016, at 16:10, Colin Law <clan...@gmail.com> wrote:
> 
> First, if you have not already done so, put some logging in your script (add 
> a message to a log file for example) to check that the script is running.
> 
> Next, I see from the description of xscreensaver-command that it may output 
> to stdout and stderr, so redirect those to a file in your script to see if it 
> says anything useful.

I put a simple log command in the script. It works when I manually execute the 
shell script. I directed the output of stdout and stderr to a log file. It 
works when I manually execute the shell script.

Neither the modification dates nor the log file contents of either log file is 
changed when I create motion in front of the camera. I know Motion detected the 
motion because it?s log file shows it sensed the motion.

So I?m feeling that the script isn?t getting executed. But there?s nothing 
wrong with the script itself as it executes fine from the shell.

So that seems to be additional data, however, I feel no closer to a successful 
outcome.


--
    Chip




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

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e

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

_______________________________________________
Motion-user mailing list
Motion-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/motion-user


End of Motion-user Digest, Vol 121, Issue 2
*******************************************

Reply via email to