When the main plastic gear stripped, I had to replace my garage door opener. I thought that it might be fun to "salvage" the electric eye sensors for some other purpose. I was also interested to see how they worked, since there are only two wire connections on the opener and yet the devices use them for both power and signals.
The opener was a Chamberlin 1/2 HP dating from 1994. Yours may or may not be similar.
The electric eye has two small boxes -- one which sends (infrared) light, and the other which receives it. The opener is able to tell when the light beam is blocked. Each of the two boxes has a pair of wires, one white and one white with a black stripe. Those wires go in parallel to two connectors on the opener.
With the devices hooked up, an oscilloscope was used to see what was going on. With the light blocked between the transmitter and receiver, the white/black wire is 6VDC above the white wire. When not blocked, a periodic signal is observed, where the white/black wire is 6V above the white wire for about 5.5 ms, then falls close to 0V for about 0.5 ms. This suggests that the opener is supplying 6V through a resistor -- the receiver is "pulling" the voltage to (near) 0V briefly and periodically. One cannot expect it to pull too hard, so a resistor must be present.
The devices were removed from the opener. With a DC voltmeter across the terminals on the opener, the voltage was measured while resistors with gradually decreasing values were put across the terminals. Since the small boxes both have lit LED's when operating, the internal equivalent resistance can't much more than about 1k for a 6V source, so that was the starting value for the external resistors. A significant drop in voltage (though less than by 1/2) was noted for a couple hundred ohms across the terminals. That means that the Thevenin equivalent resistance is less than about a couple hundred ohms.
A 6V power supply was wired through a 150 ohm resistor to the two boxes. Plus to the white/black wire, 0V (gnd) to the white wire. The signal was observed to be virtually identical to what was observed from the opener, except the maximum was closer to 5V rather than 6V. It might be that a smaller resistor is expected or that the circuit is not linear (hence, Thevenin's theorem is not applicable). But it works, anyway.
To make a completed electric eye for use without the opener, a small circuit board was used which included a 6V regulator (7806) and a 555 (low-power) wired as a "missing pulse detector." The circuitry for the latter can be found on the 555 data sheet, and is easily found with an internet search. It has been copied and recopied by many. Referring to that diagram, I used a 2N3906 PNP transistor, and a 0.1 uF capacitor and a 75k resistor for the timing. The power was supplied through a surplus wall cube (labeled 9VDC, 200 mA). The regulated 6V powers the 555 directly, and the white/black wire to the remote boxes through a series resistor (I ended up using 150 ohms for that though a somewhat smaller value may work better). I put in two LEDs. One just shows that the power is on, the other comes on when the beam is broken. More LEDs is better, right?
Pin 3 of the 555 goes low when the light beam is broken, and is high otherwise. So far it is just wired to light an LED. I am not sure what I might use the electric eye for as of yet. Perhaps something to do with trick or treaters?
Note that in the process of testing, I tried various power supply voltages. The frequency of the pulses does depend on the voltage. A 5V source still seems to work, though the frequency is not as steady.
Here's my circuit. It may or may not work for your sensors.
(1) For brighter LED's, reduce the 1k resistors to 470 ohm.
(2) Input power can be anywhere from about 8V up to 30V (i.e. whatever the 7806 can withstand)
(3) If your pulse timing is different, adjust the 75k resistor value.