emailSentryAlerts

This commit is contained in:
SpudGunMan
2024-12-09 20:29:16 -08:00
parent bcd23ebb83
commit 8d5334126f
4 changed files with 6 additions and 0 deletions
+1
View File
@@ -145,6 +145,7 @@ try:
sentry_holdoff = config['sentry'].getint('SentryHoldoff', 9) # default 9
sentryIgnoreList = config['sentry'].get('sentryIgnoreList', '').split(',')
sentry_radius = config['sentry'].getint('SentryRadius', 100) # default 100 meters
email_sentry_alerts = config['sentry'].getboolean('emailSentryAlerts', False) # default False
# location
location_enabled = config['location'].getboolean('enabled', True)
+3
View File
@@ -1051,6 +1051,9 @@ async def handleSentinel(deviceID=1):
logger.warning(f"System: {enemySpotted} is close to your location on Interface1 Accuracy is {resolution}bits")
send_message(f"Sentry{deviceID}: {enemySpotted}", secure_channel, 0, deviceID)
if enableSMTP and email_sentry_alerts:
for email in sysopEmails:
send_email(email, f"Sentry{deviceID}: {enemySpotted}")
handleSentinel_loop = 0
handleSentinel_spotted = enemySpotted
else: