         if ( tvPowerStatus == 1 ) {
           t.stop(tvIsOffEvent);
           t.stop(tvIsOnEvent);
+          timerStatus = 0;
         } else {
+          timerStatus = 1;
           tvOnTimer();
           temp_Mills = millis();
         }


void tvOnTimer()
{
  t.stop(tvIsOffEvent);
  tvIsOnEvent = t.every(o_tvOnTime * 1000 * 60 , doTvOffTimer);
}

void tvOffTimer()
{
  t.stop(tvIsOnEvent);
  tvIsOffEvent = t.every(o_tvOffTime * 1000 * 60 , doTvOnTimer);
}

void doTvOffTimer()

  }
}

void irSendTvbypir(int onoff)
{
  if ( tvPowerStatus == 1 ) {
    switch (onoff) {
