Edison was trying to understand the observed phenomenon of vapor deposition but discovered thermionic emission.
http://www.ieeeghn.org/wiki/index.php/Edison_Effect
The name Edison Effect was given to a phenomenon Edison observed in 1875, although it'd been reported two years earlier in England. Edison refined the idea in 1883, while he was trying to improve his new incandescent lamp. The effect is this: in a vacuum, electrons flow from a heated element -- like an incandescent lamp filament -- to a cooler metal plate.
Edison saw no special value in the effect, but he applied for a patent anyway. Edison patented anything that might ever be of value. Today we call the effect by the more descriptive term 'thermionic emission'. In any case, the magic of the effect is that electrons can flow only from the hot element to the cool plate, but not the other way.
The Fleming Oscillation Valve was the first practical application of the Edison Effect used as a vacuum tube rectifier and detector. It was invented by J.A. Fleming in 1904 and was the major influence on the development of wireless telegraphy and telephony. The Fleming Valve is considered by most wireless historians to be the grandfather of the modern Triode vacuum tube.