Cave door and window contact switch