Feature request for sending alerts

2 posts / 0 new
Last post
Emil's picture
Feature request for sending alerts

Featature request for sending alerts, when certain tresholds are meet,
- low battery
- high weight changes during a time period (up or down)
I think that this first should be implemented as a SMTP sending where users can put their own sender and SMTP address

Emil's picture
Put ssmtp on the hive

I have now put on mail on my hive
First I tried sendmail, this was a pain to set up so I found this
Changed the /etc/ssmtp/ssmtp.conf
root=my mail adress
mailhub=ISP smtp server
rewriteDomain=my domain (not needed)
hostname=My hostname

Created a simple script /home/hivetool/hivemail.sh
LOGFILE=/home/hivetool/`uname -n`.log
tail -288 $LOGFILE | mail $MAILADR

then made it executable
# chmod 755 /home/hivetool/hivemail.sh

Then made a crontab entry so it sends the last day to my mail
# sudo crontab -e
Add the following line
23 59 * * * /home/hivetool/hivemail.sh

Now it will send me errors that occur who would be sendt to root
And it send me a mail with the last day of readings

This is the first test, I will try to improve this soon

Log in to post comments