Send Motion-user mailing list submissions to
        [email protected]

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
        [email protected]

You can reach the person managing the list at
        [email protected]

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


Today's Topics:

   1. Re: Motion software - on_picture_save event (Kinney Baughman)
   2. Re: Send just one file at the start of motion (?ydr?nas Urbonas)


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

Message: 1
Date: Tue, 11 Aug 2015 15:40:25 -0400
From: Kinney Baughman <[email protected]>
Subject: Re: [Motion-user] Motion software - on_picture_save event
To: Motion discussion list <[email protected]>
Message-ID:
        <cahbopqumznfkpvu3md4zbwzn3owsqmqa03jnb2+qpcxehuc...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

On Tue, Aug 11, 2015 at 12:01 PM, Slavica Tomovic <[email protected]>
wrote:

>
> Kinney, your scrip would be very useful for me. My RPI now sends
> videos to remote servers but does not delete them from RPI. I need a
> script that would send motion video, check if transfer was successful
> and then delete the video from rpi memory.
>
> If you have something similar, you would save me a lot of time.
>

I just move my videos captured by motion to another drive on my local
network and then use a simple python script that acts as a web server to
serve them up to me from a remote location, usually my office at work.  My
video moves are all successful so I don't worry about checking to see if
the transfer was successful.  Perhaps I should but I don't.

You're going to need to use a program that gives you some kind of return
code you can use to check to see if your transfer was successful.

I have a passing knowledge of "curl".  I suggest you look into it.  It's
amazing what that program can do.

Pay attention to the "-f" flag.  On failure, that flag is supposed to
return a "22" error code instead of an error page.  You could check for
that code in your script and, failing to see it, delete the file from your
local rpi.

Hope this helps.



-- 
Kinney Baughman,       Technology Support Specialist
Technology Support Services
Appalachian State University
257 University Hall
Boone, NC 28608                  Phone: 828-262-6523
-------------- next part --------------
An HTML attachment was scrubbed...

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

Message: 2
Date: Tue, 11 Aug 2015 22:40:58 +0300
From: ?ydr?nas Urbonas <[email protected]>
Subject: Re: [Motion-user] Send just one file at the start of motion
To: Motion discussion list <[email protected]>
Message-ID:
        <cachtdwqj9b+q3xzkru95q9ehexzqqh3nghmpfrutxj1zj70...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

You don't need to snapshot every 5 seconds if you use curl command. Just
send command and sleep for 5 secs, if the snapshot is not ready

On Tue, Aug 11, 2015 at 10:36 PM, alex dantart <[email protected]> wrote:

