IoT-based power failure monitoring