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: How to programmatically detect unreachable cameras (Evuraan) 2. Re: How to programmatically detect unreachable cameras (Bau Dev) 3. PIR sensor interface to Motion (William B. Clay) 4. Re: Reliable system (Bau Dev) ---------------------------------------------------------------------- Message: 1 Date: Sun, 13 Sep 2020 19:35:51 -0700 From: Evuraan <evur...@gmail.com> To: Motion-user@lists.sourceforge.net Subject: Re: [Motion-user] How to programmatically detect unreachable cameras Message-ID: <ca+jjsor63q9jg63ggkg_jr9zgfs6rl7w+sciranebrs5+lk...@mail.gmail.com> Content-Type: text/plain; charset="UTF-8" Answering my own question: x1:/tmp$ wget -q http://pi4:8080/3/detection/connection -O - Camera 3 Camera 3 Connection OK x1:/tmp$ wget -q http://pi4:8080/5/detection/connection -O - Camera 5 Camera 5 Lost connection Looked inside web_text.c: https://github.com/Motion-Project/motion/blob/master/src/webu_text.c#L809 snprintf(response,sizeof(response), "<a href=/%s/detection/status>status</a><br>" "<a href=/%s/detection/start>start</a><br>" "<a href=/%s/detection/pause>pause</a><br>" "<a href=/%s/detection/connection>connection</a><br>" //<---- this ,webui->uri_camid, webui->uri_camid ,webui->uri_camid, webui->uri_camid ); On Sun, Sep 13, 2020 at 7:03 PM Evuraan <evur...@gmail.com> wrote: > > Hello, > > I've motion polling a number of IR cameras. Some of those are on WIFI > and they often go unreachable for a variety of reasons. > > If I navigate to the webcontrol_port of my motion server, I'd see the > grey image saying "UNABLE TO OPEN VIDEO DEVICE SINCE <TIMESTAMP>". > I've attached a sample screenshot. > > Sometimes although I can reach a camera over HTTP, motion may still > display the above notice until I restart the motion server. > > Is there a way I can programmatically determine how many of my video > devices cannot be reached? Apparently motion knows the last timestamp > a camera was last seen, if you can point me in the right direction > that would be great. > > If X out of my Y cameras are unavailable, I am looking to automate restarts. > > Thanks in advance! ------------------------------ Message: 2 Date: Mon, 14 Sep 2020 09:00:52 +0200 From: Bau Dev <baudev.cont...@gmail.com> To: Motion discussion list <motion-user@lists.sourceforge.net> Subject: Re: [Motion-user] How to programmatically detect unreachable cameras Message-ID: <cao-pi1szqvs_wuuvgmnv9b6yafmkd9runjqpzbdhvqkez6l...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Or you can use "on_camera_lost" event. https://motion-project.github.io/motion_config.html#on_camera_lost Le lun. 14 sept. 2020 ? 04:37, Evuraan <evur...@gmail.com> a ?crit : > Answering my own question: > > x1:/tmp$ wget -q http://pi4:8080/3/detection/connection -O - > Camera 3 > Camera 3 Connection OK > x1:/tmp$ wget -q http://pi4:8080/5/detection/connection -O - > Camera 5 > Camera 5 Lost connection > > Looked inside web_text.c: > https://github.com/Motion-Project/motion/blob/master/src/webu_text.c#L809 > > snprintf(response,sizeof(response), > "<a href=/%s/detection/status>status</a><br>" > "<a href=/%s/detection/start>start</a><br>" > "<a href=/%s/detection/pause>pause</a><br>" > "<a href=/%s/detection/connection>connection</a><br>" //<---- this > ,webui->uri_camid, webui->uri_camid > ,webui->uri_camid, webui->uri_camid > ); > > > > On Sun, Sep 13, 2020 at 7:03 PM Evuraan <evur...@gmail.com> wrote: > > > > Hello, > > > > I've motion polling a number of IR cameras. Some of those are on WIFI > > and they often go unreachable for a variety of reasons. > > > > If I navigate to the webcontrol_port of my motion server, I'd see the > > grey image saying "UNABLE TO OPEN VIDEO DEVICE SINCE <TIMESTAMP>". > > I've attached a sample screenshot. > > > > Sometimes although I can reach a camera over HTTP, motion may still > > display the above notice until I restart the motion server. > > > > Is there a way I can programmatically determine how many of my video > > devices cannot be reached? Apparently motion knows the last timestamp > > a camera was last seen, if you can point me in the right direction > > that would be great. > > > > If X out of my Y cameras are unavailable, I am looking to automate > restarts. > > > > Thanks in advance! > > > _______________________________________________ > 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 > -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 3 Date: Mon, 14 Sep 2020 09:49:10 +0200 From: "William B. Clay" <b...@italianaccent.com> To: Motion discussion list <motion-user@lists.sourceforge.net> Subject: [Motion-user] PIR sensor interface to Motion Message-ID: <2171716c-66dd-697b-dec6-8d652d60c...@italianaccent.com> Content-Type: text/plain; charset=utf-8; format=flowed On 9/14/20 2:50 AM, Jim at ScopeStuff wrote: > That absolutely works.? The IR attracts the flying critters, which > attract the > spiders.? The further away from the camera the better for the IR > illuminators. Excellent solution for a chronic problem I have, too.? Thanks for the elegantly simple idea! > A python program is checking for presence of the file that the > shellscript > writes.? It is also looking at the GPIO pins that the PIR and microwave > motion sensors are hooked to. <snip> > Another possibility is to ask the Motion Gods to add a qualification > input, > from GPIO pins perhaps, for the saving of motion images.? Unless the pin > has a "1" and not a "0" then a motion file won't be saved.? Or the Motion > files are saved to one of two paths based on the polarity of the GPIO > bit. > > Or perhaps add a conversion specifier in the tracking section like > "%A = value of GPIO bit XYZ".? That could add a tag to the file name so > the file could be used or discarded downstream of Motion. Great ideas, but a very Rasberry-Pi-centric interface.? I added a POSIX-based interface like this to the ancient motion 3.2.1 (still running because of other extensive mods that I need -- chiefly separate thread to batch and transmit DB transactions to a remote DBMS -- and the newer versions added mostly stuff I don't need): ?*? 2012-10-17 wbc external alarm function, logically "ored" w/ video motion detection via ?*???????????????? memory-mapped file /<pidfile dir>/mdT.mmap (T=thread no.), containing ?*???????????????? a 1-char alarm status plus \0 terminator.? file must be dynamically ?*???????????????? updated by separate program.? alarm status may be included in ?*???????????????? event string formats as substitution symbol "%!" for values: ?*???????????????? * "-" motion access to memory-mapped file failed (see log at startup) ?*???????????????? * "0" external alarm program inactive or not implemented ?*???????????????? * "1" external alarm program operational, but no alarm signaled ?*???????????????? * "2" external alarm signaled (only value significant to this module) ?*???????????????? * "3" external alarm fault (as determined by external alarm program) In my case, the external alarm program is Python 2 running on a bog-standard Debian Linux PC server in Python 2 using a USB-attached Phidget 1203 Interface Kit (https://www.phidgets.com/?tier=3&catid=2&pcid=1&prodid=1030). The only tricky part is coding create/open/close/delete of the memory-mapped file (man page mmap(2)) on both the Python script and motion executable sides so that the proper values are seen by motion after any possible sequence of start/stop/restart of the two components. Once you've defined a new frame-related variable and substitution symbol (e.g., %!), you can script about anything you need for post-processing (but might not suffice for aiming at cats and giving letter carriers safe passage).? I limit recorded events to 15 sec. (longer action creates multiple events), and use the "%!" symbol in an on_event_end script and on_event_end_sql config item (added) to determine what to do with the related images/videos and how to categorize the event in the motion DB (using new per-event table "incident"). -- Bill ------------------------------ Message: 4 Date: Mon, 14 Sep 2020 12:19:58 +0200 From: Bau Dev <baudev.cont...@gmail.com> To: Motion discussion list <motion-user@lists.sourceforge.net> Subject: Re: [Motion-user] Reliable system Message-ID: <cao-pi1tm1rabbehaeff-7+vz0dk62_tf4sjuub15wzfebh2...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Indeed, it sounds like a good idea! We'll have to pull some more cables haha Do you have any infrared projectors to recommend? Baudev Le lun. 14 sept. 2020 ? 01:07, David Powell <da...@depowell.com> a ?crit : > I have a similar problem and don't know how to fix it, but I do have an > idea about the spiders. > > It seems that spiders (and bugs in general) are attracted to the IR light > emitted by security cameras at night. I figure (and I have not yet tried > this) that if you turn off or disable the infrared "night vision" on the > camera, and put another IR source several feet away, perhaps you will have > the same "night vision" functionality but the spiders will build their webs > in front of the IR source instead of the camera. > > I plan to try this when I get a chance. It won't solve all the problems > but may help some. Has anyone else tried it? > > David > > > On 9/13/20 2:49 PM, Bau Dev wrote: > > Hello to all, > > If I allow myself to write here it is to have your ideas and feedback on > motion. I've been using it for several months now but I can't get the > desired result. > I have installed my alarm system (outdoor cameras, indoor cameras, 433Mhz > infrared detectors, siren, backup power supply, GSM shield and so on). > I would like to have the most functional system possible. It is not > conceivable to trigger the siren several times during the night for false > positives ! But on the other hand, this siren must be triggered > automatically during an intrusion. I can't keep my phone on all night to > check what's going on. > > Today, in this alarm system I use among others a raspberry pi 3b+ with > motion (for the 4 outdoor cameras). However I have some false positives > that I can't avoid: mosquitoes that spend the night very close, water drops > at night when it rains etc.. At night when it rains I can reach up to 200 > false positives. During the day, between 0 and 2 false positives. With so > little reliability, I even managed to turn off the outside cameras > finally... > Here are the images of some false detections. > > [image: photo5915567089844860174.jpg] > [image: photo5918052003303502838.jpg] > [image: photo5918052003303502844.jpg] > [image: photo5829970509054456810.jpg] > [image: photo5832222308868142323.jpg] > > By varying the different parameters I can't get a correct system. I set a > reasonable threshold (low enough to detect a human movement and high enough > not to constantly have false positives). But a spider passing in front of > the camera is finally impossible not to detect with the threshold (even > with the threshold_maximum) ... > I also activated the smart filter. It allows to avoid the movements of > grasses, trees and so on. > I think it's mandatory to add a human shape detection algorithm, don't > you? > If so, do you know any that have a reasonable execution time? Indeed, all > the ones I tried take more than 30 sec to identify a human on a single > image! (Obvious given the CPU of a raspberry). And does a USB dungle really > worth it? > > On the other hand, taking a step back, I find that very few home security > companies offer outdoor cameras. Or they are cameras you have to install > yourself and therefore the feedback seems disappointing. Maybe that's a > sign? Maybe we should only consider filming with outdoor cameras in order > to have different angles in case of indoor intrusions (identified by > infrared sensors which are more reliable)? > > What do you think about this? > How do you do it? > > Thank you in advance for your ideas/feedback. > > Baudev > > > _______________________________________________ > Motion-user mailing > listMotion-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/motion-userhttps://motion-project.github.io/ > > Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... -------------- next part -------------- A non-text attachment was scrubbed... Name: photo5915567089844860174.jpg Type: image/jpeg Size: 26619 bytes Desc: not available -------------- next part -------------- A non-text attachment was scrubbed... Name: photo5918052003303502838.jpg Type: image/jpeg Size: 31868 bytes Desc: not available -------------- next part -------------- A non-text attachment was scrubbed... Name: photo5918052003303502844.jpg Type: image/jpeg Size: 32937 bytes Desc: not available -------------- next part -------------- A non-text attachment was scrubbed... Name: photo5829970509054456810.jpg Type: image/jpeg Size: 61318 bytes Desc: not available -------------- next part -------------- A non-text attachment was scrubbed... Name: photo5832222308868142323.jpg Type: image/jpeg Size: 50225 bytes Desc: not available ------------------------------ ------------------------------ 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 171, Issue 8 *******************************************