I'm trying to install a ceiling fan in place of a light fixture and before I screw something up, I thought maybe someone on here could lend some advice. I am no household electrician, but I thought this one should be a no-brainer. First, I removed the light fixture expecting to find white and black wires. Instead, I find yellow, white, and red; white appears to be neutral (enters junction, goes to fixture, goes back out), yellow appears to be hot (comes in and goes to fixture, does not go out), and red is unknown to me (loops through junction without visibly connecting). It just got more confusing for me at the switch; the red wire meets with a brown wire (not seen at the light fixture) and connects to the top of the switch. At the bottom of the switch is the yellow wire, and white passes through without connecting. Finally, how do I go about grounding the fan?
Basically most homeowners just hook up the Fan and Light of the fan to the same switch source. This is not the most convenient way to work it but no extra wire would need to be pulled. To the best of my knowledge ALL wire colors except white and green are considered hot. The only problem you don't know were or how they are routed threw the house. You may be seeing wires routing toward a bedroom, or a bathroom or something. From what I see in your photos you would be using the white as the common/return wire should be white on your fan. And your yellow wire appears to be the switched wire to your wall switch. I am not sure about coded in your area but In a metal conduit system the mounting of the fixture to the steel box should be a suitable ground. If you desired to run the fan on another switched circuit I would recommend running an additional wire from the switch box and installing a dual style switch or control.