Repository navigation
USER_BACKLOG - only the first command is executed #22226
|
Hello all, Edit: I'm compiling 14.2.0 env:tasmota32 in Platformio. I'm trying to run a few comands in USER_BACKLOG after setting a custom template and selecting module 0, but only the first command is being executed. Here is the relevant part of user_config_override.h: If I change the order of the commands, say make "wifi 0" the first one, again only this one is executed. And if I try the same commands in backlog on a terminal, it executes them all correctly: What am I doing wrong, can someone see it? Thanks. |
Replies: 6 comments 5 replies
|
Hi, any ideas? |
|
Just guessing... |
|
hey,bro,I have also encountered the same problem. Have you solved it? Do you have any good solutions? Is this a bug in Tasmota? |
|
I have reproduced a similar problem and found a possible cause in Setup
Problem After In bool CommandsReady(void) {
bool ready = BACKLOG_EMPTY;
#ifdef USE_UFILESYS
ready |= UfsExecuteCommandFileReady();
#endif
return ready;
}
The reset/restart handling uses this function to decide whether it can proceed. This appears to allow saving/restarting before Change tested I changed only: ready |= UfsExecuteCommandFileReady();to: ready &= UfsExecuteCommandFileReady();This requires both the backlog and command-file execution to be finished. Test results With the same configuration and
Expected Rule3 settings are ON / Once ON. The different failure states suggest a timing-dependent issue rather than a fixed backlog length limit. These logs alone do not distinguish between commands not being executed and their changes not being saved before restart. Could a maintainer check whether the OR operation in |
|
Thanks for looking into this. Perhaps I should explain my workflow more clearly. I build device-specific firmware with the complete configuration embedded in I issue In String user_backlog = F("Backlog0 ");
user_backlog += USER_BACKLOG;
ExecuteCommand((char*)user_backlog.c_str(), SRC_RESTART);Therefore, reducing the normal backlog delay does not appear to address the underlying issue. The restart handling is explicitly guarded by: if (TasmotaGlobal.restart_flag && CommandsReady()) {After restoring the defaults, it sets: TasmotaGlobal.restart_flag = 3; // Finish backlog then Restart 1This suggests that the pending initialization commands are intended to finish before saving and restarting. However, bool ready = BACKLOG_EMPTY;
#ifdef USE_UFILESYS
ready |= UfsExecuteCommandFileReady();
#endifWhen no command file is running, I changed only
The rule texts are present in all cases. It is the activation commands at the end of Could you clarify why OR is used here, rather than AND? I understand that some hardware configuration changes require a restart before dependent commands can work, but that seems separate from whether the reset procedure waits for its own initialization backlog to finish. |

The documentation says it's only executed on the first boot after a reset (no variables defined in flash). If you've already changed a configuration setting, that's not the case. Perhaps a rule with 'on system#boot' would be more appropriate to your use case.