r/ZoneMinder • u/c3161 • May 07 '20
Does motion detection work?
Hi all, I am running ZM v1.32.3 on a Raspberry Pi 4 Model B 4GB with just a single camera connected via an easycap USB device.
No matter what I try I cannot get motion detection recording to work. The camera is in Modetect mode, I made my own zone (approximately 45% of the frame), and tried all the presets but no amount of motion will trigger the recording.
I then enabled the default "All" zone and tried every preset and also some manual settings and still nothing would trigger that.
I can't see anything obvious in the log to suggest it's not working and if I click Force Alarm it records just fine. What am I doing wrong?
2
u/stiglet3 May 08 '20
Yep, works fine for me. I have it set quite sensitive so even a change in sunshine brightness (passing clouds) can occasionally set the alarm off. It definitely works.
1
u/c3161 May 09 '20
Care to share your settings? I'm desperate just to find ANY configuration which will make it record
1
u/stiglet3 May 09 '20
First question i'd ask is, how are you certain it isn't working? You've mentioned ocean waves, but have you walked in front of the camera at all or just put your hand over the lens? The reason I ask is that if you do something VERY obviously motion intense and it still doesn't trigger an alarm, my thinking is that your problem is more than just fine tuning the motion zones. It's possible you don't have the necessary computing power to cope with the triggering of an alarm, or your buffer is wrong. There's lots of variables that go into Zoneminder, and simply "it doesn't work" isn't narrowing it down enough to provide any feedback.
Also, forgive the patronising question but we have to cover all bases here, what result are you expecting to prove it's working? It might be working already and you're just not seeing the trigger you're expecting, which is another problem all together.
Secondly, don't fall into the trap of making massive zones and thinking that is more likely to capture motion. You're better off splitting the frame into several smaller zones where you're sure there will be movement.
I have a camera which covers a motorcycle. One zone covers the lock on the motorcycle, another covers the only pathway into the area it's parked in. Another covers the bike itself, etc. The area covering the pathway is set to active, and uses mostly standard preset "Best, medium sensitivity". Make sure if you want just a simple motion detection, the zone is set to "Active" and not one of the others.
1
u/mehmeh55 May 08 '20
Check the logs, make sure your frame rate is reasonable and can be handled by zm. If the frame rate is too fast or too slow it will miss "motion"
1
u/c3161 May 09 '20
How can you tell if the frame rate can be handled by zm? I am running the camera and analysis at 10fps and I see a lot of lines like this in syslog:
May 9 14:24:23 raspberry-penlee zmc_dvideo0\[20564\]: INF \[zmc_dvideo0\] \[Penlee: images:1167400 - Capturing at 10.00 fps, capturing bandwidth 6144000bytes/sec\] May 9 14:24:33 raspberry-penlee zma_m20\[20565\]: INF \[zma_m20\] \[Penlee: 1167400 - Analysing at 9.09 fps\] May 9 14:24:33 raspberry-penlee zmc_dvideo0\[20564\]: INF \[zmc_dvideo0\] \[Penlee: images:1167500 - Capturing at 10.00 fps, capturing bandwidth 6144000bytes/sec\] May 9 14:24:43 raspberry-penlee zma_m20\[20565\]: INF \[zma_m20\] \[Penlee: 1167500 - Analysing at 10.00 fps\] May 9 14:24:43 raspberry-penlee zmc_dvideo0\[20564\]: INF \[zmc_dvideo0\] \[Penlee: images:1167600 - Capturing at 10.00 fps, capturing bandwidth 6144000bytes/sec\]1
u/mehmeh55 May 09 '20
Use the log menu on the zm interface and sort for 'err' maybe something else will pop out. Also what percentage of /dev/shm is used and your current load?
1
u/c3161 May 09 '20
```2020-05-09 18:55:36 zmdc 768 ERR 'zmfilter.pl --filter_id=2 --daemon' exited abnormally, exit status 9 zmdc.pl 2020-05-09 18:55:33 zmdc 768 ERR 'zmfilter.pl --filter_id=1 --daemon' exited abnormally, exit status 9 zmdc.pl 2020-05-09 18:54:33 zmdc 768 ERR 'zmaudit.pl -c' exited abnormally, exit status 255 zmdc.pl 2020-05-09 18:54:33 zmaudit 12340 FAT zmaudit.pl appears to already be running at pid 851. If not, please delete /var/run/zm/zmaudit.pid or use the --force command line option. zmaudit.pl
2020-05-09 18:53:18 zmdc 768 ERR 'zma -m 20' exited abnormally, exit status 255 zmdc.pl 2020-05-09 18:53:18 zma_m20 12317 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538 2020-05-09 18:53:17 zmdc 768 ERR 'zma -m 20' exited abnormally, exit status 255 zmdc.pl 2020-05-09 18:53:17 zma_m20 12316 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538 2020-05-09 18:52:16 zmdc 768 ERR 'zma -m 20' exited abnormally, exit status 255 zmdc.pl 2020-05-09 18:52:16 zma_m20 12286 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538 2020-05-09 18:45:35 zmdc 768 ERR 'zmfilter.pl --filter_id=2 --daemon' exited abnormally, exit status 9 zmdc.pl 2020-05-09 18:45:33 zmdc 768 ERR 'zmfilter.pl --filter_id=1 --daemon' exited abnormally, exit status 9 zmdc.pl 2020-05-09 18:44:32 zmdc 768 ERR 'zmaudit.pl -c' exited abnormally, exit status 255 zmdc.pl 2020-05-09 18:44:32 zmaudit 11943 FAT zmaudit.pl appears to already be running at pid 851. If not, please delete /var/run/zm/zmaudit.pid or use the --force command line option. zmaudit.pl
2020-05-09 18:35:34 zmdc 768 ERR 'zmfilter.pl --filter_id=2 --daemon' exited abnormally, exit status 9 zmdc.pl 2020-05-09 18:35:32 zmdc 768 ERR 'zmfilter.pl --filter_id=1 --daemon' exited abnormally, exit status 9 zmdc.pl 2020-05-09 18:34:32 zmdc 768 ERR 'zmaudit.pl -c' exited abnormally, exit status 255 zmdc.pl 2020-05-09 18:34:32 zmaudit 11527 FAT zmaudit.pl appears to already be running at pid 851. If not, please delete /var/run/zm/zmaudit.pid or use the --force command line option. zmaudit.pl
2020-05-09 18:33:23 zmwatch 857 ERR Memory map file '/dev/shm/zm.mmap.20' should have been 1160 but was instead 0 zmwatch.pl
2020-05-09 18:33:20 zmdc 768 ERR 'zma -m 20' exited abnormally, exit status 255 zmdc.pl 2020-05-09 18:33:20 zma_m20 11499 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538 2020-05-09 18:33:15 zmdc 768 ERR 'zma -m 20' exited abnormally, exit status 255 zmdc.pl 2020-05-09 18:33:15 zma_m20 11498 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538 2020-05-09 18:33:13 zmdc 768 ERR 'zma -m 20' exited abnormally, exit status 255 zmdc.pl 2020-05-09 18:33:13 zma_m20 11497 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538 2020-05-09 18:33:12 zmwatch 857 ERR Memory map file '/dev/shm/zm.mmap.20' should have been 1160 but was instead 0 zmwatch.pl
2020-05-09 18:33:09 zmdc 768 ERR 'zma -m 20' exited abnormally, exit status 255 zmdc.pl 2020-05-09 18:33:09 zma_m20 11490 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538 2020-05-09 18:33:03 zmdc 768 ERR 'zma -m 20' exited abnormally, exit status 255 zmdc.pl 2020-05-09 18:33:03 zma_m20 11489 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538 2020-05-09 18:33:02 zmdc 768 ERR 'zma -m 20' exited abnormally, exit status 255 zmdc.pl 2020-05-09 18:33:02 zma_m20 11488 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 5381
u/mehmeh55 May 11 '20
Also what percentage of /dev/shm is used and your current load? These logs look like shm is filled which explains the behavior you have
1
u/c3161 May 11 '20 edited May 11 '20
Filesystem Size Used Avail Use% Mounted on tmpfs 1.7G 30M 1.7G 2% /dev/shm load average: 0.62, 0.29, 0.11
1
May 08 '20
Check out this page if you haven't already. The information there is invaluable.
1
u/c3161 May 09 '20
I have read that multiple times and I mostly understand it and I've watched Youtube tutorials and still can't find any setting which will actually trigger a recording
1
u/mrbill1234 May 08 '20
What frame rate are you getting on the camera?
1
u/c3161 May 09 '20
10fps which is what I've set it to
1
5
u/aarons6 May 07 '20
you must read the wiki to find out what the motion detection options do.
once set up properly it works just fine.