Sorry for not coming back to your earlier. I had a look and as far as I can see your limits were bridged on your old setup. You have a connection from pin 5 to pin 1 and 2 on X5 and X4. Pin 5 is +24V and pin 1 and 2 are the min and max limits. Could it be that you had them disabled in the old setup?
Here is a diagram for connecting the wiring to the Ruida controller:
Basically run a wire from GND to your limit switch and then run a wire from the limit switch to the ruida controller. Make sure that you pick the right pin of the limit switch if your switch has two output pins. You can eather look up the type number in Google for an indication or use a multimeter and set it to beeper mode and figure out which of the pins connect to the common pin.
You probably have something like this: