There are two parts to the configuration of this system:
- The Event Notification Server configuration - typically
- The Machine Learning Hooks configuration - typically
The ES comes with a sample ES config file which you should customize as fit. The sample config file is well annotated, so you really should read the comments to get an understanding of what each parameter does. Similary, the ES also comes with a sample objdetect.ini file which you should read as well if you are using hooks.
4.5 of the ES, you can separate out personal text out from your config files. This is supported both in
objectconfig.ini. This is completely optional. You are free to insert your personal details directly in the config files too. The reason I added support for secret tokens is to add an extra layer of security (similar to what Home Assistant does too). It’s a nice way to be able to share config files with other folks without inadvertently sharing your personal details.
Basically, this is how it works:
You add an attribute called
secrets to the
[general] section of either/both config files. This points to some filename you have created with tokens. Then you can just use the token name in the config file.
For example, let’s suppose we add this to
[general] # This is an optional file # If specified, you can specify tokens with secret values in that file # and onlt refer to the tokens in your main config file secrets=/etc/zm/secrets.ini portal=!ZM_PORTAL user=!ZM_USER password=!ZM_PASSWORD
# your secrets file [secrets] ZMES_PICTURE_URL=https://portal/zm/index.php?view=image&eid=EVENTID&fid=objdetect&width=600 #ZMES_PICTURE_URL=https://portal/zm/index.php?view=image&eid=EVENTID&fid=snapshot&width=600 ZM_USER=user ZM_PASSWORD=password ZM_PORTAL=https://portal/zm
Then, while parsing the config file evertime a key value is found that starts with
! that means its a secret token and the corresponding value from the secrets file will be substituted.
The same concept applies to
Obviously this means you can no longer have a password beginning with an exclamation mark directly in the config. It will be treated as a secret token. To work around this, create a password token in your secrets file and put the real password there.