Zoneminder-notes: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
(7 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
* [https://forums.zoneminder.com/viewtopic.php?t=4576_0Lt_DW1cggPr7dOBj|Zoneminder foum post on blob detection] | * [https://forums.zoneminder.com/viewtopic.php?t=4576_0Lt_DW1cggPr7dOBj|Zoneminder foum post on blob detection] | ||
* [https://wiki.zoneminder.com/How_to_get_ssmtp_working_with_Zoneminder|Zoneminder ssmtp configuration example] | * [https://wiki.zoneminder.com/How_to_get_ssmtp_working_with_Zoneminder|Zoneminder ssmtp configuration example] | ||
===== Rebuild database after Docker clobbers it ===== | |||
# Assuming docker is crashing, so nothing is using db | |||
# mkdir /opt/mysql | |||
# Copy database from /opt/Zoneminder/mysql /opt/mysql | |||
# Attempt to start database with innodb recovery options set to allow it to run (mariadb_conf.d/50-server.cfg) | |||
# mysqldump -u zmuser -pzmpass zm >> /tmp/dump.sql | |||
# Remove the innodb recovery options so we can run normal | |||
# /usr/bin/mysql_install_db --defaults-file=/etc/mysql/my.cnf (If you edited to point to /opt/mysql in config) | |||
## mysql_install_db --user=mysql --datadir=/opt/mysql --basedir=/usr ----auth-root-authentication-method=socket | |||
# Start local database: /etc/init.d/mysql start | |||
# login to database: | |||
## use mysql; | |||
## create USER 'zmuser'@'localhost' IDENTIFIED BY 'zmpass'; | |||
## grant all privileges on zm.* to 'zmuser'@'localhost'; | |||
## flush privileges; | |||
## create database zm; | |||
# sudo mysql -u root -S /var/run/mysqld/mysqld.sock zm < /tmp/dump.sql | |||
# stop database | |||
# copy database back into /opt/Zoneminder/mysql | |||
# chown back to correct usierid (will not match mysql) | |||
# Start docker container (sudo docker start Zoneminder) | |||
Make damn sure that you lock down the docker version | |||
<pre> | |||
apt-mark showhold | |||
docker-ce | |||
docker-ce-cli | |||
docker-ce-rootless-extras | |||
docker-scan-plugin | |||
</pre> | |||
===== Docker run command ===== | |||
docker run -d --name="Zoneminder" --restart unless-stopped --net="bridge" --privileged="false" --shm-size="8G" -p 8443:443/tcp -p 8081:80/tcp -p 9000:9000/tcp -e TZ="America/Los_Angeles" -e PUID="99" -e PGID="100" -v "/opt/Zoneminder":"/config":rw -v "/opt/Zoneminder/data":"/var/cache/zoneminder":rw dlandon/zoneminder tail -f /dev/null | |||
===== Settings for Blob Detection ===== | |||
TESTING ONLY - Mixed results - | |||
<pre> | |||
Min/Max Pixel Threshold 40 empty | |||
Filter Width/Height 5 5 | |||
Min/Max Alarmed Area 6 75 | |||
Min/Max filtered Ares 4 75 | |||
Min Max Blob Ara 3 empty | |||
Min/Max Blobs 1 empty | |||
</pre> | |||
TESTING MUCH BETTER | |||
* https://forums.zoneminder.com/viewtopic.php?t=4576 | |||
<pre> | |||
Unites Pixels (never percentage) | |||
Min Max Pixel Threshold 10 0 | |||
Filter Width Height 3 3 | |||
Min Max Alarm Area 100 0 | |||
Min Max Filter Area 100 0 | |||
Min Max Blob Area 100 0 | |||
Min Max Blobs 1 0 | |||
</pre> | |||
[[Category:Zoneminder]] | [[Category:Zoneminder]] |
Latest revision as of 11:11, 17 February 2022
Zoneminder configuration information specific to the alarm filtering can be found in the following areas..
Rebuild database after Docker clobbers it
- Assuming docker is crashing, so nothing is using db
- mkdir /opt/mysql
- Copy database from /opt/Zoneminder/mysql /opt/mysql
- Attempt to start database with innodb recovery options set to allow it to run (mariadb_conf.d/50-server.cfg)
- mysqldump -u zmuser -pzmpass zm >> /tmp/dump.sql
- Remove the innodb recovery options so we can run normal
- /usr/bin/mysql_install_db --defaults-file=/etc/mysql/my.cnf (If you edited to point to /opt/mysql in config)
- mysql_install_db --user=mysql --datadir=/opt/mysql --basedir=/usr ----auth-root-authentication-method=socket
- Start local database: /etc/init.d/mysql start
- login to database:
- use mysql;
- create USER 'zmuser'@'localhost' IDENTIFIED BY 'zmpass';
- grant all privileges on zm.* to 'zmuser'@'localhost';
- flush privileges;
- create database zm;
- sudo mysql -u root -S /var/run/mysqld/mysqld.sock zm < /tmp/dump.sql
- stop database
- copy database back into /opt/Zoneminder/mysql
- chown back to correct usierid (will not match mysql)
- Start docker container (sudo docker start Zoneminder)
Make damn sure that you lock down the docker version
apt-mark showhold docker-ce docker-ce-cli docker-ce-rootless-extras docker-scan-plugin
Docker run command
docker run -d --name="Zoneminder" --restart unless-stopped --net="bridge" --privileged="false" --shm-size="8G" -p 8443:443/tcp -p 8081:80/tcp -p 9000:9000/tcp -e TZ="America/Los_Angeles" -e PUID="99" -e PGID="100" -v "/opt/Zoneminder":"/config":rw -v "/opt/Zoneminder/data":"/var/cache/zoneminder":rw dlandon/zoneminder tail -f /dev/null
Settings for Blob Detection
TESTING ONLY - Mixed results -
Min/Max Pixel Threshold 40 empty Filter Width/Height 5 5 Min/Max Alarmed Area 6 75 Min/Max filtered Ares 4 75 Min Max Blob Ara 3 empty Min/Max Blobs 1 empty
TESTING MUCH BETTER
Unites Pixels (never percentage) Min Max Pixel Threshold 10 0 Filter Width Height 3 3 Min Max Alarm Area 100 0 Min Max Filter Area 100 0 Min Max Blob Area 100 0 Min Max Blobs 1 0