A system, method, and apparatus for optimizing efficient use of resources in a controlled farming environment is disclosed. Various inputs to a controlled farming environment, wherein the controlled farming environment includes a plurality of plants, are controlled based on the nutrition information for the plurality of the plants. Third party information, such as electrical rate information from a power company, can be accessed by the system and may also be utilized to control the inputs to the farming environment. For example, if a power company offers incentives or reduced rates to not utilize power during certain time periods, the system of the present invention will send a signal to the electrical interface to only power the light source to the controlled environment at times other than the certain time period so as to take advantage of the reduced rates or incentives.