This is very doable but i would not rely on zoneminder looking at the door. Zoneminder can't do this on it's own. Another thing to think about is.. what does trigger the door opening/closing and do you want this?
(it's a bit tricky to have one answer here as your garage door motor can be set up differently so a little tinkering is in order here)
- Zoneminder can look at pixels changing and if there is an alarm open the door. (not very secure, unless it's a public one)
- if you get fancy you can use object detection and open if a car is detected. (also not very secure as it would open the door as any car in in sight of the camera
- If you want to get even more fancy you can use licence plate detection. (you would think this would be the most secure way as nobody owns the same plate, but think of this... if someone would print out a license plate and hold it up to the camera the door will open).
There is just no way of knowing if the image is the actual real thing. you can use it however and the hardware requirements for it and setting it up are not hard to understand. But like i said before Zoneminder can't really do this "out-of-the-box".
if you still want to do this via camera, you can
First and most important: Most garage door openers (the box that contains the motor) have an extra connector with 2 leads that is used for opening the door from the inside with a button. This is just connecting the wire back into the device. You have to find this connector or find out another way how you can open the garage door by connecting 2 leads or....(this all depends on the door opener and how it operates normally.
This is what you need:
- A dedicated laptop, desktop, raspberry pi (or clone) or server. all need to be powered on 24/7.
- A homeassistant installation that runs on the device (or any other. i use homeassistant because it's easy to instal)
- A MQTT server (you can have homeassistant set that up for you)
- A Sonoff SV that you can set up to connect the 2 wires of the motor when a event happens that needs opening the door.
- A reed switch (magnetic door opener sensor) and a magnet (2 reed switches and possibly 2 magnets if you want to be real fancy).
- Set-up Zoneminder to use MQTT
- Jumper wires
There is some soldering involved depending on how you want to set this up.
Because this method can only send just 1 pulse to the motor the reed switches can sense if the door is open or closed. If a magnet is in proximity of the reed switch it will connect both leads and you can change the state of the door in homeassistant. Most garage doors probably will not send out it's state. But your mileage can vary.
https://www.youtube.com/watch?v=QMepwpyjMCY
If you want to be sure that the door opens with only a selected number of cars etc.... like for your own home... use a device in your car that sends out a BT signal or Wifi signal that connects to your homeassitant instance so it uses a bit of authentication before the door is opened. this works best if you power that device via your car and if the device powers off when you turn off your car.
This is a better solution (i guess). If you want to you can still use the camera detection but as a second layer.
https://www.youtube.com/watch?v=AU1KD_aJSMY