taxus:
Any idea if there's any "of the shelf" circuit doing what you described?
Oh, there will be a few around, ranging from the "low end" devices implementing exactly what I described, to fully integrated commercial modules.
Searched on "220V digital input".