[support] dlandon - Zoneminder 1.36


Recommended Posts

2 hours ago, scott47 said:

 

Hi, I'm just barely getting started with zoneminder and need a bit of help.  I am trying to set up cron in zm to automatically change the state at specific times.  This is from this page: http://www.adeptus-mechanicus.com/codex/contrib/ro-zmind/ro-zmind.html

 

 

Is this related to what you are asking about adding the php-curl package?  If so, is the php-curl package needed for what I'm trying to do?  If not, should I be able to set up the cron changes above without add it?

 

My eventual goal is to figure out a way to record using motion detection during certain hours, but not the hours I'm normally home.  I would also really like to be able to easily turn off recording  during the times I'm home "off hours".

 

Thanks for all your work on this!

Scott

 

I really don't know anything about the link so I can't comment on it.  From what I saw it just uses cron to perform some tasks.  It doesn't look like it has anything to do with the php-curl package.

Link to comment
On 9/15/2017 at 4:03 PM, dlandon said:

I was asked to add the php-curl package to the Docker for this script:


https://forums.zoneminder.com/viewtopic.php?f=9&t=25499&p=102289#p97465

It looks like it changes the cameras to Modect when you are away from home and back to Monitor when back home.  I don't know if this is interesting to anyone here, but let me know and I'll see about including the script in the Docker.

 

I looked at the script and I'm not sure I am comfortable with it.  It appears that the Zoneminder credentials are hard coded in the script.  This may pose a security risk.

Link to comment
7 hours ago, dlandon said:

I really don't know anything about the link so I can't comment on it.  From what I saw it just uses cron to perform some tasks.  It doesn't look like it has anything to do with the php-curl package.

2

 

I don't use Linux very often so when I do there is always a learning curve.  After a while I love it but then I don't use it for a while and have to start all over again the next time. :-)

 

I got the scheduling process all up and going (it was cron only) along with the email notifications.  So far, so good!  I personally would like the script to change the state from your phone location added but you know much better what you're looking at.  If you think it's a security risk, I would rather not have it.

 

Thanks again!

Link to comment
  • 2 weeks later...

I'm getting what appears to be to be some kind of mysql error on first install: 

Initiating database upgrade to version 1.30.4 from version 1.28.1


Upgrading database to version 1.30.4

Loading config from DB
Saving config to DB
Upgrading DB to 1.28.99 from 1.28.1
ERROR 1142 (42000) at line 393: CREATE command denied to user 'zmuser'@'localhost' for table 'Servers'

Output: Column Id exists in States
Column Id exists in States
Column IsActive exists in States
Column IsActive exists in States
Command 'mysql -hlocalhost -uzmuser -p"zmpass" zm < /usr/share/zoneminder/db/zm_update-1.28.99.sql' exited with status: 1

Freshening configuration in database
Loading config from DB
Saving config to DB
* Starting Apache httpd web server apache2
*
Starting ZoneMinder: failure

*** /etc/my_init.d/30_firstrun.sh failed with status 255


*** Killing all processes...

I saw some posts on other forums about a bad upgrade script in the past...but that don't sound like the answer to me. 

 

Any ideas?

 

Link to comment
1 hour ago, jsbarde said:

I'm getting what appears to be to be some kind of mysql error on first install: 


Initiating database upgrade to version 1.30.4 from version 1.28.1


Upgrading database to version 1.30.4

Loading config from DB
Saving config to DB
Upgrading DB to 1.28.99 from 1.28.1
ERROR 1142 (42000) at line 393: CREATE command denied to user 'zmuser'@'localhost' for table 'Servers'

Output: Column Id exists in States
Column Id exists in States
Column IsActive exists in States
Column IsActive exists in States
Command 'mysql -hlocalhost -uzmuser -p"zmpass" zm < /usr/share/zoneminder/db/zm_update-1.28.99.sql' exited with status: 1

Freshening configuration in database
Loading config from DB
Saving config to DB
* Starting Apache httpd web server apache2
*
Starting ZoneMinder: failure

*** /etc/my_init.d/30_firstrun.sh failed with status 255


*** Killing all processes...

I saw some posts on other forums about a bad upgrade script in the past...but that don't sound like the answer to me. 

 

Any ideas?

 

It looks like you're updating an older existing Zoneminder installation.  That won't work because the appdata layout is changed.

Link to comment
On 10/9/2017 at 9:51 PM, dlandon said:

It looks like you're updating an older existing Zoneminder installation.  That won't work because the appdata layout is changed.

 

What's weird is this is my first install, tho it's possible I had an old one at some point. (the docker was deleted but maybe it left stuff behind) I'll delete everything and start over and see what that does. 

Link to comment
18 minutes ago, jsbarde said:

 

What's weird is this is my first install, tho it's possible I had an old one at some point. (the docker was deleted but maybe it left stuff behind) I'll delete everything and start over and see what that does. 

Be sure any Zoneminder appdata folders are removed.  That's where the remnants would be located.

Link to comment
  • 1 month later...
