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. Re: Pi4 Motion 4.3.1 track_generic_move not being called (Jon Grant) 2. Re: Event_start/event_end behaviour (tosiara) ---------------------------------------------------------------------- Message: 1 Date: Thu, 18 Feb 2021 08:00:56 +1100 From: Jon Grant <jongrant2...@gmail.com> To: Motion discussion list <motion-user@lists.sourceforge.net> Subject: Re: [Motion-user] Pi4 Motion 4.3.1 track_generic_move not being called Message-ID: <CA+ARkkbFQAEZUDbyv2=fv=kUuYh=dn2D9urf=mezdobhxfy...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Many thanks Adam, I?ll give this a go. Btw I think you?re correct regarding dash. Also agree a return code would be useful if available for debugging... Regards Jon On Wed, 17 Feb 2021 at 3:36 pm, Adam Goryachev via Motion-user < motion-user@lists.sourceforge.net> wrote: > > On 17/2/21 15:26, Jon Grant wrote: > > OK, must be something to do with the shell? As this works every time, > please consider this request closed by me as using Python is fine. > > *track_generic_move* /usr/bin/python3 /home/pi/mlai/movementDetected.py > '[track_generic_move] ***x/y/z etc***' > > > On Wed, Feb 17, 2021 at 12:19 PM Jon Grant <jongrant2...@gmail.com> wrote: > >> Hello devs >> >> First, thanks for an awesome solution, the quality from me getting going >> to today has been amazing! >> >> I have a question (and assume it is a beginners mistake). I have setup a >> call from *track_generic_move* to* motionTrackMove.sh *that is not being >> run, however if I call it from the command line (either as user *pi* or >> via *sudo*) it works perfectly... >> >> I can see this is being called in the motion.log file (below) >> I have tried calling this as: >> /home/pi/mlai/motionTrackMove.sh >> /usr/bin/sh /home/pi/mlai/motionTrackMove.sh >> The bash script motionTrackMove.sh has been set to execute (see below). >> Any ideas please? >> >> *tail -f /var/log/motion/motion.log* >> [1:ml1] [DBG] [EVT] [Feb 17 00:54:24] generic_move: Executing >> external command '/home/pi/mlai/motionTrackMove.sh' >> [1:ml1] [DBG] [EVT] [Feb 17 01:02:03] generic_move: Executing >> external command '/usr/bin/sh /home/pi/mlai/motionTrackMove.sh' >> >> > I'm not sure about your system, but I don't think /usr/bin/sh usually > exists, it should be /bin/sh, but since your shell is written in bash, then > it should probably have been /bin/bash. > > In any case, seems you have a working solution now. It might be good if > motion logged an error message if the executable doesn't exist, or log the > return code or something, this might have provided a better clue to the > problem. > > PPS, maybe the above is wrong, on my pi: > > root@pi-03:~# which sh > /usr/bin/sh > root@pi-03:~# ls -l /usr/bin/sh > lrwxrwxrwx 1 root root 4 Oct 22 14:01 /usr/bin/sh -> dash > root@pi-03:~# ls -l /usr/bin/dash > -rwxr-xr-x 1 root root 129536 Mar 30 2020 /usr/bin/dash > root@pi-03:~# ls -l /bin/sh > lrwxrwxrwx 1 root root 4 Oct 22 14:01 /bin/sh -> dash > root@pi-03:~# ls -ld /bin > lrwxrwxrwx 1 root root 7 Oct 22 14:00 /bin -> usr/bin > > So, maybe it was a problem with using dash instead of bash... though > again, you could re-configure the system such that sh points to bash... so > overall, maybe motion needs better logging. > > To work it out, you could use strace to better see what motion is calling > and why it fails (the syscall and results). > > Regards, > Adam > > _______________________________________________ > Motion-user mailing list > Motion-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/motion-user > https://motion-project.github.io/ > > Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user -- Cheers Jon 0404 36 7775 -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 2 Date: Thu, 18 Feb 2021 14:12:01 +0200 From: tosiara <tosi...@gmail.com> To: Motion discussion list <motion-user@lists.sourceforge.net> Subject: Re: [Motion-user] Event_start/event_end behaviour Message-ID: <cachtdwqktxdvpgo_rphsrxxjcjfb1n19_hjwkcdpjvmfu9k...@mail.gmail.com> Content-Type: text/plain; charset="UTF-8" If you are able to reproduce it, run motion with -d 9 to get verbose log and try to analyze it (or share here) It should give you more info when and which script got executed On Sun, Feb 14, 2021 at 3:25 AM James Smith <gry...@gmail.com> wrote: > > I'm using event_start and event_end to run a python script I've written to > push captured images in a motion event to a deepstack AI server and on > detection of specific objects then cast that cameras stream to a Google Nest > Hub. > > In general it's working fine, however as I have 4 cameras set up to run the > same script on motion, quite often there can be an overlap of motion > detection, especially at night with bugs galore attracted to the IR LEDs. > From what I can tell, it appears an event_start from another camera looks to > override the event_gap setting and kills any event and the scripts it run > that may already be in progress from another. > > My reason for thinking this is because the script, which I also have doing > some other tasks, like generating an animated gif from the event and then > removing the images, is not finishing all of the time when triggered from > motion, so I could only assume this happens when another event gets triggered > while this one is running. > > Is this intended behaviour, or should it be spawning an entirely new process > each time and allowing the script to run to completion? Any suggestions how I > can make sure the scripts aren't interrupted? > > Regards > James > _______________________________________________ > Motion-user mailing list > Motion-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/motion-user > https://motion-project.github.io/ > > Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user ------------------------------ ------------------------------ Subject: Digest Footer _______________________________________________ Motion-user mailing list Motion-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/motion-user ------------------------------ End of Motion-user Digest, Vol 176, Issue 28 ********************************************