> Hi ?ydr?nas:
>
> Yes, it worked that way ... I had to activate the snapshot each 5 seconds
> to get it work, though
> is it possible to do without this ?
>
> 2015-08-10 20:52 GMT+02:00 ?ydr?nas Urbonas <[email protected]>:
>
>> Motion writes the picture file at the end of event. That's why you can't
>> use picture in your script.
>> To workaround - in your script you can trigger "snapshot" creation and
>> send "lastsnap.jpg" file. Like this:
>>
>> curl -s http://localhost:8000/0/action/snapshot > /dev/null
>>
>> Don't forget to specify snapshot file name as "lastsnap" in your config
>>
>> On Mon, Aug 10, 2015 at 9:23 PM, alex dantart <[email protected]> wrote:
>>
>>> Using on_picture_save is the same "problem"  I'm receiving a photo 2
>>> minutes ago dated ... I don't know why !
>>>
>>> I describe the thing happening:
>>> (event_gap seconds has passed, so the system is "clean and ready" to
>>> capture ...)
>>>
>>> - I see the time creation of file "last.jpg"  ... it's 20:07
>>>
>>> - I "enter" in the scene (to trigger motion) at 20:16:52
>>>   and the log captures this
>>>
>>>
>>> *[1] [NTC] [EVT] [Aug 10 20:16:52] event_new_video FPS 10[1] [NTC] [ALL]
>>> [Aug 10 20:16:52] motion_detected: Motion detected - starting event 1*
>>>
>>> - I leave the scene 30 seconds later ... and nothing appears in the log
>>>
>>> - I wait outside the scene ...
>>>
>>> - And after "event_gap" seconds, that's to say, after 120 seconds I have
>>> this in log
>>>
>>>
>>>
>>> *[1] [NTC] [ALL] [Aug 10 20:18:59] preview_save: different filename or
>>> picture only![1] [NTC] [EVT] [Aug 10 20:18:59] event_newfile: File of type
>>> 1 saved to: /home/motion/last.jpg[1] [NTC] [ALL] [Aug 10 20:18:59]
>>> motion_loop: End of event 1*
>>>
>>> and the creation of file "last.jpg" is now 20:18 ... BUT !!! (here is
>>> the problem) ... the date of that shot is 20:16:52 ... (because it's
>>> written in the bottom right of the picture)
>>>
>>> So I'm receiving when the event ends, a photo of the beginning of the
>>> event, and I need to receive as soon as the even starts...
>>> I have tested with this configuration:
>>>
>>> *THIS COMMON:*
>>> *event_gap 120*
>>>
>>>
>>>
>>>
>>> *output_pictures firsttarget_dir /home/motion/picture_filename last*
>>> *and try activating in test 1*
>>> *on_event_start /home/me/send_picture /home/motion/last*
>>>
>>> *in test 2*
>>> *on_event_end /home/me/send_picture /home/motion/last*
>>>
>>> *in test 3*
>>> *on_picture_save /home/me/send_picture /home/motion/last*
>>>
>>> in all 3 tests I got the same problem
>>>
>>> Thank you
>>>
>>>
>>>
>>>
>>>
>>>
>>> 2015-08-10 19:55 GMT+02:00 Mike Wilson <[email protected]>:
>>>
>>>> I use the config variable on_picture_save to generate thumbnails. Maybe
>>>> this is what you want?
>>>>
>>>> On Mon, Aug 10, 2015 at 1:52 PM alex dantart <[email protected]> wrote:
>>>>
>>>>> What I need is:   to save one picture showing the start of the
>>>>> motion and call my script  ... and sleep in the next 180 seconds
>>>>>
>>>>> What I have right now is:  the picture at the beginning of the motion
>>>>> is saved and it's sent to script at the beginning of the next event starts
>>>>>  (weird! but is running that way today)
>>>>>
>>>>>
>>>>> 2015-08-10 19:21 GMT+02:00 ?ydr?nas Urbonas <[email protected]>:
>>>>>
>>>>>> If time gap between 4) and 5) was less than "180" - then it works as
>>>>>> expected: the event has been triggered at 2) and has not finished yet, so
>>>>>> you received only first snapshot. And this is exactly what you want. 
>>>>>> Unless
>>>>>> I misunderstood you
>>>>>>
>>>>>> On Mon, Aug 10, 2015 at 8:02 PM, alex dantart <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi:
>>>>>>>
>>>>>>> I've played with events on start, on end, and event_gap, but I can't
>>>>>>> do what I need.
>>>>>>>
>>>>>>> I'd like to trigger a perl script I have that sends the first image
>>>>>>> of a motion to my email.
>>>>>>>
>>>>>>> I have:
>>>>>>>
>>>>>>> event_gap 180
>>>>>>> output_pictures first
>>>>>>> target_dir /home/motion/
>>>>>>> picture_filename last
>>>>>>> on_event_start /home/me/send_picture /home/motion/last
>>>>>>>
>>>>>>> What I receive now is very weird:
>>>>>>>
>>>>>>> 1) Scene is still
>>>>>>> 2) There's movement in the scene
>>>>>>> 3) The movement ends in the scene
>>>>>>> 4) Scene is still again
>>>>>>> 5) There's again movement in the scene
>>>>>>>
>>>>>>> and I receive the image from the moment of point 2)
>>>>>>> What I suppose to receive (what I'd like) is to receive the first
>>>>>>> image when there's motion in the scene, and then not receiving nothing 
>>>>>>> at
>>>>>>> least during 180 seconds.
>>>>>>>
>>>>>>> Thank you !
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Alex Dantart
>>>>>>>  http://dantart.es
>>>>>>>  http://uptimiza.com
>>>>>>>
>>>>>>> If you want to print this email, please, click here before
>>>>>>> <http://t.sidekickopen16.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs5vfRYYVQBvXW3LyyX-Vd_V9H56dJ9Pf5-JP-802?t=https%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3Ddeforestation%26hl%3Den%26prmd%3Dimvnsb%26source%3Dlnms%26tbm%3Disch%26ei%3DkkDvTpCnJIjm-ga50NiJAg%26sa%3DX%26oi%3Dmode_link%26ct%3Dmode%26cd%3D2%26ved%3D0CBUQ_AUoAQ%26biw%3D1280%26bih%3D952%23hl%3Den%26tbm%3Disch%26sa%3D1%26q%3Ddeforestation%26pbx%3D1%26oq%3Ddeforestation%26aq%3Df%26aqi%3Dg10%26aql%3D%26gs_sm%3De%26gs_upl%3D74829l75066l0l75130l4l3l0l1l1l0l196l196l0.1l1l0%26bav%3Don.2%2Cor.r_gc.r_pw.r_cp.%2Ccf.osb%26fp%3D531ea00e3ebe35f9%26biw%3D1280%26bih%3D952&si=5944588326404096&pi=7ada9134-22ed-44e3-feaa-5ef1103b61d8>
>>>>>>> do it
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Motion-user mailing list
>>>>>>> [email protected]
>>>>>>> https://lists.sourceforge.net/lists/listinfo/motion-user
>>>>>>> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>>
>>>>>> _______________________________________________
>>>>>> Motion-user mailing list
>>>>>> [email protected]
>>>>>> https://lists.sourceforge.net/lists/listinfo/motion-user
>>>>>> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Alex Dantart
>>>>>  http://dantart.es
>>>>>  http://uptimiza.com
>>>>>
>>>>> If you want to print this email, please, click here before
>>>>> <http://t.sidekickopen16.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs5vfRYYVQBvXW3LyyX-Vd_V9H56dJ9Pf5-JP-802?t=https%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3Ddeforestation%26hl%3Den%26prmd%3Dimvnsb%26source%3Dlnms%26tbm%3Disch%26ei%3DkkDvTpCnJIjm-ga50NiJAg%26sa%3DX%26oi%3Dmode_link%26ct%3Dmode%26cd%3D2%26ved%3D0CBUQ_AUoAQ%26biw%3D1280%26bih%3D952%23hl%3Den%26tbm%3Disch%26sa%3D1%26q%3Ddeforestation%26pbx%3D1%26oq%3Ddeforestation%26aq%3Df%26aqi%3Dg10%26aql%3D%26gs_sm%3De%26gs_upl%3D74829l75066l0l75130l4l3l0l1l1l0l196l196l0.1l1l0%26bav%3Don.2%2Cor.r_gc.r_pw.r_cp.%2Ccf.osb%26fp%3D531ea00e3ebe35f9%26biw%3D1280%26bih%3D952&si=5944588326404096&pi=8a77d1ef-7168-41a1-b11e-4588cf547c7f>
>>>>> do it
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> _______________________________________________
>>>>> Motion-user mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/motion-user
>>>>> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> Motion-user mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/motion-user
>>>> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> Alex Dantart
>>>  http://dantart.es
>>>  http://uptimiza.com
>>>
>>> If you want to print this email, please, click here before
>>> <http://t.sidekickopen16.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs5vfRYYVQBvXW3LyyX-Vd_V9H56dJ9Pf5-JP-802?t=https%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3Ddeforestation%26hl%3Den%26prmd%3Dimvnsb%26source%3Dlnms%26tbm%3Disch%26ei%3DkkDvTpCnJIjm-ga50NiJAg%26sa%3DX%26oi%3Dmode_link%26ct%3Dmode%26cd%3D2%26ved%3D0CBUQ_AUoAQ%26biw%3D1280%26bih%3D952%23hl%3Den%26tbm%3Disch%26sa%3D1%26q%3Ddeforestation%26pbx%3D1%26oq%3Ddeforestation%26aq%3Df%26aqi%3Dg10%26aql%3D%26gs_sm%3De%26gs_upl%3D74829l75066l0l75130l4l3l0l1l1l0l196l196l0.1l1l0%26bav%3Don.2%2Cor.r_gc.r_pw.r_cp.%2Ccf.osb%26fp%3D531ea00e3ebe35f9%26biw%3D1280%26bih%3D952&si=5944588326404096&pi=69a86a51-7a6d-4146-c03a-006e328350bf>
>>> do it
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Motion-user mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/motion-user
>>> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> Motion-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/motion-user
>> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
>>
>>
>
>
> --
>
> Alex Dantart
>  http://dantart.es
>  http://uptimiza.com
>
> If you want to print this email, please, click here before
> <http://t.sidekickopen16.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs5vfRYYVQBvXW3LyyX-Vd_V9H56dJ9Pf5-JP-802?t=https%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3Ddeforestation%26hl%3Den%26prmd%3Dimvnsb%26source%3Dlnms%26tbm%3Disch%26ei%3DkkDvTpCnJIjm-ga50NiJAg%26sa%3DX%26oi%3Dmode_link%26ct%3Dmode%26cd%3D2%26ved%3D0CBUQ_AUoAQ%26biw%3D1280%26bih%3D952%23hl%3Den%26tbm%3Disch%26sa%3D1%26q%3Ddeforestation%26pbx%3D1%26oq%3Ddeforestation%26aq%3Df%26aqi%3Dg10%26aql%3D%26gs_sm%3De%26gs_upl%3D74829l75066l0l75130l4l3l0l1l1l0l196l196l0.1l1l0%26bav%3Don.2%2Cor.r_gc.r_pw.r_cp.%2Ccf.osb%26fp%3D531ea00e3ebe35f9%26biw%3D1280%26bih%3D952&si=5944588326404096&pi=d39dbc71-9cf0-446d-949c-9f959ff3c4c7>
> do it
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/motion-user
> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
>
>
-------------- next part --------------
An HTML attachment was scrubbed...

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

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


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

_______________________________________________
Motion-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/motion-user


End of Motion-user Digest, Vol 111, Issue 9
*******************************************

Reply via email to