Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ZoneMinder/zmeventnotification
Browse files Browse the repository at this point in the history
  • Loading branch information
connortechnology committed Sep 16, 2022
2 parents e328fa0 + 0d925fe commit e384178
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions hook/zmes_hook_helpers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,22 +173,22 @@ def import_zm_zones(mid, reason):
match_reason = True if g.config['only_triggered_zm_zones']=='yes' else False
g.logger.Debug(2,'import_zm_zones: match_reason={} and reason={}'.format(match_reason, reason))

url = g.config['portal'] + '/api/zones/forMonitor/' + mid + '.json'
url = g.config['api_portal'] + '/zones/forMonitor/' + mid + '.json'
g.logger.Debug(2,'Getting ZM zones using {}?username=xxx&password=yyy&user=xxx&pass=yyy'.format(url))
url = url + '?username=' + g.config['user']
url = url + '&password=' + urllib.parse.quote(g.config['password'], safe='')
url = url + '&user=' + g.config['user']
url = url + '&pass=' + urllib.parse.quote(g.config['password'], safe='')

if g.config['portal'].lower().startswith('https://'):
if g.config['api_portal'].lower().startswith('https://'):
main_handler = urllib.request.HTTPSHandler(context=g.ctx)
else:
main_handler = urllib.request.HTTPHandler()

if g.config['basic_user']:
g.logger.Debug(2,'Basic auth config found, associating handlers')
password_mgr = urllib.request.HTTPPasswordMgrWithDefaultRealm()
top_level_url = g.config['portal']
top_level_url = g.config['api_portal']
password_mgr.add_password(None, top_level_url, g.config['basic_user'],
g.config['basic_password'])
handler = urllib.request.HTTPBasicAuthHandler(password_mgr)
Expand All @@ -211,7 +211,6 @@ def import_zm_zones(mid, reason):
# Now lets look at reason to see if we need to
# honor ZM motion zones


#reason_zones = [x.strip() for x in rz.split(',')]
#g.logger.Debug(1,'Found motion zones provided in alarm cause: {}'.format(reason_zones))

Expand Down
2 changes: 1 addition & 1 deletion zmeventnotification.pl
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
DEFAULT_FCM_LOG_RAW_MESSAGE=>'no',
DEFAULT_FCM_LOG_MESSAGE_ID=>'NONE',
DEFAULT_MAX_FCM_PER_MONTH_PER_TOKEN => 8000,
DEFAULT_FCM_V1_KEY => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJnZW5lcmF0b3IiOiJwbGlhYmxlIHBpeGVscyIsImlhdCI6MTYwMTIwOTUyNSwiY2xpZW50Ijoiem1uaW5qYSJ9.mYgsZ84i3aUkYNv8j8iDsZVVOUIJmOWmiZSYf15O0zc',
DEFAULT_FCM_V1_KEY => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJnZW5lcmF0b3IiOiJab25lTWluZGVyIEluYyIsImlhdCI6MTY0MTAxODg0OCwiY2xpZW50Ijoiem1uaW5qYSJ9.ThaCp6WOlAHWrNUcXLcMB3yMWUI16AR0nePjufXcWEA',
DEFAULT_FCM_V1_URL => 'https://us-central1-zoneminder-ninja.cloudfunctions.net/send_push',
DEFAULT_MAX_PARALLEL_HOOKS => 0,
};
Expand Down

0 comments on commit e384178

Please sign in to comment.