With the rise of AI technology, it can be applied to smart greenhouse. In our research, we design a prevention mechanism against instant heavy rainfall using Long Short-Term Memory (LSTM) networks to forecast the local precipitation at the next hour near the greenhouse. Besides, missing data and imbalanced data issues are also tackled. Our experiments show that linear interpolation is enough to deal with sporadic missing data. Moreover, two approaches of imbalanced data handling can also enhance the performance of our proposed seasonal LSTM models, including oversampling methods which manipulate the imbalanced training data, as well as cost-sensitive learning methods which modify the loss function in some way. Finally, we also provide the reference result for the greenhouse farmers, so as to decide how much trade-off between Recall and Accuracy they can bear. This is done by tuning parameters related to imbalanced data handling techniques.