diff --git a/tasmota/include/tasmota_types.h b/tasmota/include/tasmota_types.h index 004b6602b..9f0005da7 100644 --- a/tasmota/include/tasmota_types.h +++ b/tasmota/include/tasmota_types.h @@ -186,7 +186,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu uint32_t no_voltage_common : 1; // bit 4 (v12.3.1.5) - SetOption150 - (Energy) Force no voltage/frequency common uint32_t matter_enabled : 1; // bit 5 (v12.3.1.5) - SetOption151 - (Matter) Enable Matter protocol over Wifi uint32_t bistable_single_pin : 1; // bit 6 (v12.5.0.1) - SetOption152 - (Power) Switch between two (0) or one (1) pin bistable relay control - uint32_t spare07 : 1; // bit 7 + uint32_t berry_autoexec : 1; // bit 7 (v12.5.0.3) - SetOption153 - (Berry) Disable autoexec.be on restart (1) uint32_t spare08 : 1; // bit 8 uint32_t spare09 : 1; // bit 9 uint32_t spare10 : 1; // bit 10 diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino index b4661c896..ca205150d 100644 --- a/tasmota/tasmota_support/support_command.ino +++ b/tasmota/tasmota_support/support_command.ino @@ -1474,6 +1474,7 @@ void CmndSetoptionBase(bool indexed) { switch (pindex) { case 5: // SetOption151 - Matter enabled case 6: // SetOption152 - (Power) Use single pin bistable + case 7: // SetOption153 - (Berry) Disable autoexec.be on restart (1) TasmotaGlobal.restart_flag = 2; break; } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_52_9_berry.ino b/tasmota/tasmota_xdrv_driver/xdrv_52_9_berry.ino index 6ee7437b1..917f656b0 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_52_9_berry.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_52_9_berry.ino @@ -378,6 +378,12 @@ void BerryInit(void) { void BrLoad(const char * script_name) { if (berry.vm == nullptr || TasmotaGlobal.no_autoexec) { return; } // abort is berry is not running, or bootloop prevention kicked in + if (!strcmp_P(script_name, "autoexec.be")) { + if (Settings->flag6.berry_autoexec) { // SetOption153 - (Berry) Disable autoexec.be on restart (1) + return; + } + } + be_getglobal(berry.vm, PSTR("load")); if (!be_isnil(berry.vm, -1)) { be_pushstring(berry.vm, script_name); diff --git a/tools/decode-status.py b/tools/decode-status.py index 2b6164fca..abd99ecfe 100755 --- a/tools/decode-status.py +++ b/tools/decode-status.py @@ -208,7 +208,7 @@ a_setoption = [[ "(Energy) Force no voltage/frequency common", "(Matter) Enable Matter protocol over Wifi", "(Power) Switch between two (0) or one (1) pin bistable relay control", - "", + "(Berry) Disable autoexec.be on restart (1)", "","","","", "","","","", "","","","", @@ -325,7 +325,7 @@ else: obj = json.load(fp) def StartDecode(): - print ("\n*** decode-status.py v12.5.0.2 by Theo Arends and Jacek Ziolkowski ***") + print ("\n*** decode-status.py v12.5.0.3 by Theo Arends and Jacek Ziolkowski ***") # print("Decoding\n{}".format(obj))