Submitted:
12 February 2026
Posted:
13 February 2026
You are already at the latest version
Abstract
Keywords:
1. Introduction
- a modular, scalable sensor–actuator architecture suitable for heterogeneous greenhouse environments;
- resilient operation enabled by autonomous local control during limited or absent network connectivity;
- consultative LLM-based decision support for complex or non-standard scenarios;
- and long-term validation through deployment in a real greenhouse environment over an extended operational period.
2. Materials and Methods
2.1. System Architecture
- Sensor nodes (S)
- Actuator nodes (A)
- Coordinator (C)
- Router (R)
- Intelligent gateway (Sg)
- Remote server (Sv)
- Long-range wireless link (L)
- Cloud services.
2.2. Hardware Implementation
- Five mobile, low-power sensor nodes based on ESP32 microcontrollers (Espressif Systems), each equipped with a DHT22 digital sensor for temperature and humidity measurements (Aosong Electronics);
- A battery power supply with an integrated charging circuit for autonomous operation;
- Actuator modules based on the ESP8266 microcontroller (Espressif Systems), each equipped with two relays for controlling electric ventilation shutters;
- An ESP32-based coordinator node for aggregating and forwarding sensor data;
- A Wi-Fi router used to establish the local wireless network;
- A smart gateway implemented with Orange Pi Zero (Shenzhen Xunlong Software Co.), running the Armbian operating system and hosting a rule-based control agent, Mosquitto MQTT broker, and Node-RED logic flows;
- A remote server configured to host a PostgreSQL database, a large language model (Mistral AI), a server-side agent, and Grafana dashboards for visualization;
- A pair of 5 GHz MikroTik antennas, enabling long-range wireless communication (up to 12 km) between the gateway and the remote server (Figure 3).
2.3. Software Implementation
- Python-based agents responsible for decision-making at both local and server levels;
- Mosquitto MQTT brokers (Eclipse Foundation) used for lightweight message exchange between system nodes;
- Node-RED logic flows (OpenJS Foundation) employed for orchestration and low-code programming of data processes;
- PostgreSQL database (PostgreSQL Global Development Group) for structured storage of sensor and system data;
- Grafana dashboards (Grafana Labs) for real-time monitoring, historical data visualization, and analytics;
- Mistral large language model (Mistral AI) integrated via API for context-aware reasoning;
- OpenWeatherMap API (OpenWeather Ltd.) for external weather data retrieval;
- Portainer (Portainer.io) used for managing Docker container environments;
- ESP-NOW and Wi-Fi (IEEE 802.11) wireless communication protocols supporting intra-network connectivity.
3. Results and Discussion
3.1. Validation in a Real Environment
3.2. Behavior Analysis and Adaptability
3.3. Role of the Intelligent Module
- when the indoor temperature is above 30° C or the humidity is above 85% and
- if an internet connection to the server is available.
4. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Shamshiri, R.; Hameed, I.; Thorp, K.; Balasundram, S.; Shafian, S.; Fatemieh, M.; Sultan, M.; Mahns, B.; Samiei, S. “Greenhouse Automation Using Wireless Sensors and IoT Instruments Integrated with Artificial Intelligence” Book: Next-Generation Greenhouses for Food Security; Intech: Publisher, 2021. [Google Scholar] [CrossRef]
- Badji, A.; Benseddik, A.; Bensaha, H.; Boukhelifa, A.; Hasrane, I. Design, technology, and management of greenhouse: A review. Journal of Cleaner Production 2022, vol. 373, 133753. [Google Scholar] [CrossRef]
- Ray, P. A survey on Internet of Things architectures. Journal of King Saud University - Computer and Information Sciences 2018, vol. 30(no. 3), 291–319. [Google Scholar] [CrossRef]
- Ayaz, M.; Ammad-Uddin, M.; Sharif, Z.; Mansour, A.; Aggoune, E.-H.M. Internet-of-Things (IoT)-based smart agriculture: Toward making the fields talk. IEEE Access 2019, vol. 7, 129551–129583. [Google Scholar] [CrossRef]
- Khanna, A.; Kaur, S. Evolution of Internet of Things (IoT) and its significant impact in the field of precision agriculture. Computers and Electronics in Agriculture 2019, vol. 157, 218–231. [Google Scholar] [CrossRef]
- Tokmakov, D.; Asenov, S.; Dimitrov, S. “Research and development of ultra-low power LoraWan sensor node”. 2019 IEEE XXVIII International Scientific Conference Electronics (ET), 2019; pp. 1–4. [Google Scholar] [CrossRef]
- Davor, C.; Dodig, I.; Cesar, I.; Kramberger, T. Developing a modern greenhouse scientific research facility - a case study. Sensors 2021, vol. 21(no. 8), 2575. [Google Scholar] [CrossRef]
- Verdouw, C.; Tekinerdogan, B.; Beulens, A.; Wolfert, S. Digital twins in smart farming. Agricultural Systems 2021, vol. 189, 103046. [Google Scholar] [CrossRef]
- Riahi, J.; Vergura, S.; Mezghani, D.; Mami, A. Intelligent Control of the Microclimate of an Agricultural Greenhouse Powered by a Supporting PV System (1350). Applied Sciences 2020, vol. 10(no. 4), 20. [Google Scholar] [CrossRef]
- Gorjian, S.; Ebadi, H.; Najafi, G.; Chandel, S.; Yildizhan, H. Recent advances in net-zero energy greenhouses and adapted thermal energy storage systems. Sustainable Energy Technologies and Assessments 2021, vol. 43, 100940. [Google Scholar] [CrossRef]
- Jawad, M.; Wahid, F.; Ali, S. Energy optimization and plant comfort management in smart greenhouses using the artificial bee colony algorithm. Scientific Reports 2025, vol. 15, 1752. [Google Scholar] [CrossRef] [PubMed]
- Musa, P.; Sugeru, H.; Wibowo, E. Wireless Sensor Networks for Precision Agriculture: A Review of NPK Sensor Implementations. Sensors vol. 1, 51. [CrossRef] [PubMed]
- Benos, L.; Tagarakis, A.; Dolias, G.; Berruto, R.; Kateris, D.; Bochtis, D. Machine learning in agriculture: A comprehensive updated review. Sensors 2021, vol. 21(no. 11), 3758. [Google Scholar] [CrossRef] [PubMed]
- Anilkumar, P.; Tokmakov, D.; Venugopal, P.; Koppu, S.; Mileva, N.; Bekyarova-Tokmakova, A. A Multi-Objective Derived Adaptive TransDeepLabv3 Using Electric Fish Optimization Algorithm for Aerial Image Semantic Segmentation. IEEE Access vol. 12, 147723–147738. [CrossRef]
- Azlan, Z.; Junaini, S.; Khan, A.; Mustafa, W. Data-Driven Agriculture: Unveiling the Power of Internet of Things and Data Analytics For Transformative Farming Practices. Journal of Sensors. [CrossRef]
- Qian, M.; Qian, C.; Yu, W. “Edge intelligence in smart agriculture CPS” Book: Edge Intelligence in Cyber-Physical Systems. 2025, vol. 11, 265–291. [Google Scholar] [CrossRef]
- Gupta, G.; Pal, S.K. Applications of AI in precision agriculture. Discover Agriculture 2025, vol. 3, 61. [Google Scholar] [CrossRef]
- Gong, R.; Zhang, H.; Li, G.; He, J. Edge Computing-Enabled Smart Agriculture: Technical Architectures, Practical Evolution, and Bottleneck Breakthroughs. Sensors vol. 25, 5302. [CrossRef] [PubMed]
- Qiu, T.; Liu, K.; Li, M. A survey on edge computing in smart agriculture. IEEE Access 2020, vol. 8, 161605–161628. [Google Scholar]
- Bommasani, R.; Hudson, D.A.; Adeli, E.; Altman, R.A.S.; von Arx, S.; Bernstein, M.; Bohg, J.; Bosselut, A.; Brunskill, E. “On the opportunities and risks of foundation models”; Computer Science: Machine Learning., 2022. [Google Scholar] [CrossRef]
- Mohammadabadi, S.; Kara, B.; Eyupoglu, C.; Uzay, C.; Tosun, M.; Karakuş, O.A. A Survey of Large Language Models: Evolution, Architectures, Adaptation, Benchmarking, Applications, Challenges, and Societal Implications. Electronics 2025, vol. 14, 3580. [Google Scholar] [CrossRef]
- Liu, P.; Yuan, W.; Fu, J.; Jiang, Z.; Hayashi, H.; Neubig, G. Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing. ACM Computing Surveys vol. 55(no. 9), 1–35. [CrossRef]
- Neelamegam, G.; Rajaram, V.; Ramya, S.; Akshya, J.; Sundarrajan, M. Multi-Agent Systems for Autonomous IoT Network Management Using Distributed Reinforcement Learning. 3rd International Conference on Intelligent Systems; Advanced Computing and Communication, 2025; pp. 906–911. [Google Scholar] [CrossRef]
- Toskov, B.; Toskova, A.; Bogdanov, S.; Spasova, N. Intelligent Management of IoT Devices with Limited Connectivity. In International Conference Automatics and Informatics (ICAI); 2021; pp. 354–357. ISBN 978-1-6654-2662-6. [Google Scholar] [CrossRef]
- Toskov, B.; Toskova, A.; Bogdanov, S.; Spasova, N. “Intelligent IoT Gateway” in International Conference Automatics and Informatics (ICAI); 2021; Volume SBN, ISBN 978-1-6654-2662-6. [Google Scholar] [CrossRef]
- Leitão, P.; Strasser, T.I.; Karnouskos, S.; Ribeiro, L.; Barbosa, J.; Huang, V. Recommendation of Best Practices for Industrial Agent Systems based on the IEEE 2660.1 Standard. 22nd IEEE International Conference on Industrial Technology (ICIT), 2021; pp. 1157–1162. [Google Scholar] [CrossRef]




