From Wastewater to Renewable Energy