Powerflex direct vent wont stay lit

Hi all, I have a 4 year old powerflex direct vent water heater that wont stay lit. All the lights blink on the gas control valve and there is a continuous clicking from it. The only way to get it to light is to blow in the black tube on the blower connected to the diaphragm and then I hear the diaphragm click and it lights. I thought the diaphragm was the problem so I changed that. I need help please.

By blowing through the black tube, you proved that the diaphragm switch was GOOD, not bad. It's doing its job as a safety interlock. There's a problem either with the fan, or exhaust venting - it's not moving the air properly, and creating enough pressure/vacuum to close the switch to keep it running. Could be a bird's nest, mouse, a separation in the exhaust venting, inoperative fan, crack in the tubing, etc.

The gas valve and the diaphragm switch are related, but not the same. That switch is in the interlock, safety circuit, and must be closed for things to work. Now, if it does close, and the gas valve doesn't open or the igniter fails to operate, that's a different issue. Could also be a flame sensor.