Typically an exterior light will have a cable directly from the switch to the light soley for the purpose of switching. This is unlike some electrical boxes you will find in your interior where there are circuits branching off within the box, or where power might come in at the ceiling and then a cable is run to the switch.
Assuming this is the case, once you disconnect it the old switch and light, connect the hot and neutral (black/white) together with a wirenut on both ends. This is a good way of indiciating that it is no longer in use, and if someone were to mistakenly connect it again, it would short out and trip the breaker. If it is not wired in this manner you will need to be a bit more careful with what you disconnect and tie together.
On the outside, if your new light fixture is not being mounted to the same electrical box then you would want to cap the box with a weather tight cover.
18awg is small for power wires. With 5VAC 2A:
- At 20ft you're going to get ~4.5V
- At 40ft, about ~4.0V.
For comparison, if it was 16awg, at 20ft you'd get ~4.7V. With 22awg, at 20ft you'd get ~3.7V.
You should check the specs on the camera: they'll often give a voltage tolerance. On top of that, some transformers (especially cheap ones) don't exactly supply the voltage they say they will, especially as the current draw is higher. A crappy transformer coupled with under-sized wiring may mean not enough power for the camera, which will result in it either not working or being "glitchy".
Because you also have a wifi camera, the lower the wifi signal it gets, the more power it will take. I'm not sure how significant this actually is, but wifi is likely to be one of the main demands for power in the camera.
You can compensate for the voltage loss with a slightly higher input voltage (a 5.5V transformer would work perfectly for you). Power over Ethernet compensates for this by supplying a higher voltage (48VDC) and requiring devices can accept as low as 44V DC.
You could also potentially use the existing wire as a fish to pull a larger wire though, but that of course depends on if it's exposed in an unfinished basement or how willing you are to open and patch drywall. If you're going to pull wires, it may just be easier to pull ethernet and use a PoE hard-wired camera (more reliable, plus the power problem is taken care of).
Best Answer
Just about anything you do will look like an eyesore unless you're willing to spend 300 to 400 bucks on a 12 foot light pole and bury it 4'. I have seen people take a 14' 4x4 and bury it 4' and run conduit up to an exterior junction box mounted on the flat surface but those posts have a strong tendency to twist. Check with your power company. They may have an outdoor lighting program that could help you on this. Think about installing the fixture on one of your walls.