diff --git a/CHANGELOG.md b/CHANGELOG.md index da65a65c0..722216896 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file. - Support for CST816S touch interface (#20213) - NeoPool hydrolysis FL1 and Redox flag (#20258) - Matter support for password for remote Tasmota devices (#20296) +- Display of active drivers using command ``status 4`` ### Breaking Changed - Refactoring of Berry `animate` module for WS2812 Leds (#20236) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index dba6bb153..1dfa0a653 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -120,6 +120,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm ### Added - Support for CST816S touch interface [#20213](https://github.com/arendst/Tasmota/issues/20213) - Support for Sonoff Basic R4 Magic Switch [#20247](https://github.com/arendst/Tasmota/issues/20247) +- Display of active drivers using command ``status 4`` - NeoPool hydrolysis FL1 and Redox flag [#20258](https://github.com/arendst/Tasmota/issues/20258) - Matter support for password for remote Tasmota devices [#20296](https://github.com/arendst/Tasmota/issues/20296) diff --git a/tasmota/include/tasmota.h b/tasmota/include/tasmota.h index d6ff4b2b7..1feca3fef 100644 --- a/tasmota/include/tasmota.h +++ b/tasmota/include/tasmota.h @@ -423,7 +423,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_SETUP_RING1, FUNC_SETUP_RING2, FUNC_PRE_INIT, FUNC_INIT, +enum XsnsFunctions { FUNC_SETTINGS_OVERRIDE, FUNC_SETUP_RING1, FUNC_SETUP_RING2, FUNC_PRE_INIT, FUNC_INIT, FUNC_ACTIVE, FUNC_LOOP, FUNC_SLEEP_LOOP, FUNC_EVERY_50_MSECOND, FUNC_EVERY_100_MSECOND, FUNC_EVERY_200_MSECOND, FUNC_EVERY_250_MSECOND, FUNC_EVERY_SECOND, FUNC_RESET_SETTINGS, FUNC_RESTORE_SETTINGS, FUNC_SAVE_SETTINGS, FUNC_SAVE_AT_MIDNIGHT, FUNC_SAVE_BEFORE_RESTART, FUNC_INTERRUPT_STOP, FUNC_INTERRUPT_START, FUNC_AFTER_TELEPERIOD, FUNC_JSON_APPEND, FUNC_WEB_SENSOR, FUNC_WEB_COL_SENSOR, diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino index 1cf661f04..7febc7a3b 100644 --- a/tasmota/tasmota.ino +++ b/tasmota/tasmota.ino @@ -775,6 +775,8 @@ void setup(void) { if (bitRead(Settings->rule_enabled, 0)) Run_Scripter(">BS",3,0); #endif + XdrvCall(FUNC_ACTIVE); // FUNC_ACTIVE + TasmotaGlobal.rules_flag.system_init = 1; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino b/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino index df267b533..20ce791f0 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino @@ -3894,6 +3894,9 @@ bool Xdrv01(uint32_t function) case FUNC_COMMAND: result = DecodeCommand(kWebCommands, WebCommand); break; + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_02_9_mqtt.ino b/tasmota/tasmota_xdrv_driver/xdrv_02_9_mqtt.ino index 7312135e8..047a9eb5f 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_02_9_mqtt.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_02_9_mqtt.ino @@ -2033,6 +2033,9 @@ bool Xdrv02(uint32_t function) case FUNC_PRE_INIT: MqttInit(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino index fa58c4725..66bf50acd 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino @@ -1497,6 +1497,9 @@ bool Xdrv03(uint32_t function) case FUNC_NETWORK_DOWN: XnrgCall(FUNC_NETWORK_DOWN); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino b/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino index a4bb1c615..228e8b9de 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino @@ -1799,6 +1799,9 @@ bool Xdrv03(uint32_t function) case FUNC_NETWORK_DOWN: XnrgCall(FUNC_NETWORK_DOWN); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_04_light.ino b/tasmota/tasmota_xdrv_driver/xdrv_04_light.ino index e52f31783..14799f208 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_04_light.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_04_light.ino @@ -3460,17 +3460,20 @@ bool Xdrv04(uint32_t function) LightInit(); break; #ifdef USE_LIGHT_ARTNET - case FUNC_JSON_APPEND: - ArtNetJSONAppend(); - break; - case FUNC_NETWORK_UP: - ArtNetFuncNetworkUp(); - break; - case FUNC_NETWORK_DOWN: - ArtNetFuncNetworkDown(); - break; + case FUNC_JSON_APPEND: + ArtNetJSONAppend(); + break; + case FUNC_NETWORK_UP: + ArtNetFuncNetworkUp(); + break; + case FUNC_NETWORK_DOWN: + ArtNetFuncNetworkDown(); + break; #endif // USE_LIGHT_ARTNET - } + case FUNC_ACTIVE: + result = true; + break; + } } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_05_irremote.ino b/tasmota/tasmota_xdrv_driver/xdrv_05_irremote.ino index 0996484b5..271a34b9d 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_05_irremote.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_05_irremote.ino @@ -444,6 +444,9 @@ bool Xdrv05(uint32_t function) result = DecodeCommand(kIrRemoteCommands, IrRemoteCommand); } break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_05_irremote_full.ino b/tasmota/tasmota_xdrv_driver/xdrv_05_irremote_full.ino index 98f45373e..5115903ab 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_05_irremote_full.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_05_irremote_full.ino @@ -916,6 +916,11 @@ bool Xdrv05(uint32_t function) result = DecodeCommand(kIrRemoteCommands, IrRemoteCommand); } break; + case FUNC_ACTIVE: + if (ir_recv_active || ir_recv_active) { + result = true; + } + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_06_snfbridge.ino b/tasmota/tasmota_xdrv_driver/xdrv_06_snfbridge.ino index 2b9988ec6..8bcb3e41e 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_06_snfbridge.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_06_snfbridge.ino @@ -566,6 +566,9 @@ bool Xdrv06(uint32_t function) case FUNC_PRE_INIT: SetSerial(19200, TS_SERIAL_8N1); break; + case FUNC_ACTIVE: + result = true; + break; } } #endif // ESP8266 diff --git a/tasmota/tasmota_xdrv_driver/xdrv_07_domoticz.ino b/tasmota/tasmota_xdrv_driver/xdrv_07_domoticz.ino index 99e45cfce..4d4c54102 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_07_domoticz.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_07_domoticz.ino @@ -699,6 +699,9 @@ bool Xdrv07(uint32_t function) { case FUNC_COMMAND: result = DecodeCommand(kDomoticzCommands, DomoticzCommand); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_08_serial_bridge.ino b/tasmota/tasmota_xdrv_driver/xdrv_08_serial_bridge.ino index bcb38fc90..c3d432808 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_08_serial_bridge.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_08_serial_bridge.ino @@ -336,6 +336,9 @@ bool Xdrv08(uint32_t function) { case FUNC_COMMAND: result = DecodeCommand(kSerialBridgeCommands, SerialBridgeCommand); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_09_timers.ino b/tasmota/tasmota_xdrv_driver/xdrv_09_timers.ino index 14026806f..fa96bf3c3 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_09_timers.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_09_timers.ino @@ -979,6 +979,9 @@ bool Xdrv09(uint32_t function) case FUNC_COMMAND: result = DecodeCommand(kTimerCommands, TimerCommand); break; + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_10_rules.ino b/tasmota/tasmota_xdrv_driver/xdrv_10_rules.ino index 945c9b8c2..13389b082 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_10_rules.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_10_rules.ino @@ -2504,6 +2504,9 @@ bool Xdrv10(uint32_t function) case FUNC_PRE_INIT: RulesInit(); break; + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino b/tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino index 6e8f41d3c..63730602f 100755 --- a/tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino @@ -13039,6 +13039,10 @@ bool Xdrv10(uint32_t function) case FUNC_NETWORK_UP: break; + + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_11_knx.ino b/tasmota/tasmota_xdrv_driver/xdrv_11_knx.ino index 719eea482..67fa26f49 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_11_knx.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_11_knx.ino @@ -1342,6 +1342,9 @@ bool Xdrv11(uint32_t function) break; // case FUNC_SET_POWER: // break; + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_122_file_settings_demo.ino b/tasmota/tasmota_xdrv_driver/xdrv_122_file_settings_demo.ino index 0e1dd13f3..7680df760 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_122_file_settings_demo.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_122_file_settings_demo.ino @@ -188,6 +188,9 @@ bool Xdrv122(uint32_t function) { case FUNC_SAVE_BEFORE_RESTART: // !!! DO NOT USE AS IT'S FUNCTION IS BETTER HANDLED BY FUNC_SAVE_SETTINGS !!! break; + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_127_debug.ino b/tasmota/tasmota_xdrv_driver/xdrv_127_debug.ino index fd4e99cf7..35d3a9ace 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_127_debug.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_127_debug.ino @@ -812,6 +812,9 @@ bool Xdrv127(uint32_t function) case FUNC_COMMAND: result = DecodeCommand(kDebugCommands, DebugCommand); break; + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_12_discovery.ino b/tasmota/tasmota_xdrv_driver/xdrv_12_discovery.ino index f71a19b8d..07e963088 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_12_discovery.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_12_discovery.ino @@ -328,6 +328,9 @@ bool Xdrv12(uint32_t function) { case FUNC_MQTT_INIT: TasDiscoverInit(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_12_home_assistant.ino b/tasmota/tasmota_xdrv_driver/xdrv_12_home_assistant.ino index 3b6378694..a58983ec2 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_12_home_assistant.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_12_home_assistant.ino @@ -1321,6 +1321,9 @@ bool Xdrv12(uint32_t function) case FUNC_MQTT_DATA: result = HAssMqttLWT(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_13_display.ino b/tasmota/tasmota_xdrv_driver/xdrv_13_display.ino index 47bfd7c62..18a387e41 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_13_display.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_13_display.ino @@ -2939,6 +2939,9 @@ bool Xdrv13(uint32_t function) case FUNC_COMMAND: result = DecodeCommand(kDisplayCommands, DisplayCommand); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_14_mp3.ino b/tasmota/tasmota_xdrv_driver/xdrv_14_mp3.ino index 625f0359c..82582b5c5 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_14_mp3.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_14_mp3.ino @@ -414,6 +414,10 @@ bool Xdrv14(uint32_t function) case FUNC_EVERY_SECOND: MP3_EVERY_SECOND(); break; + + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_15_pca9685.ino b/tasmota/tasmota_xdrv_driver/xdrv_15_pca9685.ino index 8f82432c2..c9c980f9f 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_15_pca9685.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_15_pca9685.ino @@ -228,6 +228,9 @@ bool Xdrv15(uint32_t function) result = PCA9685_Command(); } break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_15_pca9685_v2.ino b/tasmota/tasmota_xdrv_driver/xdrv_15_pca9685_v2.ino index 75ff7dd08..5ba364e30 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_15_pca9685_v2.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_15_pca9685_v2.ino @@ -613,6 +613,9 @@ bool Xdrv15(uint32_t function) result = PCA9685_Command(); } break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v1.ino b/tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v1.ino index 1c0e29315..cb7184922 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v1.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v1.ino @@ -1725,6 +1725,9 @@ bool Xdrv16(uint32_t function) { TuyaSensorsShow(0); break; #endif // USE_WEBSERVER + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v2.ino b/tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v2.ino index c3fc0b395..c9c0908e0 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v2.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_16_tuyamcu_v2.ino @@ -2575,6 +2575,9 @@ bool Xdrv16(uint32_t function) { TuyaSensorsShow(0); break; #endif // USE_WEBSERVER + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_17_rcswitch.ino b/tasmota/tasmota_xdrv_driver/xdrv_17_rcswitch.ino index 05c28fa07..51b868634 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_17_rcswitch.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_17_rcswitch.ino @@ -246,6 +246,9 @@ bool Xdrv17(uint32_t function) case FUNC_INIT: RfInit(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_18_armtronix_dimmers.ino b/tasmota/tasmota_xdrv_driver/xdrv_18_armtronix_dimmers.ino index e070e5d82..c512fdc3c 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_18_armtronix_dimmers.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_18_armtronix_dimmers.ino @@ -190,6 +190,9 @@ bool Xdrv18(uint32_t function) case FUNC_SET_CHANNELS: result = ArmtronixSetChannels(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_19_ps16dz_dimmer.ino b/tasmota/tasmota_xdrv_driver/xdrv_19_ps16dz_dimmer.ino index 69d0a69c0..a7c513bd7 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_19_ps16dz_dimmer.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_19_ps16dz_dimmer.ino @@ -225,6 +225,9 @@ bool Xdrv19(uint32_t function) case FUNC_MODULE_INIT: result = PS16DZModuleSelected(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_20_hue.ino b/tasmota/tasmota_xdrv_driver/xdrv_20_hue.ino index 74611fa78..3fae7ed2f 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_20_hue.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_20_hue.ino @@ -1168,6 +1168,9 @@ bool Xdrv20(uint32_t function) case FUNC_NETWORK_DOWN: UdpDisconnect(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_21_wemo.ino b/tasmota/tasmota_xdrv_driver/xdrv_21_wemo.ino index f3fa8ab92..a2fd187c7 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_21_wemo.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_21_wemo.ino @@ -366,6 +366,9 @@ bool Xdrv21(uint32_t function) case FUNC_NETWORK_DOWN: UdpDisconnect(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_21_wemo_multi.ino b/tasmota/tasmota_xdrv_driver/xdrv_21_wemo_multi.ino index c6b5f9410..641f9109d 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_21_wemo_multi.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_21_wemo_multi.ino @@ -465,6 +465,9 @@ bool Xdrv21(uint32_t function) case FUNC_NETWORK_DOWN: UdpDisconnect(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_22_sonoff_ifan.ino b/tasmota/tasmota_xdrv_driver/xdrv_22_sonoff_ifan.ino index 6cf5da0c5..13d8cfe24 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_22_sonoff_ifan.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_22_sonoff_ifan.ino @@ -261,6 +261,9 @@ bool Xdrv22(uint32_t function) { case FUNC_MODULE_INIT: result = SonoffIfanInit(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_A_impl.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_A_impl.ino index 175f7bd6b..341a82c2f 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_A_impl.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_A_impl.ino @@ -2484,6 +2484,9 @@ bool Xdrv23(uint32_t function) { restoreDumpAllDevices(); } break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_24_buzzer.ino b/tasmota/tasmota_xdrv_driver/xdrv_24_buzzer.ino index 9a54076d5..8f4c52b3f 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_24_buzzer.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_24_buzzer.ino @@ -253,6 +253,9 @@ bool Xdrv24(uint32_t function) { case FUNC_PIN_STATE: result = BuzzerPinState(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_25_A4988_Stepper.ino b/tasmota/tasmota_xdrv_driver/xdrv_25_A4988_Stepper.ino index d72c51545..0d97adae1 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_25_A4988_Stepper.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_25_A4988_Stepper.ino @@ -137,6 +137,9 @@ bool Xdrv25(uint32_t function) case FUNC_COMMAND: result = DecodeCommand(kA4988Commands, A4988Command); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_26_ariluxrf.ino b/tasmota/tasmota_xdrv_driver/xdrv_26_ariluxrf.ino index ede03b44c..cf45edef1 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_26_ariluxrf.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_26_ariluxrf.ino @@ -187,6 +187,9 @@ bool Xdrv26(uint32_t function) case FUNC_INTERRUPT_START: AriluxRfInit(); break; + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino index e42402bc2..c40832657 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino @@ -2371,6 +2371,9 @@ bool Xdrv27(uint32_t function) ShutterShow(); break; #endif // USE_WEBSERVER + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino index a3c926220..b6a11b3bb 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino @@ -1972,6 +1972,9 @@ bool Xdrv27(uint32_t function) ShutterShow(); break; #endif // USE_WEBSERVER + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_28_pcf8574_v2.ino b/tasmota/tasmota_xdrv_driver/xdrv_28_pcf8574_v2.ino index 6fb855bb4..7c56f460c 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_28_pcf8574_v2.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_28_pcf8574_v2.ino @@ -720,6 +720,9 @@ bool Xdrv28(uint32_t function) { break; #endif // USE_PCF8574_DISPLAYINPUT #endif // USE_WEBSERVER + case FUNC_ACTIVE: + result = true; + break; } #ifdef USE_PCF8574_MODE2 } else if (2 == Pcf8574.mode) { @@ -747,6 +750,9 @@ bool Xdrv28(uint32_t function) { case FUNC_ADD_SWITCH: result = Pcf8574AddSwitch(); break; + case FUNC_ACTIVE: + result = true; + break; } #endif // USE_PCF8574_MODE2 } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_29_deepsleep.ino b/tasmota/tasmota_xdrv_driver/xdrv_29_deepsleep.ino index bae29c8f1..b64880465 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_29_deepsleep.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_29_deepsleep.ino @@ -332,6 +332,9 @@ bool Xdrv29(uint32_t function) case FUNC_PRE_INIT: DeepSleepReInit(); break; + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_30_exs_dimmer.ino b/tasmota/tasmota_xdrv_driver/xdrv_30_exs_dimmer.ino index 7579072b3..fed86a93d 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_30_exs_dimmer.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_30_exs_dimmer.ino @@ -611,6 +611,9 @@ bool Xdrv30(uint32_t function) result = DecodeCommand(kExsCommands, ExsCommand); break; #endif + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_31_tasmota_client.ino b/tasmota/tasmota_xdrv_driver/xdrv_31_tasmota_client.ino index e4d41988e..345fc9dba 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_31_tasmota_client.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_31_tasmota_client.ino @@ -559,6 +559,9 @@ bool Xdrv31(uint32_t function) { case FUNC_COMMAND: result = DecodeCommand(kTasmotaClientCommands, TasmotaClientCommand); break; + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_32_hotplug.ino b/tasmota/tasmota_xdrv_driver/xdrv_32_hotplug.ino index d5dba3b3c..6a247e5e5 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_32_hotplug.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_32_hotplug.ino @@ -94,6 +94,9 @@ bool Xdrv32(uint32_t function) case FUNC_PRE_INIT: HotPlugInit(); break; + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_33_nrf24l01.ino b/tasmota/tasmota_xdrv_driver/xdrv_33_nrf24l01.ino index 83381d203..2289aec23 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_33_nrf24l01.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_33_nrf24l01.ino @@ -85,6 +85,10 @@ bool Xdrv33(uint32_t function) { if (FUNC_INIT == function) { NRF24Detect(); + } else if (NRF24.chipType) { + if (FUNC_ACTIVE == function) { + result = true; + } } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_34_wemos_motor_v1.ino b/tasmota/tasmota_xdrv_driver/xdrv_34_wemos_motor_v1.ino index 4b25b714d..3708f2d82 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_34_wemos_motor_v1.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_34_wemos_motor_v1.ino @@ -284,6 +284,9 @@ bool Xdrv34(uint32_t function) result = WMotorV1Command(); } break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_35_pwm_dimmer.ino b/tasmota/tasmota_xdrv_driver/xdrv_35_pwm_dimmer.ino index 76e9e7bca..d5d2b00d3 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_35_pwm_dimmer.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_35_pwm_dimmer.ino @@ -948,6 +948,10 @@ bool Xdrv35(uint32_t function) case FUNC_PRE_INIT: PWMModulePreInit(); break; + + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_36_keeloq.ino b/tasmota/tasmota_xdrv_driver/xdrv_36_keeloq.ino index 13b700920..2487f8495 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_36_keeloq.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_36_keeloq.ino @@ -276,6 +276,9 @@ bool Xdrv36(uint32_t function) KeeloqInit(); DEBUG_DRIVER_LOG(PSTR("KLQ: init done")); break; + case FUNC_ACTIVE: + result = true; + break; } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_37_sonoff_d1.ino b/tasmota/tasmota_xdrv_driver/xdrv_37_sonoff_d1.ino index a727b6080..0e656fc79 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_37_sonoff_d1.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_37_sonoff_d1.ino @@ -191,6 +191,9 @@ bool Xdrv37(uint32_t function) case FUNC_MODULE_INIT: result = SonoffD1ModuleSelected(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_38_ping.ino b/tasmota/tasmota_xdrv_driver/xdrv_38_ping.ino index ba7914c5f..77e8c5b6a 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_38_ping.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_38_ping.ino @@ -442,11 +442,14 @@ bool Xdrv38(uint32_t function) switch (function) { case FUNC_EVERY_250_MSECOND: - PingResponsePoll(); // TODO - break; + PingResponsePoll(); // TODO + break; case FUNC_COMMAND: - result = DecodeCommand(kPingCommands, PingCommand); - break; + result = DecodeCommand(kPingCommands, PingCommand); + break; + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_39_thermostat.ino b/tasmota/tasmota_xdrv_driver/xdrv_39_thermostat.ino index e4ea49af2..3e32ca7dc 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_39_thermostat.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_39_thermostat.ino @@ -2204,6 +2204,10 @@ bool Xdrv39(uint32_t function) case FUNC_COMMAND: result = DecodeCommand(kThermostatCommands, ThermostatCommand); break; + + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_40_telegram.ino b/tasmota/tasmota_xdrv_driver/xdrv_40_telegram.ino index a511cdf2d..fddd5eed3 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_40_telegram.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_40_telegram.ino @@ -487,6 +487,9 @@ bool Xdrv40(uint32_t function) case FUNC_COMMAND: result = DecodeCommand(kTelegramCommands, TelegramCommand); break; + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_41_tcp_bridge.ino b/tasmota/tasmota_xdrv_driver/xdrv_41_tcp_bridge.ino index 811bbb7ce..55ada143a 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_41_tcp_bridge.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_41_tcp_bridge.ino @@ -290,6 +290,9 @@ bool Xdrv41(uint32_t function) case FUNC_COMMAND: result = DecodeCommand(kTCPCommands, TCPCommand); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_42_0_i2s_audio.ino b/tasmota/tasmota_xdrv_driver/xdrv_42_0_i2s_audio.ino index 616465717..c49798fa1 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_42_0_i2s_audio.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_42_0_i2s_audio.ino @@ -760,6 +760,10 @@ bool Xdrv42(uint32_t function) { I2S_WR_Show(true); break; #endif // USE_I2S_WEBRADIO + + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_43_mlx90640.ino b/tasmota/tasmota_xdrv_driver/xdrv_43_mlx90640.ino index d13dd4416..2d74780b8 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_43_mlx90640.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_43_mlx90640.ino @@ -617,6 +617,9 @@ bool Xdrv43(uint32_t function) case FUNC_COMMAND: result = MLX90640Cmd(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_44_miel_hvac.ino b/tasmota/tasmota_xdrv_driver/xdrv_44_miel_hvac.ino index 6c2fd55d4..5b9f19054 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_44_miel_hvac.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_44_miel_hvac.ino @@ -1336,6 +1336,10 @@ bool Xdrv44(uint32_t function) { case FUNC_COMMAND: result = DecodeCommand(miel_hvac_cmnd_names, miel_hvac_cmnds); break; + + case FUNC_ACTIVE: + result = true; + break; } return (result); diff --git a/tasmota/tasmota_xdrv_driver/xdrv_45_shelly_dimmer.ino b/tasmota/tasmota_xdrv_driver/xdrv_45_shelly_dimmer.ino index 42ba5df0b..2bd091488 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_45_shelly_dimmer.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_45_shelly_dimmer.ino @@ -872,6 +872,9 @@ bool Xdrv45(uint32_t function) { result = DecodeCommand(kShdCommands, ShdCommand); break; #endif // SHELLY_CMDS + case FUNC_ACTIVE: + result = true; + break; } } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_46_ccloader.ino b/tasmota/tasmota_xdrv_driver/xdrv_46_ccloader.ino index ab37d271a..a85275fa7 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_46_ccloader.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_46_ccloader.ino @@ -689,6 +689,9 @@ bool Xdrv46(uint32_t function) { CCLoadershow(0); break; #endif // USE_WEBSERVER + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_47_ftc532.ino b/tasmota/tasmota_xdrv_driver/xdrv_47_ftc532.ino index 220ab6078..c7afd9682 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_47_ftc532.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_47_ftc532.ino @@ -232,6 +232,9 @@ bool Xdrv47(uint32_t function) { ftc532_show(); break; } + case FUNC_ACTIVE: + result = true; + break; } // Return bool result return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_48_timeprop.ino b/tasmota/tasmota_xdrv_driver/xdrv_48_timeprop.ino index d1fc6754a..035bf8869 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_48_timeprop.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_48_timeprop.ino @@ -345,6 +345,9 @@ bool Xdrv48(uint32_t function) { case FUNC_JSON_APPEND: ShowValues(); break; + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_49_pid.ino b/tasmota/tasmota_xdrv_driver/xdrv_49_pid.ino index 22d86dbf9..40077b306 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_49_pid.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_49_pid.ino @@ -543,6 +543,9 @@ bool Xdrv49(uint32_t function) { PIDShowValuesWeb(); break; #endif // USE_WEBSERVER + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_50_filesystem.ino b/tasmota/tasmota_xdrv_driver/xdrv_50_filesystem.ino index 58240cf2a..1a515bd47 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_50_filesystem.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_50_filesystem.ino @@ -1398,6 +1398,9 @@ bool Xdrv50(uint32_t function) { #endif break; #endif // USE_WEBSERVER + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_51_bs814a2.ino b/tasmota/tasmota_xdrv_driver/xdrv_51_bs814a2.ino index 5199b3919..8cd89310d 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_51_bs814a2.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_51_bs814a2.ino @@ -182,6 +182,9 @@ bool Xdrv51(uint32_t function) { case FUNC_JSON_APPEND: bs814_show(); break; + case FUNC_ACTIVE: + result = true; + break; } } // Return bool result diff --git a/tasmota/tasmota_xdrv_driver/xdrv_52_9_berry.ino b/tasmota/tasmota_xdrv_driver/xdrv_52_9_berry.ino index 38bbf9aa6..70db00be5 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_52_9_berry.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_52_9_berry.ino @@ -969,6 +969,9 @@ bool Xdrv52(uint32_t function) callBerryEventDispatcher(PSTR("button_pressed"), nullptr, 0, nullptr); break; + case FUNC_ACTIVE: + result = true; + break; } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_53_projector_ctrl.ino b/tasmota/tasmota_xdrv_driver/xdrv_53_projector_ctrl.ino index 999f6a738..801a1ab00 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_53_projector_ctrl.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_53_projector_ctrl.ino @@ -473,6 +473,10 @@ bool Xdrv53(uint32_t function) { result = projector_ctrl_set_power(sc); break; + case FUNC_ACTIVE: + result = true; + break; + } return (result); diff --git a/tasmota/tasmota_xdrv_driver/xdrv_54_lvgl.ino b/tasmota/tasmota_xdrv_driver/xdrv_54_lvgl.ino index 58293139b..9540bf562 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_54_lvgl.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_54_lvgl.ino @@ -471,6 +471,10 @@ bool Xdrv54(uint32_t function) case FUNC_BUTTON_PRESSED: break; + case FUNC_ACTIVE: + result = true; + break; + } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_55_touch.ino b/tasmota/tasmota_xdrv_driver/xdrv_55_touch.ino index 44eca227e..d7738e80a 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_55_touch.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_55_touch.ino @@ -589,6 +589,9 @@ bool Xdrv55(uint32_t function) { Touch_Check(TS_RotConvert); } break; + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_56_rtc_chips.ino b/tasmota/tasmota_xdrv_driver/xdrv_56_rtc_chips.ino index 1b4e4f598..eacd3a9d2 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_56_rtc_chips.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_56_rtc_chips.ino @@ -518,6 +518,9 @@ bool Xdrv56(uint32_t function) { case FUNC_JSON_APPEND: if (RtcChip.ShowSensor) RtcChip.ShowSensor(1); break; + case FUNC_ACTIVE: + result = true; + break; } } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_57_9_tasmesh.ino b/tasmota/tasmota_xdrv_driver/xdrv_57_9_tasmesh.ino index 6691017af..b6fc08630 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_57_9_tasmesh.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_57_9_tasmesh.ino @@ -855,6 +855,9 @@ bool Xdrv57(uint32_t function) { MESHdeInit(); break; #endif // USE_DEEPSLEEP + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_58_range_extender.ino b/tasmota/tasmota_xdrv_driver/xdrv_58_range_extender.ino index d72880649..73fb3daab 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_58_range_extender.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_58_range_extender.ino @@ -524,6 +524,9 @@ bool Xdrv58(uint32_t function) } } break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_59_influxdb.ino b/tasmota/tasmota_xdrv_driver/xdrv_59_influxdb.ino index d53330e25..c8c6122d9 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_59_influxdb.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_59_influxdb.ino @@ -626,6 +626,9 @@ bool Xdrv59(uint32_t function) { case FUNC_EVERY_SECOND: InfluxDbLoop(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_60_shift595.ino b/tasmota/tasmota_xdrv_driver/xdrv_60_shift595.ino index f477fc8ff..809ec86ac 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_60_shift595.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_60_shift595.ino @@ -104,16 +104,19 @@ bool Xdrv60(uint32_t function) { if (FUNC_PRE_INIT == function) { Shift595Init(); - } else if (Shift595) { - switch (function) { - case FUNC_SET_POWER: - Shift595SwitchRelay(); - break; - case FUNC_COMMAND: - result = DecodeCommand(kShift595Commands, Shift595Command); - break; - } + } else if (Shift595) { + switch (function) { + case FUNC_SET_POWER: + Shift595SwitchRelay(); + break; + case FUNC_COMMAND: + result = DecodeCommand(kShift595Commands, Shift595Command); + break; + case FUNC_ACTIVE: + result = true; + break; } + } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_61_ds3502.ino b/tasmota/tasmota_xdrv_driver/xdrv_61_ds3502.ino index 0b158bdef..537885495 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_61_ds3502.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_61_ds3502.ino @@ -86,6 +86,9 @@ bool Xdrv61(uint32_t function) { case FUNC_COMMAND: result = DecodeCommand(kDS3502Commands, DS3502Command); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_62_improv.ino b/tasmota/tasmota_xdrv_driver/xdrv_62_improv.ino index 4b3a15154..f68954b1a 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_62_improv.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_62_improv.ino @@ -353,6 +353,9 @@ bool Xdrv62(uint32_t function) { case FUNC_PRE_INIT: ImprovInit(); break; + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_63_modbus_bridge.ino b/tasmota/tasmota_xdrv_driver/xdrv_63_modbus_bridge.ino index c93be3cb5..c8f3fa109 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_63_modbus_bridge.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_63_modbus_bridge.ino @@ -1169,6 +1169,9 @@ bool Xdrv63(uint32_t function) case FUNC_COMMAND: result = DecodeCommand(kModbusBridgeCommands, ModbusBridgeCommand); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_64_pca9632.ino b/tasmota/tasmota_xdrv_driver/xdrv_64_pca9632.ino index 7c36c6ab3..591495010 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_64_pca9632.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_64_pca9632.ino @@ -266,6 +266,9 @@ bool Xdrv64(uint32_t function) { result = PCA9632_Command(); } break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_65_tuyamcubr.ino b/tasmota/tasmota_xdrv_driver/xdrv_65_tuyamcubr.ino index d5d4b0ac8..caa1cefd3 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_65_tuyamcubr.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_65_tuyamcubr.ino @@ -1110,6 +1110,10 @@ Xdrv65(uint32_t function) case FUNC_COMMAND: result = DecodeCommand(tuyamcubr_cmnd_names, tuyamcubr_cmnds); break; + + case FUNC_ACTIVE: + result = true; + break; } return (result); diff --git a/tasmota/tasmota_xdrv_driver/xdrv_66_tm1638.ino b/tasmota/tasmota_xdrv_driver/xdrv_66_tm1638.ino index e7d5f5a63..f93073411 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_66_tm1638.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_66_tm1638.ino @@ -232,6 +232,9 @@ bool Xdrv66(uint32_t function) { #endif result = TmAddKey(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_67_mcp23xxx.ino b/tasmota/tasmota_xdrv_driver/xdrv_67_mcp23xxx.ino index 1186bf5db..82aea1edb 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_67_mcp23xxx.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_67_mcp23xxx.ino @@ -834,6 +834,9 @@ bool Xdrv67(uint32_t function) { case FUNC_ADD_SWITCH: result = MCP23xAddSwitch(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino b/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino index 49f6f9cfb..da7fc794e 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino @@ -316,6 +316,9 @@ bool Xdrv68(uint32_t function) break; #endif // ZCDIMMERSET_SHOW #endif // USE_WEBSERVER + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_69_pca9557.ino b/tasmota/tasmota_xdrv_driver/xdrv_69_pca9557.ino index 190fb0e34..9ee9c1c87 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_69_pca9557.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_69_pca9557.ino @@ -527,6 +527,9 @@ bool Xdrv69(uint32_t function) { case FUNC_ADD_SWITCH: result = PCA9557AddSwitch(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_70_1_hdmi_cec.ino b/tasmota/tasmota_xdrv_driver/xdrv_70_1_hdmi_cec.ino index deb7c9776..981829691 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_70_1_hdmi_cec.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_70_1_hdmi_cec.ino @@ -302,21 +302,21 @@ bool Xdrv70(uint32_t function) { bool result = false; - switch (function) { - case FUNC_INIT: - HdmiCecInit(); - break; - case FUNC_LOOP: - case FUNC_SLEEP_LOOP: - if (HDMI_CEC_device) { + if (FUNC_INIT == function) { + HdmiCecInit(); + } else if (HDMI_CEC_device) { + switch (function) { + case FUNC_LOOP: + case FUNC_SLEEP_LOOP: HDMI_CEC_device->run(); - } - break; - case FUNC_COMMAND: - if (HDMI_CEC_device) { + break; + case FUNC_COMMAND: result = DecodeCommand(kHDMICommands, HDMICommand); - } - break; + break; + case FUNC_ACTIVE: + result = true; + break; + } } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_79_esp32_ble.ino b/tasmota/tasmota_xdrv_driver/xdrv_79_esp32_ble.ino index 6a2e01cc7..c907868e1 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_79_esp32_ble.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_79_esp32_ble.ino @@ -3634,6 +3634,9 @@ bool Xdrv79(uint32_t function) WebServer_on(PSTR("/" WEB_HANDLE_BLE), BLE_ESP32::HandleBleConfiguration); break; #endif // USE_WEBSERVER + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam.ino b/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam.ino index 541e2c55b..904e73c84 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam.ino @@ -1533,6 +1533,9 @@ bool Xdrv81(uint32_t function) { case FUNC_INIT: if(Wc.up == 0) WcSetup(Settings->webcam_config.resolution); break; + case FUNC_ACTIVE: + result = true; + break; } return result; 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 2b0e637d8..77636cf8b 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam_task.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam_task.ino @@ -3037,6 +3037,9 @@ 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; } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino b/tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino index f484566fa..8ae9c8d6a 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino @@ -384,6 +384,9 @@ bool Xdrv82(uint32_t function) { case FUNC_INIT: EthernetInit(); break; + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_83_esp32_watch.ino b/tasmota/tasmota_xdrv_driver/xdrv_83_esp32_watch.ino index 939fab4d9..236db41f3 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_83_esp32_watch.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_83_esp32_watch.ino @@ -458,6 +458,9 @@ bool Xdrv83(uint32_t function) { case FUNC_LOOP: TTGO_loop(1); break; + case FUNC_ACTIVE: + result = true; + break; } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_85_esp32_ble_eq3_trv.ino b/tasmota/tasmota_xdrv_driver/xdrv_85_esp32_ble_eq3_trv.ino index 3e170c2c3..87883192c 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_85_esp32_ble_eq3_trv.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_85_esp32_ble_eq3_trv.ino @@ -1785,6 +1785,9 @@ bool Xdrv85(uint32_t function) case FUNC_WEB_SENSOR: break; #endif // USE_WEBSERVER + case FUNC_ACTIVE: + result = true; + break; } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_86_esp32_sonoff_spm.ino b/tasmota/tasmota_xdrv_driver/xdrv_86_esp32_sonoff_spm.ino index 03cc63bf6..882407f21 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_86_esp32_sonoff_spm.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_86_esp32_sonoff_spm.ino @@ -2682,6 +2682,9 @@ bool Xdrv86(uint32_t function) { case FUNC_BUTTON_PRESSED: result = SSPMButton(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_87_esp32_sonoff_tm1621.ino b/tasmota/tasmota_xdrv_driver/xdrv_87_esp32_sonoff_tm1621.ino index 642f32ce3..b9006c740 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_87_esp32_sonoff_tm1621.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_87_esp32_sonoff_tm1621.ino @@ -600,6 +600,9 @@ bool Xdrv87(uint32_t function) { case FUNC_COMMAND: result = DecodeCommand(kTm1621Commands, kTm1621Command); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_88_esp32_shelly_pro.ino b/tasmota/tasmota_xdrv_driver/xdrv_88_esp32_shelly_pro.ino index db7671733..20d0d01c7 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_88_esp32_shelly_pro.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_88_esp32_shelly_pro.ino @@ -240,27 +240,30 @@ bool Xdrv88(uint32_t function) { if (FUNC_PRE_INIT == function) { ShellyProPreInit(); - } else if (SPro.detected) { - switch (function) { + } else if (SPro.detected) { + switch (function) { /* - case FUNC_BUTTON_PRESSED: - result = ShellyProButton(); - break; + case FUNC_BUTTON_PRESSED: + result = ShellyProButton(); + break; */ - case FUNC_EVERY_SECOND: - ShellyProLedLinkWifiOff(); - break; - case FUNC_SET_POWER: - ShellyProPower(); - break; - case FUNC_INIT: - ShellyProInit(); - break; - case FUNC_LED_LINK: - ShellyProLedLink(); - break; - } + case FUNC_EVERY_SECOND: + ShellyProLedLinkWifiOff(); + break; + case FUNC_SET_POWER: + ShellyProPower(); + break; + case FUNC_INIT: + ShellyProInit(); + break; + case FUNC_LED_LINK: + ShellyProLedLink(); + break; + case FUNC_ACTIVE: + result = true; + break; } + } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_88_esp32_shelly_pro_v1.ino b/tasmota/tasmota_xdrv_driver/xdrv_88_esp32_shelly_pro_v1.ino index 6af3d65b7..2c01a5a4a 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_88_esp32_shelly_pro_v1.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_88_esp32_shelly_pro_v1.ino @@ -153,22 +153,25 @@ bool Xdrv88(uint32_t function) { if (FUNC_PRE_INIT == function) { ShellyProPreInit(); - } else if (SPro.detected) { - switch (function) { - case FUNC_EVERY_SECOND: - ShellyProLedLinkWifiOff(); - break; - case FUNC_SET_POWER: - ShellyProPower(); - break; - case FUNC_LED_LINK: - ShellyProLedLink(); - break; - case FUNC_INIT: - ShellyProInit(); - break; - } + } else if (SPro.detected) { + switch (function) { + case FUNC_EVERY_SECOND: + ShellyProLedLinkWifiOff(); + break; + case FUNC_SET_POWER: + ShellyProPower(); + break; + case FUNC_LED_LINK: + ShellyProLedLink(); + break; + case FUNC_INIT: + ShellyProInit(); + break; + case FUNC_ACTIVE: + result = true; + break; } + } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_88_esp32_shelly_pro_v2.ino b/tasmota/tasmota_xdrv_driver/xdrv_88_esp32_shelly_pro_v2.ino index f7bea6ca5..06456b990 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_88_esp32_shelly_pro_v2.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_88_esp32_shelly_pro_v2.ino @@ -486,33 +486,36 @@ bool Xdrv88(uint32_t function) { if (FUNC_SETUP_RING2 == function) { ShellyProPreInit(); - } else if (SPro.detected) { - switch (function) { + } else if (SPro.detected) { + switch (function) { /* - case FUNC_BUTTON_PRESSED: - result = ShellyProButton(); - break; + case FUNC_BUTTON_PRESSED: + result = ShellyProButton(); + break; */ - case FUNC_EVERY_SECOND: - ShellyProLedLinkWifiOff(); - break; - case FUNC_SET_POWER: - ShellyProPower(); - break; - case FUNC_INIT: - ShellyProInit(); - break; - case FUNC_ADD_BUTTON: - result = ShellyProAddButton(); - break; - case FUNC_ADD_SWITCH: - result = ShellyProAddSwitch(); - break; - case FUNC_LED_LINK: - ShellyProLedLink(); - break; - } + case FUNC_EVERY_SECOND: + ShellyProLedLinkWifiOff(); + break; + case FUNC_SET_POWER: + ShellyProPower(); + break; + case FUNC_INIT: + ShellyProInit(); + break; + case FUNC_ADD_BUTTON: + result = ShellyProAddButton(); + break; + case FUNC_ADD_SWITCH: + result = ShellyProAddSwitch(); + break; + case FUNC_LED_LINK: + ShellyProLedLink(); + break; + case FUNC_ACTIVE: + result = true; + break; } + } return result; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_89_esp32_dali.ino b/tasmota/tasmota_xdrv_driver/xdrv_89_esp32_dali.ino index d1fbeee5c..5168d077f 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_89_esp32_dali.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_89_esp32_dali.ino @@ -574,6 +574,9 @@ bool Xdrv89(uint32_t function) case FUNC_COMMAND: result = DaliCmd(); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_90_esp32_dingtian_relay.ino b/tasmota/tasmota_xdrv_driver/xdrv_90_esp32_dingtian_relay.ino index c6dbd9193..d6d7da25a 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_90_esp32_dingtian_relay.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_90_esp32_dingtian_relay.ino @@ -271,6 +271,9 @@ bool Xdrv90(uint32_t function) { result = DingtianAddKey(); break; #endif + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_91_magic_switch.ino b/tasmota/tasmota_xdrv_driver/xdrv_91_magic_switch.ino index 5356ada69..c0c128bcd 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_91_magic_switch.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_91_magic_switch.ino @@ -179,6 +179,9 @@ bool Xdrv91(uint32_t function) { case FUNC_COMMAND: result = DecodeCommand(kMagicSwitchCommands, MagicSwitchCommand); break; + case FUNC_ACTIVE: + result = true; + break; } } return result; diff --git a/tasmota/tasmota_xx2c_global/xdrv_interface.ino b/tasmota/tasmota_xx2c_global/xdrv_interface.ino index fda25f067..03ff1b2d9 100644 --- a/tasmota/tasmota_xx2c_global/xdrv_interface.ino +++ b/tasmota/tasmota_xx2c_global/xdrv_interface.ino @@ -1063,6 +1063,8 @@ const uint8_t kXdrvList[] = { /*********************************************************************************************/ +uint32_t Xdrv_active[4] = { 0 }; + void XsnsDriverState(void) { ResponseAppend_P(PSTR(",\"Drivers\":\"")); // Use string for future enable/disable signal for (uint32_t i = 0; i < sizeof(kXdrvList); i++) { @@ -1071,7 +1073,7 @@ void XsnsDriverState(void) { #else uint32_t driverid = kXdrvList[i]; #endif - ResponseAppend_P(PSTR("%s%d"), (i) ? "," : "", driverid); + ResponseAppend_P(PSTR("%s%s%d"), (i) ? "," : "", (!bitRead(Xdrv_active[i / 32], i % 32)) ? "!" : "", driverid); } ResponseAppend_P(PSTR("\"")); } @@ -1133,11 +1135,15 @@ bool XdrvCall(uint32_t function) { // DEBUG_TRACE_LOG(PSTR("DRV: %d"), function); +#ifdef USE_PROFILE_FUNCTION uint32_t profile_driver_start = millis(); +#endif // USE_PROFILE_FUNCTION for (uint32_t x = 0; x < xdrv_present; x++) { +#ifdef USE_PROFILE_FUNCTION uint32_t profile_function_start = millis(); +#endif // USE_PROFILE_FUNCTION result = xdrv_func_ptr[x](function); @@ -1150,6 +1156,9 @@ bool XdrvCall(uint32_t function) { PROFILE_FUNCTION("drv", index, function, profile_function_start); #endif // USE_PROFILE_FUNCTION + if (FUNC_ACTIVE == function) { + bitWrite(Xdrv_active[x / 32], x % 32, result); + } if (result && (function > FUNC_return_result)) { break; } diff --git a/tasmota/tasmota_xx2c_global/xsns_interface.ino b/tasmota/tasmota_xx2c_global/xsns_interface.ino index f78d5e9e2..2f020b92d 100644 --- a/tasmota/tasmota_xx2c_global/xsns_interface.ino +++ b/tasmota/tasmota_xx2c_global/xsns_interface.ino @@ -1116,13 +1116,17 @@ bool XsnsCall(uint32_t function) { // DEBUG_TRACE_LOG(PSTR("SNS: %d"), function); +#ifdef USE_PROFILE_FUNCTION uint32_t profile_driver_start = millis(); +#endif // USE_PROFILE_FUNCTION for (uint32_t x = 0; x < xsns_present; x++) { if (XsnsEnabled(0, x)) { // Skip disabled sensor if ((FUNC_WEB_SENSOR == function) && !XsnsEnabled(1, x)) { continue; } // Skip web info for disabled sensors +#ifdef USE_PROFILE_FUNCTION uint32_t profile_function_start = millis(); +#endif // USE_PROFILE_FUNCTION result = xsns_func_ptr[x](function);