Authors - Armida Gonzalez-Lorence, Jose Alejandro Ascencio-Laguna, Cornelio Morales-Morales, Jose Gabriel Ayala-Landeros, Juan Emigdio Soto-Osornio Abstract - This research develops an integrated system that combines the Internet of Things with machine learning for the purpose of optimizing environmental conditions in Mexican poultry farms. A four-module architecture is implemented: IoT Module for real-time environmental data collection through various sensors (DHT22, MQ-7, MQ-137, MG-811), processing and storage module, multivariable machine learning module, and visualization module. Experimental validation was conducted over 62 days in a commercial poultry farm, continuously monitoring critical variables of temperature, humidity, CO₂, and NH₃. The data were processed using classification and regression algorithms, including Random Forest, neural networks, and Gradient Boosting, to generate real-time recommendations. Random Forest algorithms showed the best classification performance (68% accuracy), while Gradient Boosting achieved the lowest mean square error in regression (RMSE=1.32). Through variable importance analysis, it was identified that indoor temperature (37.5%), CO₂ levels (18.3%), and bird age (15.7%) are the most significant variables. Therefore, an Agglomerative Hierarchical Clustering analysis (k=5) was executed, which allowed categorize 5 specific microenvironments. The system implementation makes predictions about the trend of temperature, humidity, NH3, and CO2. The developed system establishes a significant evidence-based advancement for poultry farming in Mexico.