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).
Outdoor Power - Do not power the camera using an outdoor outlet. You have all the problems you listed and you make the system more susceptible to tampering (an intruder can simply unplug the camera and blind the system).
Powering the camera - Let's begin by checking if the camera and its power supply is rated for outdoor use. The exposure to moisture, and to a lesser degree extreme temperature, makes many indoor units unsuitable. The connection of the power supply to the camera needs to be water resistant. If it is not, you need to consider a different camera unit.
In general, outdoor power lines need special cable or a metal or plastic pipe to protect the cable. The power to the unit is apparently low voltage, so it may not need the same level of protection as it would if it were 120 volts.
You will need to bring the wire through the wall (or through a soffit) at some point. You want to drill through an area that DOES NOT contain framing. You will go through siding, sheathing, probably insulation, and then finish material, probably drywall.
The main issue is sealing the entry holes from water and air infiltration. This can be done on the outside using a good outdoor caulk.
On the inside, you can use a low voltage junction box to protect the wire and then route it to an outlet. The best approach might be to run the wire to a double box, low voltage on one side and line voltage on the other.
![dual voltage box](https://i.stack.imgur.com/bdtsa.jpg)
You could then have the wire exit the front of the low voltage side and have the transformer plug into the line voltage side.
Mounting Camera - Most modern cameras (at least those without heavy housings or motor mounts) are fairly light, just a few pounds, if that. They can be screwed into the sheaving of the wall, which is located beneath the vinyl siding. You need to drill through the siding and into the sheathing and then screw the base to the sheathing. As you are mounting, you can seal the screw holes and even the base of the camera with outdoor caulk.
If the camera is heavy, you should screw the camera to a framing member (stud). These are found at corners, regularly spaced horizontally (usually every 16 inches from a corner), and near the roof and floor line of each level. You can use a stud finder to locate them.
Best Answer
Power cord method
Extension power cord method
PoE method (Power on Ethernet)