This repository has been archived by the owner on Apr 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from Tronde/develop
Funktionalität für v1.3.0 umgesetzt. Closed #18.
- Loading branch information
Showing
2 changed files
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
LogInterval=600 | ||
maxtemp=38.0 # Grenzwert ab dem eine Temperaturwarnung verschickt wird. | ||
mintemp=-14.0 # Unterer Grenzwert ab dem eine Temperaturwarnung verschickt wird. | ||
minhumidity=28 # Mindestwert fuer die Luftfeuchtigkeit. | ||
maxhumidity=50 # Maximalwert fuer die Luftfeuchtigkeit. | ||
email="[email protected]" # Zieladresse für die E-Mail-Benachrichtigung. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,8 @@ | |
source ./sht21.conf | ||
|
||
#LogInterval=600 | ||
#maxtemp=25.0 # Grenzwert ab dem eine Temperaturwarnung verschickt wird. | ||
#maxtemp=25.0 # Oberer Grenzwert ab dem eine Temperaturwarnung verschickt wird. | ||
#mintemp=0.0 # Unterer Grenzwert ab dem eine Temperaturwarnung verschickt wird. | ||
#minhumidity=28 # Mindestwert fuer die Luftfeuchtigkeit. | ||
#maxhumidity=50 # Maximalwert fuer die Luftfeuchtigkeit. | ||
#email="[email protected]" # Zieladresse für die E-Mail-Benachrichtigung. | ||
|
@@ -18,7 +19,13 @@ tempalarm() { | |
temp="$(tail -n1 sht21-data.csv | awk '{print $4}')" | ||
if [ $(echo "if (${temp} > ${maxtemp}) 1 else 0" | bc) -eq 1 ] | ||
then | ||
echo "ALARM: Die Temperatur hat den festgelegten Grenzwert überschritten!" | mailx -s "Temperaturalarm" "$email" ; | ||
echo "ALARM: Die Temperatur hat den festgelegten oberen Grenzwert überschritten!" | mailx -s "Temperaturalarm" "$email" ; | ||
fi | ||
|
||
temp="$(tail -n1 sht21-data.csv | awk '{print $4}')" | ||
if [ $(echo "if (${temp} < ${mintemp}) 1 else 0" | bc) -eq 1 ] | ||
then | ||
echo "ALARM: Die Temperatur hat den festgelegten unteren Grenzwert unterschritten!" | mailx -s "Temperaturalarm" "$email" ; | ||
fi | ||
} | ||
|
||
|