Smart Water Solutions for Distributed Wastewater Treatment