Homespan Garage Door Opener

Home App is not picking up current state, for example if I open the door I push button() to open and set current->setVal(2), the app shows it as opening, but if my door has obstruction the gate controller will stop and reverse automatically and the current->setVal(1) will be triggered as the gate closes by the sensor. Mean wile home app will say its still opening even though the current state has been set and notified as closed.