Multi sensor open/close and axis/orientation

I have a garage screen with a door in it. I need to be able to monitor the open close by magnet and set rules based on its orientation. I searched the forums and do not see any answers…any ideas?

scott