Have you confirmed that flags reset when you
unplug the CM15A and plug it back in? If so,
that might be a way to trigger a "power
failure" macro. You set the flag to on. Then
if you have a macro set to keep checking
that it is on, you do nothing (sleep for 30
minutes, or whatever interval, and try
again). but, if it sees the falg is reset
(meaning that power went out, and was
restored), then it runs a "power
restoration" macro.