Can you still Purchase EmonPi?

I’ve recently bought one of these which might help:
1 Channel AC 220V Optocoupler Isolation Module High Voltage Opto Isolator 3-5V Power Suppply PLC Photoelectricity Coupler Module
Much as Robert suggested, except ready made. If 240VAC is present, the 3-5 V output goes high (or low). Can be easily integrated into OEM I suspect.
I got mine on ebay, but couldn’t find the original link.
There is also an on-line video that explains how the circuit works and how to modify it for different applications.