/* * Sending XML status files to client */ void XML_response() { String resp; resp = resp + ""; resp = resp + ""; resp = resp + ""; if (nightlightActive && nightlightFade) { resp = resp + bri_t; } else { resp = resp + bri; } resp = resp + ""; for (int i = 0; i < 3; i++) { resp = resp + ""; resp = resp + col[i]; resp = resp + ""; } resp = resp + ""; resp = resp + notifyDirect; resp = resp + ""; resp = resp + receiveNotifications; resp = resp + ""; resp = resp + nightlightActive; resp = resp + ""; resp = resp + effectCurrent; resp = resp + ""; resp = resp + effectSpeed; resp = resp + ""; #ifdef RGBW resp = resp + white; #else resp = resp + "-1"; #endif resp = resp + ""; resp = resp + useHSB; resp = resp + ""; resp = resp + serverDescription; resp = resp + ""; //enable toolbar here resp = resp + ""; server.send(200, "text/xml", resp); } void XML_response_settings() { DEBUG_PRINTLN("XML settings response"); String resp; resp = resp + ""; resp = resp + ""; resp = resp + ""; resp = resp + clientssid; resp = resp + ""; resp = resp + ""; for (int i = 0; i < clientpass.length(); i++) { resp = resp + "*"; } resp = resp + ""; for (int i = 0; i < 4; i++) { resp = resp + ""; resp = resp + staticip[i]; resp = resp + ""; } for (int i = 0; i < 4; i++) { resp = resp + ""; resp = resp + staticgateway[i]; resp = resp + ""; } for (int i = 0; i < 4; i++) { resp = resp + ""; resp = resp + staticsubnet[i]; resp = resp + ""; } resp = resp + ""; resp = resp + cmdns; resp = resp + ""; resp = resp + ""; resp = resp + apssid; resp = resp + ""; resp = resp + ""; resp = resp + aphide; resp = resp + ""; resp = resp + ""; for (int i = 0; i < appass.length(); i++) { resp = resp + "*"; } resp = resp + ""; resp = resp + ""; resp = resp + apchannel; resp = resp + ""; resp = resp + ""; resp = resp + serverDescription; resp = resp + ""; resp = resp + ""; resp = resp + useHSBDefault; resp = resp + ""; resp = resp + ""; resp = resp + ledcount; resp = resp + ""; for (int i = 0; i < 3; i++) { resp = resp + ""; resp = resp + col_s[i]; resp = resp + ""; } resp = resp + ""; resp = resp + white_s; resp = resp + ""; resp = resp + bri_s; resp = resp + ""; resp = resp + ""; resp = resp + turnOnAtBoot; resp = resp + ""; resp = resp + ""; resp = resp + effectDefault; resp = resp + ""; resp = resp + ""; resp = resp + effectSpeedDefault; resp = resp + ""; resp = resp + ""; resp = resp + useGammaCorrectionBri; resp = resp + ""; resp = resp + useGammaCorrectionRGB; resp = resp + ""; resp = resp + ""; resp = resp + buttonEnabled; resp = resp + ""; resp = resp + fadeTransition; resp = resp + ""; resp = resp + transitionDelay; resp = resp + ""; resp = resp + ""; resp = resp + bri_nl; resp = resp + ""; resp = resp + ""; resp = resp + nightlightDelayMins; resp = resp + ""; resp = resp + ""; resp = resp + nightlightFade; resp = resp + ""; resp = resp + ""; resp = resp + udpPort; resp = resp + ""; resp = resp + ""; resp = resp + receiveNotificationsDefault; resp = resp + ""; resp = resp + bri_n; resp = resp + ""; resp = resp + notifyDirectDefault; resp = resp + ""; resp = resp + notifyButton; resp = resp + "0"; //legacy resp = resp + ""; resp = resp + ntpEnabled; resp = resp + ""; resp = resp + ""; resp = resp + alexaEnabled; resp = resp + ""; resp = resp + alexaInvocationName; resp = resp + ""; resp = resp + alexaNotify; resp = resp + ""; DEBUG_PRINTLN("pretime"); resp = resp + ""; resp = resp + getTimeString(); resp = resp + ""; resp = resp + ""; resp = resp + overlayDefault; resp = resp + ""; resp = resp + ""; resp = resp + abs(arlsOffset); resp = resp + ""; resp = resp + ""; resp = resp + !arlsSign; resp = resp + ""; resp = resp + ""; resp = resp + ota_lock; resp = resp +""; resp = resp + "0"; //NI resp = resp + ""; if (!WiFi.localIP()[0] == 0) { resp = resp + WiFi.localIP()[0]; resp = resp + "."; resp = resp + WiFi.localIP()[1]; resp = resp + "."; resp = resp + WiFi.localIP()[2]; resp = resp + "."; resp = resp + WiFi.localIP()[3]; } else { resp = resp + "Not connected"; } resp = resp + ""; if (!WiFi.softAPIP()[0] == 0) { resp = resp + WiFi.softAPIP()[0]; resp = resp + "."; resp = resp + WiFi.softAPIP()[1]; resp = resp + "."; resp = resp + WiFi.softAPIP()[2]; resp = resp + "."; resp = resp + WiFi.softAPIP()[3]; } else { resp = resp + "Not active"; } resp = resp + ""; resp = resp + "WLED 0.3 (build "; resp = resp + VERSION; resp = resp + ") OK"; resp = resp + ""; DEBUG_PRINTLN(resp); server.send(200, "text/xml", resp); }