Electrical Wiring in the Home/how to wire up a switched receptacle
I want to swap an ordinary wall switch for a ceiling light into one that has an outlet and a switch such that the switch controls the outlet (a light will be plugged into it). I have two slightly different combo switch/outlets, but no matter how I wire them, I either get an outlet that stays on or a switch that controls the ceiling light.
Further, it's difficult to know which wire is which since there are two black wires that seem to be painted white. These are two wires I used and they work inasmuch as they lit something up. There appear to be two other (actual white) wires that are tied together with a connector.
You can see one of the outlet/switches I am using and the switchbox at https://i.imgsafe.org/16c80cc735.jpg
The problem is with the light wiring. How do you plan to turn the ceiling light off? Or are you not using it? You cannot control both the outlet and the light with only 2 wires. If you are not using the light, make sure that one wire is connected to the white wire coming in, and the other wire to the black wire coming into the light fixture box. You will need to figure out which wire is which. The one connected to the white will connect to the light colored screw next to the outlet. The black wire will need to connect to the brass colored screw next to the switch. Do not use the screws on the other side of the switch, and do not do anything with the brass bridge between the screws.
About Electrical Wiring in the Home
This site answers questions related to home electrical wiring, home wiring, general electrical help,and other electrical questions related to aleternating current (AC). You can find help on the National Electical Code, home electrical issues, wiring electrical outlets, installing lighting, electrical grounding, and general electrical help for do-it-yourself projects not require an electrician. If you do not see your home electrical wiring question answered in this area then please ask your electrical wiring question here