A pest-trapping device includes a frame, a catch mechanism sized to fully cover the frame, an actuator, and an optical sensor operatively connected to the actuator for detecting presence of a pest. The actuator moves the catch mechanism from a first position and a second position.