Change function mode from a bash script?

Support and queries relating to all previous versions of ZoneMinder
Locked
breezly
Posts: 1
Joined: Mon Nov 21, 2005 3:34 pm

Change function mode from a bash script?

Post by breezly »

I would like to be able to change the Function modes from a bash script. Is there an easy whay to do this? (i.e.: from Modect to Monitor to None, etc...).
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

There are several ways to do what you ask. The easiest would be to use the "run state" feature in zm.

Do this by setting the cameras function the way you want during one period. Now click running on the console like you would do to restart zm. In the Run State window give the configuration you just setup a name in New State and save.
Now you can create another set of camera states, name it as above and be able to invoke them from the command line like so:
This assumes that the two states created were named Night, and Day:
/usr/local/bin/zmpkg.pl Night

/usr/local/bin/zmpkg.pl Day

There are other options of coarse but this is the simplist.
Regards,
Cordel
Locked