Add display of active drivers using command `status 4`

This commit is contained in:
Theo Arends 2023-12-27 22:03:56 +01:00
parent 13a9c3b5b2
commit 21c7edcb50
100 changed files with 406 additions and 95 deletions

View File

@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
- Support for CST816S touch interface (#20213) - Support for CST816S touch interface (#20213)
- NeoPool hydrolysis FL1 and Redox flag (#20258) - NeoPool hydrolysis FL1 and Redox flag (#20258)
- Matter support for password for remote Tasmota devices (#20296) - Matter support for password for remote Tasmota devices (#20296)
- Display of active drivers using command ``status 4``
### Breaking Changed ### Breaking Changed
- Refactoring of Berry `animate` module for WS2812 Leds (#20236) - Refactoring of Berry `animate` module for WS2812 Leds (#20236)

View File

@ -120,6 +120,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
### Added ### Added
- Support for CST816S touch interface [#20213](https://github.com/arendst/Tasmota/issues/20213) - 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) - 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) - 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) - Matter support for password for remote Tasmota devices [#20296](https://github.com/arendst/Tasmota/issues/20296)

View File

@ -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, 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 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_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_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, FUNC_AFTER_TELEPERIOD, FUNC_JSON_APPEND, FUNC_WEB_SENSOR, FUNC_WEB_COL_SENSOR,

View File

@ -775,6 +775,8 @@ void setup(void) {
if (bitRead(Settings->rule_enabled, 0)) Run_Scripter(">BS",3,0); if (bitRead(Settings->rule_enabled, 0)) Run_Scripter(">BS",3,0);
#endif #endif
XdrvCall(FUNC_ACTIVE); // FUNC_ACTIVE
TasmotaGlobal.rules_flag.system_init = 1; TasmotaGlobal.rules_flag.system_init = 1;
} }

View File

@ -3894,6 +3894,9 @@ bool Xdrv01(uint32_t function)
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(kWebCommands, WebCommand); result = DecodeCommand(kWebCommands, WebCommand);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -2033,6 +2033,9 @@ bool Xdrv02(uint32_t function)
case FUNC_PRE_INIT: case FUNC_PRE_INIT:
MqttInit(); MqttInit();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -1497,6 +1497,9 @@ bool Xdrv03(uint32_t function)
case FUNC_NETWORK_DOWN: case FUNC_NETWORK_DOWN:
XnrgCall(FUNC_NETWORK_DOWN); XnrgCall(FUNC_NETWORK_DOWN);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -1799,6 +1799,9 @@ bool Xdrv03(uint32_t function)
case FUNC_NETWORK_DOWN: case FUNC_NETWORK_DOWN:
XnrgCall(FUNC_NETWORK_DOWN); XnrgCall(FUNC_NETWORK_DOWN);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -3470,6 +3470,9 @@ bool Xdrv04(uint32_t function)
ArtNetFuncNetworkDown(); ArtNetFuncNetworkDown();
break; break;
#endif // USE_LIGHT_ARTNET #endif // USE_LIGHT_ARTNET
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -444,6 +444,9 @@ bool Xdrv05(uint32_t function)
result = DecodeCommand(kIrRemoteCommands, IrRemoteCommand); result = DecodeCommand(kIrRemoteCommands, IrRemoteCommand);
} }
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -916,6 +916,11 @@ bool Xdrv05(uint32_t function)
result = DecodeCommand(kIrRemoteCommands, IrRemoteCommand); result = DecodeCommand(kIrRemoteCommands, IrRemoteCommand);
} }
break; break;
case FUNC_ACTIVE:
if (ir_recv_active || ir_recv_active) {
result = true;
}
break;
} }
return result; return result;
} }

View File

@ -566,6 +566,9 @@ bool Xdrv06(uint32_t function)
case FUNC_PRE_INIT: case FUNC_PRE_INIT:
SetSerial(19200, TS_SERIAL_8N1); SetSerial(19200, TS_SERIAL_8N1);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
#endif // ESP8266 #endif // ESP8266

