Compare commits

..

No commits in common. "790c848cc076d874ed7f99753a8227e567103068" and "93c9a02deb908187add5d55136697887ac985f91" have entirely different histories.

5 changed files with 12 additions and 11 deletions

Binary file not shown.

View file

@ -18,7 +18,7 @@
#define EEPROM_LAST_STATE_ADDRESS 4 // the first "last state" information for the first light #define EEPROM_LAST_STATE_ADDRESS 4 // the first "last state" information for the first light
#define EEPROM_TIMING_DATA_ADDRESS (EEPROM_LAST_STATE_ADDRESS + LIGHTS_COUNT) // Stored data date per light ELE_USED; HH; MM; CH1; CH2; CH3; CH4; #define EEPROM_TIMING_DATA_ADDRESS (EEPROM_LAST_STATE_ADDRESS + LIGHTS_COUNT) // Stored data date per light ELE_USED; HH; MM; CH1; CH2; CH3; CH4;
#define BRI_MOD_STEPS_PER_SEC 5 #define BRI_MOD_STEPS_PER_SEC 25.0
#define TIME_CHECK_INTERVAL_MS (60000UL) // 60 second interval #define TIME_CHECK_INTERVAL_MS (60000UL) // 60 second interval
#define TIME_LIGHTENGINE_INTERVAL_MS (1000UL / BRI_MOD_STEPS_PER_SEC) // BRI_MOD_STEPS_PER_SEC steps per second to in-/decrease the brightness #define TIME_LIGHTENGINE_INTERVAL_MS (1000UL / BRI_MOD_STEPS_PER_SEC) // BRI_MOD_STEPS_PER_SEC steps per second to in-/decrease the brightness

View file

@ -381,7 +381,7 @@ void init_webserver()
server.on("/state", HTTP_PUT, []() server.on("/state", HTTP_PUT, []()
{ // HTTP PUT request used to set a new light state { // HTTP PUT request used to set a new light state
DynamicJsonDocument root(512); DynamicJsonDocument root(1024);
DeserializationError error = deserializeJson(root, server.arg("plain")); DeserializationError error = deserializeJson(root, server.arg("plain"));
if (error) { if (error) {
@ -448,7 +448,7 @@ void init_webserver()
server.on("/state", HTTP_GET, []() server.on("/state", HTTP_GET, []()
{ // HTTP GET request used to fetch current light state { // HTTP GET request used to fetch current light state
uint8_t light = server.arg("light").toInt() - 1; uint8_t light = server.arg("light").toInt() - 1;
DynamicJsonDocument root(512); DynamicJsonDocument root(1024);
root["on"] = light_state[light]; root["on"] = light_state[light];
root["bri"] = bri[light]; root["bri"] = bri[light];
root["curbri"] = (int)current_bri[light]; root["curbri"] = (int)current_bri[light];
@ -688,7 +688,7 @@ void init_webserver()
ESP.reset(); ESP.reset();
} }
// ***** Generate static HTML page ***** // // ***** Generate HTML page ***** //
String tmp1 = genHMTLTop(); String tmp1 = genHMTLTop();

View file

@ -329,7 +329,6 @@ function updateLightState() {
briSlider.value = data.bri; briSlider.value = data.bri;
briSliderVal.innerHTML = (Math.round((data.bri * 100.0 / 255.0) * 100) / 100).toFixed(2); briSliderVal.innerHTML = (Math.round((data.bri * 100.0 / 255.0) * 100) / 100).toFixed(2);
//console.log('data.on ' + i + ' = ' + data.on); //console.log('data.on ' + i + ' = ' + data.on);
//console.log('data light ' + i + ' = ' + data);
if (data.on == true) { if (data.on == true) {
onLinkOn.classList.add('pure-button-primary'); onLinkOn.classList.add('pure-button-primary');
onLinkOff.classList.remove('pure-button-primary'); onLinkOff.classList.remove('pure-button-primary');

View file

@ -151,6 +151,8 @@ void tc_update_main()
{ {
//Serial.println((String)tc_data[i].hh + ":" + (String)tc_data[i].mm); //Serial.println((String)tc_data[i].hh + ":" + (String)tc_data[i].mm);
/*if (tc_data[i].hh <= timeClient.getHours() &&
tc_data[i].mm <= timeClient.getMinutes())*/
if (tc_data[i].hh <= hour() && if (tc_data[i].hh <= hour() &&
tc_data[i].mm <= minute()) tc_data[i].mm <= minute())
{ {