Doors that are metal or have metal frames you will need to put a spaces beneath the door/window sensors to separate it from the metal (especially if the doors or frames are ferrous).  Thin wood, plastic or even cardboard has worked for this purpose.