I have a 2nd story bathroom which is a little too humid unless the window is left cracked all the time, greatly decreasing the efficiency of our HVAC system. I would like to install a bathroom fan with a timer switch but want to make sure the humid air is ventilated safely and in a code-compliant manner. Home is in california, if that makes a difference.
Venting through the roof is not an option, the 2nd story of our home is covered in solar panels and I don't want to risk damaging anything up there.
In the picture below I have highlighted possible locations for an external through-wall vent for the bathroom fan ducting. Locations #1 and #2 are clearly too close to the gable vent. Location #4 is also directly below the gable vent, which worries me that warm humid air may be drawn back into the attic.
Locations #3 and #5 seem like the best option available. Is there anything wrong with this approach? Would this be a violation of any building codes for a bathroom exhaust vent?