Due to the reason that plants can purify the air and beautify the environment, many people have started to grow plants for environmental and aesthetic reasons in recent years. However, they often work late hours due to their own work pressures and then often forget to water their plants or water them too much. In addition, because each plant depends on water differently, with some needing daily watering and others needing little, the plants die. In this work, an automatic watering machine at home was proposed based on the detection of temperature and humidity in the air. This study used scatter plots to verify our data set with 71% accuracy, exceeding the average of previous experiments. Meanwhile, in order to study the influence of humidity and temperature on watering conditions, rainfall into different ranges were divided with the same range of 10. When the temperature drops or humidity rises, the number of machine shutdowns will increase. The result indicated that our machine has a great degree of rationality and accuracy.