Algorithm 3: Alert System for Community |
Initialization; 1. Start Service Node-Red 2. Check Service Node-Red 3. If Running a. Open localhost:1880/ui b. Set Clean Water Level Lower Set Point Variable c. Set Clean Water Level Upper Set Point Variable d. While Read Dashboard button status and Pin A6 i. If A6 value is less than the Clean Water Level Lower Set Point 1. Send Message to community: “Warning, The clean water level availability is very low” ii. End iii. If A6 value is greater than the Clean Water Level Upper Set Point 1. Send Message to community: “Notification, The clean water level availability is very High” iv. End v. If System ON button is active 1. Send Message to the community “System Status: The System has been turned ON!” vi. Else If System OFF button is active 1. Send Message to the community “System Status: The System has been turned OFF!” vii. Else If Pump ON button is active 1. Send Message to the community “System Status: The Main Pump is running!” viii. Else if Pump OFF button is active 1. Send Message to the community “System Status: The Main Pump turned OFF!” ix. Else if Send Maintenance Alert Button is active 1. Send Message to the community “Alert, The System will remain non-operational today because of maintenance activity. The system will be back online tomorrow. Apologies for the inconvenience caused!” x. Else if Send System Normalization Alert Button is active 1. Send Message to the community “Alert, The system has been restored and fully functional after the maintenance shutdown” xi. End e. End 4. End Check System 5. End |