   if(power != 1) {
     power = 1;
     digitalWrite(powertail, HIGH);
+    digitalWrite(iotrelay, HIGH);
     publishPowerStatus();
   }
 }


int led1 = D7;
int powertail = D5;

double temperature;
double minuteAverage;

  if(power != 0) {
    power = 0;
    digitalWrite(powertail, LOW);
    digitalWrite(iotrelay, LOW);
    publishPowerStatus();
  }
}
