A solution for the Internet of Things (IoT) Smart Irrigation Monitoring System based on artificial intelligence is proposed in this work, which is based on the communication between the Raspberry Pi3 card and severalESP32 clients using the MQTT and HTTP protocols, respectively. Our solution is divided into three parts: the firstis consists of soil moisture measurements in various zones of the field in order to construct a smart irrigation system. However, in the second part, for the second part, we involve the choice of power supply of our system. in this paper we use photovoltaic panels as a power source. A voltage constant and current measured by the ACS712 sensor, we have measured the power and energy of the solar panels every 5 min. These measures will be shown on the Node-RED platform and stored as a database in the SQLite programming language SQLite is introduced to reduce the database complexity. Because of this database, we can make accurate projections about water requirements and soil moisture. The last part consists of commanding our system by the best method(algorithm) of prediction for our case. Theratio of the reserved water was predicted with the use of machine learning (a model decision tree), which enabled us to generate these forecasts. By these forecasts command the valve. In practice, we use an electronic card that can support this type of machine learning algorithm. For this, we used the Raspberry pi card. Node-RED is the most suitable interface to apply this algorithm also it allows us to monitor in real-time with the laptop(local) and with the smartphone(4G) all measured by a dashboard. The IP address of raspberry needs with port1880 requires. This approach allows us to manage our system in a more efficient, automated, and intelligent manner.