Closed Yapping72 closed 1 year ago
Telegram bot created, added to group and verified that notifciations can be sent to group
Created alerting rules for temperature and co2 sensor readings.
TODO:
Configuring alerts for when light turns on or off. For rack 1, when growlight first switches on difference between latest and previous point will be approximately +390W. When it switches off it will be approximately -390W. This holds true for past data points.
Flux query will be used to determine the change in power consumption for each hourly interval. If change >= +360 W growlight went from off to on state. If change <= -360 W growlight went from on to off state. Using a 30W buffer since sometimes the change ranges from +391 to +393. This way alerts will only be sent when growlight turns on and when growlight turns off. This logic will apply to all other growlight power consumption alerts.
Created rules
TODO:
TOFIX: Align the start time of each alert to when new data will be recieved. i.e., sensor sends data at 432pm, alert should start only from 432pm. Intervals can stay the same.
TOFIX:
Verified That Growlight switched off alerts can be triggered.
Verified that water pump disconnected alerts can be triggered.
FIXED:
To do:
TODO:
Implemented own alerting module in python. This is in hopes of circumventing grafana alerting limitations. todo: configure nodata handling as per prof fauzis guidance i.e., send NODATA alerts only when X-alerts missed.
Custom telegram alerts working can detect for all racks.
Alerts working as intended, triggered when difference in power consumption greater than 0. Not reliant on fixed growlight times.
e.g., Rack 2,3 - 7am ON, Rack 1- 8 am ON. (19 July)
Can also capture and report unexpected behaviour, Rack 2 switched on at 7am, off at 8am and switched back on at 10am.
Will be using Telegram bot for notification, email service requires SMTP server. Setting up our own personal SMTP server is deemed to be too time and labour intensive, with very high chance of emails being directed to draft / spam. Commercially available SMTP services e.g, SendGrid has strict restrictions i.e., type of domain and only allows up to 100 emails per day. Following discussion with team and ITP advisor, telegram will be the means of notification.