Garage door open / close with liftmaster remote D-66793 443,92 Mhz

I was successful with the Fibaro Relay Switch, connected to the door button wires from the Liftmaster. Works fine.

The challenge is to know if the door is open or closed. I added a PHILIO 4-IN-1 MULTISENSOR with door magnet, but it does not always work.