I was trying to rewire this garage door opener where in current situation it is not code compliant to where it is. The picture above shows where a porcelain light socket was wired. I had hoped to use it for receptacle but the cover is too big for the box and the one that does fit is too recessed in ceiling. Behind the middle of box in picture is cross piece that is mounted between two ceiling joists. I had thought of keeping light and make another hole in ceiling for receptacle box. How close could the porcelain light fixture and receptacle be to each other to be code compliant? Using Led bulb in socket and both are on same circuit.enter image description here

2 Answers 2


They make lampholders that have an outlet built in. Solves the problem of mounting this to that octagon box.

enter image description here

  • I had thought of that, but I was always concerned about how good the receptacle coming off the light socket would be. The garage door opener would be the only thing plugged into it (1/2 hp chain drive garage door opener). Commented Apr 20, 2019 at 2:08
  • 2
    Unless you think that light circuit is overloaded, this should be good enough to run a door opener
    – Machavity
    Commented Apr 20, 2019 at 2:13
  • @Machavity If you haven't used a similar trick before, your light circuit should be fine, given how small wattage lights have nowadays.
    – yo'
    Commented Apr 20, 2019 at 14:02

I like Machavity's solution. The only problem would be that the box and wire are probably switched at the wall since there is a keyless socket there now. That would mean your opener would be on that switch. There would be nothing wrong with that unless somebody turns the switch off and then your opener would not work. That could work as a security type of 'vacation mode' where you could turn off your opener when you are away. I put a controlled plug-in adapter with a wireless remote for my mother-in-law because she had her door opened by somebody driving by. She turns it off at night or if she is not expecting us to come over.

I can't tell you code wise on the distance, but make sure if you put in another box it is 'ceiling rated'. A lot of cut-in old work boxes are only wall rated and this would affect the fire rating of your ceiling. I wouldn't suggest putting that wire in the same octagon box in the picture because you could end up with 240 volts in that box depending on which leg the wires come off your panel. Lastly, don't use a residential grade receptacle, pay the couple of dollars more for a commercial receptacle because these will grip the plug blades better.

  • It is switched at the wall in kitchen nearby. Before it was run from switch in kitchen to junction box in attic and from there to door opener and light socket. I would be eliminating one of the runs of wire by using socket and receptacle together like above. Is the box you are talking about can be found at the big box home improvement stores? I didn't remember seeing that type there. Commented Apr 20, 2019 at 3:05
  • The link is too long but search Home Depot for "4" Round Old Work Electrical Ceiling Box" and check out the old-work boxes. Make sure if you buy one you can get the correct receptacle cover for it. I think the 4 inch or 4-O (O as in oh, not the number zero) boxes are the only ones that they make a receptacle cover to fit. It will be a metal commercial cover. I don't think the 3-1/2 inch will have a cover, but I could be wrong. Home Depot can show you what they have.
    – lqlarry
    Commented Apr 20, 2019 at 3:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.