diff --git a/lib/default/TasmotaDali/src/TasmotaDali.cpp b/lib/default/TasmotaDali/src/TasmotaDali.cpp index b37147b95..c64518be5 100644 --- a/lib/default/TasmotaDali/src/TasmotaDali.cpp +++ b/lib/default/TasmotaDali/src/TasmotaDali.cpp @@ -92,7 +92,7 @@ void TasmotaDali::write(DaliFrame frame) { if (frame.meta & TM_DALI_SEND_TWICE) { SendData(frame); // Takes 14.7 ms } - delay(2); // Block response + delay(1); // Block response EnableRxInterrupt(); } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino b/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino index 2510390b0..0c19e2b50 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino @@ -677,9 +677,9 @@ void Energy200ms(void) { Energy->Settings.energy_export_kWh[i] = RtcEnergySettings.energy_export_kWh[i]; Energy->period_kWh[i] -= RtcEnergySettings.energy_today_kWh[i]; // this becomes a large unsigned, effectively a negative for EnergyShow calculation - Energy->kWhtoday[i] = 0; + Energy->kWhtoday[i] = Energy->kWhtoday[i] % 100; // Roll fractional watt-hours into the next day since kWhtotal truncates to watt-hours. Energy->energy_today_offset_kWh[i] = 0; - RtcEnergySettings.energy_today_kWh[i] = 0; + RtcEnergySettings.energy_today_kWh[i] = Energy->kWhtoday[i]; Energy->Settings.energy_today_kWh[i] = 0; Energy->start_energy[i] = 0; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_75_dali.ino b/tasmota/tasmota_xdrv_driver/xdrv_75_dali.ino index c0e7fa3e1..32deb7799 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_75_dali.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_75_dali.ino @@ -761,6 +761,10 @@ void DaliLoop(void) { } Dali->light_sync = true; // Block local loop if (any_color) { + if (Settings->save_data) { + // Postpone save_data during fast color changes which results in exception 0 on ESP8266 + TasmotaGlobal.save_data_counter = 4; + } char scmnd[20]; snprintf_P(scmnd, sizeof(scmnd), PSTR(D_CMND_COLOR " %s"), scolors); ExecuteCommand(scmnd, SRC_SWITCH);