Lichtklingel: Unterschied zwischen den Versionen
Eest9 (Diskussion | Beiträge) K wikifoo |
Keine Bearbeitungszusammenfassung |
||
Zeile 33: | Zeile 33: | ||
const char* ssid = "Metalab Secure"; | const char* ssid = "Metalab Secure"; | ||
const char* password = " | const char* password = "metaf00lab"; | ||
int alarmo = 0; | int alarmo = 0; | ||
Zeile 42: | Zeile 42: | ||
WiFi.begin(ssid, password); | WiFi.begin(ssid, password); | ||
while(WiFi.status() != WL_CONNECTED) { | while(WiFi.status() != WL_CONNECTED) { | ||
delay(500); | |||
Serial.print("."); | |||
} | |||
Serial.println("Verbindung, YEAH!"); | |||
} | } | ||
Zeile 62: | Zeile 64: | ||
Serial.print("."); | Serial.print("."); | ||
} | } | ||
Serial.println(""); | Serial.println("Verbindung, YEAH!"); | ||
Serial.print("Connected to WiFi network with IP Address: "); | Serial.print("Connected to WiFi network with IP Address: "); | ||
Serial.println(WiFi.localIP()); | Serial.println(WiFi.localIP()); | ||
} | } | ||
HTTPClient http; | HTTPClient http; | ||
Serial.println("Start Alarm"); | |||
//TURN ON Hauptraum-Alarm | //TURN ON Hauptraum-Alarm | ||
String serverPath = "http://hauptraumalarm/cm?cmnd=Power%20ON"; | String serverPath = "http://hauptraumalarm/cm?cmnd=Power%20ON"; | ||
Zeile 102: | Zeile 104: | ||
httpResponseCode = http.GET(); | httpResponseCode = http.GET(); | ||
http.end(); | http.end(); | ||
Serial.println("End alarm"); | |||
WiFi.disconnect(); | WiFi.disconnect(); |