Is there any way to distinguish a power failure versus power interruption. I am looking for a method to recognize when there is a power failure (possibly through the neutral wire) to trigger a battery back up supply. System must work when the light source is on or off.