Construction of an automated water flow management system