Managing manual hydroponic systems is often labor-intensive, requiring constant monitoring and frequent nutrient adjustment that challanges small scale growers. This study designed an IoT-based greenhouse system in Brgy. San Isidro, Talibon, Bohol, featuring automated environmental controls and machine learning-assisted nutrient optimization tailored for loose-leaf lettuce (Lactuca sativa var. crispa). The setup integrates temperature, humidity, light intensity, pH, and Total Dissolved Solids (TDS) sensors with actuators to regulate conditions in real time. Rather than relying on static baselines, a Random Forest Regression model dynamically estimates ideal TDS targets using live environmental data. To evaluate the system, we, the researchers, conducted a 30-day quasi-experimental comparison against a traditional manual hydroponic setup. Field results demonstrated significant agricultural improvements. The automated greenhouse boosted mean biomass to 119.74 grams with a 24.97% increase, average plant height to 13.00 centimeters with 23.11% increase, and leaf count to 13.13 per plant with 20.02% increase. Nutrient levels were also noticeably more stable, with the automated system maintaining a TDS standard deviation of 118.11 ppm versus 145.62 ppm in the manual setup. The hardware delivered a 97.78% correct actuator response rate, and the predictive model achieved a remarkable Mean Absolute Error of just 0.07 ppm. For growers, the most impactful change was a steep drop in manual labor. Cutting weekly maintenance from 3.5 hours down to just 0.5 hours, a reduction of 85.70%. These findings prove that automated, predictive nutrient management is highly viable for smallholder farming applications. Future development will focus on integrating solar power, testing alternative machine learning models, deploying advanced environmental sensors, and expanding technology to support a wider variety of crops.