   HTTPClient updateClient;
   debugPrintln(String(F("UPDATE: Checking update URL: ")) + String(UPDATE_URL));
   String updatePayload;
-  updateClient.begin(UPDATE_URL);
+  updateClient.begin(wifiClient, UPDATE_URL);
 
   // start connection and send HTTP header
   int httpCode = updateClient.GET();

  mqttStatusPayload += String(F("\"signalStrength\":")) + String(WiFi.RSSI()) + String(F(","));
  mqttStatusPayload += String(F("\"haspIP\":\"")) + WiFi.localIP().toString() + String(F("\","));
  mqttStatusPayload += String(F("\"heapFree\":")) + String(ESP.getFreeHeap());
  mqttStatusPayload += "}";

  mqttClient.publish(mqttSensorTopic, mqttStatusPayload);

      s[k++] = c;
  }
  s[k] = 0;
}