I recently tried installing a remote controlled ceiling fan in a bedroom and planned on having it tied into the current switch. This switch only controls an outlet on the other side of the room and the romex can be found in the attic. My hope was instead of trying to fish a new romex from the fan to the switch, I could add a junction box in the attic and splice into the line thats there. After trying a few different wiring configurations, I have yet to get the fan or its light on using the remote. Also when I plug in a lamp to the switched outlet, it is dim and then flashes repeatedly.
There is only a black, white, and ground into the switch. As for the outlet, there is a black installed on the bottom right side (switched tab is not broken) and then two white wires on the left side. It looks as though the white wire that is associated with the black wire in the outlet has a wire nut with two black wires leaving the box. I'd assume one of these is to the switch. Since the remote control on the fan handles light and fan speed, there is only a black, white, and ground coming out of the fan.
As it stands I cut the wire between the switch and the outlet and put them into a junction box in the attic with a 3rd romex that goes to the fan. I am at a loss with how to wire this up and starting to think I have to start over somehow. Any help with this would be greatly appreciated.
UPDATE
Thanks for the quick response, that makes a lot of sense and I wish I asked here prior to all the wiring configurations I tried.
If I may ask, what would be the best solution to this? I don't really care if the outlet is switched any more since I will have a light with the fan anyway. Can I take that white wire (the one wire nutted to the 2 hot lines) and pigtail that into the neutral of the outlet? I think I'd have to add a pigtail to the two remaining hot lines and attach that to the outlet as well. This might be way too much in one box however so I'm open to suggestions.