diff --git a/firmware/firmware.ino b/firmware/firmware.ino index 9e2d623..55169d1 100644 --- a/firmware/firmware.ino +++ b/firmware/firmware.ino @@ -332,6 +332,7 @@ void init_webserver() { DynamicJsonDocument root(1024); root["on"] = light_state[light]; root["bri"] = bri[light]; + root["bricur"] = (int)current_bri[light]; String output; serializeJson(root, output); server.send(200, "text/plain", output); @@ -446,7 +447,9 @@ void init_webserver() { if (server.hasArg("bri" + (String)light)) { bri[light] = (int)server.arg("bri" + (String)light).toInt(); - Serial.print("Brightness set to "); + Serial.print("Brightness "); + Serial.print(light); + Serial.print(" set to "); Serial.println(bri[light]); } @@ -508,6 +511,7 @@ void init_webserver() { String http_content = ""; http_content += ""; http_content += "
"; + http_content += ""; http_content += ""; http_content += ""; //http_content += ""; // Reload the page every 15 seconds automatically @@ -527,11 +531,31 @@ void init_webserver() { http_content += ""; http_content += "