diff --git a/CHANGELOG.md b/CHANGELOG.md index d59b3c2ab..02547ddaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file. ### Changed ### Fixed +- RTC not detected when lights are present (#16242) ### Removed diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 55b229890..2c969570f 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -115,5 +115,6 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo ### Changed ### Fixed +- RTC not detected when lights are present [#16242](https://github.com/arendst/Tasmota/issues/16242) ### Removed diff --git a/tasmota/include/tasmota.h b/tasmota/include/tasmota.h index 6284b9c29..0ec8fa05f 100644 --- a/tasmota/include/tasmota.h +++ b/tasmota/include/tasmota.h @@ -371,7 +371,7 @@ enum LightSubtypes { LST_NONE, LST_SINGLE, LST_COLDWARM, LST_RGB, LST_RGBW, LS enum LightTypes { LT_BASIC, LT_PWM1, LT_PWM2, LT_PWM3, LT_PWM4, LT_PWM5, LT_PWM6, LT_PWM7, LT_NU8, LT_SERIAL1, LT_SERIAL2, LT_RGB, LT_RGBW, LT_RGBWC, LT_NU14, LT_NU15 }; // Do not insert new fields -enum XsnsFunctions {FUNC_SETTINGS_OVERRIDE, FUNC_PIN_STATE, FUNC_MODULE_INIT, FUNC_PRE_INIT, FUNC_INIT, +enum XsnsFunctions {FUNC_SETTINGS_OVERRIDE, FUNC_PIN_STATE, FUNC_I2C_INIT, FUNC_MODULE_INIT, FUNC_PRE_INIT, FUNC_INIT, FUNC_LOOP, FUNC_EVERY_50_MSECOND, FUNC_EVERY_100_MSECOND, FUNC_EVERY_200_MSECOND, FUNC_EVERY_250_MSECOND, FUNC_EVERY_SECOND, FUNC_SAVE_SETTINGS, FUNC_SAVE_AT_MIDNIGHT, FUNC_SAVE_BEFORE_RESTART, FUNC_AFTER_TELEPERIOD, FUNC_JSON_APPEND, FUNC_WEB_SENSOR, FUNC_WEB_COL_SENSOR, FUNC_COMMAND, FUNC_COMMAND_SENSOR, FUNC_COMMAND_DRIVER, diff --git a/tasmota/tasmota_support/support_tasmota.ino b/tasmota/tasmota_support/support_tasmota.ino index ef88dc674..5ae999266 100644 --- a/tasmota/tasmota_support/support_tasmota.ino +++ b/tasmota/tasmota_support/support_tasmota.ino @@ -2173,6 +2173,8 @@ void GpioInit(void) #endif #endif // USE_I2C + XdrvCall(FUNC_I2C_INIT); // Init RTC + TasmotaGlobal.devices_present = 0; TasmotaGlobal.light_type = LT_BASIC; // Use basic PWM control if SetOption15 = 0 diff --git a/tasmota/tasmota_xdrv_driver/xdrv_56_rtc_chips.ino b/tasmota/tasmota_xdrv_driver/xdrv_56_rtc_chips.ino index ac3c31c2d..0de267656 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_56_rtc_chips.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_56_rtc_chips.ino @@ -446,7 +446,7 @@ bool Xdrv56(uint8_t function) { } #endif // RTC_NTP_SERVER - if (FUNC_MODULE_INIT == function) { + if (FUNC_I2C_INIT == function) { RtcChipDetect(); } else if (RtcChip.detected) {