My controller got a bit confused when I did the same thing.
If I remember I think I powered it one way or the other, in or out. Then turned the switch off or on, can't remember. Then reconnected the motor.
I know this sounds goofy but the thing stops when it feels the current go up from hitting the end of travel. The controller does not know if this is the open position or the closed position. You just reconnected things when it was in the opposite position.
You can use the input power and bypass the control box but you have to watch all your appendages. Be very careful.