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)
- 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)

View File

@ -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)

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,
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,

View File

@ -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;
}

View File

@ -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;
}

View File

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

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

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

View File

@ -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;
}

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

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

View File

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

View File

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

View File

@ -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;
}

View File

@ -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;
}

View File

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

View File

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

View File

@ -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;

View File

@ -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;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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;

View File

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

View File

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

View File

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

View File

@ -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
}

View File

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

View File

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

View File

@ -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;
}

View File

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

View File

@ -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;
}

View File

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

View File

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

View File

@ -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;

View File

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

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}

View File

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

View File

@ -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);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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

View File

@ -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;

View File

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

View File

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

View File

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

View File

@ -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;
}
}

View File

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

View File

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

View File

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

View File

@ -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;
}

View File

@ -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;

View File

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

View File

@ -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;

View File

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

View File

@ -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);

View File

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

View File

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

View File

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

View File

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

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

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

View File

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

View File

@ -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;
}

View File

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

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

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

View File

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

View File

@ -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;

View File

@ -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;
}

View File

@ -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);