Help configuring ZM with one CAM and different popositions

Add any particular hints or tricks you have found to help with your ZoneMinder experience.

Moderator: zoneminder

Raphton
Posts: 3
Joined: Fri Nov 30, 2012 1:12 pm

Help configuring ZM with one CAM and different popositions

Postby Raphton » Fri Nov 30, 2012 1:36 pm

Hi,

I have an IP motorized Camera (FOSCAM generic). I configured it successfully in ZM. Now as far as it is motorized i'd like to configure different point of view so i can schedule the zone which is monitored with different detection zones and different parameters and i can track movement from a zone to another.

My first idea was to create two monitors for each CAM position (one for initializing position and second for motion detect) and to schebule change betwwen position with crontab and ZM runstates.

Camera position can be controlled by sending an URL like <IP>/decoder_control.cgi?command=nn (nn is the preset position) so i created a first monitor in monitor mode with this control url for cam initialization and another one in MODECT mode and i created another couple of monitors for another cam position.

Unfortunately it doesn't work and cam switch from one position to another.

If you have any tip or idea about it, it should be really helpfull for me.

Thanks for your help.

Raph.

theforce
Posts: 122
Joined: Tue May 11, 2010 5:22 am

Re: Help configuring ZM with one CAM and different popositio

Postby theforce » Fri Nov 30, 2012 3:32 pm

The way I would do it is to write a script and have it on a schedule with cron.

Taken from a website http://www.tuxradar.com/content/build-y ... zoneminder

Scheduling

At the top of the screen, you can see that Zoneminder is showing as running. Clicking on this Running link allows you to change the state to Restart. This will restart the service. You can also add your own run states. First, configure Zoneminder as you want – for daytime motion detection for example, then click on the Running link. Type “daytime” in the text field, and click save. Daytime will be added to the list of run states. It will appear in the drop down list, and can be called using zmpkg.pl with cron jobs to schedule different modes of operation for different times of day, weekends, holidays, etc.

A typical crontab entry would read

0 9 * * 1-5 /usr/local/bin/zmpkg.pl daytime


In your script you can move your camera by sending the right command. I have some generic PTZ cameras that reset at random and wont go to position 1 after reset. So I have a script run every 5 minutes to move to position 1.

Raphton
Posts: 3
Joined: Fri Nov 30, 2012 1:12 pm

Re: Help configuring ZM with one CAM and different popositio

Postby Raphton » Wed Dec 12, 2012 2:11 pm

Hi,

Thanks for your answer. I tried this way buy i encounter some issues. In order to set camera position i need to send command

<IP>/decoder_control.cgi?command=nn

and i didn't find any way to insert it in monitor. Of course i can script it and include in the schedule with cron but by this way i will be unable to use cam follow up features (i mean feature which allow to automatically swap from a cam to another when a move is detected in the first one).

Maybe there's something i didn't understood correctly.

Thanks for your help.

Raphaël.

theforce
Posts: 122
Joined: Tue May 11, 2010 5:22 am

Re: Help configuring ZM with one CAM and different popositio

Postby theforce » Wed Dec 12, 2012 10:33 pm

I'm not to sure what your wanting. Can you provide the code for your script?

Are you saying if motion is detected by camera 1, PTZ camera will move to position 2. If motion is detect by camera 2, move PTZ camera to position 3. Something like that?

Raphton
Posts: 3
Joined: Fri Nov 30, 2012 1:12 pm

Re: Help configuring ZM with one CAM and different popositio

Postby Raphton » Thu Dec 13, 2012 10:49 am

Hello,

Sorry if i wasn't clear enough. You're right, wanted behaviour is switch from one position to another when a movement is detected in one zone. It seems easy to do with many cams, but in my situation i only have one.

When i talked about scripting, it's not really a script but more or less a batch including both commands (moving cam and then change ZM configuration).

I hope it will be clearer :) many thanks for your help.

Raphaël.


Return to “ZoneMinder Hints & Tips”

Who is online

Users browsing this forum: No registered users and 1 guest