If you are like me, and only used the large half of the sensor on the garage door, then these are the changes that webCoRE detects when the door opens or closes:
- acceleration
- orientation
- threeAxis (or Vector)
and possibly ‘status’ as well
acceleration has 2 possibilities
orientation has 6 possibilities
threeAxis/vector has millions of possibilities
Again, running the test I suggest, will let you know which ones that you want to monitor, but “orientation” will be the easiest IF your family never pauses the door partway open. If someone in your family often leaves the door partway open, please say so, because the code will need to be much more complex to account for that.
For your reference: The 90° orientation usually changes when it crosses approximately 45 degrees. Installing the sensor on the highest panel of your garage door, gives the highest probability that the door is indeed closed (or at least almost closed), since the top panel stays horizontal the longest. To say this another way, if your sensor was installed on the bottom panel, then the door could be 75% open, yet the orientation sensor would think it is closed.
You can test this to see what I mean by watching the orientation in the log while slowly closing the door manually. You will see it switches before it fully closes. (as soon as the panel it is attached to crosses 45°)
I installed my sensor on a one inch wedge (about 35°) to solve that issue. My orientation changes when my door is 2-3 inches away from being fully closed. Normal top panel install typically will trigger at 12-18 inches. Second panel from the top can be 2-3 feet open. And it gets worse the lower the sensor is.