I suggest you should use a micro PLC, you can connect the photo eye's output as an input signal of the PLC and the PLC can control the solenoid valve. the PLC can filter the fake signal of the photo eys (by programing).I suggest you can use the Siemens LOGO!.
you can mail me for more detail infomation.
stanleychou88@hotmail.com