diff --git a/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam.ino b/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam.ino index 572dc65d2..541e2c55b 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam.ino @@ -1239,7 +1239,11 @@ void CmndWebcam(void) { void CmndWebcamStream(void) { if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 1)) { Settings->webcam_config.stream = XdrvMailbox.payload; - if (!Settings->webcam_config.stream) { WcInterruptControl(); } // Stop stream + if (!Settings->webcam_config.stream) { + WcInterruptControl(); // Stop stream + } else { + WcSetStreamserver(Settings->webcam_config.stream); // Ensure server is running + } } ResponseCmndStateText(Settings->webcam_config.stream); } 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 b1acfb724..2b0e637d8 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam_task.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam_task.ino @@ -701,6 +701,7 @@ void WcInterrupt(uint32_t state) { // Stop camera ISR if active to fix TG1WDT_SYS_RESET if (!Wc.up) { return; } + WcSetStreamserver(state); if (state) { // Re-enable interrupts cam_start();