From Joe Gio <joezgio@gmail.com>: track if AC power is connected/disconnected