Provided is a method for repelling pests from a greenhouse which is open and closed by a vent, and the method includes recognizing a pest which lives in or may possibly come into a greenhouse, detecting a frequency required to repel the recognized pest and emitting an ultrasonic wave or attractant light with the detected frequency.