View File

@ -699,6 +699,9 @@ bool Xdrv07(uint32_t function) {
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(kDomoticzCommands, DomoticzCommand); result = DecodeCommand(kDomoticzCommands, DomoticzCommand);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -336,6 +336,9 @@ bool Xdrv08(uint32_t function) {
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(kSerialBridgeCommands, SerialBridgeCommand); result = DecodeCommand(kSerialBridgeCommands, SerialBridgeCommand);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -979,6 +979,9 @@ bool Xdrv09(uint32_t function)
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(kTimerCommands, TimerCommand); result = DecodeCommand(kTimerCommands, TimerCommand);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -2504,6 +2504,9 @@ bool Xdrv10(uint32_t function)
case FUNC_PRE_INIT: case FUNC_PRE_INIT:
RulesInit(); RulesInit();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -13039,6 +13039,10 @@ bool Xdrv10(uint32_t function)
case FUNC_NETWORK_UP: case FUNC_NETWORK_UP:
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -1342,6 +1342,9 @@ bool Xdrv11(uint32_t function)
break; break;
// case FUNC_SET_POWER: // case FUNC_SET_POWER:
// break; // break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -188,6 +188,9 @@ bool Xdrv122(uint32_t function) {
case FUNC_SAVE_BEFORE_RESTART: case FUNC_SAVE_BEFORE_RESTART:
// !!! DO NOT USE AS IT'S FUNCTION IS BETTER HANDLED BY FUNC_SAVE_SETTINGS !!! // !!! DO NOT USE AS IT'S FUNCTION IS BETTER HANDLED BY FUNC_SAVE_SETTINGS !!!
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -812,6 +812,9 @@ bool Xdrv127(uint32_t function)
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(kDebugCommands, DebugCommand); result = DecodeCommand(kDebugCommands, DebugCommand);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -328,6 +328,9 @@ bool Xdrv12(uint32_t function) {
case FUNC_MQTT_INIT: case FUNC_MQTT_INIT:
TasDiscoverInit(); TasDiscoverInit();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -1321,6 +1321,9 @@ bool Xdrv12(uint32_t function)
case FUNC_MQTT_DATA: case FUNC_MQTT_DATA:
result = HAssMqttLWT(); result = HAssMqttLWT();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -2939,6 +2939,9 @@ bool Xdrv13(uint32_t function)
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(kDisplayCommands, DisplayCommand); result = DecodeCommand(kDisplayCommands, DisplayCommand);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -414,6 +414,10 @@ bool Xdrv14(uint32_t function)
case FUNC_EVERY_SECOND: case FUNC_EVERY_SECOND:
MP3_EVERY_SECOND(); MP3_EVERY_SECOND();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -228,6 +228,9 @@ bool Xdrv15(uint32_t function)
result = PCA9685_Command(); result = PCA9685_Command();
} }
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -613,6 +613,9 @@ bool Xdrv15(uint32_t function)
result = PCA9685_Command(); result = PCA9685_Command();
} }
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -1725,6 +1725,9 @@ bool Xdrv16(uint32_t function) {
TuyaSensorsShow(0); TuyaSensorsShow(0);
break; break;
#endif // USE_WEBSERVER #endif // USE_WEBSERVER
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -2575,6 +2575,9 @@ bool Xdrv16(uint32_t function) {
TuyaSensorsShow(0); TuyaSensorsShow(0);
break; break;
#endif // USE_WEBSERVER #endif // USE_WEBSERVER
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -246,6 +246,9 @@ bool Xdrv17(uint32_t function)
case FUNC_INIT: case FUNC_INIT:
RfInit(); RfInit();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -190,6 +190,9 @@ bool Xdrv18(uint32_t function)
case FUNC_SET_CHANNELS: case FUNC_SET_CHANNELS:
result = ArmtronixSetChannels(); result = ArmtronixSetChannels();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -225,6 +225,9 @@ bool Xdrv19(uint32_t function)
case FUNC_MODULE_INIT: case FUNC_MODULE_INIT:
result = PS16DZModuleSelected(); result = PS16DZModuleSelected();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -1168,6 +1168,9 @@ bool Xdrv20(uint32_t function)
case FUNC_NETWORK_DOWN: case FUNC_NETWORK_DOWN:
UdpDisconnect(); UdpDisconnect();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -366,6 +366,9 @@ bool Xdrv21(uint32_t function)
case FUNC_NETWORK_DOWN: case FUNC_NETWORK_DOWN:
UdpDisconnect(); UdpDisconnect();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -465,6 +465,9 @@ bool Xdrv21(uint32_t function)
case FUNC_NETWORK_DOWN: case FUNC_NETWORK_DOWN:
UdpDisconnect(); UdpDisconnect();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -261,6 +261,9 @@ bool Xdrv22(uint32_t function) {
case FUNC_MODULE_INIT: case FUNC_MODULE_INIT:
result = SonoffIfanInit(); result = SonoffIfanInit();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -2484,6 +2484,9 @@ bool Xdrv23(uint32_t function) {
restoreDumpAllDevices(); restoreDumpAllDevices();
} }
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -253,6 +253,9 @@ bool Xdrv24(uint32_t function) {
case FUNC_PIN_STATE: case FUNC_PIN_STATE:
result = BuzzerPinState(); result = BuzzerPinState();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -137,6 +137,9 @@ bool Xdrv25(uint32_t function)
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(kA4988Commands, A4988Command); result = DecodeCommand(kA4988Commands, A4988Command);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -187,6 +187,9 @@ bool Xdrv26(uint32_t function)
case FUNC_INTERRUPT_START: case FUNC_INTERRUPT_START:
AriluxRfInit(); AriluxRfInit();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -2371,6 +2371,9 @@ bool Xdrv27(uint32_t function)
ShutterShow(); ShutterShow();
break; break;
#endif // USE_WEBSERVER #endif // USE_WEBSERVER
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -1972,6 +1972,9 @@ bool Xdrv27(uint32_t function)
ShutterShow(); ShutterShow();
break; break;
#endif // USE_WEBSERVER #endif // USE_WEBSERVER
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -720,6 +720,9 @@ bool Xdrv28(uint32_t function) {
break; break;
#endif // USE_PCF8574_DISPLAYINPUT #endif // USE_PCF8574_DISPLAYINPUT
#endif // USE_WEBSERVER #endif // USE_WEBSERVER
case FUNC_ACTIVE:
result = true;
break;
} }
#ifdef USE_PCF8574_MODE2 #ifdef USE_PCF8574_MODE2
} else if (2 == Pcf8574.mode) { } else if (2 == Pcf8574.mode) {
@ -747,6 +750,9 @@ bool Xdrv28(uint32_t function) {
case FUNC_ADD_SWITCH: case FUNC_ADD_SWITCH:
result = Pcf8574AddSwitch(); result = Pcf8574AddSwitch();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
#endif // USE_PCF8574_MODE2 #endif // USE_PCF8574_MODE2
} }

View File

@ -332,6 +332,9 @@ bool Xdrv29(uint32_t function)
case FUNC_PRE_INIT: case FUNC_PRE_INIT:
DeepSleepReInit(); DeepSleepReInit();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -611,6 +611,9 @@ bool Xdrv30(uint32_t function)
result = DecodeCommand(kExsCommands, ExsCommand); result = DecodeCommand(kExsCommands, ExsCommand);
break; break;
#endif #endif
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -559,6 +559,9 @@ bool Xdrv31(uint32_t function) {
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(kTasmotaClientCommands, TasmotaClientCommand); result = DecodeCommand(kTasmotaClientCommands, TasmotaClientCommand);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -94,6 +94,9 @@ bool Xdrv32(uint32_t function)
case FUNC_PRE_INIT: case FUNC_PRE_INIT:
HotPlugInit(); HotPlugInit();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -85,6 +85,10 @@ bool Xdrv33(uint32_t function) {
if (FUNC_INIT == function) { if (FUNC_INIT == function) {
NRF24Detect(); NRF24Detect();
} else if (NRF24.chipType) {
if (FUNC_ACTIVE == function) {
result = true;
}
} }
return result; return result;
} }

View File

@ -284,6 +284,9 @@ bool Xdrv34(uint32_t function)
result = WMotorV1Command(); result = WMotorV1Command();
} }
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -948,6 +948,10 @@ bool Xdrv35(uint32_t function)
case FUNC_PRE_INIT: case FUNC_PRE_INIT:
PWMModulePreInit(); PWMModulePreInit();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -276,6 +276,9 @@ bool Xdrv36(uint32_t function)
KeeloqInit(); KeeloqInit();
DEBUG_DRIVER_LOG(PSTR("KLQ: init done")); DEBUG_DRIVER_LOG(PSTR("KLQ: init done"));
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;

