Best way to tell if a lid is open.

Not knowing anything about the box, I'll say security door/window contacts. Surface mount, with adhesive backing.