Blog Post:

Start Zoneminder Recordings with Vera Events

In a previous post I explained how you could configure the security DVR software Zoneminder to trigger recordings from a network connection. While a neat trick, I never really explained why I set this up.

I use the Vera home automation platform as the central brains of my smart home. Vera is tied into my home security system, my lawn sprinklers, my garage door, my outside doors, and now my home security system.

Vera can be a fairly complex thing to set up but it is worth the effort to figure out. Almost any Vera connected device can be used to trigger another action. For example, I turn on the lights in my garage and walkway to my house when I open the garage door. And now I record whoever disarms my alarm when they come home with these steps.

Prerequisites:

  1. A Micasaverde Vera home automation system with at least one connected device to use as a trigger.
  2. A Zoneminder DVR system on the same network (or at least able to accept connections from the Vera on your selected port).
  3. Your Zoneminder install should be configured to allow “Network Triggers” as detailed in my previous post. If you have trouble making this recipe work, I would suggest starting with the telnet steps in that post and verify that a network connection can trigger a recording. If you can’t trigger from a telnet session, the rest of this won’t work either.
  4. A basic understanding of Vera’s Luup engine. If not, go here and here for more information.

So all you need now is the Luup code that is the glue between Vera and Zoneminder.
Vera_Luup_Screenshot

In the screenshot above, I am in the web interface of my Vera. I altered the details for my own paranoia so these are not real IP addresses. I have created a “scene” in the Vera interface called “Film back door entry”. I trigger this scene whenever someone opens the back door while my security system is armed. When triggered, the snippet of code shown opens a TCP socket to my zoneminder server at 192.168.1.5 port 6802. It sends the ascii string “2|on+10|255|Back_door_opened_while_armed|text1|text2” to the server then closes the socket. This causes camera #2 on my system (which is pointed at the back door) to record a 10 second clip with an alarm value of 255 and the title “Back_door_opened_while_armed”.

4 Responses

  1. Great read. I’ve expanded on this and implemented a “mode change” in zmtrigger … i.e.

    -1|mode||Change mode|Away|

    I’ve added this to the Mode-switch in my Vera to whenever I change mode in Vera (Home/Away/Night/Vacation) it will trigger a specific Mode in Zoneminder.

    So thanks for the inspiration!

Leave a Reply

Your email address will not be published. Required fields are marked *

Get in Touch

If you have a product design that you would like to discuss, a technical problem in need of a solution, or if you just wish you could add more capabilities to your existing engineering team, please contact us.