| Date | Time | Delay [sec] | Action source |
| 27.03.2024 | 07:02 | 0.0 | Local agent |
| 28.03.2024 | 10:42 | 26.1 | Server agent |
| 05.06.2024 | 14:11 | 26.1 | Server agent |
| 05.06.2024 | 14:31 | 6.0 | Server agent |
| 15.06.2024 | 23:38 | 0.0 | Local agent |
| 16.06.2024 | 09:16 | 6.0 | Server agent |
| 21.06.2024 | 08:31 | 6.0 | Server agent |
| 21.06.2024 | 08:51 | 6.0 | Server agent |
| Sensor id | Number of restarts (battery empty) | Max. measurements per session |
| 1 | 2 | 8149 |
| 2 | 0 | 15209 |
| 3 | 2 | 6605 |
| 4 | 0 | 15220 |
| 5 | 1 | 11656 |
| Time | Temperature [° C] |
Humidity [%] |
Shutter position |
Action taken |
| 16.02.2022 07:16 | 14.7 | 34.3 | closed | No action needed |
| 26.02.2022 12:31 | 32.9 | 20.3 | closed | Open shutters |
| 26.02.2022 12:51 | 31.2 | 20.6 | opened | No action needed |
| 26.02.2022 13:11 | 30.4 | 19.5 | opened | No action needed |
| 26.02.2022 16:51 | 13.6 | 39.7 | opened | Close shutters |
| 26.02.2022 17:11 | 12.1 | 43.9 | closed | No action needed |
| T [° C] |
H [%] |
Shutter position |
Connection | Rain | Wind | Action | Action source & explanation |
| 24.8 | 71.0 | Closed | No needed | No action needed | Local agent decision | ||
| 30.1 | 43.0 | Closed | True | False | False | Open shutters | LLM: The temperature inside the greenhouse is 30.1° C which exceeds the threshold of 30.0° C specified in the rules, indicating that ventilation is needed. The shutters are currently closed, so opening them will allow for better air circulation and cooling. |
| 31.0 | 43.0 | Opened | True | False | False | No action needed | LLM: The greenhouse temperature is above the threshold for ventilation (31.0° C), but the shutters are already open. There is no rain or strong wind outside, so there’s no need to change the current state. |
| 20.1 | 76.3 | Opened | False | No action needed | Local agent decision | ||
| 13.2 | 53.1 | Opened | False | Close shutters | Local agent decision | ||
| 31.1 | 65.5 | Closed | True | True | False | No action needed | LLM: The greenhouse shutters should not be opened as the temperature (31.1° C) is above the threshold for ventilation and it is currently raining outside. |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
