PIR motion alarm with programmable code