       rsptot = atoi(temprsptot);
     }
   }
+
+  if (HO != (unihost + rsphost)) {
+    HO = unihost + rsphost;
+    HO_UPDATE = true;
+  }
+
+  if (HL != (unitot + rsptot)) {
+    HL = unitot + rsptot;
+    HL_UPDATE = true;
+
+  }
+
   msgcallback = !msgcallback;
 }
 


PubSubClient client(mqtt_server, 1883, callback, wifiClient);

volatile float H, T1, T2, OT, PW;
volatile int NW, PIR, HO, HL, unihost, rsphost, unitot, rsptot;
volatile bool msgcallback;

int sleepmode = LOW ;
int o_sleepmode = LOW ;



  if ( receivedtopic == substopic[0] ) {
    if (root.containsKey("DS18B20")) {
      if ( T2 != root["DS18B20"] ) {
        T2  = root["DS18B20"];
        T2_UPDATE = true;
      }
    }
  }

  if ( receivedtopic == substopic[1] ) {
    if (root.containsKey("data1")) {
      if (OT != root["data1"]) {
        OT = root["data1"];
        OT_UPDATE = true;
      }
    }
  }

  if ( receivedtopic == substopic[2] ) {
    if (root.containsKey("powerAvg")) {
      if (PW != root["powerAvg"]) {
        PW  = root["powerAvg"];
        PW_UPDATE = true;
      }
    }
  }

  if ( receivedtopic == substopic[3] ) {
    if (root.containsKey("WeightAvg")) {
      if (NW != root["WeightAvg"]) {
        NW = root["WeightAvg"];
        NW_UPDATE = true;
      }
    }
  }

  if ( receivedtopic == substopic[4] )
  {
    if (root.containsKey("DOORPIR")) {
      if (PIR != root["DOORPIR"]) {
        PIR = root["DOORPIR"];
        PIR_UPDATE = true;
      }
    }
  }

