**4. Conclusions**

In this paper, a new optimal approach was developed and implemented for supplemental lighting control in greenhouse environments using IoT technology. This method solves an optimization problem to satisfy plant light needs using Markov-based sunlight prediction and variable electricity pricing. Two experimental studies during two different seasons in the same greenhouse were conducted, where the proposed lighting approach was validated in terms of electricity cost reduction (4.16% reduction during the winter study and 33.85% during the spring study) while maintaining plant growth.

**Author Contributions:** Conceptualization, S.A., S.M., J.M.V. and M.W.v.I.; methodology, S.A., S.M., J.M.V. and M.W.v.I.; software, S.A.; validation, S.A.; formal analysis, S.A.; investigation, S.A., S.M., J.M.V. and M.W.v.I.; data curation, S.A.; writing—original draft preparation, S.A.; writing—review and editing, S.A., J.M.V. and M.W.v.I.; supervision, J.M.V.; funding acquisition, J.M.V. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was financially supported by USDA-NIFA-SCRI Award Number #2018-51181- 28365, Project Lighting Approaches to Maximize Profits.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Sunlight data that were used to develop the predictive model are available at https://www.nrel.gov/grid/solar-resource/confrrm.html (accessed on 1 December 2019). The code developed for implementing the lighting strategy can be found here: https://github. com/velnilab/optimal-lighting (released 19 November 2021).

**Acknowledgments:** The authors would like to thank Theekshana C. Jayalath for his technical assistance.

**Conflicts of Interest:** The authors declare no conflict of interest. The funders had no role in the design, execution, interpretation, nor writing of the study.
