I realize there are many similar questions that have been asked, but none that I have found that apply to my situation. I'm trying to replace an old pull-chain fan with a new smart fan I purchased, and the wiring situation is boggling my mind.
First of all, in the ceiling, the old fan (with a light) was connected simply via a red wire and a white wire, with two pull chains to control either the fan and the light. But what's more is that above those two wires, there are 4 black wires that are all nutted together, three white wires that are all nutted together and two red wires that are nutted together. Disconnecting one of these wires at a time seems to turn off power to one other unrelated outlet in the room. My new ceiling fan, which has a black wire, blue wire, red wire and a green wire. It has a fan and a light as well.
The old light was controlled by one wall switch, which was actually in a double gang box with another switch that controlled a separate light in the adjacent hallway. Each of these switches have a cable with 2 red wires, 1 black wire and 1 white wire. The two black wires and two white wires are nutted together, respectively, while one of the red wires is attached to the top of each switch and the other is attached to the bottom. There is also one separate, very short red wire that connects to the top of each switch along with the other two red wires, joining them.