Add Semdoc's wife turning ON/OFF mechanism

very sophisticated algorithm