Removing GCP app publishing from the arduino app

This commit is contained in:
JayWll 2020-01-04 12:16:26 -07:00
parent d1e2f2b4cc
commit f3ad62eb10

View File

@ -53,23 +53,6 @@ void loop() {
std::unique_ptr<BearSSL::WiFiClientSecure>client(new BearSSL::WiFiClientSecure); std::unique_ptr<BearSSL::WiFiClientSecure>client(new BearSSL::WiFiClientSecure);
client->setInsecure(); client->setInsecure();
// Publish to GCP app
if (https.begin(*client, "https://houseplantcloud.appspot.com/newreading?s=" + String(gcp_app_secret) + "&v=" + String(reading))) {
int httpCode = https.GET();
if (httpCode > 0) {
if (httpCode == HTTP_CODE_OK || httpCode == HTTP_CODE_MOVED_PERMANENTLY) {
String payload = https.getString();
Serial.print("Response from server: ");
Serial.println(payload);
}
} else {
Serial.printf("Server connection failed: %s\n", https.errorToString(httpCode).c_str());
}
} else {
Serial.println("Server connection failed");
}
// Publish to glitch app // Publish to glitch app
if (https.begin(*client, "https://jasonsplant.glitch.me/newreading?s=" + String(gcp_app_secret) + "&v=" + String(reading))) { if (https.begin(*client, "https://jasonsplant.glitch.me/newreading?s=" + String(gcp_app_secret) + "&v=" + String(reading))) {
int httpCode = https.GET(); int httpCode = https.GET();