you can use other model like esp03
for your ac detection, if you are just detecting presence of ac signal, an optocoupler will help you do the job.
but if you are detecting ac signal levels, you might have a hard time doing that with esp adc because of too many spikes on the ac signal.
but if you dont want a bit of headache, i suggest use arduino