Smart sensors for pest detection