His lordship demonstrates his alarm system to his male dinner guests, noting with it engaged, the alarm goes off if any window opens (one would also assume, the doors). Later that evening, after shutting off the alarm, Raffles catches a real thief, makes a deal to hand over his booty, and help him escape from the house. The police detective notices the open window, closes it and resets the alarm, seconds before the real thief and Raffles opens the window. The alarm goes off and a chase ensues. As they apprehend the thief, we're shown one of the bedrooms with windows open and curtains blowing in the breeze. If the alarm is triggered by any open window, these windows should have been closed. And with the threat of robbery that night, all the windows would have been closed and locked.