From 970f85037b62fe2f523370ed29d093f14ad31bc3 Mon Sep 17 00:00:00 2001 From: Christian Baars Date: Tue, 18 Oct 2022 19:27:24 +0200 Subject: [PATCH] add webcam widget to dashboard --- tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi.ino | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi.ino b/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi.ino index 035e5a354..145ce7dc4 100644 --- a/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi.ino +++ b/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi.ino @@ -1910,6 +1910,14 @@ void MI32sendEnergyWidget(){ } } #endif //USE_MI_ESP32_ENERGY +#ifdef USE_WEBCAM +void MI32sendCamWidget(){ + if (Wc.CamServer && Wc.up) { + WSContentSend_P(PSTR(""), + (uint32_t)WiFi.localIP()); + } +} +#endif //USE_WEBCAM void MI32sendWidget(uint32_t slot){ auto _sensor = MIBLEsensors[slot]; @@ -2044,6 +2052,9 @@ void MI32InitGUI(void){ #ifdef USE_MI_ESP32_ENERGY MI32sendEnergyWidget(); #endif //USE_MI_ESP32_ENERGY +#ifdef USE_WEBCAM + MI32sendCamWidget(); +#endif //USE_WEBCAM WSContentSend_P(PSTR("")); WSContentSpaceButton(BUTTON_MAIN); WSContentStop();