So I basically wanted to do what the OP wanted to do here...
However, I wasn't sure if one needed to actually cut thru the siding and add a new gang box + receptacle/outlet in order to plug in the IPcam's wallwart power adapter... or if my wiring/connections are right... I think they are...
So I did this:
I spliced together the cables coming from the switch, the exterior lamp's cables (not pictured), and the cables that feed the outlet. I put those twisting plastic wire nuts on all connections, and put the lamp back on. I wanted to avoid drilling/cutting on the hardiplank siding cuz it's a pain (super hard) and kinda want the power adapter to be hidden as it's def not for outdoor use...
My question is, is this a possible/valid way to do it? I nailed the outlet to a stud on the right (without a plastic gangbox) and just pulled the 5V DC cable to thru a small opening on the lamp's housing/base.
Also could an outlet being hidden like that be a code violation? fire hazard? Where can find out about whether this is ok code-wise in my area? I'm in Metro-Atlanta, GA.