a few thoughts on posibilities

Forum for questions and support relating to the 1.30.x releases only.
Locked
viscab
Posts: 5
Joined: Mon Oct 03, 2016 11:29 am

a few thoughts on posibilities

Post by viscab »

First of all please move this thread if its in the wrong place.

I have a few ideas I would like to run past you, and if you have any ideas on how it would be done.

1: I am using crontab to schedule the run state however in addition to that I was wondering if anyone have a script so that if an outdoor camera is alarmed change the run state. As an example at night all outdoor cameras is set to mocord and all indoors is set to monitor, then if an outdoor camera is alarmed switch all cameras to record.

2: is it possible for ZM to trigger a WIFI socket? so in case a camera goes to alarm some lights inside get turned on?
https://www.hivehome.com/shop/hive-acti ... lsrc=aw.ds or any kinda of sockets

I am new to ZM but am loving it :)
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: a few thoughts on posibilities

Post by knight-of-ni »

Most people want to go the other way. They want an external event to trigger the camera recording. In your case, it might be just as easy to let a PIR motion detector trigger the lights and even tell the camera to record. See the documentation for zmtrigger. The blog linked in my signature shows how to use an esp8266 (which is probably what is in your hive switch) to get zoneminder to trigger events. You would simply wire a pir motion detector to the esp8266, rather than the sound threshold detector I used.

If you really want ZoneMinder to be the trigger rather than a motion detector, then take a look at asker's event server:
https://github.com/pliablepixels/zmeventserver

You'll need to write something to listen to the socket it creates.

While I do not own a Hive switch, I have a Wemo switch. The interesting thing about the Wemo is that someone wrote an open-source library for it:
https://github.com/iancmcc/ouimeaux

Having a library already developed by someone else should make it easier for you. Maybe you already know of something similar for the Hive switch.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
viscab
Posts: 5
Joined: Mon Oct 03, 2016 11:29 am

Re: a few thoughts on posibilities

Post by viscab »

To be honest I have not yet got the wifi socket so the WeMo might be the way to go Thank you :)

with regards to getting an alarm on one camera to change the run state, have you seen anything on this?
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: a few thoughts on posibilities

Post by knight-of-ni »

Using a camera to record another is called Linking using ZoneMinder semantics.

I'm not sure you will want an outdoor camera to cause all your other cameras to record. That will likely cause many nuisance events.
An indoor camera might work for that purpose because you don't have near as many conditions which cause false triggers: blowing trees, bugs landing on the camera lens, changes in weather, etc.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
viscab
Posts: 5
Joined: Mon Oct 03, 2016 11:29 am

Re: a few thoughts on posibilities

Post by viscab »

Ahh I see the documentation also clearly state that :oops:
With regards to the wemo switch could I get you to elaborate on how you integrate the library in to zm and how you use it?

Your blog seems very clever am I right assuming you can use it for all sorts of triggers; fire, motion door magnets etc.?

Additional (kinda in line with the wemo switch) can you some sort of outputs to zm? Could be used for lights, horns, dog barking relays etc.

Thank you for your time. I'm just about getting my head around all the possibilities in zm
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: a few thoughts on posibilities

Post by knight-of-ni »

Well, I documented my first experience with the Wemo in another blog:
http://cmwatchdog.blogspot.com/

In my case, I'm just running a cron script which talks to the wemo under the right conditions. I did not integrate it with zoneminder. In your case, you would write some code to monitor the event server socket, and then sends the right command to the wemo switch when the conditions you are looking for are true. You should also read the documentation for the wemo library I linked earlier.

I'm not sure I understand your question about outputs, but you've got to install extra software (the event server I linked earlier) to get zoneminder to output a software event. ZoneMinder can send emails as an output, but I'm not sure I would bother to use that as a software trigger. For one, it will be slow since it relies on email servers.

ZoneMinder has the zmtrigger daemon, but that is for inputs into zoneminder, not outputs.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: a few thoughts on posibilities

Post by rockedge »

You could use the Filters and instead of sending an email run a command and start a script that will do whatever. I use X10 wireless motion detectors that are connecting to a CM19a usb X10 transceiver. With a script written in PERL or python that does something when zoneminder has a motion detected event like send a command to a light switch through the CM19a unit which also recieves the original trigger from the motion detectors that fire a camera through zmTrigger.pl.
viscab
Posts: 5
Joined: Mon Oct 03, 2016 11:29 am

Re: a few thoughts on posibilities

Post by viscab »

Am I right when I think that the filters are executed after a new segment has been closed?
Locked