I am planning to install a wyze security camera at the top of a staircase. There is a light switch right there I can draw from. Was thinking about wiring a romex from the light switch to the ceiling. But then how do I plug to the camera ? External outlet ? What is a clean solution so that people cannot see all the connection if they look up ? Thanks!
It looks like the white wire may be a neutral. This is good.
However, it looks like the switch is a 4 way switch (though I always though 3 way switches were used at the top of the stairs). This is less good -- there's no consistent hot leg on it.
You can verify both of these with a multimeter.
So I don't think this box is going to help you much, as you need to have constant power and neutral to power an outlet.
I used an Edison bulb light socket adapter (one example here: https://www.leviton.com/en/products/1403-i), and simply plugged the camera in below the bulb. The wire was neatly attached to the wall with u-clips, and the excess was coiled around the camera.
Total cost was quite low, and required zero wiring.