diff --git a/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam_task.ino b/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam_task.ino index 9ec245ce0..bf36b2f08 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam_task.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam_task.ino @@ -3012,7 +3012,10 @@ bool Xdrv99(uint32_t function) { WcSetStreamserver(Settings->webcam_config.stream); WCStartOperationTask(); break; - case FUNC_SAVE_BEFORE_RESTART: { + + case FUNC_ABOUT_TO_RESTART: { + // this code will kill off the cam completely, allowing nice clean restarts + // stop cam clock #ifdef WEBCAM_DEV_DEBUG AddLog(LOG_LEVEL_DEBUG, PSTR("CAM: FUNC_SAVE_BEFORE_RESTART")); @@ -3037,6 +3040,7 @@ bool Xdrv99(uint32_t function) { AddLog(LOG_LEVEL_DEBUG, PSTR("CAM: FUNC_SAVE_BEFORE_RESTART after delay")); #endif } break; + case FUNC_ACTIVE: result = true; break; diff --git a/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi_ble.ino b/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi_ble.ino index cde5b99e7..73a1acaba 100644 --- a/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi_ble.ino +++ b/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi_ble.ino @@ -2789,7 +2789,7 @@ void HandleMI32Key(){ WSContentSend_P(HTTP_KEY_ADDED, mac, key); - strncat(key, mac, sizeof(key)); + strcat(key, mac); MI32AddKey(key, nullptr); // WSContentSpaceButton(BUTTON_CONFIGURATION);