On 5/6/2017 at 9:15 AM, dlandon said:

It looks like I need to install ssmtp in the docker.

 

EDIT: I'm working on updating the docker and will add ssmtp.  The ssmtp configuration files will be at appdata/Zoneminder/ssmtp.

Did you follow the instructions for setting up the ssmtp email in the first post?  The mailutils package is installed so you can test your email.

Link to comment
6 hours ago, jkingeek said:

I've tried following the email setup that you linked to in your original post.  I can not send email from my unraid CLI with the "mail" command but can with this:

echo "Subject: Test message" echo "test text" | ssmtp [email protected]

 

 

You have to set up and test the Zoneminder email inside the Docker with the Docker cli, not the unRAID cli.

 

to get into the docker from the unRAID cli:

docker exec -it Zoneminder bash

Then test your email.

Edited by dlandon
Link to comment
15 hours ago, dlandon said:

You have to set up and test the Zoneminder email inside the Docker with the Docker cli, not the unRAID cli.

 

to get into the docker from the unRAID cli:


docker exec -it Zoneminder bash

Then test your email.

Ok, I knew it had to be something along those lines... I got logged into the docker and can send test email manually but when I set up a filter to email on an event (which I'm not sure I did correctly) I get the following message in the syslog inside the docker:

 

Dec  5 22:15:45 aeb2d1aae291 zmfilter[601]: ERR [Can't send email: SMTP Failed to connect to mail server: Connection refused
 at /usr/bin/zmfilter.pl line 817.]

 

Link to comment
7 hours ago, jkingeek said:

Ok, I knew it had to be something along those lines... I got logged into the docker and can send test email manually but when I set up a filter to email on an event (which I'm not sure I did correctly) I get the following message in the syslog inside the docker:

 

Dec  5 22:15:45 aeb2d1aae291 zmfilter[601]: ERR [Can't send email: SMTP Failed to connect to mail server: Connection refused
 at /usr/bin/zmfilter.pl line 817.]

 

Check your credentials.

Link to comment

In order to use physical devices in docker, the host has to load the drivers first. Unraid doesn't have usb webcam drivers. 

 

That's why for dvb tuners, community is compiling and distributing custom unraid kernels with dvb driver support

Edited by aptalca
Link to comment

I have updated the Zoneminder Docker to include the zmNinja Event Notification Server.  Zoneminder can now push events to your iOS and Android devices.  There is a description of the event notification server in the first post.

 

EDIT: You will have to get the default template from CA and re-install Zoneminder to  enable port 9000 for the event notification server.

Edited by dlandon
Link to comment

I have changed the Docker to set the zmNinja Event Notification Server to secure by default.  A self signed certificate is generated and used for the Event Notification Server.  You can now also access Zoneminder securely using https.  The same self signed certificate is used for the https access.  You can supply your own certificate and copy it to config/keys.

Edited by dlandon
Link to comment

Dlandon,

 

First off, thank you for all your work on this so docker. I've been spending the last week or so getting it up and running and it works beautifully. 

 

I'm getting to the point where I'd like to schedule camera modes, and have found that the recommended way to do this is with a line in the crontab file, like the following:

 

0 05 * * * /usr/local/bin/zmpkg.pl Daytime

 

The issue is the zmpkg.pl file doesn't exist when installed as a docker in unraid. Is it possible you could add it to the /mnt/user/appdata/Zoneminder/Control folder? Does it exist within the docker image? 

 

 

Link to comment
4 hours ago, BilboT34Baggins said:

Dlandon,

 

First off, thank you for all your work on this so docker. I've been spending the last week or so getting it up and running and it works beautifully. 

 

I'm getting to the point where I'd like to schedule camera modes, and have found that the recommended way to do this is with a line in the crontab file, like the following:

 

0 05 * * * /usr/local/bin/zmpkg.pl Daytime

 

The issue is the zmpkg.pl file doesn't exist when installed as a docker in unraid. Is it possible you could add it to the /mnt/user/appdata/Zoneminder/Control folder? Does it exist within the docker image? 

 

 

/usr/bin/zmpkg.pl

Link to comment
3 hours ago, dlandon said:

/usr/bin/zmpkg.pl

Here's a listing of files in my usr/bin directory.

No sign of zmpkg.pl. I've scoured the unraid directories extensively and haven't found it anywhere. The "find" command has no luck either. Should I attempt a reinstall? I'm running Zoneminder v1.30.4, on unraid v6.4.0. And I'm pretty sure the docker is up to date.

usr-bin zoneminder.txt

Link to comment
3 hours ago, BilboT34Baggins said:

Here's a listing of files in my usr/bin directory.

No sign of zmpkg.pl. I've scoured the unraid directories extensively and haven't found it anywhere. The "find" command has no luck either. Should I attempt a reinstall? I'm running Zoneminder v1.30.4, on unraid v6.4.0. And I'm pretty sure the docker is up to date.

usr-bin zoneminder.txt

It's in the docker image, not in unraid.

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.