[support] dlandon - Zoneminder 1.36


Recommended Posts

19 hours ago, Ramiii said:

I have an issue with zone minder , whenever I start/restart the container it keeps updating files then it fails then runs the container , it takes around 20 minutes .

 

I get this 

 


*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/05_set_the_time.sh...
Setting the timezone to : Africa/Cairo
Current default time zone: 'Africa/Cairo'
Local time is now: Mon Aug 26 22:33:43 EET 2019.
Universal Time is now: Mon Aug 26 20:33:43 UTC 2019.
Date: Mon Aug 26 22:33:43 EET 2019
*** Running /etc/my_init.d/06_set_php_time.sh...
*** Running /etc/my_init.d/10_syslog-ng.init...
Aug 26 22:33:44 010e2578b757 syslog-ng[33]: syslog-ng starting up; version='3.5.6'
Aug 26 22:33:44 010e2578b757 syslog-ng[33]: EOF on control channel, closing connection;
*** Running /etc/my_init.d/20_apt_update.sh...
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://ppa.launchpad.net/iconnor/zoneminder-1.32/ubuntu xenial InRelease
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:5 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease [23.9 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main Sources [192 kB]
Get:8 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 Packages [68.5 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [136 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main Sources [429 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/multiverse Sources [3518 B]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [924 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [328 kB]
Get:14 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [579 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Sources [9427 B]
Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [1304 kB]
Get:17 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [6119 B]
Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [983 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [19.1 kB]
Get:20 http://archive.ubuntu.com/ubuntu xenial-backports/universe Sources [7665 B]
Get:21 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [8807 B]
Fetched 5347 kB in 5s (897 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages will be upgraded:
dh-python dpkg libapache2-mod-php7.1 libgd3 libglib2.0-0 php-apcu-bc php7.1
php7.1-cli php7.1-common php7.1-fpm php7.1-gd php7.1-json php7.1-mysql
php7.1-opcache php7.1-readline php7.3-common php7.3-mysql
python3-software-properties software-properties-common
19 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 9712 kB of archives.
After this operation, 2048 B of additional disk space will be used.
Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 libgd3 amd64 2.2.5-5.2+ubuntu16.04.1+deb.sury.org+1 [134 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 dpkg amd64 1.18.4ubuntu1.6 [2085 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libglib2.0-0 amd64 2.48.2-0ubuntu4.4 [1120 kB]
Err:3 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libglib2.0-0 amd64 2.48.2-0ubuntu4.4
Hash Sum mismatch
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 dh-python all 2.20151103ubuntu1.2 [73.9 kB]
Get:3 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libglib2.0-0 amd64 2.48.2-0ubuntu4.4 [1120 kB]
Err:1 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 libgd3 amd64 2.2.5-5.2+ubuntu16.04.1+deb.sury.org+1
Connection timed out
Get:5 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php7.1-gd amd64 7.1.31-1+ubuntu16.04.1+deb.sury.org+1 [27.1 kB]
Err:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 dh-python all 2.20151103ubuntu1.2
Connection timed out [IP: 91.189.88.162 80]
Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 software-properties-common all 0.96.20.9 [9452 B]
Get:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 dh-python all 2.20151103ubuntu1.2 [73.9 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 dh-python all 2.20151103ubuntu1.2 [73.9 kB]
Err:5 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php7.1-gd amd64 7.1.31-1+ubuntu16.04.1+deb.sury.org+1
Connection timed out
Get:7 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php7.1-json amd64 7.1.31-1+ubuntu16.04.1+deb.sury.org+1 [17.2 kB]
Err:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 software-properties-common all 0.96.20.9
Connection timed out [IP: 91.189.88.162 80]
Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3-software-properties all 0.96.20.9 [20.1 kB]
Err:7 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php7.1-json amd64 7.1.31-1+ubuntu16.04.1+deb.sury.org+1
Connection timed out
Get:9 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php7.1-opcache amd64 7.1.31-1+ubuntu16.04.1+deb.sury.org+1 [143 kB]
Err:8 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3-software-properties all 0.96.20.9
Connection timed out [IP: 91.189.88.162 80]

 

Your server cannot access the update servers.  Check your internet connection.

Link to comment
On 8/27/2019 at 11:15 PM, Living Legend said:

I have a question on what the optimal way to handle saving/filtering through two camera's JPG and MP4 outputs.

 

I'm currently running two cameras.  In my ideal scenario, the cameras would be recording using the H264 camera passthrough 24/7.  These recordings would be maintained for 24-48 and then deleted.

 

Additionally, I would like an image saved once an hour per camera.  These will never be deleted.

 

What would be the optimal way to do this regarding minimizing server resources? 

 

I was able to set up JPGs and MP4s to save from the same camera feed to the same event folder.  The problem was I could not figure out how bifurcate images/videos from the event folder via filter.  It was an all or nothing proposition.  If I wanted to delete beyond 24 hours, I lost the pictures too.  If I wanted to keep beyond 24 hours, I was forced to keep all videos.

 

The next option seems to be to set up 2 feeds for each camera, one responsible for images, one responsible for video.  The video feed will use the filter to delete the event folders > 24 hours old while the image feed will remain untouched.  I hesitated to do this as I assumed it would be more resource intensive.

 

Any suggestions on the best way to accomplish this?

 Just wanted to bump my post that may have gotten lost in the shuffle earlier this week.

 

@dlandon, any suggestions on the optimal way regarding computer resources to keep MP4 files for 24 hours, then delete, and keep the few daily snapshots in perpetuity?  Is there a way to do it with one stream with a filter on the event that can distinguish between MP4 and JPG files, or do I need two independent streams, one to clear MP4s daily and one to keep JPGs?

Link to comment
On 8/31/2019 at 6:34 PM, Living Legend said:

 Just wanted to bump my post that may have gotten lost in the shuffle earlier this week.

 

@dlandon, any suggestions on the optimal way regarding computer resources to keep MP4 files for 24 hours, then delete, and keep the few daily snapshots in perpetuity?  Is there a way to do it with one stream with a filter on the event that can distinguish between MP4 and JPG files, or do I need two independent streams, one to clear MP4s daily and one to keep JPGs?

Your best bet is to post your issue on the Zoneminder forum.

Link to comment
6 hours ago, Archiardo said:

Hi all!

I'm at the moment trying to set up zoneminder to use a webcam to surveillance the room where my unraid server is located. But I can't get it to work, the logs keep giving me a permission denied error.

Any ideas, I can't seem to find an answer online..

 

Thanks!

zoneminder_error.PNG

Camera credentials?

Link to comment

Hi

 

Yesterday it seems on a reboot of ZM I am getting errors during the update portion of booting as per below. Is anyone else getting this?

 

Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up util-linux (2.27.1-6ubuntu3.8) ...

Configuration file '/etc/cron.weekly/fstrim'
==> Deleted (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** fstrim (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package util-linux (--configure):
end of file on stdin at conffile prompt
Errors were encountered while processing:
util-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)
*** /etc/my_init.d/20_apt_update.sh failed with status 100

*** Killing all processes...
Sep 8 09:58:53 c9dcb0b8e49c syslog-ng[13]: syslog-ng shutting down; version='3.5.6'
Errors were encountered while processing:
util-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)
*** /etc/my_init.d/20_apt_update.sh failed with status 100

*** Killing all processes...
Sep 8 09:58:53 c9dcb0b8e49c syslog-ng[13]: syslog-ng shutting down; version='3.5.6'

 

Link to comment
1 minute ago, jas0r said:

Hi

 

Yesterday it seems on a reboot of ZM I am getting errors during the update portion of booting as per below. Is anyone else getting this?

 


Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up util-linux (2.27.1-6ubuntu3.8) ...

Configuration file '/etc/cron.weekly/fstrim'
==> Deleted (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** fstrim (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package util-linux (--configure):
end of file on stdin at conffile prompt
Errors were encountered while processing:
util-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)
*** /etc/my_init.d/20_apt_update.sh failed with status 100

*** Killing all processes...
Sep 8 09:58:53 c9dcb0b8e49c syslog-ng[13]: syslog-ng shutting down; version='3.5.6'
Errors were encountered while processing:
util-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)
*** /etc/my_init.d/20_apt_update.sh failed with status 100

*** Killing all processes...
Sep 8 09:58:53 c9dcb0b8e49c syslog-ng[13]: syslog-ng shutting down; version='3.5.6'

 

Update the docker.

Link to comment

A new docker has been released that will now download and install the yolo and tiny yolo files for hook processing.  Two new environment variables have been added to the template where you can set them to download and install the hook models.

 

The new template is available in CA.  I would suggest getting the new template from CA and set the variables to your preference.

 

The new docker should be built in about 30 minutes,

  • Like 1
Link to comment

The last few days have been whirlwind.  There have been a lot of changes in regards to the zmnotification server and the hook processing.  I have been working with the Zoneminder developers to get the docker easier to set up.  You will find the hook processing much easier to set up now.  It should be just a matter of configuration.

Link to comment
The last few days have been whirlwind.  There have been a lot of changes in regards to the zmnotification server and the hook processing.  I have been working with the Zoneminder developers to get the docker easier to set up.  You will find the hook processing much easier to set up now.  It should be just a matter of configuration.

 

Great news! Thanks for the update, much appreciated.

 

This last year ZM has evolved nicely even if Eventserver is not in ZM itself, it’s a killer feature. Read on their slack this summer that the ZM crew had Hardware support (GPU) running now but I have no idea how well it works. But it’s a great step forward. Hope it is stable and fully working soon and introduced into the next public version

 

Edit:Typos

Link to comment
On 7/24/2019 at 11:29 AM, MaNRo said:

Hi guys,

 

First let me thank dlandon for his great work, really appreciate your hard work, cheers sir!

 

Now, running "sudo pip3 install -r /config/hook/requirements.txt" got me closer to a solution, but now, when testing the detect_wrapper with an event I'm getting this: 

 

Command:

sudo -u www-data /usr/bin/detect_wrapper.sh 1446 5 (testing event 1446 on monitor 5)

 

Result:
Traceback (most recent call last):
  File "/usr/bin/detect.py", line 206, in <module>
    b, l, c = img.processFilters(b, l, c, match)
AttributeError: module 'zmes_hook_helpers.image_manip' has no attribute 'processFilters'

 

Has anyone see/deal with this before?

 

Thanks in advance for all your help!

@MaNRo did you ever figure this one. Mine now has the above error. Im just going back through all my debugging from last time I had errors.

Link to comment
3 hours ago, jas0r said:

@MaNRo did you ever figure this one. Mine now has the above error. Im just going back through all my debugging from last time I had errors.

The docker now sets up the hook processing and installs all the correct files so you no longer have to do a manual setup.  I recommend you do the following:

- Remove the Zoneminder docker.

- Remove the appdata/Zoneminder/hook folder.

- Go to CA and use the latest Zoneminder template and set the new hook variables for your needs.

- Apply your settings to the objectconfig.ini file.

Edited by dlandon
Link to comment

I made a brand new install. In order to work I had to pull and copy over the latest zmes_hook_helpers folder. I get detection's now in the log file.

Although I get detection's it now wont write back the object detection to ZM. My prev setup did but now I get:

"Could not write image to ZoneMinder as eventpath not present"

 

Reading online it seems it wont work until 1.33. Or is it maybe permissions?

Link to comment
12 minutes ago, jas0r said:

I made a brand new install. In order to work I had to pull and copy over the latest zmes_hook_helpers folder. I get detection's now in the log file.

Although I get detection's it now wont write back the object detection to ZM. My prev setup did but now I get:

"Could not write image to ZoneMinder as eventpath not present"

 

Reading online it seems it wont work until 1.33. Or is it maybe permissions?

@jas0r I don't remember exactly which helpers did I modified last time, but yes, it worked... until a couple of days ago he he, I will do what @dlandon suggested and let you guys know if I managed to make it work again.

 

Cheers,

Link to comment

@jas0r I can confirm that following the advice of @dlandon everything is working as expected, I didn't need to download the zmes_hook_helpers, actually I renamed the current hook directory to hook.back, remove my custom script from running with -e ADVANCED_SCRIPT=0 also made sure that -e INSTALL_HOOK=1  and  -e INSTALL_YOLO=1 were added. Once the container was fully created I stopped it, copy the objectconfig.ini from my hook.back to the newly created hook directory and restarted the container.

 

Here the results for a couple of events:

root@nas# docker exec -ti zoneminder sudo -u www-data /usr/bin/detect_wrapper.sh 5111 2
[s] detected:person:90%
root@nas# docker exec -ti zoneminder sudo -u www-data /usr/bin/detect_wrapper.sh 5118 3
[s] detected:car:76%

 

@dlandon once again kudos for all your hard work, keep the outstanding job you're doing!

 

Cheers!

Link to comment

@MaNRo I get the same events but does yours write to ZM?

 

If I set "write_image_to_zm=yes" in objectconfig.ini I get

sudo -u www-data /usr/bin/detect_wrapper.sh 8 2
[s] detected:person:100%

but in my ZM logs I get

Sep 20 10:31:17 23a218b343cc /detect.py[20282]: INF [zmesdetect_m2] [object:person at [132, 186, 398, 474] has an acceptable confidence:0.9966217279434204 (min confidence=0.5)]
Sep 20 10:31:17 23a218b343cc /detect.py[20282]: INF [zmesdetect_m2] [labels found: ['person']]
Sep 20 10:31:17 23a218b343cc /detect.py[20282]: ERR [zmesdetect_m2] [Could not write image to ZoneMinder as eventpath not present]
Sep 20 10:31:17 23a218b343cc /detect.py[20282]: INF [zmesdetect_m2] [Prediction string:[s] detected:person:100% ]

and nothing is updated in ZM. Therefore the filter in ZMNinja in events called "Show Only Detected Objects" wont work anymore.

It used to write the object data (not the image bounding boxes) back to ZM for me in previous versions.

Link to comment
38 minutes ago, jas0r said:

@MaNRo I get the same events but does yours write to ZM?

 

If I set "write_image_to_zm=yes" in objectconfig.ini I get


sudo -u www-data /usr/bin/detect_wrapper.sh 8 2
[s] detected:person:100%

but in my ZM logs I get


Sep 20 10:31:17 23a218b343cc /detect.py[20282]: INF [zmesdetect_m2] [object:person at [132, 186, 398, 474] has an acceptable confidence:0.9966217279434204 (min confidence=0.5)]
Sep 20 10:31:17 23a218b343cc /detect.py[20282]: INF [zmesdetect_m2] [labels found: ['person']]
Sep 20 10:31:17 23a218b343cc /detect.py[20282]: ERR [zmesdetect_m2] [Could not write image to ZoneMinder as eventpath not present]
Sep 20 10:31:17 23a218b343cc /detect.py[20282]: INF [zmesdetect_m2] [Prediction string:[s] detected:person:100% ]

and nothing is updated in ZM. Therefore the filter in ZMNinja in events called "Show Only Detected Objects" wont work anymore.

It used to write the object data (not the image bounding boxes) back to ZM for me in previous versions.

Sorry my friend, I forgot to comment on that, based on the comments of my zmeventnotification.ini, the way I understand it is that if you enable "hook_pass_image_path = yes" on the zmeventnotification.ini you will also need to enable "write_image_to_zm=yes" on the objectconfig.ini but those to parameters are only supported on ZM 1.33 and above:

# if enabled, will pass the right folder for the hook script
# to store the detected image, so it shows up in ZM console view too
# Requires ZM >=1.33. Don't enable this if you are running an older version

# Note: you also need to set write_image_to_zm=yes in objectconfig.ini
# default: no
# hook_pass_image_path = yes

So far, without that feature I've been receiving push notifications from zmNinja on my Android phone with good enough captures attached to them. On the Event Lists those captures are not that good, meaning the main frame of the detection is not the captured frame of the listed events, I guess the "write_image_to_zm=yes" will take care of that, but we'll have to wait until ZM 1.33 is stable enough to @dlandon do his magic ;)

 

Cheers!

Link to comment
  • dlandon changed the title to [support] dlandon - Zoneminder 1.36

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.