ZM on RasPi 3B+

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
liderbug
Posts: 125
Joined: Wed Dec 19, 2007 4:46 pm

ZM on RasPi 3B+

Post by liderbug » Sun Aug 11, 2019 4:54 pm

Just about there. Can monitor, and Force Alarm. The problem I'm having is with Filter

Filter: 3 DriveAlarm*&
Name: Drivealarm
MonId: = 1
Execute x /home/cal/bin/drive.alarm
background: x
concurrently: x

INF Checking filter DriveAlarm execute returned 1 events

In zmfilter.pl line 973: my $output = qx($command);
returns 'Iexit status 1'
searching the web I'm told to use "curly brace" and not "parentheses"
qx{$command} and I get
INF Executing /home/cal/bin/drive.alarm /var/cache/zoneminder/events/1/2019-08-11/16

I can run "/home/cal/bi...." from the cmd line - works fine. But via ZM - nada
The logs say "qx" ran - but my drive alarm doesn't. Thoughts?

tks

liderbug
Posts: 125
Joined: Wed Dec 19, 2007 4:46 pm

Re: ZM on RasPi 3B+

Post by liderbug » Mon Aug 12, 2019 12:21 am

[ never mind - don't ask ]

bbunge
Posts: 2442
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: ZM on RasPi 3B+

Post by bbunge » Mon Aug 12, 2019 12:45 am

Thought this may be a good place to discuss Ubuntu Server on a Pi.

I find Zoneminder works better on my Pi 3B+ with Ubuntu 18.04 Server image. See: http://cdimage.ubuntu.com/releases/bionic/release/

There are images for armhf and arm64. With a Pi 3B+ the armhf seems to work better. With either you will need to set the time zone and update the OS. The Zoneminder install script here (https://wiki.zoneminder.com/Ubuntu_Serv ... ell_script) installs Apache, Mariadb, PHP and Zoneminder. I have run the script on the armhf and arm64 versions of Bionic. You may want to disable the cloud service. Google is your friend for how to's to get this running. When installing a camera enable JPEG's and disable video writing.

liderbug
Posts: 125
Joined: Wed Dec 19, 2007 4:46 pm

Re: ZM on RasPi 3B+

Post by liderbug » Mon Aug 12, 2019 2:01 am

Its' running fine now. - well standard ZM running. What I'm working on now is that a filter to act a motion detector - but not 60 seconds after the fact. So I'm trying to get a "after insert on Events - exec 'my bash script'.

liderbug
Posts: 125
Joined: Wed Dec 19, 2007 4:46 pm

Re: ZM on RasPi 3B+

Post by liderbug » Tue Aug 13, 2019 3:04 am

OK - Monitor is working fine, detection also recordings. When I do a playback all I get is a black bar and no playback. About 6 minutes later up it pops but won't run. Just the first frame showing. Nothing in the logs.

operat0r
Posts: 25
Joined: Thu Jan 18, 2018 4:03 am

Re: ZM on RasPi 3B+

Post by operat0r » Tue Aug 13, 2019 4:24 am

Check out my profile for some garbage shell script I use for event scripts ...

can you be more specific ?

* what you mean by 'playback' what exact link/url are you clicking
* post full logs/debug ? ZIP if you can reproduce the problem
* worst case we can do screen share and you can show me what you are talking about
* try different browser
* try montage view ? montage view looks/feels a lot like playback ( may be completely different )
* watch logs and iotop/iftop/htop/logs while you are observing the issue
* post more details on how to reproduce the problem

liderbug
Posts: 125
Joined: Wed Dec 19, 2007 4:46 pm

Re: ZM on RasPi 3B+

Post by liderbug » Tue Aug 13, 2019 3:04 pm

* what you mean by 'playback' what exact link/url are you clicking
I have a "detection" see zm1.jpg Id=227 <click> see zm2.jpg - note clock
tick-tock-tick-tock.... see zm3.jpg note clock again.

Then if I click on "Play" - nothing happens. What is displayed in zm3.jpg is 00001-capture.jpg.
The last file in the 227 subdir is 00276-capture.jpg
---------------
logs

2019-08-13 08:02:31 web_js 13233 ERR getCmdResponse stream error: No data to read from socket - checkStreamForErrors() ?view=event
2019-08-13 08:02:31 web_php 13233 ERR No data to read from socket /usr/share/zoneminder/www/includes/functions.php 2051
2019-08-13 08:02:31 web_php 13233 ERR Timed out waiting for msg /var/run/zm/zms-232952s.sock /usr/share/zoneminder/www/ajax/stream.php 90
---------------
the rest of the logs for the period are:

2019-08-13 08:02:27 zmc_dvideo0 17006 INF Monitor-1: images:8000 - Capturing at 10.00 fps, capturing bandwidth 751728bytes/sec zm_monitor.cpp 2477
2019-08-13 08:02:26 zmfilter_3 11702 INF Checking filter DriveAlarm execute returned 0 events zmfilter.pl
2019-08-13 08:02:21 zma_m1 17128 INF Monitor-1: 5900 - Analysing at 10.00 fps zm_monitor.cpp 1247
2019-08-13 08:02:17 zmc_dvideo0 17006 INF Monitor-1: images:7900 - Capturing at 10.00 fps, capturing bandwidth 751379bytes/sec zm_monitor.cpp 2477
2019-08-13 08:02:13 zmfilter_1 11693 INF Checking filter PurgeWhenFull delete returned 0 events zmfilter.pl
2019-08-13 08:02:11 zma_m1 17128 INF Monitor-1: 5800 - Analysing at 10.00 fps zm_monitor.cpp 1247
-------------- all standard INF entries.

* try different browser
Hmmm, interesting - I've been using GChrome (above notes) ran Firefox and the 5 minute delay want away - image 001 came right up - however "Play" nothing. Previous <+ and Next +> work.

------------
* try montage view ? mon..
Live view or Montage works fine ... [time xx:10:17, 10:18, 10:19, 20, 21....]
event recording works fine - just that the "Play" button doesn't .
-------
/etc/zm/conf.d/01-system-paths.conf
ZM_DIR_EVENTS=/var/cache/zoneminder/events
ZM_DIR_IMAGES=/var/cache/zoneminder/images
ZM_DIR_SOUNDS=sounds
ZM_DIR_EXPORTS=/tmp/zm
ZM_PATH_ZMS=/zm/cgi-bin/nph-zms
ZM_PATH_MAP=/dev/shm
ZM_PATH_SOCKS=/var/run/zm
ZM_PATH_LOGS=/var/log/zm
ZM_PATH_SWAP=/tmp/zm
ZM_PATH_ARP="/bin/ip neigh"
------------
/etc/apache2/conf-available/zoneminder.conf
# Remember to enable cgi mod (i.e. "a2enmod cgi").
#ScriptAlias /zoneminder/cgi-bin /usr/lib/zoneminder/cgi-bin
ScriptAlias /zm/cgi-bin /usr/lib/zoneminder/cgi-bin

<Directory /usr/lib/zoneminder/cgi-bin>
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AllowOverride All
Require all granted
</Directory>

# Order matters. This alias must come first.
Alias /zm/cache /var/cache/zoneminder
<Directory /var/cache/zoneminder>
Options -Indexes +FollowSymLinks
AllowOverride None
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
</Directory>

Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www>
Options -Indexes +FollowSymLinks
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
</Directory>

<Directory /usr/share/zoneminder/www/api>
AllowOverride All
</Directory>
====================
I really appreciate your help. Thanks
Attachments
zm3.jpg
zm3.jpg (152.08 KiB) Viewed 615 times
zm2.jpg
zm2.jpg (86.37 KiB) Viewed 615 times
zm1.jpg
zm1.jpg (151.77 KiB) Viewed 615 times

liderbug
Posts: 125
Joined: Wed Dec 19, 2007 4:46 pm

Re: ZM on RasPi 3B+

Post by liderbug » Wed Aug 14, 2019 3:15 am

I don't know if I'm on to something or not. I have an event, I click on it [Event- 34] and it pops up the playback window. Looking at the code the "|>" play button says "playClicked()" and tracked the other end to skins/classic/views/js/event.js. I added "alert ("clicked"); at the start of the function.
When I click on Play I get [ nada ] - no alert box. OK lets "alert" Previous - again no alert box.

However I have ZM running on a older Intel box FCx remote cam and I can't find where event.js is included thinking that somehow it got dropped - got what the little boy shot at.
( or is somehow "alert" blocked? )
<sigh>

liderbug
Posts: 125
Joined: Wed Dec 19, 2007 4:46 pm

Re: ZM on RasPi 3B+

Post by liderbug » Wed Aug 14, 2019 1:31 pm

Overnight, sleeping on it, went back to the playback window there are 9 buttons: Prev, Rewind.....Next
So my cursor is an arrow (pointing to 11:00) or a hand/finger pointing up
Prev. hand
Rewind hand
Step Back arrow
Pause hand
Play arrow
Step Fwd arrow
Fast Fwd hand
Zoom Out arrow
Next hand
Although on my other system (much older) all are arrow ( color me confused'ed'ed...)
Also Logs say Example: "ReferenceError: streamFastFwd is not defined" on all buttons
=================
Hours later - I've gotten nowhere. Everything works (I think) except playback. My older system does autoplay when I click on an event. This new system pops up the replay window and just sits there - click, click, click ... nada!

liderbug
Posts: 125
Joined: Wed Dec 19, 2007 4:46 pm

Re: ZM on RasPi 3B+

Post by liderbug » Wed Aug 14, 2019 11:09 pm

The playback window:

Mode: Replay Rate: 0x Progress: 0s Zoom: 1x
rate= 0?

http sg55/zm/index.php?view=event&eid=100&filter[Query][terms][0][attr]=MonitorId&filter[Query][terms][0][op]=%3d&filter[Query][terms][0][val]=1&page=1&popup=1

I tried adding &rate=100 to the end of the URL - didn't work.

sg55/zm/index.php?view=event&eid=100&rate=100&filter... IT WORKS!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests