Hi, if your EGR valve is stuck open, it could cause a rough idle. P1400 indicates there is a problem with the EGR flowmeter. This may be the result of a valve that is stuck open or may be the cause or may be unrelated. What I recommend is to first check the vacuum hoses on the sensor/flowmeter and also check the hoses from the EGR solenoid to the EGR valve and from the intake manifold to the solenoid. If those are good, remove the EGR valve and inspect the EGR passages for blockage. Also check the valve for properoperation. The valve should default closed and open when engine vacuum is applied to the vacuum port. If you cannot find anything wrong, with the valve or passages, test the control solenoid that supplies vacuum to the EGR valve. It should click open when you apply 12 volts to it. If all this is good, check the wiring from the flowmeter to the computer for continuity. Please let me know if you have questions, and thanks for using FixYa.