I probably wouldn't have it right in the window just because they're nocturnal animals and probably don't like all that light all the time. I don't really have proof of this... just a feeling I have! as far as sensing the rats, I really don't think so...