This project is for controlling the AC unit with a Raspberry Pi. It has capability to detect line power losses, temperature (and pressure) fluctuations.

Please see the project page for a detailed explanation