changes
This commit is contained in:
parent
ccc578e963
commit
4f3ec83f82
@ -18,8 +18,10 @@ MONGO_HOST = "172.16.2.15"
|
||||
MONGO_DATABASE = "iot"
|
||||
MONGO_COLLECTION = "iot"
|
||||
INTERVAL = 30 * 60
|
||||
PERIOD = 10
|
||||
PERIOD = 120
|
||||
THRESHOLD = 0.0
|
||||
EMAIL_SENDER = 'freezer@hottis.de'
|
||||
EMAIL_RECP = 'familie@hottis.de'
|
||||
|
||||
|
||||
|
||||
@ -119,10 +121,10 @@ class AlarmSender(threading.Thread):
|
||||
msg = self.queue.get()
|
||||
emailMsg = MIMEText("Temperature in freezer to high: %s %s" % (msg['timestamp'], msg['temperature']))
|
||||
emailMsg['Subject'] = 'Freezer Alarm'
|
||||
emailMsg['From'] = 'freezer@hottis.de'
|
||||
emailMsg['To'] = 'familie@hottis.de'
|
||||
emailMsg['From'] = EMAIL_SENDER
|
||||
emailMsg['To'] = EMAIL_RECP
|
||||
s = smtplib.SMTP('localhost')
|
||||
s.sendmail('freezer@hottis.de', ['familie@hottis.de'], emailMsg.as_string())
|
||||
s.sendmail(EMAIL_SENDER, [EMAIL_RECP], emailMsg.as_string())
|
||||
s.quit()
|
||||
|
||||
Logger.debug("AlarmSender sends message for: %s" % msg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user