For animal or human building? Regardless, there will be safety issues to consider, to prevent damage/overload if the door is obstructed.
How will your system cope with unwanted activation due to e.g clouds passing, insect on sensor, etc?
Does your opener/closer include internal limit switches?