View File

@ -191,6 +191,9 @@ bool Xdrv37(uint32_t function)
case FUNC_MODULE_INIT: case FUNC_MODULE_INIT:
result = SonoffD1ModuleSelected(); result = SonoffD1ModuleSelected();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -447,6 +447,9 @@ bool Xdrv38(uint32_t function)
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(kPingCommands, PingCommand); result = DecodeCommand(kPingCommands, PingCommand);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -2204,6 +2204,10 @@ bool Xdrv39(uint32_t function)
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(kThermostatCommands, ThermostatCommand); result = DecodeCommand(kThermostatCommands, ThermostatCommand);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -487,6 +487,9 @@ bool Xdrv40(uint32_t function)
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(kTelegramCommands, TelegramCommand); result = DecodeCommand(kTelegramCommands, TelegramCommand);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -290,6 +290,9 @@ bool Xdrv41(uint32_t function)
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(kTCPCommands, TCPCommand); result = DecodeCommand(kTCPCommands, TCPCommand);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -760,6 +760,10 @@ bool Xdrv42(uint32_t function) {
I2S_WR_Show(true); I2S_WR_Show(true);
break; break;
#endif // USE_I2S_WEBRADIO #endif // USE_I2S_WEBRADIO
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -617,6 +617,9 @@ bool Xdrv43(uint32_t function)
case FUNC_COMMAND: case FUNC_COMMAND:
result = MLX90640Cmd(); result = MLX90640Cmd();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -1336,6 +1336,10 @@ bool Xdrv44(uint32_t function) {
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(miel_hvac_cmnd_names, miel_hvac_cmnds); result = DecodeCommand(miel_hvac_cmnd_names, miel_hvac_cmnds);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return (result); return (result);

View File

@ -872,6 +872,9 @@ bool Xdrv45(uint32_t function) {
result = DecodeCommand(kShdCommands, ShdCommand); result = DecodeCommand(kShdCommands, ShdCommand);
break; break;
#endif // SHELLY_CMDS #endif // SHELLY_CMDS
case FUNC_ACTIVE:
result = true;
break;
} }
} }

