Try a sensor like this
Output is a relay closure. Wire it up same as a button press; pullup resistor, relay closure to connect the input pin to Gnd.
Try a sensor like this
Output is a relay closure. Wire it up same as a button press; pullup resistor, relay closure to connect the input pin to Gnd.