A system for controlling the environment of at least one greenhouse, wherein the system comprises sensors for sensing temperature, humidity light, CO2 level, soil conditions and the like. The system is configured to sense environmental conditions and generate sensor data that gets conditioned and is received by an environmental controller, which comprises a repository that stores the pre- defined environmental data and power management protocol, an analyzer that analyzes conditioned sensor data with respect to pre- defined data to generate analyzed environmental data, and a processor, configured to instruct the analyzer to perform its functions and also to transmit the analyzed environmental data. The environmental controller cooperates with the repository and the analyzer to receive the analyzed environmental and the power management protocol thereby processing the analyzed environmental data with respect to the power management protocol to generate power regulating instructions. Fig.5