Zoneminder on Buster on RasPi 3B+

Forum for questions and support relating to 1.33.x development only.
Locked
liderbug
Posts: 125
Joined: Wed Dec 19, 2007 4:46 pm

Zoneminder on Buster on RasPi 3B+

Post by liderbug »

Shiny new 3B+ running buster with a RasPi cam (lamp'ed). I've loaded Zoneminder and it's running - sort of...

It detects motion and takes one jpg image. I can watch the live monitor but can't display the detected. So far Google hasn't been my friend.

Help please
User avatar
iconnor
Posts: 2882
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Zoneminder on Buster on RasPi 3B+

Post by iconnor »

I think most people here are pretty tired of trying to help people who won't even look at their own logs.

Given that we havn't packaged zm for buster yet, and debian hasn't packaged us well for years we have no idea what version of zm you are running, let alone what the problem might be.

Check your logs. Report to us what they say.
Turn on debugging (options->Logging->Debug)
liderbug
Posts: 125
Joined: Wed Dec 19, 2007 4:46 pm

Re: Zoneminder on Buster on RasPi 3B+

Post by liderbug »

OK.
/etc/zm/conf.d/01-system-paths.conf -> ZM_PATH_ZMS=/zm/cgi-bin/nph-zms
changed " =/zm/" to "=/zoneminder/"
that got me to being able to watch Monitor1 live and record.

Then setting Cam.Storage to: SaveJpegs = Frames Only, Video Writer = Disabled.
allows me to click on an event and pop up the event - problem is all I get is frame 1. No playback.
Log when I try to play an event:
getCmdResponse stream error: Socket /var/run/zm/zms-954971s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/lat ... window-etc for more information.[I did, gained nothing] - checkStreamForErrors() ?view=event
2019-08-08 10:07:29 web_php 6063 ERR Socket /var/run/zm/zms-954971s.sock does not exist. [NOTE: there is zms-723923s.sock] This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache [YES] and check that the PATH_ZMS is set correctly [in /etc/zm/config.d] . Make sure that ZM is actually recording [. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/lat ... window-etc for more information. /usr/share/zoneminder/www/includes/functions.php 2051
2019-08-08 10:07:29 zms_e85 6199 ERR Can't open /var/cache/zoneminder/events/1/2019-08-08/84/00001-capture.jpg: No such file or directory
------------------------
logs: zms_e85
2019-08-08 10:19:57 zms_e85 6323 ERR Can't open /var/cache/zoneminder/events/1/2019-08-08/84/00001-capture.jpg: No such file or directory
-----------------------
Notice the line above "Can't open ... /84/000..." But I clicked on "85"
URL= "...view=event&eid=85&filter%5..." So I Forced 3 more events and clicked on "Event=86" and the log shows "Can't open /var/cache/zoneminder/events/1/2019-08-08/84/00001-capture.jpg: No such file or directory"
------------
more playing around, deleted all events and a reboot I created several Forced Event.
91 Event- 91 2019-08-08 10:40:16
clicked on "Event-91..."
and up popped "91" with the timestamp in the image of "... 10:32:51.."
Mode: Live Zoom: 1x
Id Name Time Secs Frames Score
91 Event- 91 2019-08-08 10:40:16 12.02 325/320 255/255 X
90 Event- 90 2019-08-08 10:33:00 10.12 243/238 255/255 X
89 Event- 89 2019-08-08 10:32:51 6.02 151/146 255/255 X
88 Event- 88 2019-08-08 10:32:39 7.37 185/180
--------------------------------
later... ran: cpan Number::Bytes::Human
seemed to solve a couple of "ERR" entries.
liderbug
Posts: 125
Joined: Wed Dec 19, 2007 4:46 pm

Re: Zoneminder on Buster on RasPi 3B+

Post by liderbug »

I also modified zonemider.service:
ExecStart=rm /var/run/zm/* ; /usr/bin/zmpkg.pl start
ExecReload=rm /var/run/zm/* ; /usr/bin/zmpkg.pl restart

and all of the log.ERR XXX.pid is already there have gone away.
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Zoneminder on Buster on RasPi 3B+

Post by bbunge »

You are in the wrong forum area. See Zoneminder 1.32.x

viewtopic.php?f=38&t=28409

Pretty sure the pi will work if you read through the above topic. With that said I've not had much success with Buster on a Pi... Debian 9 with ZM 1.30.4 yes!
liderbug
Posts: 125
Joined: Wed Dec 19, 2007 4:46 pm

Re: Zoneminder on Buster on RasPi 3B+

Post by liderbug »

Looks like everything is working the way it should.
Along the way I ran: apt install libavdevice-dev libavutil-dev libswscale-dev libavformat-dev libavcodec-dev

apt install did v1.32.3 and I could swear I clicked on the 1.32 link - Lack of coffee - that's my story.....

Every 6 minutes I keep getting WAR "No filter found for SELECT * FROM Filters WHERE Background .."
Ya, I haven't created any filters - so what's your problem?

Config: Source: /dev/video0, vfl-2, 0, NTSC, Auto, No, 1, 24 bit, 960x720

I think everything I've done to get it working is above
-----------------------------------------------------------------------------------
top - 20:39:29 up 9:59, 3 users, load average: 0.81, 0.65, 0.50
Tasks: 160 total, 1 running, 158 sleeping, 0 stopped, 1 zombie
%Cpu0 : 5.0 us, 4.0 sy, 0.0 ni, 89.7 id, 0.7 wa, 0.0 hi, 0.7 si, 0.0 st
%Cpu1 : 12.2 us, 4.3 sy, 0.0 ni, 83.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu2 : 23.3 us, 0.7 sy, 0.0 ni, 76.1 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu3 : 1.0 us, 2.7 sy, 0.0 ni, 96.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 874.5 total, 135.4 free, 318.3 used, 420.9 buff/cache
MiB Swap: 100.0 total, 86.2 free, 13.8 used. 360.3 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12973 www-data 20 0 312068 138568 133956 S 23.1 15.5 5:34.25 nph-zms
8602 www-data 20 0 264768 145888 136716 S 12.2 16.3 48:37.21 zma
3621 www-data 20 0 230988 14400 9356 S 1.0 1.6 0:14.02 apache2
7729 www-data 20 0 278296 155956 152244 S 1.0 17.4 3:39.99 zmc
...
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 61089300 4679820 53880016 8% /
devtmpfs 443152 0 443152 0% /dev
tmpfs 447760 121508 326252 28% /dev/shm
tmpfs 447760 22876 424884 6% /run
tmpfs 5120 4 5116 1% /run/lock
tmpfs 447760 0 447760 0% /sys/fs/cgroup
/dev/mmcblk0p1 258096 39973 218123 16% /boot
tmpfs 89552 0 89552 0% /run/user/1000
tmpfs 89552 0 89552 0% /run/user/1001
-------------------
So top, df and xload dont' show ZM putting much of a load on the system
Locked