So while I’m redoing my outdoor soffits I’m installing can lights. The tiny boxes that they supply aren’t big enough for one of the locations. I could install a junction box in the attic, but a thought occurred to me: The can lights can be disassembled so you can reach their box through the opening- remove a few screws and part of the light pulls down so you can reach the box.
I don’t know if this is the conventional way to do it, but Is there anything wrong with mounting another box next to it that could be accessed by removing the guts of the light in the same manner. Would a future electrician think to look for a box there in a couple of decades when the next owner is having trouble?
Technically the second box is accessible (it’s no more or less accessible than the junction that came with the light), so it might technically meet code, but it’s not a good idea. It definitely violates the intention of the electrical code, if not the actual letter of the law, so to speak. I can’t picture an electrician thinking to look there for another junction. Externally it looks like just another can light and that’s it.
It would be much better to put the junction box in the attic.
If you’ve ever watched “Mike Holmes Makes It Right”, one of the things they always seem to find and complain about are hidden junction boxes. They are behind walls with no access etc. It makes it very difficult to troubleshoot problems. I’d advise against it.
ALL junction boxes have to be accessible, that’s the point of having these boxes. My first home had wire splices in the wall, no access at all. I was able to find a troubling one by feeling the walls for heat (!!!). I wound up completely re-wiring the place.
Yep, junction boxes behind walls are clearly a code violation.
That’s not what the OP is talking about though. In the OP’s case, the junction box is technically accessible, so you can make the argument that it is to code (as boytyperanma said, your local inspector might not agree with you).
As I said in post #2 though, it might technically be to code, but it’s not a good idea.
The problem I see with not doing it that way is this is the sloping side of a ranch house. Putting the junction box in the attic would result in a length of Romex longer than 4.5 feet where it’s impractical (unless maybe for someone 20 years younger) to wedge themselves in and staple it.