Dlandon this year released a Docker image complete with Zoneminder and Machinelearning, integration into home assistant is complete. This is why this article absolutely had to see the light of day. For less than a year, installation under docker has been greatly simplified. In addition, machinelearning is very complete thanks to object detection, facial detection, facial recognition, plate recognition, etc ....
- Home assistant core or HAOS installed and functional
- Traditional computer with HDD or NAS type
- Docker installed and functional on the computer
- Know how to use the docker environment to install and configure Zoneminder
The installation environment:
Zoneminder will be installed on a NAS running Openmediavault with docker. This choice is almost essential, on the one hand the CPU / GPU processor is relatively powerful, moreover the storage of videos can become very invasive. I do not recommend installing Zoneminder on a Raspberry Pi, not powerful enough for zm and active Machinelearning.
when the home assistant OS, it is installed on a Raspberry pi since can, before I used the home-assistant core which was running in a container on the NAS.
below we find the docker command that we find in the documentation of the github repository .
docker run -d --name="Zoneminder" \ --net="bridge" \ --privileged="false" \ --shm-size="8G" \ -p 8443:443/tcp \ -p 9000:9000/tcp \ -e TZ="America/New_York" \ -e PUID="99" \ -e PGID="100" \ -e MULTI_PORT_START="0" \ -e MULTI_PORT_END="0" \ -v "/mnt/Zoneminder":"/config":rw \ -v "/mnt/Zoneminder/data":"/var/cache/zoneminder":rw \ dlandon/zoneminder.machine.learning
Example of custom configurations "the one I use" for Openmediavault, you have to think about customizing the TZ timezone as well as any mounting volume. You can install ZM unsecured with the port -p 8080: 80 , however I strongly advise to install in ssl, letsencrypt is part of the container. Bye!
docker run -d --name="Zoneminder" \ --net="bridge" \ --privileged="false" \ --shm-size="8G" \ -p 8443:443/tcp \ -p 9000:9000/tcp \ -e TZ="Europe/Paris" \ -e PUID="1000" \ -e PGID="100" \ -e MULTI_PORT_START="0" \ -e MULTI_PORT_END="0" \ -v "/sharedfolder/Appdata/Zoneminder":"/config":rw \ -v "/sharedfolder/Télésurveillance/Zoneminder":"/var/cache/zoneminder":rw \ dlandon/zoneminder.machine.learning
After launching the image, the installation is done quickly thanks to dlandon's work on the image. Previously with the old image of Zoneminder you had to wait 20 to 40 minutes, the ES and ML part took a lot of time. Now Zoneminder and The ZMEventnotification package install in less than 5 minutes .
PS: If you want to use a installation under docker-compose you will find the code here.