Change settings with personal scripts by modifying database

Forum for questions and support relating to the 1.28.x releases only.
Locked
Kinoha
Posts: 6
Joined: Mon Feb 02, 2015 3:22 pm

Change settings with personal scripts by modifying database

Post by Kinoha »

Hello,

I need to change the function of monitor and enable/disable zones.

Looking into the database I found the following tables:
Monitors with the Function field
Zones with the Type field

I wonder if I can change these fields (with command: mysql -zmuser -pzmpass -e "USE zm;UPDATE Zones SET Type='Active' WHERE Name='XXXX';" e.g.) or if there is a better solution?

Thanks
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Change settings with personal scripts by modifying datab

Post by knight-of-ni »

Use run states to make zoneminder do different things at different times or events:
http://www.zoneminder.com/wiki/index.ph ... or_week.3F

The example uses cron to change the state, but you don't have to.
You can change the state from the command line or in a script.
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/
Locked