For a safer setup always step it down with a transformer.
Or use an optoisolator. Have your voltage divided down/rectified AC driving an optoisolator, monitor the other side with the input.
isn't this an optoisolator I'm trying to use?
to detect power loss
this project won't have an AC receptacle to plug-into, so "wall-wart" is out
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16