View File

@ -689,6 +689,9 @@ bool Xdrv46(uint32_t function) {
CCLoadershow(0); CCLoadershow(0);
break; break;
#endif // USE_WEBSERVER #endif // USE_WEBSERVER
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -232,6 +232,9 @@ bool Xdrv47(uint32_t function) {
ftc532_show(); ftc532_show();
break; break;
} }
case FUNC_ACTIVE:
result = true;
break;
} }
// Return bool result // Return bool result
return result; return result;

View File

@ -345,6 +345,9 @@ bool Xdrv48(uint32_t function) {
case FUNC_JSON_APPEND: case FUNC_JSON_APPEND:
ShowValues(); ShowValues();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -543,6 +543,9 @@ bool Xdrv49(uint32_t function) {
PIDShowValuesWeb(); PIDShowValuesWeb();
break; break;
#endif // USE_WEBSERVER #endif // USE_WEBSERVER
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -1398,6 +1398,9 @@ bool Xdrv50(uint32_t function) {
#endif #endif
break; break;
#endif // USE_WEBSERVER #endif // USE_WEBSERVER
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -182,6 +182,9 @@ bool Xdrv51(uint32_t function) {
case FUNC_JSON_APPEND: case FUNC_JSON_APPEND:
bs814_show(); bs814_show();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
// Return bool result // Return bool result

View File

@ -969,6 +969,9 @@ bool Xdrv52(uint32_t function)
callBerryEventDispatcher(PSTR("button_pressed"), nullptr, 0, nullptr); callBerryEventDispatcher(PSTR("button_pressed"), nullptr, 0, nullptr);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;

View File

@ -473,6 +473,10 @@ bool Xdrv53(uint32_t function) {
result = projector_ctrl_set_power(sc); result = projector_ctrl_set_power(sc);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return (result); return (result);

View File

@ -471,6 +471,10 @@ bool Xdrv54(uint32_t function)
case FUNC_BUTTON_PRESSED: case FUNC_BUTTON_PRESSED:
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -589,6 +589,9 @@ bool Xdrv55(uint32_t function) {
Touch_Check(TS_RotConvert); Touch_Check(TS_RotConvert);
} }
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -518,6 +518,9 @@ bool Xdrv56(uint32_t function) {
case FUNC_JSON_APPEND: case FUNC_JSON_APPEND:
if (RtcChip.ShowSensor) RtcChip.ShowSensor(1); if (RtcChip.ShowSensor) RtcChip.ShowSensor(1);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }

View File

@ -855,6 +855,9 @@ bool Xdrv57(uint32_t function) {
MESHdeInit(); MESHdeInit();
break; break;
#endif // USE_DEEPSLEEP #endif // USE_DEEPSLEEP
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -524,6 +524,9 @@ bool Xdrv58(uint32_t function)
} }
} }
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -626,6 +626,9 @@ bool Xdrv59(uint32_t function) {
case FUNC_EVERY_SECOND: case FUNC_EVERY_SECOND:
InfluxDbLoop(); InfluxDbLoop();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -112,6 +112,9 @@ bool Xdrv60(uint32_t function) {
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(kShift595Commands, Shift595Command); result = DecodeCommand(kShift595Commands, Shift595Command);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -86,6 +86,9 @@ bool Xdrv61(uint32_t function) {
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(kDS3502Commands, DS3502Command); result = DecodeCommand(kDS3502Commands, DS3502Command);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -353,6 +353,9 @@ bool Xdrv62(uint32_t function) {
case FUNC_PRE_INIT: case FUNC_PRE_INIT:
ImprovInit(); ImprovInit();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -1169,6 +1169,9 @@ bool Xdrv63(uint32_t function)
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(kModbusBridgeCommands, ModbusBridgeCommand); result = DecodeCommand(kModbusBridgeCommands, ModbusBridgeCommand);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -266,6 +266,9 @@ bool Xdrv64(uint32_t function) {
result = PCA9632_Command(); result = PCA9632_Command();
} }
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -1110,6 +1110,10 @@ Xdrv65(uint32_t function)
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(tuyamcubr_cmnd_names, tuyamcubr_cmnds); result = DecodeCommand(tuyamcubr_cmnd_names, tuyamcubr_cmnds);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return (result); return (result);

View File

@ -232,6 +232,9 @@ bool Xdrv66(uint32_t function) {
#endif #endif
result = TmAddKey(); result = TmAddKey();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -834,6 +834,9 @@ bool Xdrv67(uint32_t function) {
case FUNC_ADD_SWITCH: case FUNC_ADD_SWITCH:
result = MCP23xAddSwitch(); result = MCP23xAddSwitch();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -316,6 +316,9 @@ bool Xdrv68(uint32_t function)
break; break;
#endif // ZCDIMMERSET_SHOW #endif // ZCDIMMERSET_SHOW
#endif // USE_WEBSERVER #endif // USE_WEBSERVER
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -527,6 +527,9 @@ bool Xdrv69(uint32_t function) {
case FUNC_ADD_SWITCH: case FUNC_ADD_SWITCH:
result = PCA9557AddSwitch(); result = PCA9557AddSwitch();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -302,21 +302,21 @@ bool Xdrv70(uint32_t function)
{ {
bool result = false; bool result = false;
switch (function) { if (FUNC_INIT == function) {
case FUNC_INIT:
HdmiCecInit(); HdmiCecInit();
break; } else if (HDMI_CEC_device) {
switch (function) {
case FUNC_LOOP: case FUNC_LOOP:
case FUNC_SLEEP_LOOP: case FUNC_SLEEP_LOOP:
if (HDMI_CEC_device) {
HDMI_CEC_device->run(); HDMI_CEC_device->run();
}
break; break;
case FUNC_COMMAND: case FUNC_COMMAND:
if (HDMI_CEC_device) {
result = DecodeCommand(kHDMICommands, HDMICommand); result = DecodeCommand(kHDMICommands, HDMICommand);
}
break; break;
case FUNC_ACTIVE:
result = true;
break;
}
} }
return result; return result;
} }

View File

@ -3634,6 +3634,9 @@ bool Xdrv79(uint32_t function)
WebServer_on(PSTR("/" WEB_HANDLE_BLE), BLE_ESP32::HandleBleConfiguration); WebServer_on(PSTR("/" WEB_HANDLE_BLE), BLE_ESP32::HandleBleConfiguration);
break; break;
#endif // USE_WEBSERVER #endif // USE_WEBSERVER
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -1533,6 +1533,9 @@ bool Xdrv81(uint32_t function) {
case FUNC_INIT: case FUNC_INIT:
if(Wc.up == 0) WcSetup(Settings->webcam_config.resolution); if(Wc.up == 0) WcSetup(Settings->webcam_config.resolution);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;

View File

@ -3037,6 +3037,9 @@ bool Xdrv99(uint32_t function) {
AddLog(LOG_LEVEL_DEBUG, PSTR("CAM: FUNC_SAVE_BEFORE_RESTART after delay")); AddLog(LOG_LEVEL_DEBUG, PSTR("CAM: FUNC_SAVE_BEFORE_RESTART after delay"));
#endif #endif
} break; } break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;

View File

@ -384,6 +384,9 @@ bool Xdrv82(uint32_t function) {
case FUNC_INIT: case FUNC_INIT:
EthernetInit(); EthernetInit();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -458,6 +458,9 @@ bool Xdrv83(uint32_t function) {
case FUNC_LOOP: case FUNC_LOOP:
TTGO_loop(1); TTGO_loop(1);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;

View File

@ -1785,6 +1785,9 @@ bool Xdrv85(uint32_t function)
case FUNC_WEB_SENSOR: case FUNC_WEB_SENSOR:
break; break;
#endif // USE_WEBSERVER #endif // USE_WEBSERVER
case FUNC_ACTIVE:
result = true;
break;
} }
return result; return result;
} }

View File

@ -2682,6 +2682,9 @@ bool Xdrv86(uint32_t function) {
case FUNC_BUTTON_PRESSED: case FUNC_BUTTON_PRESSED:
result = SSPMButton(); result = SSPMButton();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -600,6 +600,9 @@ bool Xdrv87(uint32_t function) {
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(kTm1621Commands, kTm1621Command); result = DecodeCommand(kTm1621Commands, kTm1621Command);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -259,6 +259,9 @@ bool Xdrv88(uint32_t function) {
case FUNC_LED_LINK: case FUNC_LED_LINK:
ShellyProLedLink(); ShellyProLedLink();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -167,6 +167,9 @@ bool Xdrv88(uint32_t function) {
case FUNC_INIT: case FUNC_INIT:
ShellyProInit(); ShellyProInit();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -511,6 +511,9 @@ bool Xdrv88(uint32_t function) {
case FUNC_LED_LINK: case FUNC_LED_LINK:
ShellyProLedLink(); ShellyProLedLink();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -574,6 +574,9 @@ bool Xdrv89(uint32_t function)
case FUNC_COMMAND: case FUNC_COMMAND:
result = DaliCmd(); result = DaliCmd();
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -271,6 +271,9 @@ bool Xdrv90(uint32_t function) {
result = DingtianAddKey(); result = DingtianAddKey();
break; break;
#endif #endif
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -179,6 +179,9 @@ bool Xdrv91(uint32_t function) {
case FUNC_COMMAND: case FUNC_COMMAND:
result = DecodeCommand(kMagicSwitchCommands, MagicSwitchCommand); result = DecodeCommand(kMagicSwitchCommands, MagicSwitchCommand);
break; break;
case FUNC_ACTIVE:
result = true;
break;
} }
} }
return result; return result;

View File

@ -1063,6 +1063,8 @@ const uint8_t kXdrvList[] = {
/*********************************************************************************************/ /*********************************************************************************************/
uint32_t Xdrv_active[4] = { 0 };
void XsnsDriverState(void) { void XsnsDriverState(void) {
ResponseAppend_P(PSTR(",\"Drivers\":\"")); // Use string for future enable/disable signal ResponseAppend_P(PSTR(",\"Drivers\":\"")); // Use string for future enable/disable signal
for (uint32_t i = 0; i < sizeof(kXdrvList); i++) { for (uint32_t i = 0; i < sizeof(kXdrvList); i++) {
@ -1071,7 +1073,7 @@ void XsnsDriverState(void) {
#else #else
uint32_t driverid = kXdrvList[i]; uint32_t driverid = kXdrvList[i];
#endif #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("\"")); ResponseAppend_P(PSTR("\""));
} }
@ -1133,11 +1135,15 @@ bool XdrvCall(uint32_t function) {
// DEBUG_TRACE_LOG(PSTR("DRV: %d"), function); // DEBUG_TRACE_LOG(PSTR("DRV: %d"), function);
#ifdef USE_PROFILE_FUNCTION
uint32_t profile_driver_start = millis(); uint32_t profile_driver_start = millis();
#endif // USE_PROFILE_FUNCTION
for (uint32_t x = 0; x < xdrv_present; x++) { for (uint32_t x = 0; x < xdrv_present; x++) {
#ifdef USE_PROFILE_FUNCTION
uint32_t profile_function_start = millis(); uint32_t profile_function_start = millis();
#endif // USE_PROFILE_FUNCTION
result = xdrv_func_ptr[x](function); result = xdrv_func_ptr[x](function);
@ -1150,6 +1156,9 @@ bool XdrvCall(uint32_t function) {
PROFILE_FUNCTION("drv", index, function, profile_function_start); PROFILE_FUNCTION("drv", index, function, profile_function_start);
#endif // USE_PROFILE_FUNCTION #endif // USE_PROFILE_FUNCTION
if (FUNC_ACTIVE == function) {
bitWrite(Xdrv_active[x / 32], x % 32, result);
}
if (result && (function > FUNC_return_result)) { if (result && (function > FUNC_return_result)) {
break; break;
} }

View File

@ -1116,13 +1116,17 @@ bool XsnsCall(uint32_t function) {
// DEBUG_TRACE_LOG(PSTR("SNS: %d"), function); // DEBUG_TRACE_LOG(PSTR("SNS: %d"), function);
#ifdef USE_PROFILE_FUNCTION
uint32_t profile_driver_start = millis(); uint32_t profile_driver_start = millis();
#endif // USE_PROFILE_FUNCTION
for (uint32_t x = 0; x < xsns_present; x++) { for (uint32_t x = 0; x < xsns_present; x++) {
if (XsnsEnabled(0, x)) { // Skip disabled sensor if (XsnsEnabled(0, x)) { // Skip disabled sensor
if ((FUNC_WEB_SENSOR == function) && !XsnsEnabled(1, x)) { continue; } // Skip web info for disabled sensors 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(); uint32_t profile_function_start = millis();
#endif // USE_PROFILE_FUNCTION
result = xsns_func_ptr[x](function); result = xsns_func_ptr[x](function);