Stanley garage door opener -- obstruction sensor problem

My Stanley garage door opener is about 10 years old and the obstruction sensor gadget was going bad. Despite being accurately lined up with the opposite sensor, the red light would not light and the door would not close. By tapping on the sensor unit, I was sometimes able to make it work, so it seemed there was something loose inside.
I purchased a replacement sensor kit from an online garage door parts outfit. It looks identical to the OEM sensors, but doesn't say STANLEY on the front. I didn't want to remove all my original wiring, so I cut the wires and spliced the new sensors in. I was careful to connect all the same wires.
Well, the new sensors are installed and lined up but no red light. The units are beeping about once a second. Anybody know what's up with this and how to make it work???
Thanks, Lenny Greeley, Colorado

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file
Upload is a website for homeowners and building and maintenance pros. It is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.