NOVELTY - Method for producing energy and treating wastewater involves starting up collection of wastewater in April-May, two days before new moon, from a pretreatment stage through a pumping station or gravitationally, and treating the pre-treated wastewater in a three zone harvested free water surface constructed wetland in greenhouse, with air temperature of 13-40 degrees C and water temperature of 10-32 degrees C, where the first zone is treated by using Eichhornia crassipes in fully vegetated zone, and the second zone is treated by using Myriophyllum spicatum in an open water zone.    USE - The method is useful for producing energy and treating wastewater (claimed).    DETAILED DESCRIPTION - Method for producing energy and treating wastewater involves starting up collection of wastewater in April-May, two days before new moon, from a pretreatment stage through a pumping station or gravitationally, and treating the pre-treated wastewater in three zone harvested free water surface constructed wetland in greenhouse, with air temperature of 13-40 degrees C and water temperatures of 10-32 degrees C, where the first zone is treated by using Eichhornia crassipes in fully vegetated zone, the second zone is treated by using Myriophyllum spicatum in an open water zone and the third zone is treated by E.crassipes in a fully vegetated zone, and the water goes further into a 0.8 mm mesh filter which has the role of retaining seeds, meanwhile the 25% of the first and third zone are harvested each 29.53 days, two days before full moon, by mechanical harvesters, and along with wastewater, fed through a chopper pump or gravitationally, into a anaerobic digester, from which the biogas is reformed and stored into graphene or graphene based materials, so it can be used for heating the greenhouse with a low-intensity radiant heating system, and the digesters with a boiler, the reminder of the hydrogen produced being used for producing energy. An INDEPENDENT CLAIM is included for installation for producing energy and treating wastewater.