diff --git a/CHANGELOG.md b/CHANGELOG.md
index 73594ea8f..cf3b47477 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
## [Unreleased] - Development
## [10.0.0.3]
+### Added
+- Autoconfiguration for ESP32 and variants
+
### Changed
- ESP8266 Gratuitous ARP enabled and set to 60 seconds (#13623)
diff --git a/lib/libesp32/Berry/default/be_autoconf_lib.c b/lib/libesp32/Berry/default/be_autoconf_lib.c
new file mode 100644
index 000000000..bec1382ea
--- /dev/null
+++ b/lib/libesp32/Berry/default/be_autoconf_lib.c
@@ -0,0 +1,1389 @@
+/********************************************************************
+ * Tasmota lib
+ *
+ * To use: `import autoconf`
+ *
+ *******************************************************************/
+#include "be_constobj.h"
+
+
+/********************************************************************
+** Solidified function: page_autoconf_ctl
+********************************************************************/
+be_local_closure(page_autoconf_ctl, /* name */
+ be_nested_proto(
+ 13, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[41]) { /* constants */
+ /* K0 */ be_nested_string("webserver", 1572454038, 9),
+ /* K1 */ be_nested_string("string", 398550328, 6),
+ /* K2 */ be_nested_string("path", -2071507658, 4),
+ /* K3 */ be_nested_string("check_privileged_access", -602033328, 23),
+ /* K4 */ be_nested_string("has_arg", 424878688, 7),
+ /* K5 */ be_nested_string("reapply", -516027964, 7),
+ /* K6 */ be_nested_string("tasmota", 424643812, 7),
+ /* K7 */ be_nested_string("log", 1062293841, 3),
+ /* K8 */ be_nested_string("CFG: removing first time marker", 2125556683, 31),
+ /* K9 */ be_const_int(2),
+ /* K10 */ be_nested_string("clear_first_time", 632769909, 16),
+ /* K11 */ be_nested_string("redirect", 389758641, 8),
+ /* K12 */ be_nested_string("/?rst=", 580074707, 6),
+ /* K13 */ be_nested_string("zip", -1417514060, 3),
+ /* K14 */ be_nested_string("CFG: removing autoconf files", -280262326, 28),
+ /* K15 */ be_nested_string("delete_all_configs", -1912899718, 18),
+ /* K16 */ be_nested_string("arg", 1047474471, 3),
+ /* K17 */ be_nested_string("reset", 1695364032, 5),
+ /* K18 */ be_nested_string("format", -1180859054, 6),
+ /* K19 */ be_nested_string("https://raw.githubusercontent.com/tasmota/autoconf/main/%s/%s_autoconf.zip", 2084253523, 74),
+ /* K20 */ be_nested_string("arch", -1342162999, 4),
+ /* K21 */ be_nested_string("CFG: downloading '%s'", 589480701, 21),
+ /* K22 */ be_nested_string("%s_autoconf.zip", -1148460718, 15),
+ /* K23 */ be_nested_string("webclient", -218578150, 9),
+ /* K24 */ be_nested_string("begin", 1748273790, 5),
+ /* K25 */ be_nested_string("GET", -1763262857, 3),
+ /* K26 */ be_nested_string("return code=%i", 2127454401, 14),
+ /* K27 */ be_nested_string("connection_error", 1358926260, 16),
+ /* K28 */ be_nested_string("write_file", -1117308417, 10),
+ /* K29 */ be_nested_string("close", 667630371, 5),
+ /* K30 */ be_nested_string("value_error", 773297791, 11),
+ /* K31 */ be_nested_string("Unknown command", 1830905432, 15),
+ /* K32 */ be_nested_string("CFG: Exception> '%s' - %s", 1228874553, 25),
+ /* K33 */ be_nested_string("content_start", -1357458227, 13),
+ /* K34 */ be_nested_string("Parameter error", -454925258, 15),
+ /* K35 */ be_nested_string("content_send_style", 1087907647, 18),
+ /* K36 */ be_nested_string("content_send", 1673733649, 12),
+ /* K37 */ be_nested_string("
Exception:
'%s'
%s
", -42402214, 59),
+ /* K38 */ be_nested_string("content_button", 1956476087, 14),
+ /* K39 */ be_nested_string("BUTTON_CONFIGURATION", 70820856, 20),
+ /* K40 */ be_nested_string("content_stop", 658554751, 12),
+ }),
+ (be_nested_const_str("page_autoconf_ctl", -1841585800, 17)),
+ ((bstring*) &be_const_str_input),
+ ( &(const binstruction[117]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0xA40E0400, // 0002 IMPORT R3 K2
+ 0x8C100303, // 0003 GETMET R4 R1 K3
+ 0x7C100200, // 0004 CALL R4 1
+ 0x74120001, // 0005 JMPT R4 #0008
+ 0x4C100000, // 0006 LDNIL R4
+ 0x80040800, // 0007 RET 1 R4
+ 0xA802004E, // 0008 EXBLK 0 #0058
+ 0x8C100304, // 0009 GETMET R4 R1 K4
+ 0x58180005, // 000A LDCONST R6 K5
+ 0x7C100400, // 000B CALL R4 2
+ 0x7812000A, // 000C JMPF R4 #0018
+ 0xB8120C00, // 000D GETNGBL R4 K6
+ 0x8C100907, // 000E GETMET R4 R4 K7
+ 0x58180008, // 000F LDCONST R6 K8
+ 0x581C0009, // 0010 LDCONST R7 K9
+ 0x7C100600, // 0011 CALL R4 3
+ 0x8C10010A, // 0012 GETMET R4 R0 K10
+ 0x7C100200, // 0013 CALL R4 1
+ 0x8C10030B, // 0014 GETMET R4 R1 K11
+ 0x5818000C, // 0015 LDCONST R6 K12
+ 0x7C100400, // 0016 CALL R4 2
+ 0x7002003D, // 0017 JMP #0056
+ 0x8C100304, // 0018 GETMET R4 R1 K4
+ 0x5818000D, // 0019 LDCONST R6 K13
+ 0x7C100400, // 001A CALL R4 2
+ 0x78120038, // 001B JMPF R4 #0055
+ 0xB8120C00, // 001C GETNGBL R4 K6
+ 0x8C100907, // 001D GETMET R4 R4 K7
+ 0x5818000E, // 001E LDCONST R6 K14
+ 0x581C0009, // 001F LDCONST R7 K9
+ 0x7C100600, // 0020 CALL R4 3
+ 0x8C10010F, // 0021 GETMET R4 R0 K15
+ 0x7C100200, // 0022 CALL R4 1
+ 0x8C100310, // 0023 GETMET R4 R1 K16
+ 0x5818000D, // 0024 LDCONST R6 K13
+ 0x7C100400, // 0025 CALL R4 2
+ 0x20140911, // 0026 NE R5 R4 K17
+ 0x78160026, // 0027 JMPF R5 #004F
+ 0x8C140512, // 0028 GETMET R5 R2 K18
+ 0x581C0013, // 0029 LDCONST R7 K19
+ 0xB8220C00, // 002A GETNGBL R8 K6
+ 0x8C201114, // 002B GETMET R8 R8 K20
+ 0x7C200200, // 002C CALL R8 1
+ 0x5C240800, // 002D MOVE R9 R4
+ 0x7C140800, // 002E CALL R5 4
+ 0xB81A0C00, // 002F GETNGBL R6 K6
+ 0x8C180D07, // 0030 GETMET R6 R6 K7
+ 0x8C200512, // 0031 GETMET R8 R2 K18
+ 0x58280015, // 0032 LDCONST R10 K21
+ 0x5C2C0A00, // 0033 MOVE R11 R5
+ 0x7C200600, // 0034 CALL R8 3
+ 0x58240009, // 0035 LDCONST R9 K9
+ 0x7C180600, // 0036 CALL R6 3
+ 0x8C180512, // 0037 GETMET R6 R2 K18
+ 0x58200016, // 0038 LDCONST R8 K22
+ 0x5C240800, // 0039 MOVE R9 R4
+ 0x7C180600, // 003A CALL R6 3
+ 0xB81E2E00, // 003B GETNGBL R7 K23
+ 0x7C1C0000, // 003C CALL R7 0
+ 0x8C200F18, // 003D GETMET R8 R7 K24
+ 0x5C280A00, // 003E MOVE R10 R5
+ 0x7C200400, // 003F CALL R8 2
+ 0x8C200F19, // 0040 GETMET R8 R7 K25
+ 0x7C200200, // 0041 CALL R8 1
+ 0x542600C7, // 0042 LDINT R9 200
+ 0x20241009, // 0043 NE R9 R8 R9
+ 0x78260004, // 0044 JMPF R9 #004A
+ 0x8C240512, // 0045 GETMET R9 R2 K18
+ 0x582C001A, // 0046 LDCONST R11 K26
+ 0x5C301000, // 0047 MOVE R12 R8
+ 0x7C240600, // 0048 CALL R9 3
+ 0xB0063609, // 0049 RAISE 1 K27 R9
+ 0x8C240F1C, // 004A GETMET R9 R7 K28
+ 0x5C2C0C00, // 004B MOVE R11 R6
+ 0x7C240400, // 004C CALL R9 2
+ 0x8C240F1D, // 004D GETMET R9 R7 K29
+ 0x7C240200, // 004E CALL R9 1
+ 0x8C14010A, // 004F GETMET R5 R0 K10
+ 0x7C140200, // 0050 CALL R5 1
+ 0x8C14030B, // 0051 GETMET R5 R1 K11
+ 0x581C000C, // 0052 LDCONST R7 K12
+ 0x7C140400, // 0053 CALL R5 2
+ 0x70020000, // 0054 JMP #0056
+ 0xB0063D1F, // 0055 RAISE 1 K30 K31
+ 0xA8040001, // 0056 EXBLK 1 1
+ 0x7002001B, // 0057 JMP #0074
+ 0xAC100002, // 0058 CATCH R4 0 2
+ 0x70020018, // 0059 JMP #0073
+ 0x60180001, // 005A GETGBL R6 G1
+ 0x8C1C0512, // 005B GETMET R7 R2 K18
+ 0x58240020, // 005C LDCONST R9 K32
+ 0x5C280800, // 005D MOVE R10 R4
+ 0x5C2C0A00, // 005E MOVE R11 R5
+ 0x7C1C0800, // 005F CALL R7 4
+ 0x7C180200, // 0060 CALL R6 1
+ 0x8C180321, // 0061 GETMET R6 R1 K33
+ 0x58200022, // 0062 LDCONST R8 K34
+ 0x7C180400, // 0063 CALL R6 2
+ 0x8C180323, // 0064 GETMET R6 R1 K35
+ 0x7C180200, // 0065 CALL R6 1
+ 0x8C180324, // 0066 GETMET R6 R1 K36
+ 0x8C200512, // 0067 GETMET R8 R2 K18
+ 0x58280025, // 0068 LDCONST R10 K37
+ 0x5C2C0800, // 0069 MOVE R11 R4
+ 0x5C300A00, // 006A MOVE R12 R5
+ 0x7C200800, // 006B CALL R8 4
+ 0x7C180400, // 006C CALL R6 2
+ 0x8C180326, // 006D GETMET R6 R1 K38
+ 0x88200327, // 006E GETMBR R8 R1 K39
+ 0x7C180400, // 006F CALL R6 2
+ 0x8C180328, // 0070 GETMET R6 R1 K40
+ 0x7C180200, // 0071 CALL R6 1
+ 0x70020000, // 0072 JMP #0074
+ 0xB0080000, // 0073 RAISE 2 R0 R0
+ 0x80000000, // 0074 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: autoexec
+********************************************************************/
+be_local_closure(autoexec, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[32]) { /* constants */
+ /* K0 */ be_nested_string("_archive", -290407892, 8),
+ /* K1 */ be_nested_string("path", -2071507658, 4),
+ /* K2 */ be_nested_string("#init.bat", -997372219, 9),
+ /* K3 */ be_nested_string("is_first_time", 275242384, 13),
+ /* K4 */ be_nested_string("exists", 1002329533, 6),
+ /* K5 */ be_nested_string("set_first_time", -1183719746, 14),
+ /* K6 */ be_nested_string("run_bat", -1758063998, 7),
+ /* K7 */ be_nested_string("tasmota", 424643812, 7),
+ /* K8 */ be_nested_string("log", 1062293841, 3),
+ /* K9 */ be_nested_string("CFG: 'init.bat' done, restarting", 1569670677, 32),
+ /* K10 */ be_const_int(2),
+ /* K11 */ be_nested_string("cmd", -158181397, 3),
+ /* K12 */ be_nested_string("Restart 1", -790511441, 9),
+ /* K13 */ be_nested_string("#display.ini", 182218220, 12),
+ /* K14 */ be_nested_string("gpio", -1656812038, 4),
+ /* K15 */ be_nested_string("pin_used", -261112684, 8),
+ /* K16 */ be_nested_string("OPTION_A", 1133299440, 8),
+ /* K17 */ be_nested_string("display.ini", -1648793295, 11),
+ /* K18 */ be_nested_string("CFG: skipping 'display.ini' because already present in file-system", -329418032, 66),
+ /* K19 */ be_nested_string("display", 1164572437, 7),
+ /* K20 */ be_nested_string("r", -150190315, 1),
+ /* K21 */ be_nested_string("read", -824204347, 4),
+ /* K22 */ be_nested_string("close", 667630371, 5),
+ /* K23 */ be_nested_string("start", 1697318111, 5),
+ /* K24 */ be_nested_string("#autoexec.bat", -912076799, 13),
+ /* K25 */ be_nested_string("CFG: running ", -1816632762, 13),
+ /* K26 */ be_const_int(3),
+ /* K27 */ be_nested_string("CFG: ran ", -715396824, 10),
+ /* K28 */ be_nested_string("#autoexec.be", 1181757091, 12),
+ /* K29 */ be_nested_string("CFG: loading ", -284605793, 13),
+ /* K30 */ be_nested_string("load", -435725847, 4),
+ /* K31 */ be_nested_string("CFG: loaded ", -584693758, 13),
+ }),
+ (be_nested_const_str("autoexec", -618105405, 8)),
+ ((bstring*) &be_const_str_input),
+ ( &(const binstruction[107]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x4C080000, // 0001 LDNIL R2
+ 0x1C040202, // 0002 EQ R1 R1 R2
+ 0x78060000, // 0003 JMPF R1 #0005
+ 0x80000200, // 0004 RET 0
+ 0xA4060200, // 0005 IMPORT R1 K1
+ 0x88080100, // 0006 GETMBR R2 R0 K0
+ 0x00080502, // 0007 ADD R2 R2 K2
+ 0x8C0C0103, // 0008 GETMET R3 R0 K3
+ 0x7C0C0200, // 0009 CALL R3 1
+ 0x780E0012, // 000A JMPF R3 #001E
+ 0x8C0C0304, // 000B GETMET R3 R1 K4
+ 0x5C140400, // 000C MOVE R5 R2
+ 0x7C0C0400, // 000D CALL R3 2
+ 0x780E000E, // 000E JMPF R3 #001E
+ 0x8C0C0105, // 000F GETMET R3 R0 K5
+ 0x7C0C0200, // 0010 CALL R3 1
+ 0x8C0C0106, // 0011 GETMET R3 R0 K6
+ 0x5C140400, // 0012 MOVE R5 R2
+ 0x7C0C0400, // 0013 CALL R3 2
+ 0xB80E0E00, // 0014 GETNGBL R3 K7
+ 0x8C0C0708, // 0015 GETMET R3 R3 K8
+ 0x58140009, // 0016 LDCONST R5 K9
+ 0x5818000A, // 0017 LDCONST R6 K10
+ 0x7C0C0600, // 0018 CALL R3 3
+ 0xB80E0E00, // 0019 GETNGBL R3 K7
+ 0x8C0C070B, // 001A GETMET R3 R3 K11
+ 0x5814000C, // 001B LDCONST R5 K12
+ 0x7C0C0400, // 001C CALL R3 2
+ 0x80000600, // 001D RET 0
+ 0x880C0100, // 001E GETMBR R3 R0 K0
+ 0x000C070D, // 001F ADD R3 R3 K13
+ 0x5C080600, // 0020 MOVE R2 R3
+ 0xB80E1C00, // 0021 GETNGBL R3 K14
+ 0x8C0C070F, // 0022 GETMET R3 R3 K15
+ 0xB8161C00, // 0023 GETNGBL R5 K14
+ 0x88140B10, // 0024 GETMBR R5 R5 K16
+ 0x5818000A, // 0025 LDCONST R6 K10
+ 0x7C0C0600, // 0026 CALL R3 3
+ 0x780E0019, // 0027 JMPF R3 #0042
+ 0x8C0C0304, // 0028 GETMET R3 R1 K4
+ 0x5C140400, // 0029 MOVE R5 R2
+ 0x7C0C0400, // 002A CALL R3 2
+ 0x780E0015, // 002B JMPF R3 #0042
+ 0x8C0C0304, // 002C GETMET R3 R1 K4
+ 0x58140011, // 002D LDCONST R5 K17
+ 0x7C0C0400, // 002E CALL R3 2
+ 0x780E0005, // 002F JMPF R3 #0036
+ 0xB80E0E00, // 0030 GETNGBL R3 K7
+ 0x8C0C0708, // 0031 GETMET R3 R3 K8
+ 0x58140012, // 0032 LDCONST R5 K18
+ 0x5818000A, // 0033 LDCONST R6 K10
+ 0x7C0C0600, // 0034 CALL R3 3
+ 0x7002000B, // 0035 JMP #0042
+ 0xA40E2600, // 0036 IMPORT R3 K19
+ 0x60100011, // 0037 GETGBL R4 G17
+ 0x5C140400, // 0038 MOVE R5 R2
+ 0x58180014, // 0039 LDCONST R6 K20
+ 0x7C100400, // 003A CALL R4 2
+ 0x8C140915, // 003B GETMET R5 R4 K21
+ 0x7C140200, // 003C CALL R5 1
+ 0x8C180916, // 003D GETMET R6 R4 K22
+ 0x7C180200, // 003E CALL R6 1
+ 0x8C180717, // 003F GETMET R6 R3 K23
+ 0x5C200A00, // 0040 MOVE R8 R5
+ 0x7C180400, // 0041 CALL R6 2
+ 0x880C0100, // 0042 GETMBR R3 R0 K0
+ 0x000C0718, // 0043 ADD R3 R3 K24
+ 0x5C080600, // 0044 MOVE R2 R3
+ 0x8C0C0304, // 0045 GETMET R3 R1 K4
+ 0x5C140400, // 0046 MOVE R5 R2
+ 0x7C0C0400, // 0047 CALL R3 2
+ 0x780E000C, // 0048 JMPF R3 #0056
+ 0xB80E0E00, // 0049 GETNGBL R3 K7
+ 0x8C0C0708, // 004A GETMET R3 R3 K8
+ 0x00163202, // 004B ADD R5 K25 R2
+ 0x5818001A, // 004C LDCONST R6 K26
+ 0x7C0C0600, // 004D CALL R3 3
+ 0x8C0C0106, // 004E GETMET R3 R0 K6
+ 0x5C140400, // 004F MOVE R5 R2
+ 0x7C0C0400, // 0050 CALL R3 2
+ 0xB80E0E00, // 0051 GETNGBL R3 K7
+ 0x8C0C0708, // 0052 GETMET R3 R3 K8
+ 0x00163602, // 0053 ADD R5 K27 R2
+ 0x5818001A, // 0054 LDCONST R6 K26
+ 0x7C0C0600, // 0055 CALL R3 3
+ 0x880C0100, // 0056 GETMBR R3 R0 K0
+ 0x000C071C, // 0057 ADD R3 R3 K28
+ 0x5C080600, // 0058 MOVE R2 R3
+ 0x8C0C0304, // 0059 GETMET R3 R1 K4
+ 0x5C140400, // 005A MOVE R5 R2
+ 0x7C0C0400, // 005B CALL R3 2
+ 0x780E000C, // 005C JMPF R3 #006A
+ 0xB80E0E00, // 005D GETNGBL R3 K7
+ 0x8C0C0708, // 005E GETMET R3 R3 K8
+ 0x00163A02, // 005F ADD R5 K29 R2
+ 0x5818001A, // 0060 LDCONST R6 K26
+ 0x7C0C0600, // 0061 CALL R3 3
+ 0xB80E3C00, // 0062 GETNGBL R3 K30
+ 0x5C100400, // 0063 MOVE R4 R2
+ 0x7C0C0200, // 0064 CALL R3 1
+ 0xB80E0E00, // 0065 GETNGBL R3 K7
+ 0x8C0C0708, // 0066 GETMET R3 R3 K8
+ 0x00163E02, // 0067 ADD R5 K31 R2
+ 0x5818001A, // 0068 LDCONST R6 K26
+ 0x7C0C0600, // 0069 CALL R3 3
+ 0x80000000, // 006A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: run_bat
+********************************************************************/
+be_local_closure(run_bat, /* name */
+ be_nested_proto(
+ 13, /* nstack */
+ 2, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[10]) { /* constants */
+ /* K0 */ be_nested_string("string", 398550328, 6),
+ /* K1 */ be_nested_string("r", -150190315, 1),
+ /* K2 */ be_nested_string("readline", 1212709927, 8),
+ /* K3 */ be_const_int(0),
+ /* K4 */ be_nested_string("\n", 252472541, 1),
+ /* K5 */ be_nested_string("tasmota", 424643812, 7),
+ /* K6 */ be_nested_string("cmd", -158181397, 3),
+ /* K7 */ be_nested_string("close", 667630371, 5),
+ /* K8 */ be_nested_string("format", -1180859054, 6),
+ /* K9 */ be_nested_string("CFG: could not run %s (%s - %s)", 1428829580, 31),
+ }),
+ (be_nested_const_str("run_bat", -1758063998, 7)),
+ ((bstring*) &be_const_str_input),
+ ( &(const binstruction[54]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0x4C0C0000, // 0001 LDNIL R3
+ 0xA8020023, // 0002 EXBLK 0 #0027
+ 0x60100011, // 0003 GETGBL R4 G17
+ 0x5C140200, // 0004 MOVE R5 R1
+ 0x58180001, // 0005 LDCONST R6 K1
+ 0x7C100400, // 0006 CALL R4 2
+ 0x5C0C0800, // 0007 MOVE R3 R4
+ 0x50100200, // 0008 LDBOOL R4 1 0
+ 0x78120018, // 0009 JMPF R4 #0023
+ 0x8C100702, // 000A GETMET R4 R3 K2
+ 0x7C100200, // 000B CALL R4 1
+ 0x6014000C, // 000C GETGBL R5 G12
+ 0x5C180800, // 000D MOVE R6 R4
+ 0x7C140200, // 000E CALL R5 1
+ 0x1C140B03, // 000F EQ R5 R5 K3
+ 0x78160000, // 0010 JMPF R5 #0012
+ 0x70020010, // 0011 JMP #0023
+ 0x5415FFFE, // 0012 LDINT R5 -1
+ 0x94140805, // 0013 GETIDX R5 R4 R5
+ 0x1C140B04, // 0014 EQ R5 R5 K4
+ 0x78160002, // 0015 JMPF R5 #0019
+ 0x5415FFFD, // 0016 LDINT R5 -2
+ 0x40160605, // 0017 CONNECT R5 K3 R5
+ 0x94100805, // 0018 GETIDX R4 R4 R5
+ 0x6014000C, // 0019 GETGBL R5 G12
+ 0x5C180800, // 001A MOVE R6 R4
+ 0x7C140200, // 001B CALL R5 1
+ 0x24140B03, // 001C GT R5 R5 K3
+ 0x78160003, // 001D JMPF R5 #0022
+ 0xB8160A00, // 001E GETNGBL R5 K5
+ 0x8C140B06, // 001F GETMET R5 R5 K6
+ 0x5C1C0800, // 0020 MOVE R7 R4
+ 0x7C140400, // 0021 CALL R5 2
+ 0x7001FFE4, // 0022 JMP #0008
+ 0x8C100707, // 0023 GETMET R4 R3 K7
+ 0x7C100200, // 0024 CALL R4 1
+ 0xA8040001, // 0025 EXBLK 1 1
+ 0x7002000D, // 0026 JMP #0035
+ 0xAC100002, // 0027 CATCH R4 0 2
+ 0x7002000A, // 0028 JMP #0034
+ 0x60180001, // 0029 GETGBL R6 G1
+ 0x8C1C0508, // 002A GETMET R7 R2 K8
+ 0x58240009, // 002B LDCONST R9 K9
+ 0x5C280200, // 002C MOVE R10 R1
+ 0x5C2C0800, // 002D MOVE R11 R4
+ 0x5C300A00, // 002E MOVE R12 R5
+ 0x7C1C0A00, // 002F CALL R7 5
+ 0x7C180200, // 0030 CALL R6 1
+ 0x8C180707, // 0031 GETMET R6 R3 K7
+ 0x7C180200, // 0032 CALL R6 1
+ 0x70020000, // 0033 JMP #0035
+ 0xB0080000, // 0034 RAISE 2 R0 R0
+ 0x80000000, // 0035 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: page_autoconf_mgr
+********************************************************************/
+be_local_closure(page_autoconf_mgr, /* name */
+ be_nested_proto(
+ 19, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[38]) { /* constants */
+ /* K0 */ be_nested_string("webserver", 1572454038, 9),
+ /* K1 */ be_nested_string("string", 398550328, 6),
+ /* K2 */ be_nested_string("check_privileged_access", -602033328, 23),
+ /* K3 */ be_nested_string("content_start", -1357458227, 13),
+ /* K4 */ be_nested_string("Auto-configuration", 1665006109, 18),
+ /* K5 */ be_nested_string("content_send_style", 1087907647, 18),
+ /* K6 */ be_nested_string("content_send", 1673733649, 12),
+ /* K7 */ be_nested_string(" (This feature requires an internet connection)
", -1575700810, 74),
+ /* K8 */ be_nested_string("get_current_module_path", -1088293888, 23),
+ /* K9 */ be_nested_string("tr", 1195724803, 2),
+ /* K10 */ be_nested_string("_", -636741266, 1),
+ /* K11 */ be_nested_string(" ", 621580159, 1),
+ /* K12 */ be_nested_string("_error", 1132109656, 6),
+ /* K13 */ be_nested_string("<Error: apply new or remove>", -1439459347, 34),
+ /* K14 */ be_nested_string("<None>", -1692801798, 12),
+ /* K15 */ be_nested_string("", 2052843416, 25),
+ /* K24 */ be_nested_string("", 1926223891, 80),
+ /* K25 */ be_nested_string("", 452285201, 120),
+ }),
+ (be_nested_const_str("web_add_config_button", 639674325, 21)),
+ ((bstring*) &be_const_str_input),
+ ( &(const binstruction[ 5]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x8C080301, // 0001 GETMET R2 R1 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x7C080400, // 0003 CALL R2 2
+ 0x80000000, // 0004 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: is_first_time
+********************************************************************/
+be_local_closure(is_first_time, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_string("path", -2071507658, 4),
+ /* K1 */ be_nested_string("exists", 1002329533, 6),
+ /* K2 */ be_nested_string("/.autoconf", -2082892903, 10),
+ }),
+ (be_nested_const_str("is_first_time", 275242384, 13)),
+ ((bstring*) &be_const_str_input),
+ ( &(const binstruction[ 8]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x8C080301, // 0001 GETMET R2 R1 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x7C080400, // 0003 CALL R2 2
+ 0x780A0000, // 0004 JMPF R2 #0006
+ 0x50080001, // 0005 LDBOOL R2 0 1
+ 0x50080200, // 0006 LDBOOL R2 1 0
+ 0x80040400, // 0007 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(init, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[15]) { /* constants */
+ /* K0 */ be_nested_string("path", -2071507658, 4),
+ /* K1 */ be_nested_string("string", 398550328, 6),
+ /* K2 */ be_nested_string("listdir", 2005220720, 7),
+ /* K3 */ be_nested_string("/", 705468254, 1),
+ /* K4 */ be_nested_string("tasmota", 424643812, 7),
+ /* K5 */ be_nested_string("add_driver", 1654458371, 10),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_nested_string("find", -1108310694, 4),
+ /* K8 */ be_nested_string("_autoconf.zip", 1641927766, 13),
+ /* K9 */ be_nested_string("format", -1180859054, 6),
+ /* K10 */ be_nested_string("CFG: multiple autoconf files found, aborting ('%s' + '%s')", 197663371, 58),
+ /* K11 */ be_nested_string("_error", 1132109656, 6),
+ /* K12 */ be_const_int(1),
+ /* K13 */ be_nested_string("CFG: no '*_autoconf.zip' file found", -1047382425, 35),
+ /* K14 */ be_nested_string("_archive", -290407892, 8),
+ }),
+ (be_nested_const_str("init", 380752755, 4)),
+ ((bstring*) &be_const_str_input),
+ ( &(const binstruction[49]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x8C0C0302, // 0002 GETMET R3 R1 K2
+ 0x58140003, // 0003 LDCONST R5 K3
+ 0x7C0C0400, // 0004 CALL R3 2
+ 0x4C100000, // 0005 LDNIL R4
+ 0xB8160800, // 0006 GETNGBL R5 K4
+ 0x8C140B05, // 0007 GETMET R5 R5 K5
+ 0x5C1C0000, // 0008 MOVE R7 R0
+ 0x7C140400, // 0009 CALL R5 2
+ 0x58140006, // 000A LDCONST R5 K6
+ 0x6018000C, // 000B GETGBL R6 G12
+ 0x5C1C0600, // 000C MOVE R7 R3
+ 0x7C180200, // 000D CALL R6 1
+ 0x14180A06, // 000E LT R6 R5 R6
+ 0x781A0016, // 000F JMPF R6 #0027
+ 0x8C180507, // 0010 GETMET R6 R2 K7
+ 0x94200605, // 0011 GETIDX R8 R3 R5
+ 0x58240008, // 0012 LDCONST R9 K8
+ 0x7C180600, // 0013 CALL R6 3
+ 0x24180D06, // 0014 GT R6 R6 K6
+ 0x781A000E, // 0015 JMPF R6 #0025
+ 0x4C180000, // 0016 LDNIL R6
+ 0x20180806, // 0017 NE R6 R4 R6
+ 0x781A000A, // 0018 JMPF R6 #0024
+ 0x60180001, // 0019 GETGBL R6 G1
+ 0x8C1C0509, // 001A GETMET R7 R2 K9
+ 0x5824000A, // 001B LDCONST R9 K10
+ 0x5C280800, // 001C MOVE R10 R4
+ 0x942C0605, // 001D GETIDX R11 R3 R5
+ 0x7C1C0800, // 001E CALL R7 4
+ 0x7C180200, // 001F CALL R6 1
+ 0x50180200, // 0020 LDBOOL R6 1 0
+ 0x90021606, // 0021 SETMBR R0 K11 R6
+ 0x4C180000, // 0022 LDNIL R6
+ 0x80040C00, // 0023 RET 1 R6
+ 0x94100605, // 0024 GETIDX R4 R3 R5
+ 0x00140B0C, // 0025 ADD R5 R5 K12
+ 0x7001FFE3, // 0026 JMP #000B
+ 0x4C180000, // 0027 LDNIL R6
+ 0x1C180806, // 0028 EQ R6 R4 R6
+ 0x781A0004, // 0029 JMPF R6 #002F
+ 0x60180001, // 002A GETGBL R6 G1
+ 0x581C000D, // 002B LDCONST R7 K13
+ 0x7C180200, // 002C CALL R6 1
+ 0x4C180000, // 002D LDNIL R6
+ 0x80040C00, // 002E RET 1 R6
+ 0x90021C04, // 002F SETMBR R0 K14 R4
+ 0x80000000, // 0030 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: preinit
+********************************************************************/
+be_local_closure(preinit, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[10]) { /* constants */
+ /* K0 */ be_nested_string("_archive", -290407892, 8),
+ /* K1 */ be_nested_string("path", -2071507658, 4),
+ /* K2 */ be_nested_string("#preinit.be", 687035716, 11),
+ /* K3 */ be_nested_string("exists", 1002329533, 6),
+ /* K4 */ be_nested_string("tasmota", 424643812, 7),
+ /* K5 */ be_nested_string("log", 1062293841, 3),
+ /* K6 */ be_nested_string("CFG: loading ", -284605793, 13),
+ /* K7 */ be_const_int(3),
+ /* K8 */ be_nested_string("load", -435725847, 4),
+ /* K9 */ be_nested_string("CFG: loaded ", -584693758, 13),
+ }),
+ (be_nested_const_str("preinit", -1572960196, 7)),
+ ((bstring*) &be_const_str_input),
+ ( &(const binstruction[26]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x4C080000, // 0001 LDNIL R2
+ 0x1C040202, // 0002 EQ R1 R1 R2
+ 0x78060000, // 0003 JMPF R1 #0005
+ 0x80000200, // 0004 RET 0
+ 0xA4060200, // 0005 IMPORT R1 K1
+ 0x88080100, // 0006 GETMBR R2 R0 K0
+ 0x00080502, // 0007 ADD R2 R2 K2
+ 0x8C0C0303, // 0008 GETMET R3 R1 K3
+ 0x5C140400, // 0009 MOVE R5 R2
+ 0x7C0C0400, // 000A CALL R3 2
+ 0x780E000C, // 000B JMPF R3 #0019
+ 0xB80E0800, // 000C GETNGBL R3 K4
+ 0x8C0C0705, // 000D GETMET R3 R3 K5
+ 0x00160C02, // 000E ADD R5 K6 R2
+ 0x58180007, // 000F LDCONST R6 K7
+ 0x7C0C0600, // 0010 CALL R3 3
+ 0xB80E1000, // 0011 GETNGBL R3 K8
+ 0x5C100400, // 0012 MOVE R4 R2
+ 0x7C0C0200, // 0013 CALL R3 1
+ 0xB80E0800, // 0014 GETNGBL R3 K4
+ 0x8C0C0705, // 0015 GETMET R3 R3 K5
+ 0x00161202, // 0016 ADD R5 K9 R2
+ 0x58180007, // 0017 LDCONST R6 K7
+ 0x7C0C0600, // 0018 CALL R3 3
+ 0x80000000, // 0019 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: reset
+********************************************************************/
+be_local_closure(reset, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[13]) { /* constants */
+ /* K0 */ be_nested_string("path", -2071507658, 4),
+ /* K1 */ be_nested_string("string", 398550328, 6),
+ /* K2 */ be_nested_string("listdir", 2005220720, 7),
+ /* K3 */ be_nested_string("/", 705468254, 1),
+ /* K4 */ be_const_int(0),
+ /* K5 */ be_nested_string("find", -1108310694, 4),
+ /* K6 */ be_nested_string("_autoconf.zip", 1641927766, 13),
+ /* K7 */ be_nested_string("remove", -611183107, 6),
+ /* K8 */ be_nested_string("format", -1180859054, 6),
+ /* K9 */ be_nested_string("CFG: removed file '%s'", 2048602473, 22),
+ /* K10 */ be_const_int(1),
+ /* K11 */ be_nested_string("_archive", -290407892, 8),
+ /* K12 */ be_nested_string("_error", 1132109656, 6),
+ }),
+ (be_nested_const_str("reset", 1695364032, 5)),
+ ((bstring*) &be_const_str_input),
+ ( &(const binstruction[35]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x8C0C0302, // 0002 GETMET R3 R1 K2
+ 0x58140003, // 0003 LDCONST R5 K3
+ 0x7C0C0400, // 0004 CALL R3 2
+ 0x4C100000, // 0005 LDNIL R4
+ 0x58140004, // 0006 LDCONST R5 K4
+ 0x6018000C, // 0007 GETGBL R6 G12
+ 0x5C1C0600, // 0008 MOVE R7 R3
+ 0x7C180200, // 0009 CALL R6 1
+ 0x14180A06, // 000A LT R6 R5 R6
+ 0x781A0011, // 000B JMPF R6 #001E
+ 0x94180605, // 000C GETIDX R6 R3 R5
+ 0x8C1C0505, // 000D GETMET R7 R2 K5
+ 0x5C240C00, // 000E MOVE R9 R6
+ 0x58280006, // 000F LDCONST R10 K6
+ 0x7C1C0600, // 0010 CALL R7 3
+ 0x241C0F04, // 0011 GT R7 R7 K4
+ 0x781E0008, // 0012 JMPF R7 #001C
+ 0x8C1C0307, // 0013 GETMET R7 R1 K7
+ 0x5C240C00, // 0014 MOVE R9 R6
+ 0x7C1C0400, // 0015 CALL R7 2
+ 0x601C0001, // 0016 GETGBL R7 G1
+ 0x8C200508, // 0017 GETMET R8 R2 K8
+ 0x58280009, // 0018 LDCONST R10 K9
+ 0x5C2C0C00, // 0019 MOVE R11 R6
+ 0x7C200600, // 001A CALL R8 3
+ 0x7C1C0200, // 001B CALL R7 1
+ 0x00140B0A, // 001C ADD R5 R5 K10
+ 0x7001FFE8, // 001D JMP #0007
+ 0x4C180000, // 001E LDNIL R6
+ 0x90021606, // 001F SETMBR R0 K11 R6
+ 0x4C180000, // 0020 LDNIL R6
+ 0x90021806, // 0021 SETMBR R0 K12 R6
+ 0x80000000, // 0022 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: web_add_handler
+********************************************************************/
+be_local_closure(web_add_handler, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 2]) {
+ be_nested_proto(
+ 2, /* nstack */
+ 0, /* argc */
+ 0, /* varg */
+ 1, /* has upvals */
+ ( &(const bupvaldesc[ 1]) { /* upvals */
+ be_local_const_upval(1, 0),
+ }),
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_string("page_autoconf_mgr", -651030265, 17),
+ }),
+ (be_nested_const_str("", 607256038, 8)),
+ ((bstring*) &be_const_str_input),
+ ( &(const binstruction[ 4]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x7C000200, // 0002 CALL R0 1
+ 0x80040000, // 0003 RET 1 R0
+ })
+ ),
+ be_nested_proto(
+ 2, /* nstack */
+ 0, /* argc */
+ 0, /* varg */
+ 1, /* has upvals */
+ ( &(const bupvaldesc[ 1]) { /* upvals */
+ be_local_const_upval(1, 0),
+ }),
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_string("page_autoconf_ctl", -1841585800, 17),
+ }),
+ (be_nested_const_str("", 607256038, 8)),
+ ((bstring*) &be_const_str_input),
+ ( &(const binstruction[ 4]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x7C000200, // 0002 CALL R0 1
+ 0x80040000, // 0003 RET 1 R0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_string("webserver", 1572454038, 9),
+ /* K1 */ be_nested_string("on", 1630810064, 2),
+ /* K2 */ be_nested_string("/ac", -390315318, 3),
+ /* K3 */ be_nested_string("HTTP_GET", 1722467738, 8),
+ /* K4 */ be_nested_string("HTTP_POST", 1999554144, 9),
+ }),
+ (be_nested_const_str("web_add_handler", -304792334, 15)),
+ ((bstring*) &be_const_str_input),
+ ( &(const binstruction[13]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x8C080301, // 0001 GETMET R2 R1 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x84140000, // 0003 CLOSURE R5 P0
+ 0x88180303, // 0004 GETMBR R6 R1 K3
+ 0x7C080800, // 0005 CALL R2 4
+ 0x8C080301, // 0006 GETMET R2 R1 K1
+ 0x58100002, // 0007 LDCONST R4 K2
+ 0x84140001, // 0008 CLOSURE R5 P1
+ 0x88180304, // 0009 GETMBR R6 R1 K4
+ 0x7C080800, // 000A CALL R2 4
+ 0xA0000000, // 000B CLOSE R0
+ 0x80000000, // 000C RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: clear_first_time
+********************************************************************/
+be_local_closure(clear_first_time, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_string("path", -2071507658, 4),
+ /* K1 */ be_nested_string("remove", -611183107, 6),
+ /* K2 */ be_nested_string("/.autoconf", -2082892903, 10),
+ }),
+ (be_nested_const_str("clear_first_time", 632769909, 16)),
+ ((bstring*) &be_const_str_input),
+ ( &(const binstruction[ 5]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x8C080301, // 0001 GETMET R2 R1 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x7C080400, // 0003 CALL R2 2
+ 0x80000000, // 0004 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: get_current_module_path
+********************************************************************/
+be_local_closure(get_current_module_path, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_string("_archive", -290407892, 8),
+ }),
+ (be_nested_const_str("get_current_module_path", -1088293888, 23)),
+ ((bstring*) &be_const_str_input),
+ ( &(const binstruction[ 2]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x80040200, // 0001 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified class: Autoconf
+********************************************************************/
+be_local_class(Autoconf,
+ 2,
+ NULL,
+ be_nested_map(18,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_nested_key("page_autoconf_ctl", -1841585800, 17, -1), be_const_closure(page_autoconf_ctl_closure) },
+ { be_nested_key("autoexec", -618105405, 8, -1), be_const_closure(autoexec_closure) },
+ { be_nested_key("run_bat", -1758063998, 7, 6), be_const_closure(run_bat_closure) },
+ { be_nested_key("page_autoconf_mgr", -651030265, 17, -1), be_const_closure(page_autoconf_mgr_closure) },
+ { be_nested_key("get_current_module_name", -1915696556, 23, -1), be_const_closure(get_current_module_name_closure) },
+ { be_nested_key("delete_all_configs", -1912899718, 18, 13), be_const_closure(delete_all_configs_closure) },
+ { be_nested_key("set_first_time", -1183719746, 14, -1), be_const_closure(set_first_time_closure) },
+ { be_nested_key("load_templates", -781097163, 14, -1), be_const_closure(load_templates_closure) },
+ { be_nested_key("_archive", -290407892, 8, -1), be_const_var(0) },
+ { be_nested_key("web_add_config_button", 639674325, 21, -1), be_const_closure(web_add_config_button_closure) },
+ { be_nested_key("is_first_time", 275242384, 13, -1), be_const_closure(is_first_time_closure) },
+ { be_nested_key("init", 380752755, 4, -1), be_const_closure(init_closure) },
+ { be_nested_key("preinit", -1572960196, 7, 5), be_const_closure(preinit_closure) },
+ { be_nested_key("reset", 1695364032, 5, 17), be_const_closure(reset_closure) },
+ { be_nested_key("web_add_handler", -304792334, 15, 4), be_const_closure(web_add_handler_closure) },
+ { be_nested_key("clear_first_time", 632769909, 16, 11), be_const_closure(clear_first_time_closure) },
+ { be_nested_key("_error", 1132109656, 6, -1), be_const_var(1) },
+ { be_nested_key("get_current_module_path", -1088293888, 23, -1), be_const_closure(get_current_module_path_closure) },
+ })),
+ (be_nested_const_str("Autoconf", 984011268, 8))
+);
+
+/********************************************************************
+** Solidified function: _anonymous_
+********************************************************************/
+be_local_closure(_anonymous_, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_const_class(be_class_Autoconf),
+ }),
+ (be_nested_const_str("_anonymous_", 1957281476, 11)),
+ ((bstring*) &be_const_str_input),
+ ( &(const binstruction[ 5]) { /* code */
+ 0x58040000, // 0000 LDCONST R1 K0
+ 0xB4000000, // 0001 CLASS K0
+ 0x5C080200, // 0002 MOVE R2 R1
+ 0x7C080000, // 0003 CALL R2 0
+ 0x80040400, // 0004 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified module: autoconf
+********************************************************************/
+be_local_module(autoconf,
+ "autoconf",
+ be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_nested_key("init", 380752755, 4, -1), be_const_closure(_anonymous__closure) },
+ }))
+);
+BE_EXPORT_VARIABLE be_define_const_native_module(autoconf);
+/********************************************************************/
diff --git a/lib/libesp32/Berry/default/be_display_lib.c b/lib/libesp32/Berry/default/be_display_lib.c
new file mode 100644
index 000000000..2d8bf9ff7
--- /dev/null
+++ b/lib/libesp32/Berry/default/be_display_lib.c
@@ -0,0 +1,29 @@
+/********************************************************************
+ * Tasmota lib
+ *
+ * To use: `import display`
+ *
+ * Initialize Universal Display driver
+ *******************************************************************/
+#include "be_constobj.h"
+
+#ifdef USE_DISPLAY
+
+// Tasmota specific
+
+extern int be_disp_start(bvm *vm);
+
+/********************************************************************
+** Solidified module: display
+********************************************************************/
+be_local_module(display,
+ "display",
+ be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_nested_key("start", 1697318111, 5, -1), be_const_func(be_disp_start) },
+ }))
+);
+BE_EXPORT_VARIABLE be_define_const_native_module(display);
+/********************************************************************/
+
+#endif // USE_DISPLAY
\ No newline at end of file
diff --git a/lib/libesp32/Berry/default/be_modtab.c b/lib/libesp32/Berry/default/be_modtab.c
index 46b5528a9..1b219658f 100644
--- a/lib/libesp32/Berry/default/be_modtab.c
+++ b/lib/libesp32/Berry/default/be_modtab.c
@@ -26,8 +26,10 @@ be_extern_native_module(strict);
/* Tasmota specific */
be_extern_native_module(python_compat);
be_extern_native_module(persist);
+be_extern_native_module(autoconf);
be_extern_native_module(light);
be_extern_native_module(gpio);
+be_extern_native_module(display);
be_extern_native_module(energy);
be_extern_native_module(webserver);
be_extern_native_module(flash);
@@ -85,7 +87,13 @@ BERRY_LOCAL const bntvmodule* const be_module_table[] = {
&be_native_module(python_compat),
&be_native_module(path),
&be_native_module(persist),
+#ifdef USE_AUTOCONF
+ &be_native_module(autoconf),
+#endif // USE_AUTOCONF
&be_native_module(gpio),
+#ifdef USE_DISPLAY
+ &be_native_module(display),
+#endif // USE_DISPLAY
#ifdef USE_LIGHT
&be_native_module(light),
#endif
diff --git a/lib/libesp32/Berry/default/be_tasmotalib.c b/lib/libesp32/Berry/default/be_tasmotalib.c
index dd5c986d8..dc07a8562 100644
--- a/lib/libesp32/Berry/default/be_tasmotalib.c
+++ b/lib/libesp32/Berry/default/be_tasmotalib.c
@@ -141,7 +141,7 @@ be_local_closure(init, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[11]) { /* constants */
+ ( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_string("global", 503252654, 6),
/* K1 */ be_nested_string("ctypes_bytes_dyn", 915205307, 16),
/* K2 */ be_nested_string("_global_addr", 533766721, 12),
@@ -153,10 +153,12 @@ be_local_closure(init, /* name */
/* K8 */ be_nested_string("settings", 1745255176, 8),
/* K9 */ be_nested_string("toptr", -915119842, 5),
/* K10 */ be_nested_string("_settings_def", -519406989, 13),
+ /* K11 */ be_nested_string("wd", 1531424278, 2),
+ /* K12 */ be_nested_string("", -2128831035, 0),
}),
- ((bstring*) &be_const_str_init),
- (be_nested_const_str("tasmota.be", 1128870755, 10)),
- ( &(const binstruction[23]) { /* code */
+ (be_nested_const_str("init", 380752755, 4)),
+ ((bstring*) &be_const_str_input),
+ ( &(const binstruction[24]) { /* code */
0xB8060200, // 0000 GETNGBL R1 K1
0x88080102, // 0001 GETMBR R2 R0 K2
0x880C0103, // 0002 GETMBR R3 R0 K3
@@ -179,7 +181,8 @@ be_local_closure(init, /* name */
0x8814010A, // 0013 GETMBR R5 R0 K10
0x7C0C0400, // 0014 CALL R3 2
0x90021003, // 0015 SETMBR R0 K8 R3
- 0x80000000, // 0016 RET 0
+ 0x9002170C, // 0016 SETMBR R0 K11 K12
+ 0x80000000, // 0017 RET 0
})
)
);
@@ -850,7 +853,7 @@ be_local_closure(time_str, /* name */
********************************************************************/
be_local_closure(load, /* name */
be_nested_proto(
- 15, /* nstack */
+ 19, /* nstack */
2, /* argc */
0, /* varg */
0, /* has upvals */
@@ -858,116 +861,140 @@ be_local_closure(load, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[18]) { /* constants */
+ ( &(const bvalue[21]) { /* constants */
/* K0 */ be_nested_string("string", 398550328, 6),
/* K1 */ be_nested_string("path", -2071507658, 4),
- /* K2 */ be_nested_string("find", -1108310694, 4),
- /* K3 */ be_nested_string(".", 722245873, 1),
- /* K4 */ be_const_int(0),
- /* K5 */ be_nested_string(".be", 1325797348, 3),
- /* K6 */ be_nested_string("split", -2017972765, 5),
- /* K7 */ be_const_int(1),
- /* K8 */ be_nested_string("be", 942383232, 2),
- /* K9 */ be_nested_string("bec", 1336821081, 3),
- /* K10 */ be_nested_string("io_error", 1970281036, 8),
- /* K11 */ be_nested_string("file extension is not '.be' or '.bec'", -1199247657, 37),
- /* K12 */ be_nested_string("c", -435409838, 1),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_string("/", 705468254, 1),
+ /* K4 */ be_nested_string("split", -2017972765, 5),
+ /* K5 */ be_nested_string("#", 638357778, 1),
+ /* K6 */ be_const_int(1),
+ /* K7 */ be_nested_string("find", -1108310694, 4),
+ /* K8 */ be_nested_string(".", 722245873, 1),
+ /* K9 */ be_nested_string(".be", 1325797348, 3),
+ /* K10 */ be_nested_string(".bec", -309694075, 4),
+ /* K11 */ be_nested_string("io_error", 1970281036, 8),
+ /* K12 */ be_nested_string("file extension is not '.be' or '.bec'", -1199247657, 37),
/* K13 */ be_nested_string("last_modified", 772177145, 13),
- /* K14 */ be_nested_string("file", -1427482813, 4),
- /* K15 */ be_nested_string("save", -855671224, 4),
- /* K16 */ be_nested_string("format", -1180859054, 6),
- /* K17 */ be_nested_string("BRY: could not save compiled file %s (%s)", 736659787, 41),
+ /* K14 */ be_nested_string("c", -435409838, 1),
+ /* K15 */ be_nested_string("wd", 1531424278, 2),
+ /* K16 */ be_nested_string("", -2128831035, 0),
+ /* K17 */ be_nested_string("file", -1427482813, 4),
+ /* K18 */ be_nested_string("save", -855671224, 4),
+ /* K19 */ be_nested_string("format", -1180859054, 6),
+ /* K20 */ be_nested_string("BRY: could not save compiled file %s (%s)", 736659787, 41),
}),
(be_nested_const_str("load", -435725847, 4)),
((bstring*) &be_const_str_input),
- ( &(const binstruction[87]) { /* code */
+ ( &(const binstruction[108]) { /* code */
0xA40A0000, // 0000 IMPORT R2 K0
0xA40E0200, // 0001 IMPORT R3 K1
- 0x8C100502, // 0002 GETMET R4 R2 K2
- 0x5C180200, // 0003 MOVE R6 R1
- 0x581C0003, // 0004 LDCONST R7 K3
- 0x7C100600, // 0005 CALL R4 3
- 0x14100904, // 0006 LT R4 R4 K4
- 0x78120000, // 0007 JMPF R4 #0009
- 0x00040305, // 0008 ADD R1 R1 K5
- 0x8C100506, // 0009 GETMET R4 R2 K6
- 0x5C180200, // 000A MOVE R6 R1
- 0x581C0003, // 000B LDCONST R7 K3
- 0x7C100600, // 000C CALL R4 3
- 0x6014000C, // 000D GETGBL R5 G12
- 0x5C180800, // 000E MOVE R6 R4
- 0x7C140200, // 000F CALL R5 1
- 0x18140B07, // 0010 LE R5 R5 K7
- 0x74160007, // 0011 JMPT R5 #001A
- 0x5415FFFE, // 0012 LDINT R5 -1
- 0x94140805, // 0013 GETIDX R5 R4 R5
- 0x20140B08, // 0014 NE R5 R5 K8
- 0x78160004, // 0015 JMPF R5 #001B
- 0x5415FFFE, // 0016 LDINT R5 -1
- 0x94140805, // 0017 GETIDX R5 R4 R5
- 0x20140B09, // 0018 NE R5 R5 K9
- 0x78160000, // 0019 JMPF R5 #001B
- 0xB006150B, // 001A RAISE 1 K10 K11
- 0x5415FFFE, // 001B LDINT R5 -1
- 0x94140205, // 001C GETIDX R5 R1 R5
- 0x1C140B0C, // 001D EQ R5 R5 K12
- 0x8C18070D, // 001E GETMET R6 R3 K13
- 0x5C200200, // 001F MOVE R8 R1
- 0x7C180400, // 0020 CALL R6 2
- 0x78160005, // 0021 JMPF R5 #0028
- 0x4C1C0000, // 0022 LDNIL R7
- 0x1C1C0C07, // 0023 EQ R7 R6 R7
- 0x781E0001, // 0024 JMPF R7 #0027
- 0x501C0000, // 0025 LDBOOL R7 0 0
- 0x80040E00, // 0026 RET 1 R7
- 0x70020013, // 0027 JMP #003C
- 0x8C1C070D, // 0028 GETMET R7 R3 K13
- 0x0024030C, // 0029 ADD R9 R1 K12
- 0x7C1C0400, // 002A CALL R7 2
- 0x4C200000, // 002B LDNIL R8
- 0x1C200C08, // 002C EQ R8 R6 R8
- 0x78220004, // 002D JMPF R8 #0033
- 0x4C200000, // 002E LDNIL R8
- 0x1C200E08, // 002F EQ R8 R7 R8
- 0x78220001, // 0030 JMPF R8 #0033
- 0x50200000, // 0031 LDBOOL R8 0 0
- 0x80041000, // 0032 RET 1 R8
- 0x4C200000, // 0033 LDNIL R8
- 0x20200E08, // 0034 NE R8 R7 R8
- 0x78220005, // 0035 JMPF R8 #003C
- 0x4C200000, // 0036 LDNIL R8
- 0x1C200C08, // 0037 EQ R8 R6 R8
- 0x74220001, // 0038 JMPT R8 #003B
- 0x28200E06, // 0039 GE R8 R7 R6
- 0x78220000, // 003A JMPF R8 #003C
- 0x50140200, // 003B LDBOOL R5 1 0
- 0x601C000D, // 003C GETGBL R7 G13
- 0x5C200200, // 003D MOVE R8 R1
- 0x5824000E, // 003E LDCONST R9 K14
- 0x7C1C0400, // 003F CALL R7 2
- 0x74160011, // 0040 JMPT R5 #0053
- 0xA8020005, // 0041 EXBLK 0 #0048
- 0x8C20010F, // 0042 GETMET R8 R0 K15
- 0x0028030C, // 0043 ADD R10 R1 K12
- 0x5C2C0E00, // 0044 MOVE R11 R7
- 0x7C200600, // 0045 CALL R8 3
- 0xA8040001, // 0046 EXBLK 1 1
- 0x7002000A, // 0047 JMP #0053
- 0xAC200001, // 0048 CATCH R8 0 1
- 0x70020007, // 0049 JMP #0052
- 0x60240001, // 004A GETGBL R9 G1
- 0x8C280510, // 004B GETMET R10 R2 K16
- 0x58300011, // 004C LDCONST R12 K17
- 0x0034030C, // 004D ADD R13 R1 K12
- 0x5C381000, // 004E MOVE R14 R8
- 0x7C280800, // 004F CALL R10 4
- 0x7C240200, // 0050 CALL R9 1
- 0x70020000, // 0051 JMP #0053
- 0xB0080000, // 0052 RAISE 2 R0 R0
- 0x5C200E00, // 0053 MOVE R8 R7
- 0x7C200000, // 0054 CALL R8 0
- 0x50200200, // 0055 LDBOOL R8 1 0
- 0x80041000, // 0056 RET 1 R8
+ 0x6010000C, // 0002 GETGBL R4 G12
+ 0x5C140200, // 0003 MOVE R5 R1
+ 0x7C100200, // 0004 CALL R4 1
+ 0x1C100902, // 0005 EQ R4 R4 K2
+ 0x78120001, // 0006 JMPF R4 #0009
+ 0x50100000, // 0007 LDBOOL R4 0 0
+ 0x80040800, // 0008 RET 1 R4
+ 0x94100302, // 0009 GETIDX R4 R1 K2
+ 0x20100903, // 000A NE R4 R4 K3
+ 0x78120000, // 000B JMPF R4 #000D
+ 0x00060601, // 000C ADD R1 K3 R1
+ 0x8C100504, // 000D GETMET R4 R2 K4
+ 0x5C180200, // 000E MOVE R6 R1
+ 0x581C0005, // 000F LDCONST R7 K5
+ 0x7C100600, // 0010 CALL R4 3
+ 0x94140902, // 0011 GETIDX R5 R4 K2
+ 0x5419FFFE, // 0012 LDINT R6 -1
+ 0x94180806, // 0013 GETIDX R6 R4 R6
+ 0x601C000C, // 0014 GETGBL R7 G12
+ 0x5C200800, // 0015 MOVE R8 R4
+ 0x7C1C0200, // 0016 CALL R7 1
+ 0x241C0F06, // 0017 GT R7 R7 K6
+ 0x8C200507, // 0018 GETMET R8 R2 K7
+ 0x5C280C00, // 0019 MOVE R10 R6
+ 0x582C0008, // 001A LDCONST R11 K8
+ 0x7C200600, // 001B CALL R8 3
+ 0x14201102, // 001C LT R8 R8 K2
+ 0x78220001, // 001D JMPF R8 #0020
+ 0x00040309, // 001E ADD R1 R1 K9
+ 0x00180D09, // 001F ADD R6 R6 K9
+ 0x5421FFFC, // 0020 LDINT R8 -3
+ 0x5425FFFE, // 0021 LDINT R9 -1
+ 0x40201009, // 0022 CONNECT R8 R8 R9
+ 0x94200C08, // 0023 GETIDX R8 R6 R8
+ 0x1C201109, // 0024 EQ R8 R8 K9
+ 0x5425FFFB, // 0025 LDINT R9 -4
+ 0x5429FFFE, // 0026 LDINT R10 -1
+ 0x4024120A, // 0027 CONNECT R9 R9 R10
+ 0x94240C09, // 0028 GETIDX R9 R6 R9
+ 0x1C24130A, // 0029 EQ R9 R9 K10
+ 0x74220001, // 002A JMPT R8 #002D
+ 0x74260000, // 002B JMPT R9 #002D
+ 0xB006170C, // 002C RAISE 1 K11 K12
+ 0x8C28070D, // 002D GETMET R10 R3 K13
+ 0x5C300A00, // 002E MOVE R12 R5
+ 0x7C280400, // 002F CALL R10 2
+ 0x78260005, // 0030 JMPF R9 #0037
+ 0x4C2C0000, // 0031 LDNIL R11
+ 0x1C2C140B, // 0032 EQ R11 R10 R11
+ 0x782E0001, // 0033 JMPF R11 #0036
+ 0x502C0000, // 0034 LDBOOL R11 0 0
+ 0x80041600, // 0035 RET 1 R11
+ 0x70020013, // 0036 JMP #004B
+ 0x8C2C070D, // 0037 GETMET R11 R3 K13
+ 0x0034030E, // 0038 ADD R13 R1 K14
+ 0x7C2C0400, // 0039 CALL R11 2
+ 0x4C300000, // 003A LDNIL R12
+ 0x1C30140C, // 003B EQ R12 R10 R12
+ 0x78320004, // 003C JMPF R12 #0042
+ 0x4C300000, // 003D LDNIL R12
+ 0x1C30160C, // 003E EQ R12 R11 R12
+ 0x78320001, // 003F JMPF R12 #0042
+ 0x50300000, // 0040 LDBOOL R12 0 0
+ 0x80041800, // 0041 RET 1 R12
+ 0x4C300000, // 0042 LDNIL R12
+ 0x2030160C, // 0043 NE R12 R11 R12
+ 0x78320005, // 0044 JMPF R12 #004B
+ 0x4C300000, // 0045 LDNIL R12
+ 0x1C30140C, // 0046 EQ R12 R10 R12
+ 0x74320001, // 0047 JMPT R12 #004A
+ 0x2830160A, // 0048 GE R12 R11 R10
+ 0x78320000, // 0049 JMPF R12 #004B
+ 0x50240200, // 004A LDBOOL R9 1 0
+ 0x781E0002, // 004B JMPF R7 #004F
+ 0x002C0B05, // 004C ADD R11 R5 K5
+ 0x90021E0B, // 004D SETMBR R0 K15 R11
+ 0x70020000, // 004E JMP #0050
+ 0x90021F10, // 004F SETMBR R0 K15 K16
+ 0x602C000D, // 0050 GETGBL R11 G13
+ 0x5C300200, // 0051 MOVE R12 R1
+ 0x58340011, // 0052 LDCONST R13 K17
+ 0x7C2C0400, // 0053 CALL R11 2
+ 0x74260012, // 0054 JMPT R9 #0068
+ 0x741E0011, // 0055 JMPT R7 #0068
+ 0xA8020005, // 0056 EXBLK 0 #005D
+ 0x8C300112, // 0057 GETMET R12 R0 K18
+ 0x0038030E, // 0058 ADD R14 R1 K14
+ 0x5C3C1600, // 0059 MOVE R15 R11
+ 0x7C300600, // 005A CALL R12 3
+ 0xA8040001, // 005B EXBLK 1 1
+ 0x7002000A, // 005C JMP #0068
+ 0xAC300001, // 005D CATCH R12 0 1
+ 0x70020007, // 005E JMP #0067
+ 0x60340001, // 005F GETGBL R13 G1
+ 0x8C380513, // 0060 GETMET R14 R2 K19
+ 0x58400014, // 0061 LDCONST R16 K20
+ 0x0044030E, // 0062 ADD R17 R1 K14
+ 0x5C481800, // 0063 MOVE R18 R12
+ 0x7C380800, // 0064 CALL R14 4
+ 0x7C340200, // 0065 CALL R13 1
+ 0x70020000, // 0066 JMP #0068
+ 0xB0080000, // 0067 RAISE 2 R0 R0
+ 0x5C301600, // 0068 MOVE R12 R11
+ 0x7C300000, // 0069 CALL R12 0
+ 0x50300200, // 006A LDBOOL R12 1 0
+ 0x80041800, // 006B RET 1 R12
})
)
);
@@ -1856,6 +1883,7 @@ class be_class_tasmota (scope: global, name: Tasmota) {
global, var
settings, var
cmd_res, var
+ wd, var
_global_def, comptr(&be_tasmota_global_struct)
_settings_def, comptr(&be_tasmota_settings_struct)
diff --git a/lib/libesp32/Berry/default/embedded/Tasmota.be b/lib/libesp32/Berry/default/embedded/Tasmota.be
index 5bccfa66c..e1d7ef10e 100644
--- a/lib/libesp32/Berry/default/embedded/Tasmota.be
+++ b/lib/libesp32/Berry/default/embedded/Tasmota.be
@@ -27,6 +27,7 @@ class Tasmota
var cmd_res # store the command result, nil if disables, true if capture enabled, contains return value
var global # mapping to TasmotaGlobal
var settings
+ var wd # last working directory
def init()
# instanciate the mapping object to TasmotaGlobal
@@ -36,6 +37,7 @@ class Tasmota
if settings_addr
self.settings = ctypes_bytes_dyn(introspect.toptr(settings_addr), self._settings_def)
end
+ self.wd = ""
end
# create a specific sub-class for rules: pattern(string) -> closure
@@ -324,21 +326,39 @@ class Tasmota
import string
import path
- # if the filename has no '.' append '.be'
- if string.find(f, '.') < 0
+ # fail if empty string
+ if size(f) == 0 return false end
+ # Ex: f = 'app.zip#autoexec'
+
+ # add leading '/' if absent
+ if f[0] != '/' f = '/' + f end
+ # Ex: f = '/app.zip#autoexec'
+
+ var f_items = string.split(f, '#')
+ var f_prefix = f_items[0]
+ var f_suffix = f_items[-1] # last token
+ var f_archive = size(f_items) > 1 # is the file in an archive
+
+ # if no dot, add the default '.be' extension
+ if string.find(f_suffix, '.') < 0 # does the final file has a '.'
f += ".be"
+ f_suffix += ".be"
end
+ # Ex: f = '/app.zip#autoexec.be'
+
+ # if the filename has no '.' append '.be'
+ var suffix_be = f_suffix[-3..-1] == '.be'
+ var suffix_bec = f_suffix[-4..-1] == '.bec'
+ # Ex: f = '/app.zip#autoexec.be', f_suffix = 'autoexec.be', suffix_be = true, suffix_bec = false
# check that the file ends with '.be' of '.bec'
- var fl = string.split(f,'.')
- if (size(fl) <= 1 || (fl[-1] != 'be' && fl[-1] != 'bec'))
+ if !suffix_be && !suffix_bec
raise "io_error", "file extension is not '.be' or '.bec'"
end
- var is_bytecode = f[-1] == 'c' # file is Berry source and not bytecode
- var f_time = path.last_modified(f)
+ var f_time = path.last_modified(f_prefix)
- if is_bytecode
+ if suffix_bec
if f_time == nil return false end # file does not exist
# f is the right file, continue
else
@@ -348,13 +368,20 @@ class Tasmota
# bytecode exists and is more recent than berry source, use bytecode
##### temporarily disable loading from bec file
# f = f + "c" # use bytecode name
- is_bytecode = true
+ suffix_bec = true
end
end
+ # recall the working directory
+ if f_archive
+ self.wd = f_prefix + "#"
+ else
+ self.wd = ""
+ end
+
var c = compile(f, 'file')
# save the compiled bytecode
- if !is_bytecode
+ if !suffix_bec && !f_archive
try
self.save(f + 'c', c)
except .. as e
diff --git a/lib/libesp32/Berry/default/embedded/autoconf.be b/lib/libesp32/Berry/default/embedded/autoconf.be
new file mode 100644
index 000000000..3be35fe1e
--- /dev/null
+++ b/lib/libesp32/Berry/default/embedded/autoconf.be
@@ -0,0 +1,387 @@
+#- autocong module for Berry -#
+#- -#
+#- To solidify: -#
+#-
+ # load only persis_module and persist_module.init
+ import autoconf
+ solidify.dump(autoconf_module)
+ # copy and paste into `be_autoconf_lib.c`
+-#
+#-
+
+# For external compile:
+
+display = module("display")
+self = nil
+tasmota = nil
+def load() end
+
+-#
+
+var autoconf_module = module("autoconf")
+
+autoconf_module.init = def (m)
+
+ class Autoconf
+ var _archive
+ var _error
+
+ def init()
+ import path
+ import string
+
+ var dir = path.listdir("/")
+ var entry
+ tasmota.add_driver(self)
+
+ var i = 0
+ while i < size(dir)
+ if string.find(dir[i], "_autoconf.zip") > 0 # does the file contain '*_autoconf.zip'
+ if entry != nil
+ # we have multiple configuration files, not allowed
+ print(string.format("CFG: multiple autoconf files found, aborting ('%s' + '%s')", entry, dir[i]))
+ self._error = true
+ return nil
+ end
+ entry = dir[i]
+ end
+ i += 1
+ end
+
+ if entry == nil
+ print("CFG: no '*_autoconf.zip' file found")
+ return nil
+ end
+
+ self._archive = entry
+ end
+
+
+ # ####################################################################################################
+ # Manage first time marker
+ # ####################################################################################################
+ def is_first_time()
+ import path
+ return !path.exists("/.autoconf")
+ end
+ def set_first_time()
+ var f = open("/.autoconf", "w")
+ f.close()
+ end
+ def clear_first_time()
+ import path
+ path.remove("/.autoconf")
+ end
+
+ # ####################################################################################################
+ # Delete all autoconfig files present
+ # ####################################################################################################
+ def delete_all_configs()
+ import path
+ import string
+ var dir = path.listdir("/")
+
+ for d:dir
+ if string.find(d, "_autoconf.zip") > 0 # does the file contain '*_autoconf.zip'
+ path.remove(d)
+ end
+ end
+ end
+
+ # ####################################################################################################
+ # Get current module
+ # contains the name of the archive without leading `/`, ex: `M5Stack_Fire_autoconf.zip`
+ # or `nil` if none
+ # ####################################################################################################
+ def get_current_module_path()
+ return self._archive
+ end
+ def get_current_module_name()
+ return self._archive[0..-13]
+ end
+
+ # ####################################################################################################
+ # Load templates from Github
+ # ####################################################################################################
+ def load_templates()
+ import string
+ import json
+ try
+ var url = string.format("https://raw.githubusercontent.com/tasmota/autoconf/main/%s_manifest.json", tasmota.arch())
+ tasmota.log(string.format("CFG: loading '%s'", url), 3)
+ # load the template
+ var cl = webclient()
+ cl.begin(url)
+ var r = cl.GET()
+ if r != 200
+ tasmota.log(string.format("CFG: return_code=%i", r), 2)
+ return nil
+ end
+ var s = cl.get_string()
+ cl.close()
+ # convert to json
+ var j = json.load(s)
+ tasmota.log(string.format("CFG: loaded '%s'", str(j)), 3)
+
+ var t = j.find("zip")
+ if isinstance(t, list)
+ return t
+ end
+
+ return nil
+ except .. as e, m
+ tasmota.log(string.format("CFG: exception '%s' - '%s'", e, m), 2)
+ return nil
+ end
+ end
+
+ # ####################################################################################################
+ # Init web handlers
+ # ####################################################################################################
+ # Displays a "Autocong" button on the configuration page
+ def web_add_config_button()
+ import webserver
+ webserver.content_send("")
+ end
+
+
+ # This HTTP GET manager controls which web controls are displayed
+ def page_autoconf_mgr()
+ import webserver
+ import string
+ if !webserver.check_privileged_access() return nil end
+
+ webserver.content_start('Auto-configuration')
+ webserver.content_send_style()
+ webserver.content_send(" (This feature requires an internet connection)
")
+
+ var cur_module = self.get_current_module_path()
+ var cur_module_display = cur_module ? string.tr(self.get_current_module_path(), "_", " ") : self._error ? "<Error: apply new or remove>" : "<None>"
+
+ webserver.content_send("")
+
+ webserver.content_send("")
+ webserver.content_button(webserver.BUTTON_CONFIGURATION)
+ webserver.content_stop()
+ end
+
+ # ####################################################################################################
+ # Web controller
+ #
+ # Applies the changes and restart
+ # ####################################################################################################
+ # This HTTP POST manager handles the submitted web form data
+ def page_autoconf_ctl()
+ import webserver
+ import string
+ import path
+ if !webserver.check_privileged_access() return nil end
+
+ try
+ if webserver.has_arg("reapply")
+ tasmota.log("CFG: removing first time marker", 2);
+ # print("CFG: removing first time marker")
+ self.clear_first_time()
+ #- and force restart -#
+ webserver.redirect("/?rst=")
+
+ elif webserver.has_arg("zip")
+ # remove any remaining autoconf file
+ tasmota.log("CFG: removing autoconf files", 2);
+ # print("CFG: removing autoconf files")
+ self.delete_all_configs()
+
+ # get the name of the configuration file
+ var arch_name = webserver.arg("zip")
+
+ if arch_name != "reset"
+ var url = string.format("https://raw.githubusercontent.com/tasmota/autoconf/main/%s/%s_autoconf.zip", tasmota.arch(), arch_name)
+ tasmota.log(string.format("CFG: downloading '%s'", url), 2);
+
+ var local_file = string.format("%s_autoconf.zip", arch_name)
+
+ # download file and write directly to file system
+ var cl = webclient()
+ cl.begin(url)
+ var r = cl.GET()
+ if r != 200 raise "connection_error", string.format("return code=%i", r) end
+ cl.write_file(local_file)
+ cl.close()
+ end
+
+ # remove marker to reapply template
+ self.clear_first_time()
+
+ #- and force restart -#
+ webserver.redirect("/?rst=")
+ else
+ raise "value_error", "Unknown command"
+ end
+ except .. as e, m
+ print(string.format("CFG: Exception> '%s' - %s", e, m))
+ #- display error page -#
+ webserver.content_start("Parameter error") #- title of the web page -#
+ webserver.content_send_style() #- send standard Tasmota styles -#
+
+ webserver.content_send(string.format("Exception:
'%s'
%s
", e, m))
+
+ webserver.content_button(webserver.BUTTON_CONFIGURATION) #- button back to management page -#
+ webserver.content_stop() #- end of web page -#
+ end
+ end
+
+ # Add HTTP POST and GET handlers
+ def web_add_handler()
+ import webserver
+ webserver.on('/ac', / -> self.page_autoconf_mgr(), webserver.HTTP_GET)
+ webserver.on('/ac', / -> self.page_autoconf_ctl(), webserver.HTTP_POST)
+ end
+
+
+ # reset the configuration information (but don't restart)
+ # i.e. remove any autoconf file
+ def reset()
+ import path
+ import string
+
+ var dir = path.listdir("/")
+ var entry
+
+ var i = 0
+ while i < size(dir)
+ var fname = dir[i]
+ if string.find(fname, "_autoconf.zip") > 0 # does the file contain '*_autoconf.zip'
+ path.remove(fname)
+ print(string.format("CFG: removed file '%s'", fname))
+ end
+ i += 1
+ end
+
+ self._archive = nil
+ self._error = nil
+ end
+
+ def preinit()
+ if self._archive == nil return end
+ # try to launch `preinit.be`
+ import path
+
+ var fname = self._archive + '#preinit.be'
+ if path.exists(fname)
+ tasmota.log("CFG: loading "+fname, 3)
+ load(fname)
+ tasmota.log("CFG: loaded "+fname, 3)
+ end
+ end
+
+ def run_bat(fname) # read a '*.bat' file and run each command
+ import string
+ var f
+ try
+ f = open(fname, "r") # open file in read-only mode, it is expected to exist
+ while true
+ var line = f.readline() # read each line, can contain a terminal '\n', empty if end of file
+ if size(line) == 0 break end # end of file
+
+ if line[-1] == "\n" line = line[0..-2] end # remove any trailing '\n'
+ if size(line) > 0
+ tasmota.cmd(line) # run the command
+ end
+ end
+ f.close() # close, we don't expect exception with read-only, could be added later though
+ except .. as e, m
+ print(string.format('CFG: could not run %s (%s - %s)', fname, e, m))
+ f.close()
+ end
+ end
+
+ def autoexec()
+ if self._archive == nil return end
+ # try to launch `preinit.be`
+ import path
+
+ # Step 1. if first run, only apply `init.bat`
+ var fname = self._archive + '#init.bat'
+ if self.is_first_time() && path.exists(fname)
+ # create the '.autoconf' file to avoid running it again, even if it crashed
+ self.set_first_time()
+
+ # if path.exists(fname) # we know it exists from initial test
+ self.run_bat(fname)
+ tasmota.log("CFG: 'init.bat' done, restarting", 2)
+ tasmota.cmd("Restart 1")
+ return # if init was run, force a restart anyways and don't run the remaining code
+ # end
+ end
+
+ # Step 2. if 'display.ini' is present, launch Universal Display
+ fname = self._archive + '#display.ini'
+ if gpio.pin_used(gpio.OPTION_A, 2) && path.exists(fname)
+ if path.exists("display.ini")
+ tasmota.log("CFG: skipping 'display.ini' because already present in file-system", 2)
+ else
+ import display
+ var f = open(fname,"r")
+ var desc = f.read()
+ f.close()
+ display.start(desc)
+ end
+ end
+
+ # Step 3. if 'autoexec.bat' is present, run it
+ fname = self._archive + '#autoexec.bat'
+ if path.exists(fname)
+ tasmota.log("CFG: running "+fname, 3)
+ self.run_bat(fname)
+ tasmota.log("CFG: ran "+fname, 3)
+ end
+
+ # Step 4. if 'autoexec.be' is present, load it
+ fname = self._archive + '#autoexec.be'
+ if path.exists(fname)
+ tasmota.log("CFG: loading "+fname, 3)
+ load(fname)
+ tasmota.log("CFG: loaded "+fname, 3)
+ end
+ end
+ end
+
+ return Autoconf() # return an instance of this class
+end
+
+aa = autoconf_module.init(autoconf_module)
+import webserver
+webserver.on('/ac2', / -> aa.page_autoconf_mgr(), webserver.HTTP_GET)
+return autoconf_module
diff --git a/lib/libesp32/Berry/generate/be_const_strtab.h b/lib/libesp32/Berry/generate/be_const_strtab.h
index aaf1a94a3..c9aafc561 100644
--- a/lib/libesp32/Berry/generate/be_const_strtab.h
+++ b/lib/libesp32/Berry/generate/be_const_strtab.h
@@ -1,343 +1,346 @@
-extern const bcstring be_const_str_SERIAL_5N1;
-extern const bcstring be_const_str__global_addr;
extern const bcstring be_const_str_setmember;
-extern const bcstring be_const_str_OneWire;
-extern const bcstring be_const_str__get_cb;
-extern const bcstring be_const_str_classof;
-extern const bcstring be_const_str_SERIAL_8O2;
-extern const bcstring be_const_str___upper__;
-extern const bcstring be_const_str_gamma10;
-extern const bcstring be_const_str_copy;
-extern const bcstring be_const_str_tostring;
-extern const bcstring be_const_str_dot_p1;
-extern const bcstring be_const_str_item;
-extern const bcstring be_const_str_read8;
-extern const bcstring be_const_str_setbits;
-extern const bcstring be_const_str_upper;
-extern const bcstring be_const_str_rad;
-extern const bcstring be_const_str_web_send;
-extern const bcstring be_const_str_load;
-extern const bcstring be_const_str_opt_add;
extern const bcstring be_const_str_hex;
-extern const bcstring be_const_str_read12;
-extern const bcstring be_const_str_end;
-extern const bcstring be_const_str_chars_in_string;
-extern const bcstring be_const_str_write8;
-extern const bcstring be_const_str_def;
-extern const bcstring be_const_str_select;
-extern const bcstring be_const_str_type;
-extern const bcstring be_const_str_global;
-extern const bcstring be_const_str_yield;
-extern const bcstring be_const_str_opt_eq;
-extern const bcstring be_const_str_SERIAL_8E1;
-extern const bcstring be_const_str_rtc;
-extern const bcstring be_const_str_else;
-extern const bcstring be_const_str_get_power;
-extern const bcstring be_const_str_addr;
-extern const bcstring be_const_str_allocated;
-extern const bcstring be_const_str_finish;
-extern const bcstring be_const_str_dot_p;
-extern const bcstring be_const_str_getbits;
-extern const bcstring be_const_str_tag;
-extern const bcstring be_const_str_add;
-extern const bcstring be_const_str_pin;
-extern const bcstring be_const_str_set_timeouts;
-extern const bcstring be_const_str_import;
-extern const bcstring be_const_str_SERIAL_6N1;
-extern const bcstring be_const_str_SERIAL_8O1;
-extern const bcstring be_const_str__settings_ptr;
-extern const bcstring be_const_str_remove_cmd;
-extern const bcstring be_const_str___iterator__;
-extern const bcstring be_const_str_atan2;
-extern const bcstring be_const_str_ctypes_bytes;
-extern const bcstring be_const_str_millis;
-extern const bcstring be_const_str_available;
-extern const bcstring be_const_str_delay;
-extern const bcstring be_const_str_imin;
-extern const bcstring be_const_str_shared_key;
-extern const bcstring be_const_str_wire;
-extern const bcstring be_const_str__drivers;
-extern const bcstring be_const_str_last_modified;
-extern const bcstring be_const_str_serial;
-extern const bcstring be_const_str_opt_call;
-extern const bcstring be_const_str_webclient;
-extern const bcstring be_const_str_SERIAL_6E2;
-extern const bcstring be_const_str_ctypes_bytes_dyn;
-extern const bcstring be_const_str_time_dump;
-extern const bcstring be_const_str_static;
-extern const bcstring be_const_str_classname;
-extern const bcstring be_const_str_isrunning;
-extern const bcstring be_const_str_top;
-extern const bcstring be_const_str_remove;
-extern const bcstring be_const_str_begin;
-extern const bcstring be_const_str_content_stop;
-extern const bcstring be_const_str_deg;
-extern const bcstring be_const_str_gc;
-extern const bcstring be_const_str_gen_cb;
-extern const bcstring be_const_str_reset;
-extern const bcstring be_const_str_clear;
-extern const bcstring be_const_str_skip;
-extern const bcstring be_const_str_SERIAL_5E1;
-extern const bcstring be_const_str_has;
-extern const bcstring be_const_str_raise;
-extern const bcstring be_const_str_setitem;
-extern const bcstring be_const_str_write_bit;
-extern const bcstring be_const_str_stop;
-extern const bcstring be_const_str_AES_GCM;
-extern const bcstring be_const_str_exec_cmd;
-extern const bcstring be_const_str_iter;
-extern const bcstring be_const_str_ceil;
-extern const bcstring be_const_str_exp;
-extern const bcstring be_const_str_tob64;
-extern const bcstring be_const_str_wire_scan;
-extern const bcstring be_const_str_call;
-extern const bcstring be_const_str_cmd_res;
-extern const bcstring be_const_str_opt_connect;
+extern const bcstring be_const_str_arch;
extern const bcstring be_const_str_resolvecmnd;
-extern const bcstring be_const_str_SERIAL_6E1;
-extern const bcstring be_const_str_try;
-extern const bcstring be_const_str__cb;
-extern const bcstring be_const_str_AudioOutput;
-extern const bcstring be_const_str_check_privileged_access;
-extern const bcstring be_const_str_SERIAL_6O2;
-extern const bcstring be_const_str_content_send;
-extern const bcstring be_const_str_tolower;
-extern const bcstring be_const_str_detect;
-extern const bcstring be_const_str_imax;
-extern const bcstring be_const_str_set_auth;
-extern const bcstring be_const_str_depower;
-extern const bcstring be_const_str_read24;
-extern const bcstring be_const_str_add_header;
-extern const bcstring be_const_str_kv;
-extern const bcstring be_const_str_pin_used;
-extern const bcstring be_const_str_publish_result;
-extern const bcstring be_const_str_do;
-extern const bcstring be_const_str_pow;
-extern const bcstring be_const_str_read_bytes;
-extern const bcstring be_const_str_SERIAL_5E2;
-extern const bcstring be_const_str_scale_uint;
-extern const bcstring be_const_str_get;
-extern const bcstring be_const_str_remove_timer;
-extern const bcstring be_const_str_dot_len;
-extern const bcstring be_const_str_Wire;
-extern const bcstring be_const_str__begin_transmission;
-extern const bcstring be_const_str_toupper;
-extern const bcstring be_const_str_SERIAL_5N2;
-extern const bcstring be_const_str_arg_size;
-extern const bcstring be_const_str_AudioFileSource;
-extern const bcstring be_const_str_I2C_Driver;
-extern const bcstring be_const_str_decrypt;
-extern const bcstring be_const_str_digital_write;
-extern const bcstring be_const_str_input;
-extern const bcstring be_const_str_char;
-extern const bcstring be_const_str_floor;
-extern const bcstring be_const_str_real;
-extern const bcstring be_const_str_AudioGenerator;
-extern const bcstring be_const_str__cmd;
-extern const bcstring be_const_str_enabled;
-extern const bcstring be_const_str_int;
-extern const bcstring be_const_str_byte;
-extern const bcstring be_const_str_resp_cmnd_error;
-extern const bcstring be_const_str_dot_size;
-extern const bcstring be_const_str_list;
-extern const bcstring be_const_str_reset_search;
-extern const bcstring be_const_str_SERIAL_7N2;
-extern const bcstring be_const_str_set;
-extern const bcstring be_const_str_elif;
-extern const bcstring be_const_str_Tasmota;
-extern const bcstring be_const_str_get_switch;
-extern const bcstring be_const_str_read;
-extern const bcstring be_const_str___lower__;
-extern const bcstring be_const_str__read;
-extern const bcstring be_const_str_asin;
-extern const bcstring be_const_str_POST;
-extern const bcstring be_const_str_arg;
-extern const bcstring be_const_str_reduce;
-extern const bcstring be_const_str_deinit;
-extern const bcstring be_const_str_save;
-extern const bcstring be_const_str_SERIAL_8E2;
-extern const bcstring be_const_str_get_size;
-extern const bcstring be_const_str_search;
-extern const bcstring be_const_str_srand;
-extern const bcstring be_const_str_isnan;
+extern const bcstring be_const_str_resp_cmnd_done;
+extern const bcstring be_const_str_top;
+extern const bcstring be_const_str_content_start;
+extern const bcstring be_const_str_deg;
+extern const bcstring be_const_str_fromptr;
+extern const bcstring be_const_str_time_dump;
+extern const bcstring be_const_str_compile;
+extern const bcstring be_const_str_members;
extern const bcstring be_const_str_arg_name;
-extern const bcstring be_const_str_content_flush;
-extern const bcstring be_const_str_get_light;
-extern const bcstring be_const_str_sqrt;
-extern const bcstring be_const_str__end_transmission;
-extern const bcstring be_const_str_listdir;
-extern const bcstring be_const_str_log10;
+extern const bcstring be_const_str_real;
+extern const bcstring be_const_str_insert;
+extern const bcstring be_const_str_open;
+extern const bcstring be_const_str_ctypes_bytes;
+extern const bcstring be_const_str_tag;
+extern const bcstring be_const_str_reset;
+extern const bcstring be_const_str_toupper;
+extern const bcstring be_const_str_POST;
+extern const bcstring be_const_str_SERIAL_6O2;
+extern const bcstring be_const_str_iter;
+extern const bcstring be_const_str_load;
+extern const bcstring be_const_str_available;
+extern const bcstring be_const_str_ceil;
+extern const bcstring be_const_str_clear;
+extern const bcstring be_const_str_digital_read;
+extern const bcstring be_const_str__get_cb;
+extern const bcstring be_const_str_bytes;
+extern const bcstring be_const_str_settings;
+extern const bcstring be_const_str_get_string;
+extern const bcstring be_const_str_asstring;
+extern const bcstring be_const_str_pin_used;
extern const bcstring be_const_str_pop;
-extern const bcstring be_const_str_read32;
-extern const bcstring be_const_str_for;
-extern const bcstring be_const_str_exec_tele;
+extern const bcstring be_const_str_static;
+extern const bcstring be_const_str_AES_GCM;
+extern const bcstring be_const_str_SERIAL_8N2;
+extern const bcstring be_const_str_close;
+extern const bcstring be_const_str_set_power;
+extern const bcstring be_const_str_find_op;
+extern const bcstring be_const_str_get;
+extern const bcstring be_const_str_print;
+extern const bcstring be_const_str_publish_result;
+extern const bcstring be_const_str_target_search;
+extern const bcstring be_const_str__ccmd;
+extern const bcstring be_const_str_fromb64;
+extern const bcstring be_const_str_module;
+extern const bcstring be_const_str_allocated;
+extern const bcstring be_const_str_GET;
+extern const bcstring be_const_str_SERIAL_8E1;
+extern const bcstring be_const_str_classof;
+extern const bcstring be_const_str_cos;
+extern const bcstring be_const_str_assert;
+extern const bcstring be_const_str_content_send;
+extern const bcstring be_const_str_read13;
+extern const bcstring be_const_str_reverse;
+extern const bcstring be_const_str_set_timer;
+extern const bcstring be_const_str_class;
+extern const bcstring be_const_str_codedump;
+extern const bcstring be_const_str_isrunning;
+extern const bcstring be_const_str_publish;
+extern const bcstring be_const_str_range;
+extern const bcstring be_const_str_write;
+extern const bcstring be_const_str_opt_connect;
+extern const bcstring be_const_str_SERIAL_7O1;
+extern const bcstring be_const_str_update;
+extern const bcstring be_const_str__cmd;
+extern const bcstring be_const_str_isnan;
+extern const bcstring be_const_str_resp_cmnd_failed;
+extern const bcstring be_const_str_SERIAL_5O1;
+extern const bcstring be_const_str_abs;
+extern const bcstring be_const_str_SERIAL_7E2;
+extern const bcstring be_const_str_SERIAL_6N1;
+extern const bcstring be_const_str__cb;
+extern const bcstring be_const_str_depower;
+extern const bcstring be_const_str_Tasmota;
+extern const bcstring be_const_str_item;
+extern const bcstring be_const_str_set_useragent;
+extern const bcstring be_const_str_wire2;
+extern const bcstring be_const_str_time_reached;
+extern const bcstring be_const_str_chars_in_string;
+extern const bcstring be_const_str_false;
+extern const bcstring be_const_str_add_rule;
+extern const bcstring be_const_str_setbits;
+extern const bcstring be_const_str_write_file;
+extern const bcstring be_const_str_SERIAL_8O1;
+extern const bcstring be_const_str_wd;
+extern const bcstring be_const_str_wire_scan;
+extern const bcstring be_const_str_AudioFileSourceFS;
+extern const bcstring be_const_str_get_free_heap;
+extern const bcstring be_const_str_AudioGenerator;
+extern const bcstring be_const_str_SERIAL_5E2;
+extern const bcstring be_const_str__global_addr;
+extern const bcstring be_const_str_content_send_style;
+extern const bcstring be_const_str_remove_timer;
+extern const bcstring be_const_str_tr;
+extern const bcstring be_const_str_dot_w;
+extern const bcstring be_const_str_MD5;
+extern const bcstring be_const_str_break;
+extern const bcstring be_const_str_digital_write;
+extern const bcstring be_const_str_asin;
+extern const bcstring be_const_str__def;
+extern const bcstring be_const_str_exec_cmd;
+extern const bcstring be_const_str_exists;
+extern const bcstring be_const_str_flush;
+extern const bcstring be_const_str_as;
+extern const bcstring be_const_str_set_light;
+extern const bcstring be_const_str_time_str;
+extern const bcstring be_const_str_arg_size;
+extern const bcstring be_const_str_bus;
+extern const bcstring be_const_str_opt_eq;
+extern const bcstring be_const_str_try_rule;
+extern const bcstring be_const_str_kv;
+extern const bcstring be_const_str_reverse_gamma10;
+extern const bcstring be_const_str_tostring;
+extern const bcstring be_const_str_format;
+extern const bcstring be_const_str_tob64;
+extern const bcstring be_const_str_continue;
extern const bcstring be_const_str_log;
+extern const bcstring be_const_str_SERIAL_7N1;
+extern const bcstring be_const_str_lower;
+extern const bcstring be_const_str_stop;
+extern const bcstring be_const_str_count;
+extern const bcstring be_const_str_encrypt;
+extern const bcstring be_const_str_resp_cmnd_str;
+extern const bcstring be_const_str_byte;
+extern const bcstring be_const_str_fromstring;
+extern const bcstring be_const_str_run_deferred;
+extern const bcstring be_const_str_setitem;
+extern const bcstring be_const_str_cmd;
+extern const bcstring be_const_str_event;
+extern const bcstring be_const_str_SERIAL_6E1;
+extern const bcstring be_const_str_SERIAL_6O1;
+extern const bcstring be_const_str_remove_driver;
+extern const bcstring be_const_str_EC_C25519;
+extern const bcstring be_const_str_read12;
+extern const bcstring be_const_str__write;
+extern const bcstring be_const_str_opt_call;
+extern const bcstring be_const_str_AudioOutput;
+extern const bcstring be_const_str_attrdump;
+extern const bcstring be_const_str_int;
+extern const bcstring be_const_str_AudioGeneratorMP3;
+extern const bcstring be_const_str_add_header;
+extern const bcstring be_const_str_ctypes_bytes_dyn;
+extern const bcstring be_const_str_keys;
+extern const bcstring be_const_str_set_auth;
+extern const bcstring be_const_str_def;
+extern const bcstring be_const_str_;
+extern const bcstring be_const_str_SERIAL_5N2;
+extern const bcstring be_const_str__rules;
+extern const bcstring be_const_str_has;
+extern const bcstring be_const_str_set;
+extern const bcstring be_const_str_public_key;
+extern const bcstring be_const_str_get_power;
+extern const bcstring be_const_str_type;
+extern const bcstring be_const_str_opt_add;
+extern const bcstring be_const_str_dot_size;
+extern const bcstring be_const_str_set_timeouts;
+extern const bcstring be_const_str_tomap;
+extern const bcstring be_const_str_getbits;
+extern const bcstring be_const_str_sinh;
+extern const bcstring be_const_str_sqrt;
+extern const bcstring be_const_str_dot_p1;
+extern const bcstring be_const_str_begin;
+extern const bcstring be_const_str_delay;
+extern const bcstring be_const_str_scan;
+extern const bcstring be_const_str_for;
+extern const bcstring be_const_str_read8;
+extern const bcstring be_const_str_AudioGeneratorWAV;
+extern const bcstring be_const_str_get_light;
+extern const bcstring be_const_str__global_def;
extern const bcstring be_const_str_map;
extern const bcstring be_const_str_redirect;
-extern const bcstring be_const_str_format;
-extern const bcstring be_const_str_pi;
-extern const bcstring be_const_str_range;
-extern const bcstring be_const_str_SERIAL_7E2;
-extern const bcstring be_const_str_count;
-extern const bcstring be_const_str_update;
-extern const bcstring be_const_str_SERIAL_7N1;
-extern const bcstring be_const_str_find_key_i;
-extern const bcstring be_const_str_content_button;
-extern const bcstring be_const_str_AudioGeneratorMP3;
-extern const bcstring be_const_str_AudioGeneratorWAV;
-extern const bcstring be_const_str__buffer;
-extern const bcstring be_const_str_remove_driver;
-extern const bcstring be_const_str_false;
-extern const bcstring be_const_str_fromptr;
-extern const bcstring be_const_str_geti;
-extern const bcstring be_const_str_lower;
-extern const bcstring be_const_str_nan;
-extern const bcstring be_const_str_assert;
-extern const bcstring be_const_str_time_str;
-extern const bcstring be_const_str_exists;
-extern const bcstring be_const_str_read13;
-extern const bcstring be_const_str_set_power;
-extern const bcstring be_const_str_seti;
-extern const bcstring be_const_str_toptr;
-extern const bcstring be_const_str_acos;
-extern const bcstring be_const_str_find_op;
+extern const bcstring be_const_str__ptr;
extern const bcstring be_const_str_isinstance;
-extern const bcstring be_const_str_cb_dispatch;
-extern const bcstring be_const_str_SERIAL_5O2;
-extern const bcstring be_const_str_bytes;
-extern const bcstring be_const_str_public_key;
-extern const bcstring be_const_str_continue;
-extern const bcstring be_const_str_;
-extern const bcstring be_const_str__available;
-extern const bcstring be_const_str__def;
-extern const bcstring be_const_str_i2c_enabled;
-extern const bcstring be_const_str_reverse;
-extern const bcstring be_const_str_true;
-extern const bcstring be_const_str_dac_voltage;
-extern const bcstring be_const_str_name;
-extern const bcstring be_const_str_reverse_gamma10;
-extern const bcstring be_const_str_add_rule;
-extern const bcstring be_const_str_dump;
-extern const bcstring be_const_str_AudioOutputI2S;
-extern const bcstring be_const_str_attrdump;
-extern const bcstring be_const_str_fromstring;
-extern const bcstring be_const_str_publish;
-extern const bcstring be_const_str_wifi;
-extern const bcstring be_const_str__write;
-extern const bcstring be_const_str_resp_cmnd;
-extern const bcstring be_const_str_tomap;
-extern const bcstring be_const_str_content_start;
-extern const bcstring be_const_str_traceback;
-extern const bcstring be_const_str_as;
-extern const bcstring be_const_str_memory;
-extern const bcstring be_const_str_pin_mode;
-extern const bcstring be_const_str_EC_C25519;
-extern const bcstring be_const_str_str;
-extern const bcstring be_const_str_tanh;
-extern const bcstring be_const_str_write_bytes;
-extern const bcstring be_const_str_except;
-extern const bcstring be_const_str_get_option;
-extern const bcstring be_const_str_dot_w;
-extern const bcstring be_const_str_SERIAL_7O1;
-extern const bcstring be_const_str_SERIAL_8N1;
-extern const bcstring be_const_str_init;
-extern const bcstring be_const_str__timers;
-extern const bcstring be_const_str_super;
-extern const bcstring be_const_str_GET;
-extern const bcstring be_const_str_fromb64;
-extern const bcstring be_const_str_break;
-extern const bcstring be_const_str__global_def;
-extern const bcstring be_const_str_bus;
-extern const bcstring be_const_str_find;
-extern const bcstring be_const_str_resp_cmnd_failed;
-extern const bcstring be_const_str_SERIAL_6N2;
-extern const bcstring be_const_str__request_from;
-extern const bcstring be_const_str_cos;
-extern const bcstring be_const_str_cosh;
-extern const bcstring be_const_str_set_useragent;
+extern const bcstring be_const_str_pin;
extern const bcstring be_const_str_size;
-extern const bcstring be_const_str_web_send_decimal;
-extern const bcstring be_const_str_write;
-extern const bcstring be_const_str_module;
-extern const bcstring be_const_str_try_rule;
-extern const bcstring be_const_str_var;
-extern const bcstring be_const_str_content_send_style;
-extern const bcstring be_const_str_sinh;
+extern const bcstring be_const_str_state;
+extern const bcstring be_const_str_dot_p;
+extern const bcstring be_const_str__drivers;
+extern const bcstring be_const_str_erase;
+extern const bcstring be_const_str_I2C_Driver;
+extern const bcstring be_const_str_addr;
+extern const bcstring be_const_str_copy;
+extern const bcstring be_const_str_find_key_i;
+extern const bcstring be_const_str_pin_mode;
+extern const bcstring be_const_str_setrange;
+extern const bcstring be_const_str_SERIAL_8N1;
+extern const bcstring be_const_str_char;
+extern const bcstring be_const_str_concat;
+extern const bcstring be_const_str_remove;
+extern const bcstring be_const_str_serial;
+extern const bcstring be_const_str_SERIAL_5O2;
+extern const bcstring be_const_str__read;
+extern const bcstring be_const_str_cmd_res;
+extern const bcstring be_const_str_contains;
+extern const bcstring be_const_str_imax;
+extern const bcstring be_const_str_super;
+extern const bcstring be_const_str_try;
+extern const bcstring be_const_str_last_modified;
extern const bcstring be_const_str_return;
-extern const bcstring be_const_str_asstring;
-extern const bcstring be_const_str_digital_read;
-extern const bcstring be_const_str_has_arg;
-extern const bcstring be_const_str_number;
-extern const bcstring be_const_str_remove_rule;
-extern const bcstring be_const_str_get_string;
+extern const bcstring be_const_str_SERIAL_6N2;
+extern const bcstring be_const_str_call;
extern const bcstring be_const_str_resize;
-extern const bcstring be_const_str_encrypt;
-extern const bcstring be_const_str_opt_neq;
-extern const bcstring be_const_str_add_driver;
-extern const bcstring be_const_str_close;
+extern const bcstring be_const_str_escape;
+extern const bcstring be_const_str_upper;
+extern const bcstring be_const_str_end;
+extern const bcstring be_const_str_gamma8;
+extern const bcstring be_const_str_memory;
+extern const bcstring be_const_str_wifi;
+extern const bcstring be_const_str_yield;
+extern const bcstring be_const_str_get_option;
+extern const bcstring be_const_str_init;
+extern const bcstring be_const_str_read;
+extern const bcstring be_const_str__settings_ptr;
+extern const bcstring be_const_str__timers;
+extern const bcstring be_const_str_finish;
+extern const bcstring be_const_str___upper__;
+extern const bcstring be_const_str_dump;
+extern const bcstring be_const_str_save;
+extern const bcstring be_const_str___lower__;
+extern const bcstring be_const_str_listdir;
+extern const bcstring be_const_str_check_privileged_access;
+extern const bcstring be_const_str_rand;
+extern const bcstring be_const_str_web_send;
+extern const bcstring be_const_str_i2c_enabled;
+extern const bcstring be_const_str_wire1;
+extern const bcstring be_const_str_dac_voltage;
+extern const bcstring be_const_str_imin;
+extern const bcstring be_const_str_log10;
+extern const bcstring be_const_str_skip;
+extern const bcstring be_const_str_else;
+extern const bcstring be_const_str_except;
+extern const bcstring be_const_str_nil;
+extern const bcstring be_const_str_resp_cmnd_error;
+extern const bcstring be_const_str_calldepth;
+extern const bcstring be_const_str_do;
+extern const bcstring be_const_str___iterator__;
+extern const bcstring be_const_str_true;
+extern const bcstring be_const_str_rad;
+extern const bcstring be_const_str_import;
+extern const bcstring be_const_str_SERIAL_8O2;
+extern const bcstring be_const_str_gamma10;
+extern const bcstring be_const_str_elif;
+extern const bcstring be_const_str_resp_cmnd;
+extern const bcstring be_const_str_shared_key;
+extern const bcstring be_const_str_web_send_decimal;
+extern const bcstring be_const_str_write8;
+extern const bcstring be_const_str_SERIAL_5E1;
extern const bcstring be_const_str_member;
-extern const bcstring be_const_str_response_append;
+extern const bcstring be_const_str_sin;
+extern const bcstring be_const_str_OneWire;
+extern const bcstring be_const_str_SERIAL_7O2;
+extern const bcstring be_const_str__begin_transmission;
+extern const bcstring be_const_str_get_switch;
+extern const bcstring be_const_str_name;
+extern const bcstring be_const_str_nan;
+extern const bcstring be_const_str_add;
+extern const bcstring be_const_str_eth;
+extern const bcstring be_const_str_find;
+extern const bcstring be_const_str_read32;
+extern const bcstring be_const_str_remove_cmd;
+extern const bcstring be_const_str_gc;
+extern const bcstring be_const_str_reset_search;
+extern const bcstring be_const_str_content_stop;
+extern const bcstring be_const_str_counters;
+extern const bcstring be_const_str_detect;
+extern const bcstring be_const_str_exp;
+extern const bcstring be_const_str_on;
+extern const bcstring be_const_str_arg;
+extern const bcstring be_const_str_reduce;
extern const bcstring be_const_str_split;
extern const bcstring be_const_str_strftime;
-extern const bcstring be_const_str_exec_rules;
-extern const bcstring be_const_str_AudioFileSourceFS;
-extern const bcstring be_const_str__ccmd;
-extern const bcstring be_const_str_set_timer;
-extern const bcstring be_const_str_time_reached;
-extern const bcstring be_const_str_SERIAL_7O2;
-extern const bcstring be_const_str_SERIAL_8N2;
+extern const bcstring be_const_str_raise;
+extern const bcstring be_const_str_AudioOutputI2S;
extern const bcstring be_const_str_if;
-extern const bcstring be_const_str__ptr;
-extern const bcstring be_const_str_insert;
-extern const bcstring be_const_str_print;
-extern const bcstring be_const_str_run_deferred;
-extern const bcstring be_const_str_scan;
-extern const bcstring be_const_str_settings;
-extern const bcstring be_const_str_arch;
-extern const bcstring be_const_str_open;
-extern const bcstring be_const_str_cmd;
-extern const bcstring be_const_str_loop;
-extern const bcstring be_const_str_wire1;
-extern const bcstring be_const_str_nil;
-extern const bcstring be_const_str_SERIAL_7E1;
-extern const bcstring be_const_str_keys;
-extern const bcstring be_const_str_sin;
-extern const bcstring be_const_str_calldepth;
-extern const bcstring be_const_str_while;
-extern const bcstring be_const_str_counters;
-extern const bcstring be_const_str_members;
-extern const bcstring be_const_str_on;
-extern const bcstring be_const_str__rules;
-extern const bcstring be_const_str_collect;
-extern const bcstring be_const_str_url_encode;
-extern const bcstring be_const_str_codedump;
-extern const bcstring be_const_str_dot_p2;
-extern const bcstring be_const_str_MD5;
+extern const bcstring be_const_str_cb_dispatch;
+extern const bcstring be_const_str_exec_tele;
+extern const bcstring be_const_str_srand;
+extern const bcstring be_const_str_write_bytes;
extern const bcstring be_const_str__settings_def;
-extern const bcstring be_const_str_erase;
-extern const bcstring be_const_str_gamma8;
-extern const bcstring be_const_str_rand;
-extern const bcstring be_const_str_resp_cmnd_str;
-extern const bcstring be_const_str_state;
-extern const bcstring be_const_str_SERIAL_6O1;
-extern const bcstring be_const_str_contains;
-extern const bcstring be_const_str_set_light;
-extern const bcstring be_const_str_setrange;
-extern const bcstring be_const_str_tan;
-extern const bcstring be_const_str_target_search;
-extern const bcstring be_const_str_abs;
-extern const bcstring be_const_str_resp_cmnd_done;
-extern const bcstring be_const_str_eth;
-extern const bcstring be_const_str_SERIAL_5O1;
-extern const bcstring be_const_str_concat;
-extern const bcstring be_const_str_flush;
-extern const bcstring be_const_str_get_free_heap;
-extern const bcstring be_const_str_push;
-extern const bcstring be_const_str_compile;
-extern const bcstring be_const_str_wire2;
+extern const bcstring be_const_str_cosh;
+extern const bcstring be_const_str_pi;
+extern const bcstring be_const_str_remove_rule;
+extern const bcstring be_const_str_scale_uint;
+extern const bcstring be_const_str_var;
+extern const bcstring be_const_str_SERIAL_8E2;
+extern const bcstring be_const_str_acos;
+extern const bcstring be_const_str_gen_cb;
+extern const bcstring be_const_str_read_bytes;
+extern const bcstring be_const_str_AudioFileSource;
+extern const bcstring be_const_str_SERIAL_5N1;
+extern const bcstring be_const_str_wire;
+extern const bcstring be_const_str_while;
+extern const bcstring be_const_str_SERIAL_7N2;
+extern const bcstring be_const_str_get_size;
+extern const bcstring be_const_str_exec_rules;
+extern const bcstring be_const_str__available;
+extern const bcstring be_const_str_search;
+extern const bcstring be_const_str_global;
+extern const bcstring be_const_str_collect;
+extern const bcstring be_const_str_input;
+extern const bcstring be_const_str_response_append;
+extern const bcstring be_const_str_str;
+extern const bcstring be_const_str_SERIAL_6E2;
+extern const bcstring be_const_str_SERIAL_7E1;
+extern const bcstring be_const_str_content_button;
+extern const bcstring be_const_str_number;
+extern const bcstring be_const_str_tanh;
+extern const bcstring be_const_str_toptr;
+extern const bcstring be_const_str_write_bit;
extern const bcstring be_const_str_add_cmd;
+extern const bcstring be_const_str_select;
+extern const bcstring be_const_str_traceback;
+extern const bcstring be_const_str_atan2;
+extern const bcstring be_const_str_loop;
+extern const bcstring be_const_str_millis;
+extern const bcstring be_const_str_url_encode;
+extern const bcstring be_const_str__end_transmission;
+extern const bcstring be_const_str_deinit;
+extern const bcstring be_const_str_tan;
+extern const bcstring be_const_str_geti;
+extern const bcstring be_const_str_seti;
+extern const bcstring be_const_str__buffer;
extern const bcstring be_const_str_atan;
-extern const bcstring be_const_str_event;
+extern const bcstring be_const_str_content_flush;
+extern const bcstring be_const_str_list;
+extern const bcstring be_const_str_tolower;
+extern const bcstring be_const_str_dot_len;
+extern const bcstring be_const_str__request_from;
+extern const bcstring be_const_str_has_arg;
+extern const bcstring be_const_str_pow;
+extern const bcstring be_const_str_push;
+extern const bcstring be_const_str_read24;
+extern const bcstring be_const_str_enabled;
+extern const bcstring be_const_str_webclient;
+extern const bcstring be_const_str_opt_neq;
+extern const bcstring be_const_str_dot_p2;
+extern const bcstring be_const_str_Wire;
+extern const bcstring be_const_str_decrypt;
+extern const bcstring be_const_str_floor;
extern const bcstring be_const_str_issubclass;
-extern const bcstring be_const_str_write_file;
-extern const bcstring be_const_str_class;
+extern const bcstring be_const_str_classname;
+extern const bcstring be_const_str_rtc;
+extern const bcstring be_const_str_add_driver;
diff --git a/lib/libesp32/Berry/generate/be_const_strtab_def.h b/lib/libesp32/Berry/generate/be_const_strtab_def.h
index 792cbd7f6..f031878a3 100644
--- a/lib/libesp32/Berry/generate/be_const_strtab_def.h
+++ b/lib/libesp32/Berry/generate/be_const_strtab_def.h
@@ -1,512 +1,517 @@
-be_define_const_str(SERIAL_5N1, "SERIAL_5N1", 3313031680u, 0, 10, NULL);
-be_define_const_str(_global_addr, "_global_addr", 533766721u, 0, 12, &be_const_str_setmember);
be_define_const_str(setmember, "setmember", 1432909441u, 0, 9, NULL);
-be_define_const_str(OneWire, "OneWire", 2298990722u, 0, 7, &be_const_str__get_cb);
-be_define_const_str(_get_cb, "_get_cb", 1448849122u, 0, 7, &be_const_str_classof);
-be_define_const_str(classof, "classof", 1796577762u, 0, 7, NULL);
-be_define_const_str(SERIAL_8O2, "SERIAL_8O2", 272345123u, 0, 10, &be_const_str___upper__);
-be_define_const_str(__upper__, "__upper__", 3612202883u, 0, 9, &be_const_str_gamma10);
-be_define_const_str(gamma10, "gamma10", 3472052483u, 0, 7, NULL);
-be_define_const_str(copy, "copy", 3848464964u, 0, 4, NULL);
-be_define_const_str(tostring, "tostring", 2299708645u, 0, 8, NULL);
-be_define_const_str(dot_p1, ".p1", 249175686u, 0, 3, &be_const_str_item);
-be_define_const_str(item, "item", 2671260646u, 0, 4, NULL);
-be_define_const_str(read8, "read8", 2802788167u, 0, 5, &be_const_str_setbits);
-be_define_const_str(setbits, "setbits", 2762408167u, 0, 7, &be_const_str_upper);
-be_define_const_str(upper, "upper", 176974407u, 0, 5, NULL);
-be_define_const_str(rad, "rad", 1358899048u, 0, 3, &be_const_str_web_send);
-be_define_const_str(web_send, "web_send", 2989941448u, 0, 8, NULL);
-be_define_const_str(load, "load", 3859241449u, 0, 4, NULL);
-be_define_const_str(opt_add, "+", 772578730u, 0, 1, &be_const_str_hex);
-be_define_const_str(hex, "hex", 4273249610u, 0, 3, &be_const_str_read12);
-be_define_const_str(read12, "read12", 4291076970u, 0, 6, &be_const_str_end);
-be_define_const_str(end, "end", 1787721130u, 56, 3, NULL);
-be_define_const_str(chars_in_string, "chars_in_string", 3148785132u, 0, 15, &be_const_str_write8);
-be_define_const_str(write8, "write8", 3133991532u, 0, 6, &be_const_str_def);
-be_define_const_str(def, "def", 3310976652u, 55, 3, NULL);
-be_define_const_str(select, "select", 297952813u, 0, 6, &be_const_str_type);
-be_define_const_str(type, "type", 1361572173u, 0, 4, NULL);
-be_define_const_str(global, "global", 503252654u, 0, 6, &be_const_str_yield);
-be_define_const_str(yield, "yield", 1821831854u, 0, 5, NULL);
-be_define_const_str(opt_eq, "==", 2431966415u, 0, 2, NULL);
-be_define_const_str(SERIAL_8E1, "SERIAL_8E1", 2371121616u, 0, 10, &be_const_str_rtc);
-be_define_const_str(rtc, "rtc", 1070575216u, 0, 3, &be_const_str_else);
-be_define_const_str(else, "else", 3183434736u, 52, 4, NULL);
-be_define_const_str(get_power, "get_power", 3009799377u, 0, 9, NULL);
-be_define_const_str(addr, "addr", 1087856498u, 0, 4, &be_const_str_allocated);
-be_define_const_str(allocated, "allocated", 429986098u, 0, 9, &be_const_str_finish);
-be_define_const_str(finish, "finish", 1494643858u, 0, 6, NULL);
-be_define_const_str(dot_p, ".p", 1171526419u, 0, 2, &be_const_str_getbits);
-be_define_const_str(getbits, "getbits", 3094168979u, 0, 7, &be_const_str_tag);
-be_define_const_str(tag, "tag", 2516003219u, 0, 3, NULL);
-be_define_const_str(add, "add", 993596020u, 0, 3, &be_const_str_pin);
-be_define_const_str(pin, "pin", 1866532500u, 0, 3, &be_const_str_set_timeouts);
-be_define_const_str(set_timeouts, "set_timeouts", 3732850900u, 0, 12, &be_const_str_import);
-be_define_const_str(import, "import", 288002260u, 66, 6, NULL);
-be_define_const_str(SERIAL_6N1, "SERIAL_6N1", 198895701u, 0, 10, NULL);
-be_define_const_str(SERIAL_8O1, "SERIAL_8O1", 289122742u, 0, 10, &be_const_str__settings_ptr);
-be_define_const_str(_settings_ptr, "_settings_ptr", 1825772182u, 0, 13, &be_const_str_remove_cmd);
-be_define_const_str(remove_cmd, "remove_cmd", 3832315702u, 0, 10, NULL);
-be_define_const_str(__iterator__, "__iterator__", 3884039703u, 0, 12, &be_const_str_atan2);
-be_define_const_str(atan2, "atan2", 3173440503u, 0, 5, &be_const_str_ctypes_bytes);
-be_define_const_str(ctypes_bytes, "ctypes_bytes", 3879019703u, 0, 12, &be_const_str_millis);
-be_define_const_str(millis, "millis", 1214679063u, 0, 6, NULL);
-be_define_const_str(available, "available", 1727918744u, 0, 9, &be_const_str_delay);
-be_define_const_str(delay, "delay", 1322381784u, 0, 5, &be_const_str_imin);
-be_define_const_str(imin, "imin", 2714127864u, 0, 4, &be_const_str_shared_key);
-be_define_const_str(shared_key, "shared_key", 2200833624u, 0, 10, &be_const_str_wire);
-be_define_const_str(wire, "wire", 4082753944u, 0, 4, NULL);
-be_define_const_str(_drivers, "_drivers", 3260328985u, 0, 8, &be_const_str_last_modified);
-be_define_const_str(last_modified, "last_modified", 772177145u, 0, 13, &be_const_str_serial);
-be_define_const_str(serial, "serial", 3687697785u, 0, 6, NULL);
-be_define_const_str(opt_call, "()", 685372826u, 0, 2, &be_const_str_webclient);
-be_define_const_str(webclient, "webclient", 4076389146u, 0, 9, NULL);
-be_define_const_str(SERIAL_6E2, "SERIAL_6E2", 317471867u, 0, 10, &be_const_str_ctypes_bytes_dyn);
-be_define_const_str(ctypes_bytes_dyn, "ctypes_bytes_dyn", 915205307u, 0, 16, &be_const_str_time_dump);
-be_define_const_str(time_dump, "time_dump", 3330410747u, 0, 9, &be_const_str_static);
-be_define_const_str(static, "static", 3532702267u, 71, 6, NULL);
-be_define_const_str(classname, "classname", 1998589948u, 0, 9, &be_const_str_isrunning);
-be_define_const_str(isrunning, "isrunning", 1688182268u, 0, 9, &be_const_str_top);
+be_define_const_str(hex, "hex", 4273249610u, 0, 3, NULL);
+be_define_const_str(arch, "arch", 2952804297u, 0, 4, &be_const_str_resolvecmnd);
+be_define_const_str(resolvecmnd, "resolvecmnd", 993361485u, 0, 11, &be_const_str_resp_cmnd_done);
+be_define_const_str(resp_cmnd_done, "resp_cmnd_done", 2601874875u, 0, 14, NULL);
be_define_const_str(top, "top", 2802900028u, 0, 3, NULL);
-be_define_const_str(remove, "remove", 3683784189u, 0, 6, NULL);
-be_define_const_str(begin, "begin", 1748273790u, 0, 5, NULL);
-be_define_const_str(content_stop, "content_stop", 658554751u, 0, 12, &be_const_str_deg);
-be_define_const_str(deg, "deg", 3327754271u, 0, 3, &be_const_str_gc);
-be_define_const_str(gc, "gc", 1042313471u, 0, 2, &be_const_str_gen_cb);
-be_define_const_str(gen_cb, "gen_cb", 3245227551u, 0, 6, NULL);
-be_define_const_str(reset, "reset", 1695364032u, 0, 5, NULL);
-be_define_const_str(clear, "clear", 1550717474u, 0, 5, &be_const_str_skip);
-be_define_const_str(skip, "skip", 1097563074u, 0, 4, NULL);
-be_define_const_str(SERIAL_5E1, "SERIAL_5E1", 1163775235u, 0, 10, &be_const_str_has);
-be_define_const_str(has, "has", 3988721635u, 0, 3, &be_const_str_raise);
-be_define_const_str(raise, "raise", 1593437475u, 70, 5, NULL);
-be_define_const_str(setitem, "setitem", 1554834596u, 0, 7, &be_const_str_write_bit);
-be_define_const_str(write_bit, "write_bit", 2660990436u, 0, 9, NULL);
-be_define_const_str(stop, "stop", 3411225317u, 0, 4, NULL);
-be_define_const_str(AES_GCM, "AES_GCM", 3832208678u, 0, 7, NULL);
-be_define_const_str(exec_cmd, "exec_cmd", 493567399u, 0, 8, &be_const_str_iter);
-be_define_const_str(iter, "iter", 3124256359u, 0, 4, NULL);
-be_define_const_str(ceil, "ceil", 1659167240u, 0, 4, &be_const_str_exp);
-be_define_const_str(exp, "exp", 1923516200u, 0, 3, &be_const_str_tob64);
-be_define_const_str(tob64, "tob64", 373777640u, 0, 5, &be_const_str_wire_scan);
-be_define_const_str(wire_scan, "wire_scan", 2671275880u, 0, 9, NULL);
-be_define_const_str(call, "call", 3018949801u, 0, 4, NULL);
-be_define_const_str(cmd_res, "cmd_res", 921166762u, 0, 7, NULL);
-be_define_const_str(opt_connect, "..", 2748622605u, 0, 2, &be_const_str_resolvecmnd);
-be_define_const_str(resolvecmnd, "resolvecmnd", 993361485u, 0, 11, NULL);
-be_define_const_str(SERIAL_6E1, "SERIAL_6E1", 334249486u, 0, 10, &be_const_str_try);
-be_define_const_str(try, "try", 2887626766u, 68, 3, NULL);
-be_define_const_str(_cb, "_cb", 4043300367u, 0, 3, NULL);
-be_define_const_str(AudioOutput, "AudioOutput", 3257792048u, 0, 11, &be_const_str_check_privileged_access);
-be_define_const_str(check_privileged_access, "check_privileged_access", 3692933968u, 0, 23, NULL);
-be_define_const_str(SERIAL_6O2, "SERIAL_6O2", 316486129u, 0, 10, &be_const_str_content_send);
-be_define_const_str(content_send, "content_send", 1673733649u, 0, 12, &be_const_str_tolower);
-be_define_const_str(tolower, "tolower", 1042520049u, 0, 7, NULL);
-be_define_const_str(detect, "detect", 8884370u, 0, 6, &be_const_str_imax);
-be_define_const_str(imax, "imax", 3084515410u, 0, 4, &be_const_str_set_auth);
-be_define_const_str(set_auth, "set_auth", 1057170930u, 0, 8, NULL);
-be_define_const_str(depower, "depower", 3563819571u, 0, 7, &be_const_str_read24);
-be_define_const_str(read24, "read24", 1808533811u, 0, 6, NULL);
-be_define_const_str(add_header, "add_header", 927130612u, 0, 10, &be_const_str_kv);
-be_define_const_str(kv, "kv", 1497177492u, 0, 2, &be_const_str_pin_used);
-be_define_const_str(pin_used, "pin_used", 4033854612u, 0, 8, &be_const_str_publish_result);
-be_define_const_str(publish_result, "publish_result", 2013351252u, 0, 14, &be_const_str_do);
-be_define_const_str(do, "do", 1646057492u, 65, 2, NULL);
-be_define_const_str(pow, "pow", 1479764693u, 0, 3, &be_const_str_read_bytes);
-be_define_const_str(read_bytes, "read_bytes", 3576733173u, 0, 10, NULL);
-be_define_const_str(SERIAL_5E2, "SERIAL_5E2", 1180552854u, 0, 10, &be_const_str_scale_uint);
-be_define_const_str(scale_uint, "scale_uint", 3090811094u, 0, 10, NULL);
-be_define_const_str(get, "get", 1410115415u, 0, 3, &be_const_str_remove_timer);
-be_define_const_str(remove_timer, "remove_timer", 4141472215u, 0, 12, NULL);
-be_define_const_str(dot_len, ".len", 850842136u, 0, 4, &be_const_str_Wire);
-be_define_const_str(Wire, "Wire", 1938276536u, 0, 4, &be_const_str__begin_transmission);
-be_define_const_str(_begin_transmission, "_begin_transmission", 2779461176u, 0, 19, &be_const_str_toupper);
-be_define_const_str(toupper, "toupper", 3691983576u, 0, 7, NULL);
-be_define_const_str(SERIAL_5N2, "SERIAL_5N2", 3363364537u, 0, 10, &be_const_str_arg_size);
-be_define_const_str(arg_size, "arg_size", 3310243257u, 0, 8, NULL);
-be_define_const_str(AudioFileSource, "AudioFileSource", 2959980058u, 0, 15, &be_const_str_I2C_Driver);
-be_define_const_str(I2C_Driver, "I2C_Driver", 1714501658u, 0, 10, &be_const_str_decrypt);
-be_define_const_str(decrypt, "decrypt", 2886974618u, 0, 7, NULL);
-be_define_const_str(digital_write, "digital_write", 3435877979u, 0, 13, &be_const_str_input);
-be_define_const_str(input, "input", 4191711099u, 0, 5, NULL);
-be_define_const_str(char, "char", 2823553821u, 0, 4, &be_const_str_floor);
-be_define_const_str(floor, "floor", 3102149661u, 0, 5, &be_const_str_real);
+be_define_const_str(content_start, "content_start", 2937509069u, 0, 13, &be_const_str_deg);
+be_define_const_str(deg, "deg", 3327754271u, 0, 3, &be_const_str_fromptr);
+be_define_const_str(fromptr, "fromptr", 666189689u, 0, 7, &be_const_str_time_dump);
+be_define_const_str(time_dump, "time_dump", 3330410747u, 0, 9, NULL);
+be_define_const_str(compile, "compile", 1000265118u, 0, 7, &be_const_str_members);
+be_define_const_str(members, "members", 937576464u, 0, 7, NULL);
+be_define_const_str(arg_name, "arg_name", 1345046155u, 0, 8, &be_const_str_real);
be_define_const_str(real, "real", 3604983901u, 0, 4, NULL);
-be_define_const_str(AudioGenerator, "AudioGenerator", 1839297342u, 0, 14, &be_const_str__cmd);
-be_define_const_str(_cmd, "_cmd", 3419822142u, 0, 4, &be_const_str_enabled);
-be_define_const_str(enabled, "enabled", 49525662u, 0, 7, &be_const_str_int);
-be_define_const_str(int, "int", 2515107422u, 0, 3, NULL);
-be_define_const_str(byte, "byte", 1683620383u, 0, 4, &be_const_str_resp_cmnd_error);
-be_define_const_str(resp_cmnd_error, "resp_cmnd_error", 2404088863u, 0, 15, NULL);
-be_define_const_str(dot_size, ".size", 1965188224u, 0, 5, NULL);
-be_define_const_str(list, "list", 217798785u, 0, 4, &be_const_str_reset_search);
-be_define_const_str(reset_search, "reset_search", 1350414305u, 0, 12, NULL);
-be_define_const_str(SERIAL_7N2, "SERIAL_7N2", 1874282627u, 0, 10, &be_const_str_set);
-be_define_const_str(set, "set", 3324446467u, 0, 3, &be_const_str_elif);
-be_define_const_str(elif, "elif", 3232090307u, 51, 4, NULL);
-be_define_const_str(Tasmota, "Tasmota", 4047617668u, 0, 7, &be_const_str_get_switch);
-be_define_const_str(get_switch, "get_switch", 164821028u, 0, 10, NULL);
-be_define_const_str(read, "read", 3470762949u, 0, 4, NULL);
-be_define_const_str(__lower__, "__lower__", 123855590u, 0, 9, &be_const_str__read);
-be_define_const_str(_read, "_read", 346717030u, 0, 5, &be_const_str_asin);
+be_define_const_str(insert, "insert", 3332609576u, 0, 6, NULL);
+be_define_const_str(open, "open", 3546203337u, 0, 4, NULL);
+be_define_const_str(ctypes_bytes, "ctypes_bytes", 3879019703u, 0, 12, &be_const_str_tag);
+be_define_const_str(tag, "tag", 2516003219u, 0, 3, NULL);
+be_define_const_str(reset, "reset", 1695364032u, 0, 5, &be_const_str_toupper);
+be_define_const_str(toupper, "toupper", 3691983576u, 0, 7, NULL);
+be_define_const_str(POST, "POST", 1929554311u, 0, 4, &be_const_str_SERIAL_6O2);
+be_define_const_str(SERIAL_6O2, "SERIAL_6O2", 316486129u, 0, 10, &be_const_str_iter);
+be_define_const_str(iter, "iter", 3124256359u, 0, 4, &be_const_str_load);
+be_define_const_str(load, "load", 3859241449u, 0, 4, NULL);
+be_define_const_str(available, "available", 1727918744u, 0, 9, &be_const_str_ceil);
+be_define_const_str(ceil, "ceil", 1659167240u, 0, 4, &be_const_str_clear);
+be_define_const_str(clear, "clear", 1550717474u, 0, 5, &be_const_str_digital_read);
+be_define_const_str(digital_read, "digital_read", 3585496928u, 0, 12, NULL);
+be_define_const_str(_get_cb, "_get_cb", 1448849122u, 0, 7, &be_const_str_bytes);
+be_define_const_str(bytes, "bytes", 1706151940u, 0, 5, &be_const_str_settings);
+be_define_const_str(settings, "settings", 1745255176u, 0, 8, NULL);
+be_define_const_str(get_string, "get_string", 4195847969u, 0, 10, NULL);
+be_define_const_str(asstring, "asstring", 1298225088u, 0, 8, &be_const_str_pin_used);
+be_define_const_str(pin_used, "pin_used", 4033854612u, 0, 8, &be_const_str_pop);
+be_define_const_str(pop, "pop", 1362321360u, 0, 3, NULL);
+be_define_const_str(static, "static", 3532702267u, 71, 6, NULL);
+be_define_const_str(AES_GCM, "AES_GCM", 3832208678u, 0, 7, &be_const_str_SERIAL_8N2);
+be_define_const_str(SERIAL_8N2, "SERIAL_8N2", 2386074854u, 0, 10, NULL);
+be_define_const_str(close, "close", 667630371u, 0, 5, &be_const_str_set_power);
+be_define_const_str(set_power, "set_power", 549820893u, 0, 9, NULL);
+be_define_const_str(find_op, "find_op", 3766713376u, 0, 7, NULL);
+be_define_const_str(get, "get", 1410115415u, 0, 3, NULL);
+be_define_const_str(print, "print", 372738696u, 0, 5, &be_const_str_publish_result);
+be_define_const_str(publish_result, "publish_result", 2013351252u, 0, 14, NULL);
+be_define_const_str(target_search, "target_search", 1947846553u, 0, 13, NULL);
+be_define_const_str(_ccmd, "_ccmd", 2163421413u, 0, 5, &be_const_str_fromb64);
+be_define_const_str(fromb64, "fromb64", 2717019639u, 0, 7, &be_const_str_module);
+be_define_const_str(module, "module", 3617558685u, 0, 6, NULL);
+be_define_const_str(allocated, "allocated", 429986098u, 0, 9, NULL);
+be_define_const_str(GET, "GET", 2531704439u, 0, 3, NULL);
+be_define_const_str(SERIAL_8E1, "SERIAL_8E1", 2371121616u, 0, 10, &be_const_str_classof);
+be_define_const_str(classof, "classof", 1796577762u, 0, 7, &be_const_str_cos);
+be_define_const_str(cos, "cos", 4220379804u, 0, 3, NULL);
+be_define_const_str(assert, "assert", 2774883451u, 0, 6, &be_const_str_content_send);
+be_define_const_str(content_send, "content_send", 1673733649u, 0, 12, &be_const_str_read13);
+be_define_const_str(read13, "read13", 12887293u, 0, 6, &be_const_str_reverse);
+be_define_const_str(reverse, "reverse", 558918661u, 0, 7, &be_const_str_set_timer);
+be_define_const_str(set_timer, "set_timer", 2135414533u, 0, 9, &be_const_str_class);
+be_define_const_str(class, "class", 2872970239u, 57, 5, NULL);
+be_define_const_str(codedump, "codedump", 1786337906u, 0, 8, &be_const_str_isrunning);
+be_define_const_str(isrunning, "isrunning", 1688182268u, 0, 9, &be_const_str_publish);
+be_define_const_str(publish, "publish", 264247304u, 0, 7, &be_const_str_range);
+be_define_const_str(range, "range", 4208725202u, 0, 5, &be_const_str_write);
+be_define_const_str(write, "write", 3190202204u, 0, 5, NULL);
+be_define_const_str(opt_connect, "..", 2748622605u, 0, 2, &be_const_str_SERIAL_7O1);
+be_define_const_str(SERIAL_7O1, "SERIAL_7O1", 1823802675u, 0, 10, NULL);
+be_define_const_str(update, "update", 672109684u, 0, 6, NULL);
+be_define_const_str(_cmd, "_cmd", 3419822142u, 0, 4, &be_const_str_isnan);
+be_define_const_str(isnan, "isnan", 2981347434u, 0, 5, &be_const_str_resp_cmnd_failed);
+be_define_const_str(resp_cmnd_failed, "resp_cmnd_failed", 2136281562u, 0, 16, NULL);
+be_define_const_str(SERIAL_5O1, "SERIAL_5O1", 3782657917u, 0, 10, &be_const_str_abs);
+be_define_const_str(abs, "abs", 709362235u, 0, 3, NULL);
+be_define_const_str(SERIAL_7E2, "SERIAL_7E2", 97385204u, 0, 10, NULL);
+be_define_const_str(SERIAL_6N1, "SERIAL_6N1", 198895701u, 0, 10, &be_const_str__cb);
+be_define_const_str(_cb, "_cb", 4043300367u, 0, 3, &be_const_str_depower);
+be_define_const_str(depower, "depower", 3563819571u, 0, 7, NULL);
+be_define_const_str(Tasmota, "Tasmota", 4047617668u, 0, 7, &be_const_str_item);
+be_define_const_str(item, "item", 2671260646u, 0, 4, &be_const_str_set_useragent);
+be_define_const_str(set_useragent, "set_useragent", 612237244u, 0, 13, &be_const_str_wire2);
+be_define_const_str(wire2, "wire2", 3229499038u, 0, 5, NULL);
+be_define_const_str(time_reached, "time_reached", 2075136773u, 0, 12, NULL);
+be_define_const_str(chars_in_string, "chars_in_string", 3148785132u, 0, 15, &be_const_str_false);
+be_define_const_str(false, "false", 184981848u, 62, 5, NULL);
+be_define_const_str(add_rule, "add_rule", 596540743u, 0, 8, &be_const_str_setbits);
+be_define_const_str(setbits, "setbits", 2762408167u, 0, 7, &be_const_str_write_file);
+be_define_const_str(write_file, "write_file", 3177658879u, 0, 10, NULL);
+be_define_const_str(SERIAL_8O1, "SERIAL_8O1", 289122742u, 0, 10, &be_const_str_wd);
+be_define_const_str(wd, "wd", 1531424278u, 0, 2, &be_const_str_wire_scan);
+be_define_const_str(wire_scan, "wire_scan", 2671275880u, 0, 9, NULL);
+be_define_const_str(AudioFileSourceFS, "AudioFileSourceFS", 1839147653u, 0, 17, &be_const_str_get_free_heap);
+be_define_const_str(get_free_heap, "get_free_heap", 625069757u, 0, 13, NULL);
+be_define_const_str(AudioGenerator, "AudioGenerator", 1839297342u, 0, 14, &be_const_str_SERIAL_5E2);
+be_define_const_str(SERIAL_5E2, "SERIAL_5E2", 1180552854u, 0, 10, NULL);
+be_define_const_str(_global_addr, "_global_addr", 533766721u, 0, 12, &be_const_str_content_send_style);
+be_define_const_str(content_send_style, "content_send_style", 1087907647u, 0, 18, &be_const_str_remove_timer);
+be_define_const_str(remove_timer, "remove_timer", 4141472215u, 0, 12, &be_const_str_tr);
+be_define_const_str(tr, "tr", 1195724803u, 0, 2, NULL);
+be_define_const_str(dot_w, ".w", 1255414514u, 0, 2, NULL);
+be_define_const_str(MD5, "MD5", 1935726387u, 0, 3, NULL);
+be_define_const_str(break, "break", 3378807160u, 58, 5, NULL);
+be_define_const_str(digital_write, "digital_write", 3435877979u, 0, 13, NULL);
be_define_const_str(asin, "asin", 4272848550u, 0, 4, NULL);
-be_define_const_str(POST, "POST", 1929554311u, 0, 4, &be_const_str_arg);
-be_define_const_str(arg, "arg", 1047474471u, 0, 3, &be_const_str_reduce);
-be_define_const_str(reduce, "reduce", 2002030311u, 0, 6, NULL);
-be_define_const_str(deinit, "deinit", 2345559592u, 0, 6, &be_const_str_save);
-be_define_const_str(save, "save", 3439296072u, 0, 4, NULL);
-be_define_const_str(SERIAL_8E2, "SERIAL_8E2", 2421454473u, 0, 10, &be_const_str_get_size);
-be_define_const_str(get_size, "get_size", 2803644713u, 0, 8, &be_const_str_search);
-be_define_const_str(search, "search", 2150836393u, 0, 6, &be_const_str_srand);
-be_define_const_str(srand, "srand", 465518633u, 0, 5, NULL);
-be_define_const_str(isnan, "isnan", 2981347434u, 0, 5, NULL);
-be_define_const_str(arg_name, "arg_name", 1345046155u, 0, 8, &be_const_str_content_flush);
-be_define_const_str(content_flush, "content_flush", 214922475u, 0, 13, NULL);
-be_define_const_str(get_light, "get_light", 381930476u, 0, 9, NULL);
+be_define_const_str(_def, "_def", 1985022181u, 0, 4, &be_const_str_exec_cmd);
+be_define_const_str(exec_cmd, "exec_cmd", 493567399u, 0, 8, &be_const_str_exists);
+be_define_const_str(exists, "exists", 1002329533u, 0, 6, &be_const_str_flush);
+be_define_const_str(flush, "flush", 3002334877u, 0, 5, &be_const_str_as);
+be_define_const_str(as, "as", 1579491469u, 67, 2, NULL);
+be_define_const_str(set_light, "set_light", 3176076152u, 0, 9, &be_const_str_time_str);
+be_define_const_str(time_str, "time_str", 2613827612u, 0, 8, NULL);
+be_define_const_str(arg_size, "arg_size", 3310243257u, 0, 8, &be_const_str_bus);
+be_define_const_str(bus, "bus", 1607822841u, 0, 3, NULL);
+be_define_const_str(opt_eq, "==", 2431966415u, 0, 2, &be_const_str_try_rule);
+be_define_const_str(try_rule, "try_rule", 1986449405u, 0, 8, NULL);
+be_define_const_str(kv, "kv", 1497177492u, 0, 2, &be_const_str_reverse_gamma10);
+be_define_const_str(reverse_gamma10, "reverse_gamma10", 739112262u, 0, 15, NULL);
+be_define_const_str(tostring, "tostring", 2299708645u, 0, 8, NULL);
+be_define_const_str(format, "format", 3114108242u, 0, 6, &be_const_str_tob64);
+be_define_const_str(tob64, "tob64", 373777640u, 0, 5, &be_const_str_continue);
+be_define_const_str(continue, "continue", 2977070660u, 59, 8, NULL);
+be_define_const_str(log, "log", 1062293841u, 0, 3, NULL);
+be_define_const_str(SERIAL_7N1, "SERIAL_7N1", 1891060246u, 0, 10, &be_const_str_lower);
+be_define_const_str(lower, "lower", 3038577850u, 0, 5, NULL);
+be_define_const_str(stop, "stop", 3411225317u, 0, 4, NULL);
+be_define_const_str(count, "count", 967958004u, 0, 5, &be_const_str_encrypt);
+be_define_const_str(encrypt, "encrypt", 2194327650u, 0, 7, &be_const_str_resp_cmnd_str);
+be_define_const_str(resp_cmnd_str, "resp_cmnd_str", 737845590u, 0, 13, NULL);
+be_define_const_str(byte, "byte", 1683620383u, 0, 4, NULL);
+be_define_const_str(fromstring, "fromstring", 610302344u, 0, 10, &be_const_str_run_deferred);
+be_define_const_str(run_deferred, "run_deferred", 371594696u, 0, 12, &be_const_str_setitem);
+be_define_const_str(setitem, "setitem", 1554834596u, 0, 7, NULL);
+be_define_const_str(cmd, "cmd", 4136785899u, 0, 3, &be_const_str_event);
+be_define_const_str(event, "event", 4264611999u, 0, 5, NULL);
+be_define_const_str(SERIAL_6E1, "SERIAL_6E1", 334249486u, 0, 10, &be_const_str_SERIAL_6O1);
+be_define_const_str(SERIAL_6O1, "SERIAL_6O1", 266153272u, 0, 10, &be_const_str_remove_driver);
+be_define_const_str(remove_driver, "remove_driver", 1030243768u, 0, 13, NULL);
+be_define_const_str(EC_C25519, "EC_C25519", 95492591u, 0, 9, NULL);
+be_define_const_str(read12, "read12", 4291076970u, 0, 6, NULL);
+be_define_const_str(_write, "_write", 2215462825u, 0, 6, NULL);
+be_define_const_str(opt_call, "()", 685372826u, 0, 2, &be_const_str_AudioOutput);
+be_define_const_str(AudioOutput, "AudioOutput", 3257792048u, 0, 11, &be_const_str_attrdump);
+be_define_const_str(attrdump, "attrdump", 1521571304u, 0, 8, &be_const_str_int);
+be_define_const_str(int, "int", 2515107422u, 0, 3, NULL);
+be_define_const_str(AudioGeneratorMP3, "AudioGeneratorMP3", 2199818488u, 0, 17, &be_const_str_add_header);
+be_define_const_str(add_header, "add_header", 927130612u, 0, 10, NULL);
+be_define_const_str(ctypes_bytes_dyn, "ctypes_bytes_dyn", 915205307u, 0, 16, &be_const_str_keys);
+be_define_const_str(keys, "keys", 4182378701u, 0, 4, NULL);
+be_define_const_str(set_auth, "set_auth", 1057170930u, 0, 8, &be_const_str_def);
+be_define_const_str(def, "def", 3310976652u, 55, 3, NULL);
+be_define_const_str(, "", 2166136261u, 0, 0, &be_const_str_SERIAL_5N2);
+be_define_const_str(SERIAL_5N2, "SERIAL_5N2", 3363364537u, 0, 10, &be_const_str__rules);
+be_define_const_str(_rules, "_rules", 4266217105u, 0, 6, &be_const_str_has);
+be_define_const_str(has, "has", 3988721635u, 0, 3, &be_const_str_set);
+be_define_const_str(set, "set", 3324446467u, 0, 3, NULL);
+be_define_const_str(public_key, "public_key", 4169142980u, 0, 10, NULL);
+be_define_const_str(get_power, "get_power", 3009799377u, 0, 9, &be_const_str_type);
+be_define_const_str(type, "type", 1361572173u, 0, 4, NULL);
+be_define_const_str(opt_add, "+", 772578730u, 0, 1, &be_const_str_dot_size);
+be_define_const_str(dot_size, ".size", 1965188224u, 0, 5, &be_const_str_set_timeouts);
+be_define_const_str(set_timeouts, "set_timeouts", 3732850900u, 0, 12, &be_const_str_tomap);
+be_define_const_str(tomap, "tomap", 612167626u, 0, 5, NULL);
+be_define_const_str(getbits, "getbits", 3094168979u, 0, 7, &be_const_str_sinh);
+be_define_const_str(sinh, "sinh", 282220607u, 0, 4, &be_const_str_sqrt);
be_define_const_str(sqrt, "sqrt", 2112764879u, 0, 4, NULL);
-be_define_const_str(_end_transmission, "_end_transmission", 3237480400u, 0, 17, &be_const_str_listdir);
-be_define_const_str(listdir, "listdir", 2005220720u, 0, 7, &be_const_str_log10);
-be_define_const_str(log10, "log10", 2346846000u, 0, 5, &be_const_str_pop);
-be_define_const_str(pop, "pop", 1362321360u, 0, 3, &be_const_str_read32);
-be_define_const_str(read32, "read32", 1741276240u, 0, 6, &be_const_str_for);
+be_define_const_str(dot_p1, ".p1", 249175686u, 0, 3, &be_const_str_begin);
+be_define_const_str(begin, "begin", 1748273790u, 0, 5, &be_const_str_delay);
+be_define_const_str(delay, "delay", 1322381784u, 0, 5, &be_const_str_scan);
+be_define_const_str(scan, "scan", 3974641896u, 0, 4, &be_const_str_for);
be_define_const_str(for, "for", 2901640080u, 54, 3, NULL);
-be_define_const_str(exec_tele, "exec_tele", 1020751601u, 0, 9, &be_const_str_log);
-be_define_const_str(log, "log", 1062293841u, 0, 3, &be_const_str_map);
+be_define_const_str(read8, "read8", 2802788167u, 0, 5, NULL);
+be_define_const_str(AudioGeneratorWAV, "AudioGeneratorWAV", 2746509368u, 0, 17, &be_const_str_get_light);
+be_define_const_str(get_light, "get_light", 381930476u, 0, 9, NULL);
+be_define_const_str(_global_def, "_global_def", 646007001u, 0, 11, &be_const_str_map);
be_define_const_str(map, "map", 3751997361u, 0, 3, &be_const_str_redirect);
be_define_const_str(redirect, "redirect", 389758641u, 0, 8, NULL);
-be_define_const_str(format, "format", 3114108242u, 0, 6, &be_const_str_pi);
-be_define_const_str(pi, "pi", 1213090802u, 0, 2, &be_const_str_range);
-be_define_const_str(range, "range", 4208725202u, 0, 5, NULL);
-be_define_const_str(SERIAL_7E2, "SERIAL_7E2", 97385204u, 0, 10, &be_const_str_count);
-be_define_const_str(count, "count", 967958004u, 0, 5, &be_const_str_update);
-be_define_const_str(update, "update", 672109684u, 0, 6, NULL);
-be_define_const_str(SERIAL_7N1, "SERIAL_7N1", 1891060246u, 0, 10, &be_const_str_find_key_i);
-be_define_const_str(find_key_i, "find_key_i", 850136726u, 0, 10, NULL);
-be_define_const_str(content_button, "content_button", 1956476087u, 0, 14, NULL);
-be_define_const_str(AudioGeneratorMP3, "AudioGeneratorMP3", 2199818488u, 0, 17, &be_const_str_AudioGeneratorWAV);
-be_define_const_str(AudioGeneratorWAV, "AudioGeneratorWAV", 2746509368u, 0, 17, &be_const_str__buffer);
-be_define_const_str(_buffer, "_buffer", 2044888568u, 0, 7, &be_const_str_remove_driver);
-be_define_const_str(remove_driver, "remove_driver", 1030243768u, 0, 13, &be_const_str_false);
-be_define_const_str(false, "false", 184981848u, 62, 5, NULL);
-be_define_const_str(fromptr, "fromptr", 666189689u, 0, 7, NULL);
-be_define_const_str(geti, "geti", 2381006490u, 0, 4, &be_const_str_lower);
-be_define_const_str(lower, "lower", 3038577850u, 0, 5, &be_const_str_nan);
-be_define_const_str(nan, "nan", 797905850u, 0, 3, NULL);
-be_define_const_str(assert, "assert", 2774883451u, 0, 6, NULL);
-be_define_const_str(time_str, "time_str", 2613827612u, 0, 8, NULL);
-be_define_const_str(exists, "exists", 1002329533u, 0, 6, &be_const_str_read13);
-be_define_const_str(read13, "read13", 12887293u, 0, 6, &be_const_str_set_power);
-be_define_const_str(set_power, "set_power", 549820893u, 0, 9, NULL);
-be_define_const_str(seti, "seti", 1500556254u, 0, 4, &be_const_str_toptr);
-be_define_const_str(toptr, "toptr", 3379847454u, 0, 5, NULL);
-be_define_const_str(acos, "acos", 1006755615u, 0, 4, NULL);
-be_define_const_str(find_op, "find_op", 3766713376u, 0, 7, NULL);
+be_define_const_str(_ptr, "_ptr", 306235816u, 0, 4, &be_const_str_isinstance);
be_define_const_str(isinstance, "isinstance", 3669352738u, 0, 10, NULL);
-be_define_const_str(cb_dispatch, "cb_dispatch", 1741510499u, 0, 11, NULL);
-be_define_const_str(SERIAL_5O2, "SERIAL_5O2", 3732325060u, 0, 10, &be_const_str_bytes);
-be_define_const_str(bytes, "bytes", 1706151940u, 0, 5, &be_const_str_public_key);
-be_define_const_str(public_key, "public_key", 4169142980u, 0, 10, &be_const_str_continue);
-be_define_const_str(continue, "continue", 2977070660u, 59, 8, NULL);
-be_define_const_str(, "", 2166136261u, 0, 0, &be_const_str__available);
-be_define_const_str(_available, "_available", 1306196581u, 0, 10, &be_const_str__def);
-be_define_const_str(_def, "_def", 1985022181u, 0, 4, &be_const_str_i2c_enabled);
-be_define_const_str(i2c_enabled, "i2c_enabled", 218388101u, 0, 11, &be_const_str_reverse);
-be_define_const_str(reverse, "reverse", 558918661u, 0, 7, &be_const_str_true);
-be_define_const_str(true, "true", 1303515621u, 61, 4, NULL);
-be_define_const_str(dac_voltage, "dac_voltage", 1552257222u, 0, 11, &be_const_str_name);
-be_define_const_str(name, "name", 2369371622u, 0, 4, &be_const_str_reverse_gamma10);
-be_define_const_str(reverse_gamma10, "reverse_gamma10", 739112262u, 0, 15, NULL);
-be_define_const_str(add_rule, "add_rule", 596540743u, 0, 8, &be_const_str_dump);
-be_define_const_str(dump, "dump", 3663001223u, 0, 4, NULL);
-be_define_const_str(AudioOutputI2S, "AudioOutputI2S", 638031784u, 0, 14, &be_const_str_attrdump);
-be_define_const_str(attrdump, "attrdump", 1521571304u, 0, 8, &be_const_str_fromstring);
-be_define_const_str(fromstring, "fromstring", 610302344u, 0, 10, &be_const_str_publish);
-be_define_const_str(publish, "publish", 264247304u, 0, 7, &be_const_str_wifi);
-be_define_const_str(wifi, "wifi", 120087624u, 0, 4, NULL);
-be_define_const_str(_write, "_write", 2215462825u, 0, 6, NULL);
-be_define_const_str(resp_cmnd, "resp_cmnd", 2869459626u, 0, 9, &be_const_str_tomap);
-be_define_const_str(tomap, "tomap", 612167626u, 0, 5, NULL);
-be_define_const_str(content_start, "content_start", 2937509069u, 0, 13, &be_const_str_traceback);
-be_define_const_str(traceback, "traceback", 3385188109u, 0, 9, &be_const_str_as);
-be_define_const_str(as, "as", 1579491469u, 67, 2, NULL);
-be_define_const_str(memory, "memory", 2229924270u, 0, 6, &be_const_str_pin_mode);
-be_define_const_str(pin_mode, "pin_mode", 3258314030u, 0, 8, NULL);
-be_define_const_str(EC_C25519, "EC_C25519", 95492591u, 0, 9, NULL);
-be_define_const_str(str, "str", 3259748752u, 0, 3, &be_const_str_tanh);
-be_define_const_str(tanh, "tanh", 153638352u, 0, 4, &be_const_str_write_bytes);
-be_define_const_str(write_bytes, "write_bytes", 1227543792u, 0, 11, &be_const_str_except);
-be_define_const_str(except, "except", 950914032u, 69, 6, NULL);
-be_define_const_str(get_option, "get_option", 2123730033u, 0, 10, NULL);
-be_define_const_str(dot_w, ".w", 1255414514u, 0, 2, NULL);
-be_define_const_str(SERIAL_7O1, "SERIAL_7O1", 1823802675u, 0, 10, &be_const_str_SERIAL_8N1);
-be_define_const_str(SERIAL_8N1, "SERIAL_8N1", 2369297235u, 0, 10, &be_const_str_init);
-be_define_const_str(init, "init", 380752755u, 0, 4, NULL);
-be_define_const_str(_timers, "_timers", 2600100916u, 0, 7, &be_const_str_super);
-be_define_const_str(super, "super", 4152230356u, 0, 5, NULL);
-be_define_const_str(GET, "GET", 2531704439u, 0, 3, &be_const_str_fromb64);
-be_define_const_str(fromb64, "fromb64", 2717019639u, 0, 7, NULL);
-be_define_const_str(break, "break", 3378807160u, 58, 5, NULL);
-be_define_const_str(_global_def, "_global_def", 646007001u, 0, 11, &be_const_str_bus);
-be_define_const_str(bus, "bus", 1607822841u, 0, 3, NULL);
-be_define_const_str(find, "find", 3186656602u, 0, 4, &be_const_str_resp_cmnd_failed);
-be_define_const_str(resp_cmnd_failed, "resp_cmnd_failed", 2136281562u, 0, 16, NULL);
-be_define_const_str(SERIAL_6N2, "SERIAL_6N2", 148562844u, 0, 10, &be_const_str__request_from);
-be_define_const_str(_request_from, "_request_from", 3965148604u, 0, 13, &be_const_str_cos);
-be_define_const_str(cos, "cos", 4220379804u, 0, 3, &be_const_str_cosh);
-be_define_const_str(cosh, "cosh", 4099687964u, 0, 4, &be_const_str_set_useragent);
-be_define_const_str(set_useragent, "set_useragent", 612237244u, 0, 13, &be_const_str_size);
-be_define_const_str(size, "size", 597743964u, 0, 4, &be_const_str_web_send_decimal);
-be_define_const_str(web_send_decimal, "web_send_decimal", 1407210204u, 0, 16, &be_const_str_write);
-be_define_const_str(write, "write", 3190202204u, 0, 5, NULL);
-be_define_const_str(module, "module", 3617558685u, 0, 6, &be_const_str_try_rule);
-be_define_const_str(try_rule, "try_rule", 1986449405u, 0, 8, NULL);
-be_define_const_str(var, "var", 2317739966u, 64, 3, NULL);
-be_define_const_str(content_send_style, "content_send_style", 1087907647u, 0, 18, &be_const_str_sinh);
-be_define_const_str(sinh, "sinh", 282220607u, 0, 4, &be_const_str_return);
-be_define_const_str(return, "return", 2246981567u, 60, 6, NULL);
-be_define_const_str(asstring, "asstring", 1298225088u, 0, 8, &be_const_str_digital_read);
-be_define_const_str(digital_read, "digital_read", 3585496928u, 0, 12, &be_const_str_has_arg);
-be_define_const_str(has_arg, "has_arg", 424878688u, 0, 7, &be_const_str_number);
-be_define_const_str(number, "number", 467038368u, 0, 6, &be_const_str_remove_rule);
-be_define_const_str(remove_rule, "remove_rule", 3456211328u, 0, 11, NULL);
-be_define_const_str(get_string, "get_string", 4195847969u, 0, 10, &be_const_str_resize);
-be_define_const_str(resize, "resize", 3514612129u, 0, 6, NULL);
-be_define_const_str(encrypt, "encrypt", 2194327650u, 0, 7, NULL);
-be_define_const_str(opt_neq, "!=", 2428715011u, 0, 2, &be_const_str_add_driver);
-be_define_const_str(add_driver, "add_driver", 1654458371u, 0, 10, &be_const_str_close);
-be_define_const_str(close, "close", 667630371u, 0, 5, &be_const_str_member);
-be_define_const_str(member, "member", 719708611u, 0, 6, &be_const_str_response_append);
-be_define_const_str(response_append, "response_append", 450346371u, 0, 15, &be_const_str_split);
-be_define_const_str(split, "split", 2276994531u, 0, 5, &be_const_str_strftime);
-be_define_const_str(strftime, "strftime", 187738851u, 0, 8, NULL);
-be_define_const_str(exec_rules, "exec_rules", 1445221092u, 0, 10, NULL);
-be_define_const_str(AudioFileSourceFS, "AudioFileSourceFS", 1839147653u, 0, 17, &be_const_str__ccmd);
-be_define_const_str(_ccmd, "_ccmd", 2163421413u, 0, 5, &be_const_str_set_timer);
-be_define_const_str(set_timer, "set_timer", 2135414533u, 0, 9, &be_const_str_time_reached);
-be_define_const_str(time_reached, "time_reached", 2075136773u, 0, 12, NULL);
-be_define_const_str(SERIAL_7O2, "SERIAL_7O2", 1840580294u, 0, 10, &be_const_str_SERIAL_8N2);
-be_define_const_str(SERIAL_8N2, "SERIAL_8N2", 2386074854u, 0, 10, &be_const_str_if);
-be_define_const_str(if, "if", 959999494u, 50, 2, NULL);
-be_define_const_str(_ptr, "_ptr", 306235816u, 0, 4, &be_const_str_insert);
-be_define_const_str(insert, "insert", 3332609576u, 0, 6, &be_const_str_print);
-be_define_const_str(print, "print", 372738696u, 0, 5, &be_const_str_run_deferred);
-be_define_const_str(run_deferred, "run_deferred", 371594696u, 0, 12, &be_const_str_scan);
-be_define_const_str(scan, "scan", 3974641896u, 0, 4, &be_const_str_settings);
-be_define_const_str(settings, "settings", 1745255176u, 0, 8, NULL);
-be_define_const_str(arch, "arch", 2952804297u, 0, 4, &be_const_str_open);
-be_define_const_str(open, "open", 3546203337u, 0, 4, NULL);
-be_define_const_str(cmd, "cmd", 4136785899u, 0, 3, &be_const_str_loop);
-be_define_const_str(loop, "loop", 3723446379u, 0, 4, &be_const_str_wire1);
-be_define_const_str(wire1, "wire1", 3212721419u, 0, 5, NULL);
-be_define_const_str(nil, "nil", 228849900u, 63, 3, NULL);
-be_define_const_str(SERIAL_7E1, "SERIAL_7E1", 147718061u, 0, 10, &be_const_str_keys);
-be_define_const_str(keys, "keys", 4182378701u, 0, 4, &be_const_str_sin);
-be_define_const_str(sin, "sin", 3761252941u, 0, 3, NULL);
-be_define_const_str(calldepth, "calldepth", 3122364302u, 0, 9, &be_const_str_while);
-be_define_const_str(while, "while", 231090382u, 53, 5, NULL);
-be_define_const_str(counters, "counters", 4095866864u, 0, 8, &be_const_str_members);
-be_define_const_str(members, "members", 937576464u, 0, 7, &be_const_str_on);
-be_define_const_str(on, "on", 1630810064u, 0, 2, NULL);
-be_define_const_str(_rules, "_rules", 4266217105u, 0, 6, &be_const_str_collect);
-be_define_const_str(collect, "collect", 2399039025u, 0, 7, &be_const_str_url_encode);
-be_define_const_str(url_encode, "url_encode", 528392145u, 0, 10, NULL);
-be_define_const_str(codedump, "codedump", 1786337906u, 0, 8, NULL);
-be_define_const_str(dot_p2, ".p2", 232398067u, 0, 3, &be_const_str_MD5);
-be_define_const_str(MD5, "MD5", 1935726387u, 0, 3, &be_const_str__settings_def);
-be_define_const_str(_settings_def, "_settings_def", 3775560307u, 0, 13, NULL);
-be_define_const_str(erase, "erase", 1010949589u, 0, 5, NULL);
-be_define_const_str(gamma8, "gamma8", 3802843830u, 0, 6, &be_const_str_rand);
-be_define_const_str(rand, "rand", 2711325910u, 0, 4, &be_const_str_resp_cmnd_str);
-be_define_const_str(resp_cmnd_str, "resp_cmnd_str", 737845590u, 0, 13, &be_const_str_state);
+be_define_const_str(pin, "pin", 1866532500u, 0, 3, &be_const_str_size);
+be_define_const_str(size, "size", 597743964u, 0, 4, &be_const_str_state);
be_define_const_str(state, "state", 2016490230u, 0, 5, NULL);
-be_define_const_str(SERIAL_6O1, "SERIAL_6O1", 266153272u, 0, 10, &be_const_str_contains);
-be_define_const_str(contains, "contains", 1825239352u, 0, 8, &be_const_str_set_light);
-be_define_const_str(set_light, "set_light", 3176076152u, 0, 9, &be_const_str_setrange);
-be_define_const_str(setrange, "setrange", 3794019032u, 0, 8, &be_const_str_tan);
+be_define_const_str(dot_p, ".p", 1171526419u, 0, 2, &be_const_str__drivers);
+be_define_const_str(_drivers, "_drivers", 3260328985u, 0, 8, &be_const_str_erase);
+be_define_const_str(erase, "erase", 1010949589u, 0, 5, NULL);
+be_define_const_str(I2C_Driver, "I2C_Driver", 1714501658u, 0, 10, &be_const_str_addr);
+be_define_const_str(addr, "addr", 1087856498u, 0, 4, &be_const_str_copy);
+be_define_const_str(copy, "copy", 3848464964u, 0, 4, &be_const_str_find_key_i);
+be_define_const_str(find_key_i, "find_key_i", 850136726u, 0, 10, &be_const_str_pin_mode);
+be_define_const_str(pin_mode, "pin_mode", 3258314030u, 0, 8, &be_const_str_setrange);
+be_define_const_str(setrange, "setrange", 3794019032u, 0, 8, NULL);
+be_define_const_str(SERIAL_8N1, "SERIAL_8N1", 2369297235u, 0, 10, &be_const_str_char);
+be_define_const_str(char, "char", 2823553821u, 0, 4, &be_const_str_concat);
+be_define_const_str(concat, "concat", 4124019837u, 0, 6, &be_const_str_remove);
+be_define_const_str(remove, "remove", 3683784189u, 0, 6, &be_const_str_serial);
+be_define_const_str(serial, "serial", 3687697785u, 0, 6, NULL);
+be_define_const_str(SERIAL_5O2, "SERIAL_5O2", 3732325060u, 0, 10, &be_const_str__read);
+be_define_const_str(_read, "_read", 346717030u, 0, 5, &be_const_str_cmd_res);
+be_define_const_str(cmd_res, "cmd_res", 921166762u, 0, 7, &be_const_str_contains);
+be_define_const_str(contains, "contains", 1825239352u, 0, 8, &be_const_str_imax);
+be_define_const_str(imax, "imax", 3084515410u, 0, 4, &be_const_str_super);
+be_define_const_str(super, "super", 4152230356u, 0, 5, &be_const_str_try);
+be_define_const_str(try, "try", 2887626766u, 68, 3, NULL);
+be_define_const_str(last_modified, "last_modified", 772177145u, 0, 13, &be_const_str_return);
+be_define_const_str(return, "return", 2246981567u, 60, 6, NULL);
+be_define_const_str(SERIAL_6N2, "SERIAL_6N2", 148562844u, 0, 10, NULL);
+be_define_const_str(call, "call", 3018949801u, 0, 4, &be_const_str_resize);
+be_define_const_str(resize, "resize", 3514612129u, 0, 6, NULL);
+be_define_const_str(escape, "escape", 2652972038u, 0, 6, NULL);
+be_define_const_str(upper, "upper", 176974407u, 0, 5, NULL);
+be_define_const_str(end, "end", 1787721130u, 56, 3, NULL);
+be_define_const_str(gamma8, "gamma8", 3802843830u, 0, 6, &be_const_str_memory);
+be_define_const_str(memory, "memory", 2229924270u, 0, 6, &be_const_str_wifi);
+be_define_const_str(wifi, "wifi", 120087624u, 0, 4, NULL);
+be_define_const_str(yield, "yield", 1821831854u, 0, 5, NULL);
+be_define_const_str(get_option, "get_option", 2123730033u, 0, 10, &be_const_str_init);
+be_define_const_str(init, "init", 380752755u, 0, 4, &be_const_str_read);
+be_define_const_str(read, "read", 3470762949u, 0, 4, NULL);
+be_define_const_str(_settings_ptr, "_settings_ptr", 1825772182u, 0, 13, &be_const_str__timers);
+be_define_const_str(_timers, "_timers", 2600100916u, 0, 7, &be_const_str_finish);
+be_define_const_str(finish, "finish", 1494643858u, 0, 6, NULL);
+be_define_const_str(__upper__, "__upper__", 3612202883u, 0, 9, &be_const_str_dump);
+be_define_const_str(dump, "dump", 3663001223u, 0, 4, NULL);
+be_define_const_str(save, "save", 3439296072u, 0, 4, NULL);
+be_define_const_str(__lower__, "__lower__", 123855590u, 0, 9, &be_const_str_listdir);
+be_define_const_str(listdir, "listdir", 2005220720u, 0, 7, NULL);
+be_define_const_str(check_privileged_access, "check_privileged_access", 3692933968u, 0, 23, &be_const_str_rand);
+be_define_const_str(rand, "rand", 2711325910u, 0, 4, &be_const_str_web_send);
+be_define_const_str(web_send, "web_send", 2989941448u, 0, 8, NULL);
+be_define_const_str(i2c_enabled, "i2c_enabled", 218388101u, 0, 11, &be_const_str_wire1);
+be_define_const_str(wire1, "wire1", 3212721419u, 0, 5, NULL);
+be_define_const_str(dac_voltage, "dac_voltage", 1552257222u, 0, 11, &be_const_str_imin);
+be_define_const_str(imin, "imin", 2714127864u, 0, 4, &be_const_str_log10);
+be_define_const_str(log10, "log10", 2346846000u, 0, 5, &be_const_str_skip);
+be_define_const_str(skip, "skip", 1097563074u, 0, 4, &be_const_str_else);
+be_define_const_str(else, "else", 3183434736u, 52, 4, &be_const_str_except);
+be_define_const_str(except, "except", 950914032u, 69, 6, &be_const_str_nil);
+be_define_const_str(nil, "nil", 228849900u, 63, 3, NULL);
+be_define_const_str(resp_cmnd_error, "resp_cmnd_error", 2404088863u, 0, 15, NULL);
+be_define_const_str(calldepth, "calldepth", 3122364302u, 0, 9, &be_const_str_do);
+be_define_const_str(do, "do", 1646057492u, 65, 2, NULL);
+be_define_const_str(__iterator__, "__iterator__", 3884039703u, 0, 12, &be_const_str_true);
+be_define_const_str(true, "true", 1303515621u, 61, 4, NULL);
+be_define_const_str(rad, "rad", 1358899048u, 0, 3, &be_const_str_import);
+be_define_const_str(import, "import", 288002260u, 66, 6, NULL);
+be_define_const_str(SERIAL_8O2, "SERIAL_8O2", 272345123u, 0, 10, &be_const_str_gamma10);
+be_define_const_str(gamma10, "gamma10", 3472052483u, 0, 7, &be_const_str_elif);
+be_define_const_str(elif, "elif", 3232090307u, 51, 4, NULL);
+be_define_const_str(resp_cmnd, "resp_cmnd", 2869459626u, 0, 9, &be_const_str_shared_key);
+be_define_const_str(shared_key, "shared_key", 2200833624u, 0, 10, &be_const_str_web_send_decimal);
+be_define_const_str(web_send_decimal, "web_send_decimal", 1407210204u, 0, 16, &be_const_str_write8);
+be_define_const_str(write8, "write8", 3133991532u, 0, 6, NULL);
+be_define_const_str(SERIAL_5E1, "SERIAL_5E1", 1163775235u, 0, 10, &be_const_str_member);
+be_define_const_str(member, "member", 719708611u, 0, 6, &be_const_str_sin);
+be_define_const_str(sin, "sin", 3761252941u, 0, 3, NULL);
+be_define_const_str(OneWire, "OneWire", 2298990722u, 0, 7, &be_const_str_SERIAL_7O2);
+be_define_const_str(SERIAL_7O2, "SERIAL_7O2", 1840580294u, 0, 10, &be_const_str__begin_transmission);
+be_define_const_str(_begin_transmission, "_begin_transmission", 2779461176u, 0, 19, &be_const_str_get_switch);
+be_define_const_str(get_switch, "get_switch", 164821028u, 0, 10, &be_const_str_name);
+be_define_const_str(name, "name", 2369371622u, 0, 4, &be_const_str_nan);
+be_define_const_str(nan, "nan", 797905850u, 0, 3, NULL);
+be_define_const_str(add, "add", 993596020u, 0, 3, &be_const_str_eth);
+be_define_const_str(eth, "eth", 2191266556u, 0, 3, &be_const_str_find);
+be_define_const_str(find, "find", 3186656602u, 0, 4, &be_const_str_read32);
+be_define_const_str(read32, "read32", 1741276240u, 0, 6, &be_const_str_remove_cmd);
+be_define_const_str(remove_cmd, "remove_cmd", 3832315702u, 0, 10, NULL);
+be_define_const_str(gc, "gc", 1042313471u, 0, 2, &be_const_str_reset_search);
+be_define_const_str(reset_search, "reset_search", 1350414305u, 0, 12, NULL);
+be_define_const_str(content_stop, "content_stop", 658554751u, 0, 12, NULL);
+be_define_const_str(counters, "counters", 4095866864u, 0, 8, &be_const_str_detect);
+be_define_const_str(detect, "detect", 8884370u, 0, 6, &be_const_str_exp);
+be_define_const_str(exp, "exp", 1923516200u, 0, 3, &be_const_str_on);
+be_define_const_str(on, "on", 1630810064u, 0, 2, NULL);
+be_define_const_str(arg, "arg", 1047474471u, 0, 3, &be_const_str_reduce);
+be_define_const_str(reduce, "reduce", 2002030311u, 0, 6, &be_const_str_split);
+be_define_const_str(split, "split", 2276994531u, 0, 5, &be_const_str_strftime);
+be_define_const_str(strftime, "strftime", 187738851u, 0, 8, &be_const_str_raise);
+be_define_const_str(raise, "raise", 1593437475u, 70, 5, NULL);
+be_define_const_str(AudioOutputI2S, "AudioOutputI2S", 638031784u, 0, 14, &be_const_str_if);
+be_define_const_str(if, "if", 959999494u, 50, 2, NULL);
+be_define_const_str(cb_dispatch, "cb_dispatch", 1741510499u, 0, 11, &be_const_str_exec_tele);
+be_define_const_str(exec_tele, "exec_tele", 1020751601u, 0, 9, &be_const_str_srand);
+be_define_const_str(srand, "srand", 465518633u, 0, 5, NULL);
+be_define_const_str(write_bytes, "write_bytes", 1227543792u, 0, 11, NULL);
+be_define_const_str(_settings_def, "_settings_def", 3775560307u, 0, 13, NULL);
+be_define_const_str(cosh, "cosh", 4099687964u, 0, 4, &be_const_str_pi);
+be_define_const_str(pi, "pi", 1213090802u, 0, 2, &be_const_str_remove_rule);
+be_define_const_str(remove_rule, "remove_rule", 3456211328u, 0, 11, &be_const_str_scale_uint);
+be_define_const_str(scale_uint, "scale_uint", 3090811094u, 0, 10, &be_const_str_var);
+be_define_const_str(var, "var", 2317739966u, 64, 3, NULL);
+be_define_const_str(SERIAL_8E2, "SERIAL_8E2", 2421454473u, 0, 10, &be_const_str_acos);
+be_define_const_str(acos, "acos", 1006755615u, 0, 4, &be_const_str_gen_cb);
+be_define_const_str(gen_cb, "gen_cb", 3245227551u, 0, 6, &be_const_str_read_bytes);
+be_define_const_str(read_bytes, "read_bytes", 3576733173u, 0, 10, NULL);
+be_define_const_str(AudioFileSource, "AudioFileSource", 2959980058u, 0, 15, &be_const_str_SERIAL_5N1);
+be_define_const_str(SERIAL_5N1, "SERIAL_5N1", 3313031680u, 0, 10, &be_const_str_wire);
+be_define_const_str(wire, "wire", 4082753944u, 0, 4, &be_const_str_while);
+be_define_const_str(while, "while", 231090382u, 53, 5, NULL);
+be_define_const_str(SERIAL_7N2, "SERIAL_7N2", 1874282627u, 0, 10, &be_const_str_get_size);
+be_define_const_str(get_size, "get_size", 2803644713u, 0, 8, NULL);
+be_define_const_str(exec_rules, "exec_rules", 1445221092u, 0, 10, NULL);
+be_define_const_str(_available, "_available", 1306196581u, 0, 10, &be_const_str_search);
+be_define_const_str(search, "search", 2150836393u, 0, 6, NULL);
+be_define_const_str(global, "global", 503252654u, 0, 6, NULL);
+be_define_const_str(collect, "collect", 2399039025u, 0, 7, &be_const_str_input);
+be_define_const_str(input, "input", 4191711099u, 0, 5, &be_const_str_response_append);
+be_define_const_str(response_append, "response_append", 450346371u, 0, 15, NULL);
+be_define_const_str(str, "str", 3259748752u, 0, 3, NULL);
+be_define_const_str(SERIAL_6E2, "SERIAL_6E2", 317471867u, 0, 10, &be_const_str_SERIAL_7E1);
+be_define_const_str(SERIAL_7E1, "SERIAL_7E1", 147718061u, 0, 10, &be_const_str_content_button);
+be_define_const_str(content_button, "content_button", 1956476087u, 0, 14, NULL);
+be_define_const_str(number, "number", 467038368u, 0, 6, &be_const_str_tanh);
+be_define_const_str(tanh, "tanh", 153638352u, 0, 4, &be_const_str_toptr);
+be_define_const_str(toptr, "toptr", 3379847454u, 0, 5, &be_const_str_write_bit);
+be_define_const_str(write_bit, "write_bit", 2660990436u, 0, 9, NULL);
+be_define_const_str(add_cmd, "add_cmd", 3361630879u, 0, 7, &be_const_str_select);
+be_define_const_str(select, "select", 297952813u, 0, 6, &be_const_str_traceback);
+be_define_const_str(traceback, "traceback", 3385188109u, 0, 9, NULL);
+be_define_const_str(atan2, "atan2", 3173440503u, 0, 5, &be_const_str_loop);
+be_define_const_str(loop, "loop", 3723446379u, 0, 4, &be_const_str_millis);
+be_define_const_str(millis, "millis", 1214679063u, 0, 6, &be_const_str_url_encode);
+be_define_const_str(url_encode, "url_encode", 528392145u, 0, 10, NULL);
+be_define_const_str(_end_transmission, "_end_transmission", 3237480400u, 0, 17, &be_const_str_deinit);
+be_define_const_str(deinit, "deinit", 2345559592u, 0, 6, &be_const_str_tan);
be_define_const_str(tan, "tan", 2633446552u, 0, 3, NULL);
-be_define_const_str(target_search, "target_search", 1947846553u, 0, 13, NULL);
-be_define_const_str(abs, "abs", 709362235u, 0, 3, &be_const_str_resp_cmnd_done);
-be_define_const_str(resp_cmnd_done, "resp_cmnd_done", 2601874875u, 0, 14, NULL);
-be_define_const_str(eth, "eth", 2191266556u, 0, 3, NULL);
-be_define_const_str(SERIAL_5O1, "SERIAL_5O1", 3782657917u, 0, 10, &be_const_str_concat);
-be_define_const_str(concat, "concat", 4124019837u, 0, 6, &be_const_str_flush);
-be_define_const_str(flush, "flush", 3002334877u, 0, 5, &be_const_str_get_free_heap);
-be_define_const_str(get_free_heap, "get_free_heap", 625069757u, 0, 13, &be_const_str_push);
-be_define_const_str(push, "push", 2272264157u, 0, 4, NULL);
-be_define_const_str(compile, "compile", 1000265118u, 0, 7, &be_const_str_wire2);
-be_define_const_str(wire2, "wire2", 3229499038u, 0, 5, NULL);
-be_define_const_str(add_cmd, "add_cmd", 3361630879u, 0, 7, &be_const_str_atan);
-be_define_const_str(atan, "atan", 108579519u, 0, 4, &be_const_str_event);
-be_define_const_str(event, "event", 4264611999u, 0, 5, &be_const_str_issubclass);
-be_define_const_str(issubclass, "issubclass", 4078395519u, 0, 10, &be_const_str_write_file);
-be_define_const_str(write_file, "write_file", 3177658879u, 0, 10, &be_const_str_class);
-be_define_const_str(class, "class", 2872970239u, 57, 5, NULL);
+be_define_const_str(geti, "geti", 2381006490u, 0, 4, &be_const_str_seti);
+be_define_const_str(seti, "seti", 1500556254u, 0, 4, NULL);
+be_define_const_str(_buffer, "_buffer", 2044888568u, 0, 7, NULL);
+be_define_const_str(atan, "atan", 108579519u, 0, 4, &be_const_str_content_flush);
+be_define_const_str(content_flush, "content_flush", 214922475u, 0, 13, &be_const_str_list);
+be_define_const_str(list, "list", 217798785u, 0, 4, &be_const_str_tolower);
+be_define_const_str(tolower, "tolower", 1042520049u, 0, 7, NULL);
+be_define_const_str(dot_len, ".len", 850842136u, 0, 4, &be_const_str__request_from);
+be_define_const_str(_request_from, "_request_from", 3965148604u, 0, 13, &be_const_str_has_arg);
+be_define_const_str(has_arg, "has_arg", 424878688u, 0, 7, NULL);
+be_define_const_str(pow, "pow", 1479764693u, 0, 3, &be_const_str_push);
+be_define_const_str(push, "push", 2272264157u, 0, 4, &be_const_str_read24);
+be_define_const_str(read24, "read24", 1808533811u, 0, 6, NULL);
+be_define_const_str(enabled, "enabled", 49525662u, 0, 7, &be_const_str_webclient);
+be_define_const_str(webclient, "webclient", 4076389146u, 0, 9, NULL);
+be_define_const_str(opt_neq, "!=", 2428715011u, 0, 2, &be_const_str_dot_p2);
+be_define_const_str(dot_p2, ".p2", 232398067u, 0, 3, NULL);
+be_define_const_str(Wire, "Wire", 1938276536u, 0, 4, &be_const_str_decrypt);
+be_define_const_str(decrypt, "decrypt", 2886974618u, 0, 7, NULL);
+be_define_const_str(floor, "floor", 3102149661u, 0, 5, &be_const_str_issubclass);
+be_define_const_str(issubclass, "issubclass", 4078395519u, 0, 10, NULL);
+be_define_const_str(classname, "classname", 1998589948u, 0, 9, &be_const_str_rtc);
+be_define_const_str(rtc, "rtc", 1070575216u, 0, 3, NULL);
+be_define_const_str(add_driver, "add_driver", 1654458371u, 0, 10, NULL);
static const bstring* const m_string_table[] = {
- (const bstring *)&be_const_str_SERIAL_5N1,
- (const bstring *)&be_const_str__global_addr,
- (const bstring *)&be_const_str_OneWire,
- (const bstring *)&be_const_str_SERIAL_8O2,
- (const bstring *)&be_const_str_copy,
- (const bstring *)&be_const_str_tostring,
- (const bstring *)&be_const_str_dot_p1,
- (const bstring *)&be_const_str_read8,
- (const bstring *)&be_const_str_rad,
- (const bstring *)&be_const_str_load,
- (const bstring *)&be_const_str_opt_add,
NULL,
- (const bstring *)&be_const_str_chars_in_string,
- (const bstring *)&be_const_str_select,
- (const bstring *)&be_const_str_global,
- (const bstring *)&be_const_str_opt_eq,
- (const bstring *)&be_const_str_SERIAL_8E1,
- (const bstring *)&be_const_str_get_power,
- (const bstring *)&be_const_str_addr,
- (const bstring *)&be_const_str_dot_p,
- (const bstring *)&be_const_str_add,
- (const bstring *)&be_const_str_SERIAL_6N1,
- (const bstring *)&be_const_str_SERIAL_8O1,
- (const bstring *)&be_const_str___iterator__,
- (const bstring *)&be_const_str_available,
- (const bstring *)&be_const_str__drivers,
- (const bstring *)&be_const_str_opt_call,
- (const bstring *)&be_const_str_SERIAL_6E2,
- (const bstring *)&be_const_str_classname,
- (const bstring *)&be_const_str_remove,
- (const bstring *)&be_const_str_begin,
- (const bstring *)&be_const_str_content_stop,
- (const bstring *)&be_const_str_reset,
- NULL,
- (const bstring *)&be_const_str_clear,
- (const bstring *)&be_const_str_SERIAL_5E1,
- (const bstring *)&be_const_str_setitem,
- (const bstring *)&be_const_str_stop,
- (const bstring *)&be_const_str_AES_GCM,
- (const bstring *)&be_const_str_exec_cmd,
- (const bstring *)&be_const_str_ceil,
- (const bstring *)&be_const_str_call,
- (const bstring *)&be_const_str_cmd_res,
- NULL,
- NULL,
- (const bstring *)&be_const_str_opt_connect,
- (const bstring *)&be_const_str_SERIAL_6E1,
- (const bstring *)&be_const_str__cb,
- (const bstring *)&be_const_str_AudioOutput,
- (const bstring *)&be_const_str_SERIAL_6O2,
- (const bstring *)&be_const_str_detect,
- (const bstring *)&be_const_str_depower,
- (const bstring *)&be_const_str_add_header,
- (const bstring *)&be_const_str_pow,
- (const bstring *)&be_const_str_SERIAL_5E2,
- (const bstring *)&be_const_str_get,
- (const bstring *)&be_const_str_dot_len,
- (const bstring *)&be_const_str_SERIAL_5N2,
- (const bstring *)&be_const_str_AudioFileSource,
- (const bstring *)&be_const_str_digital_write,
- NULL,
- (const bstring *)&be_const_str_char,
- (const bstring *)&be_const_str_AudioGenerator,
- (const bstring *)&be_const_str_byte,
- (const bstring *)&be_const_str_dot_size,
- (const bstring *)&be_const_str_list,
- NULL,
- (const bstring *)&be_const_str_SERIAL_7N2,
- (const bstring *)&be_const_str_Tasmota,
- (const bstring *)&be_const_str_read,
- (const bstring *)&be_const_str___lower__,
- (const bstring *)&be_const_str_POST,
- (const bstring *)&be_const_str_deinit,
- (const bstring *)&be_const_str_SERIAL_8E2,
- (const bstring *)&be_const_str_isnan,
- (const bstring *)&be_const_str_arg_name,
- (const bstring *)&be_const_str_get_light,
- NULL,
- NULL,
- (const bstring *)&be_const_str_sqrt,
- (const bstring *)&be_const_str__end_transmission,
- (const bstring *)&be_const_str_exec_tele,
- (const bstring *)&be_const_str_format,
- NULL,
- (const bstring *)&be_const_str_SERIAL_7E2,
- NULL,
- (const bstring *)&be_const_str_SERIAL_7N1,
- (const bstring *)&be_const_str_content_button,
- (const bstring *)&be_const_str_AudioGeneratorMP3,
- (const bstring *)&be_const_str_fromptr,
- (const bstring *)&be_const_str_geti,
- (const bstring *)&be_const_str_assert,
- (const bstring *)&be_const_str_time_str,
- (const bstring *)&be_const_str_exists,
- (const bstring *)&be_const_str_seti,
- (const bstring *)&be_const_str_acos,
- (const bstring *)&be_const_str_find_op,
- NULL,
- (const bstring *)&be_const_str_isinstance,
- (const bstring *)&be_const_str_cb_dispatch,
- (const bstring *)&be_const_str_SERIAL_5O2,
- (const bstring *)&be_const_str_,
- (const bstring *)&be_const_str_dac_voltage,
- (const bstring *)&be_const_str_add_rule,
- (const bstring *)&be_const_str_AudioOutputI2S,
- (const bstring *)&be_const_str__write,
- (const bstring *)&be_const_str_resp_cmnd,
- NULL,
- NULL,
- (const bstring *)&be_const_str_content_start,
- (const bstring *)&be_const_str_memory,
- (const bstring *)&be_const_str_EC_C25519,
- (const bstring *)&be_const_str_str,
- (const bstring *)&be_const_str_get_option,
- (const bstring *)&be_const_str_dot_w,
- (const bstring *)&be_const_str_SERIAL_7O1,
- (const bstring *)&be_const_str__timers,
- NULL,
- NULL,
- (const bstring *)&be_const_str_GET,
- (const bstring *)&be_const_str_break,
- (const bstring *)&be_const_str__global_def,
- (const bstring *)&be_const_str_find,
- NULL,
- (const bstring *)&be_const_str_SERIAL_6N2,
- (const bstring *)&be_const_str_module,
- (const bstring *)&be_const_str_var,
- (const bstring *)&be_const_str_content_send_style,
- (const bstring *)&be_const_str_asstring,
- (const bstring *)&be_const_str_get_string,
- (const bstring *)&be_const_str_encrypt,
- (const bstring *)&be_const_str_opt_neq,
- (const bstring *)&be_const_str_exec_rules,
- (const bstring *)&be_const_str_AudioFileSourceFS,
- (const bstring *)&be_const_str_SERIAL_7O2,
- NULL,
- (const bstring *)&be_const_str__ptr,
+ (const bstring *)&be_const_str_setmember,
+ (const bstring *)&be_const_str_hex,
(const bstring *)&be_const_str_arch,
+ (const bstring *)&be_const_str_top,
+ (const bstring *)&be_const_str_content_start,
+ (const bstring *)&be_const_str_compile,
+ (const bstring *)&be_const_str_arg_name,
+ (const bstring *)&be_const_str_insert,
+ (const bstring *)&be_const_str_open,
NULL,
- (const bstring *)&be_const_str_cmd,
- (const bstring *)&be_const_str_nil,
- (const bstring *)&be_const_str_SERIAL_7E1,
- (const bstring *)&be_const_str_calldepth,
+ (const bstring *)&be_const_str_ctypes_bytes,
+ (const bstring *)&be_const_str_reset,
+ (const bstring *)&be_const_str_POST,
+ (const bstring *)&be_const_str_available,
NULL,
- (const bstring *)&be_const_str_counters,
- (const bstring *)&be_const_str__rules,
- (const bstring *)&be_const_str_codedump,
- (const bstring *)&be_const_str_dot_p2,
- NULL,
- (const bstring *)&be_const_str_erase,
- (const bstring *)&be_const_str_gamma8,
- NULL,
- (const bstring *)&be_const_str_SERIAL_6O1,
+ (const bstring *)&be_const_str__get_cb,
+ (const bstring *)&be_const_str_get_string,
+ (const bstring *)&be_const_str_asstring,
+ (const bstring *)&be_const_str_static,
+ (const bstring *)&be_const_str_AES_GCM,
+ (const bstring *)&be_const_str_close,
+ (const bstring *)&be_const_str_find_op,
+ (const bstring *)&be_const_str_get,
+ (const bstring *)&be_const_str_print,
(const bstring *)&be_const_str_target_search,
NULL,
- (const bstring *)&be_const_str_abs,
- (const bstring *)&be_const_str_eth,
+ (const bstring *)&be_const_str__ccmd,
+ (const bstring *)&be_const_str_allocated,
+ (const bstring *)&be_const_str_GET,
+ (const bstring *)&be_const_str_SERIAL_8E1,
+ (const bstring *)&be_const_str_assert,
+ (const bstring *)&be_const_str_codedump,
+ (const bstring *)&be_const_str_opt_connect,
+ (const bstring *)&be_const_str_update,
+ NULL,
+ (const bstring *)&be_const_str__cmd,
(const bstring *)&be_const_str_SERIAL_5O1,
- (const bstring *)&be_const_str_compile,
- (const bstring *)&be_const_str_add_cmd
+ (const bstring *)&be_const_str_SERIAL_7E2,
+ (const bstring *)&be_const_str_SERIAL_6N1,
+ (const bstring *)&be_const_str_Tasmota,
+ (const bstring *)&be_const_str_time_reached,
+ (const bstring *)&be_const_str_chars_in_string,
+ (const bstring *)&be_const_str_add_rule,
+ NULL,
+ NULL,
+ (const bstring *)&be_const_str_SERIAL_8O1,
+ (const bstring *)&be_const_str_AudioFileSourceFS,
+ (const bstring *)&be_const_str_AudioGenerator,
+ (const bstring *)&be_const_str__global_addr,
+ (const bstring *)&be_const_str_dot_w,
+ (const bstring *)&be_const_str_MD5,
+ (const bstring *)&be_const_str_break,
+ (const bstring *)&be_const_str_digital_write,
+ (const bstring *)&be_const_str_asin,
+ (const bstring *)&be_const_str__def,
+ (const bstring *)&be_const_str_set_light,
+ (const bstring *)&be_const_str_arg_size,
+ NULL,
+ (const bstring *)&be_const_str_opt_eq,
+ (const bstring *)&be_const_str_kv,
+ (const bstring *)&be_const_str_tostring,
+ (const bstring *)&be_const_str_format,
+ (const bstring *)&be_const_str_log,
+ (const bstring *)&be_const_str_SERIAL_7N1,
+ (const bstring *)&be_const_str_stop,
+ (const bstring *)&be_const_str_count,
+ (const bstring *)&be_const_str_byte,
+ (const bstring *)&be_const_str_fromstring,
+ (const bstring *)&be_const_str_cmd,
+ (const bstring *)&be_const_str_SERIAL_6E1,
+ (const bstring *)&be_const_str_EC_C25519,
+ (const bstring *)&be_const_str_read12,
+ (const bstring *)&be_const_str__write,
+ (const bstring *)&be_const_str_opt_call,
+ NULL,
+ (const bstring *)&be_const_str_AudioGeneratorMP3,
+ (const bstring *)&be_const_str_ctypes_bytes_dyn,
+ (const bstring *)&be_const_str_set_auth,
+ (const bstring *)&be_const_str_,
+ (const bstring *)&be_const_str_public_key,
+ (const bstring *)&be_const_str_get_power,
+ (const bstring *)&be_const_str_opt_add,
+ (const bstring *)&be_const_str_getbits,
+ (const bstring *)&be_const_str_dot_p1,
+ (const bstring *)&be_const_str_read8,
+ (const bstring *)&be_const_str_AudioGeneratorWAV,
+ (const bstring *)&be_const_str__global_def,
+ (const bstring *)&be_const_str__ptr,
+ NULL,
+ (const bstring *)&be_const_str_pin,
+ (const bstring *)&be_const_str_dot_p,
+ (const bstring *)&be_const_str_I2C_Driver,
+ (const bstring *)&be_const_str_SERIAL_8N1,
+ (const bstring *)&be_const_str_SERIAL_5O2,
+ (const bstring *)&be_const_str_last_modified,
+ (const bstring *)&be_const_str_SERIAL_6N2,
+ (const bstring *)&be_const_str_call,
+ (const bstring *)&be_const_str_escape,
+ (const bstring *)&be_const_str_upper,
+ (const bstring *)&be_const_str_end,
+ NULL,
+ (const bstring *)&be_const_str_gamma8,
+ NULL,
+ (const bstring *)&be_const_str_yield,
+ (const bstring *)&be_const_str_get_option,
+ (const bstring *)&be_const_str__settings_ptr,
+ (const bstring *)&be_const_str___upper__,
+ (const bstring *)&be_const_str_save,
+ NULL,
+ (const bstring *)&be_const_str___lower__,
+ NULL,
+ (const bstring *)&be_const_str_check_privileged_access,
+ (const bstring *)&be_const_str_i2c_enabled,
+ (const bstring *)&be_const_str_dac_voltage,
+ (const bstring *)&be_const_str_resp_cmnd_error,
+ (const bstring *)&be_const_str_calldepth,
+ (const bstring *)&be_const_str___iterator__,
+ (const bstring *)&be_const_str_rad,
+ (const bstring *)&be_const_str_SERIAL_8O2,
+ (const bstring *)&be_const_str_resp_cmnd,
+ (const bstring *)&be_const_str_SERIAL_5E1,
+ (const bstring *)&be_const_str_OneWire,
+ NULL,
+ (const bstring *)&be_const_str_add,
+ (const bstring *)&be_const_str_gc,
+ NULL,
+ (const bstring *)&be_const_str_content_stop,
+ (const bstring *)&be_const_str_counters,
+ (const bstring *)&be_const_str_arg,
+ (const bstring *)&be_const_str_AudioOutputI2S,
+ (const bstring *)&be_const_str_cb_dispatch,
+ (const bstring *)&be_const_str_write_bytes,
+ (const bstring *)&be_const_str__settings_def,
+ (const bstring *)&be_const_str_cosh,
+ (const bstring *)&be_const_str_SERIAL_8E2,
+ (const bstring *)&be_const_str_AudioFileSource,
+ (const bstring *)&be_const_str_SERIAL_7N2,
+ (const bstring *)&be_const_str_exec_rules,
+ (const bstring *)&be_const_str__available,
+ (const bstring *)&be_const_str_global,
+ (const bstring *)&be_const_str_collect,
+ (const bstring *)&be_const_str_str,
+ (const bstring *)&be_const_str_SERIAL_6E2,
+ (const bstring *)&be_const_str_number,
+ (const bstring *)&be_const_str_add_cmd,
+ NULL,
+ (const bstring *)&be_const_str_atan2,
+ (const bstring *)&be_const_str__end_transmission,
+ NULL,
+ (const bstring *)&be_const_str_geti,
+ NULL,
+ (const bstring *)&be_const_str__buffer,
+ (const bstring *)&be_const_str_atan,
+ (const bstring *)&be_const_str_dot_len,
+ (const bstring *)&be_const_str_pow,
+ (const bstring *)&be_const_str_enabled,
+ (const bstring *)&be_const_str_opt_neq,
+ (const bstring *)&be_const_str_Wire,
+ (const bstring *)&be_const_str_floor,
+ (const bstring *)&be_const_str_classname,
+ (const bstring *)&be_const_str_add_driver
};
static const struct bconststrtab m_const_string_table = {
- .size = 160,
- .count = 321,
+ .size = 162,
+ .count = 324,
.table = m_string_table
};
diff --git a/lib/libesp32/Berry/generate/be_fixed_be_class_tasmota.h b/lib/libesp32/Berry/generate/be_fixed_be_class_tasmota.h
index 34b9c0a05..a61b9a363 100644
--- a/lib/libesp32/Berry/generate/be_fixed_be_class_tasmota.h
+++ b/lib/libesp32/Berry/generate/be_fixed_be_class_tasmota.h
@@ -1,91 +1,92 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_tasmota_map) {
- { be_const_key(resp_cmnd_done, -1), be_const_func(l_respCmndDone) },
- { be_const_key(settings, 70), be_const_var(0) },
- { be_const_key(set_light, -1), be_const_closure(set_light_closure) },
- { be_const_key(gc, 35), be_const_closure(gc_closure) },
- { be_const_key(add_cmd, -1), be_const_closure(add_cmd_closure) },
- { be_const_key(try_rule, -1), be_const_closure(try_rule_closure) },
- { be_const_key(publish, 20), be_const_func(l_publish) },
- { be_const_key(_settings_ptr, 28), be_const_comptr(&Settings) },
- { be_const_key(exec_tele, 36), be_const_closure(exec_tele_closure) },
- { be_const_key(delay, -1), be_const_func(l_delay) },
- { be_const_key(_drivers, -1), be_const_var(1) },
- { be_const_key(find_key_i, -1), be_const_closure(find_key_i_closure) },
- { be_const_key(resp_cmnd_failed, -1), be_const_func(l_respCmndFailed) },
- { be_const_key(wire2, 64), be_const_var(2) },
- { be_const_key(gen_cb, 56), be_const_closure(gen_cb_closure) },
- { be_const_key(resp_cmnd_str, -1), be_const_func(l_respCmndStr) },
- { be_const_key(_timers, 25), be_const_var(3) },
- { be_const_key(kv, -1), be_const_closure(kv_closure) },
- { be_const_key(set_power, -1), be_const_func(l_setpower) },
- { be_const_key(cmd, 38), be_const_closure(cmd_closure) },
- { be_const_key(global, -1), be_const_var(4) },
- { be_const_key(response_append, -1), be_const_func(l_respAppend) },
- { be_const_key(_get_cb, -1), be_const_func(l_get_cb) },
- { be_const_key(time_reached, -1), be_const_func(l_timereached) },
- { be_const_key(wifi, 19), be_const_func(l_wifi) },
- { be_const_key(rtc, -1), be_const_func(l_rtc) },
- { be_const_key(i2c_enabled, 8), be_const_func(l_i2cenabled) },
- { be_const_key(publish_result, 34), be_const_func(l_publish_result) },
- { be_const_key(_settings_def, -1), be_const_comptr(&be_tasmota_settings_struct) },
- { be_const_key(yield, 6), be_const_func(l_yield) },
- { be_const_key(init, -1), be_const_closure(init_closure) },
- { be_const_key(eth, -1), be_const_func(l_eth) },
- { be_const_key(get_free_heap, -1), be_const_func(l_getFreeHeap) },
- { be_const_key(get_option, -1), be_const_func(l_getoption) },
- { be_const_key(get_power, -1), be_const_func(l_getpower) },
- { be_const_key(run_deferred, -1), be_const_closure(run_deferred_closure) },
- { be_const_key(get_light, 11), be_const_closure(get_light_closure) },
- { be_const_key(cmd_res, -1), be_const_var(5) },
- { be_const_key(event, -1), be_const_closure(event_closure) },
- { be_const_key(load, -1), be_const_closure(load_closure) },
- { be_const_key(remove_timer, -1), be_const_closure(remove_timer_closure) },
- { be_const_key(wire_scan, -1), be_const_closure(wire_scan_closure) },
- { be_const_key(_cb, 50), be_const_var(6) },
- { be_const_key(remove_driver, 67), be_const_closure(remove_driver_closure) },
- { be_const_key(wire1, 61), be_const_var(7) },
- { be_const_key(memory, -1), be_const_func(l_memory) },
- { be_const_key(_global_addr, -1), be_const_comptr(&TasmotaGlobal) },
- { be_const_key(time_dump, -1), be_const_func(l_time_dump) },
- { be_const_key(_ccmd, -1), be_const_var(8) },
- { be_const_key(exec_cmd, 39), be_const_closure(exec_cmd_closure) },
- { be_const_key(exec_rules, 68), be_const_closure(exec_rules_closure) },
- { be_const_key(resp_cmnd, 14), be_const_func(l_respCmnd) },
- { be_const_key(remove_cmd, -1), be_const_closure(remove_cmd_closure) },
- { be_const_key(remove_rule, 69), be_const_closure(remove_rule_closure) },
- { be_const_key(web_send_decimal, -1), be_const_func(l_webSendDecimal) },
- { be_const_key(_rules, 41), be_const_var(9) },
- { be_const_key(strftime, 59), be_const_func(l_strftime) },
- { be_const_key(chars_in_string, -1), be_const_closure(chars_in_string_closure) },
- { be_const_key(set_timer, -1), be_const_closure(set_timer_closure) },
- { be_const_key(_global_def, -1), be_const_comptr(&be_tasmota_global_struct) },
- { be_const_key(resolvecmnd, -1), be_const_func(l_resolveCmnd) },
+ { be_const_key(exec_rules, 20), be_const_closure(exec_rules_closure) },
+ { be_const_key(publish_result, 75), be_const_func(l_publish_result) },
{ be_const_key(scale_uint, -1), be_const_func(l_scaleuint) },
- { be_const_key(time_str, -1), be_const_closure(time_str_closure) },
- { be_const_key(millis, 48), be_const_func(l_millis) },
- { be_const_key(resp_cmnd_error, -1), be_const_func(l_respCmndError) },
- { be_const_key(arch, -1), be_const_func(l_arch) },
- { be_const_key(log, -1), be_const_func(l_logInfo) },
- { be_const_key(add_rule, -1), be_const_closure(add_rule_closure) },
- { be_const_key(_cmd, 17), be_const_func(l_cmd) },
- { be_const_key(get_switch, -1), be_const_func(l_getswitch) },
+ { be_const_key(strftime, 6), be_const_func(l_strftime) },
+ { be_const_key(remove_driver, -1), be_const_closure(remove_driver_closure) },
+ { be_const_key(get_free_heap, -1), be_const_func(l_getFreeHeap) },
+ { be_const_key(time_dump, -1), be_const_func(l_time_dump) },
+ { be_const_key(add_driver, 37), be_const_closure(add_driver_closure) },
{ be_const_key(find_op, -1), be_const_closure(find_op_closure) },
- { be_const_key(add_driver, 3), be_const_closure(add_driver_closure) },
- { be_const_key(save, 65), be_const_func(l_save) },
- { be_const_key(web_send, -1), be_const_func(l_webSend) },
+ { be_const_key(arch, 38), be_const_func(l_arch) },
+ { be_const_key(eth, 26), be_const_func(l_eth) },
+ { be_const_key(response_append, -1), be_const_func(l_respAppend) },
+ { be_const_key(_timers, -1), be_const_var(0) },
+ { be_const_key(try_rule, -1), be_const_closure(try_rule_closure) },
+ { be_const_key(_settings_ptr, -1), be_const_comptr(&Settings) },
+ { be_const_key(resp_cmnd_error, -1), be_const_func(l_respCmndError) },
+ { be_const_key(publish, -1), be_const_func(l_publish) },
+ { be_const_key(time_reached, 32), be_const_func(l_timereached) },
+ { be_const_key(_get_cb, -1), be_const_func(l_get_cb) },
+ { be_const_key(wire1, 27), be_const_var(1) },
+ { be_const_key(rtc, 43), be_const_func(l_rtc) },
+ { be_const_key(web_send_decimal, -1), be_const_func(l_webSendDecimal) },
+ { be_const_key(cmd_res, -1), be_const_var(2) },
+ { be_const_key(add_rule, -1), be_const_closure(add_rule_closure) },
+ { be_const_key(delay, 40), be_const_func(l_delay) },
+ { be_const_key(_global_addr, -1), be_const_comptr(&TasmotaGlobal) },
+ { be_const_key(set_light, -1), be_const_closure(set_light_closure) },
+ { be_const_key(add_cmd, 74), be_const_closure(add_cmd_closure) },
+ { be_const_key(global, -1), be_const_var(3) },
+ { be_const_key(get_power, -1), be_const_func(l_getpower) },
+ { be_const_key(wire2, -1), be_const_var(4) },
+ { be_const_key(cmd, -1), be_const_closure(cmd_closure) },
+ { be_const_key(get_option, 48), be_const_func(l_getoption) },
+ { be_const_key(set_power, -1), be_const_func(l_setpower) },
+ { be_const_key(wd, 28), be_const_var(5) },
+ { be_const_key(remove_timer, -1), be_const_closure(remove_timer_closure) },
+ { be_const_key(wire_scan, 61), be_const_closure(wire_scan_closure) },
+ { be_const_key(_settings_def, -1), be_const_comptr(&be_tasmota_settings_struct) },
+ { be_const_key(exec_tele, 69), be_const_closure(exec_tele_closure) },
+ { be_const_key(gen_cb, -1), be_const_closure(gen_cb_closure) },
+ { be_const_key(chars_in_string, 66), be_const_closure(chars_in_string_closure) },
+ { be_const_key(log, -1), be_const_func(l_logInfo) },
+ { be_const_key(find_key_i, -1), be_const_closure(find_key_i_closure) },
+ { be_const_key(get_light, -1), be_const_closure(get_light_closure) },
+ { be_const_key(time_str, -1), be_const_closure(time_str_closure) },
+ { be_const_key(_rules, 73), be_const_var(6) },
+ { be_const_key(remove_cmd, 50), be_const_closure(remove_cmd_closure) },
+ { be_const_key(_cb, -1), be_const_var(7) },
+ { be_const_key(_ccmd, -1), be_const_var(8) },
+ { be_const_key(i2c_enabled, 53), be_const_func(l_i2cenabled) },
+ { be_const_key(resp_cmnd_str, -1), be_const_func(l_respCmndStr) },
+ { be_const_key(init, -1), be_const_closure(init_closure) },
+ { be_const_key(save, 10), be_const_func(l_save) },
+ { be_const_key(set_timer, -1), be_const_closure(set_timer_closure) },
+ { be_const_key(resp_cmnd, -1), be_const_func(l_respCmnd) },
+ { be_const_key(resp_cmnd_done, -1), be_const_func(l_respCmndDone) },
+ { be_const_key(get_switch, 21), be_const_func(l_getswitch) },
+ { be_const_key(load, -1), be_const_closure(load_closure) },
+ { be_const_key(_cmd, 72), be_const_func(l_cmd) },
+ { be_const_key(event, -1), be_const_closure(event_closure) },
+ { be_const_key(run_deferred, -1), be_const_closure(run_deferred_closure) },
+ { be_const_key(web_send, 1), be_const_func(l_webSend) },
+ { be_const_key(memory, -1), be_const_func(l_memory) },
{ be_const_key(cb_dispatch, -1), be_const_closure(cb_dispatch_closure) },
+ { be_const_key(remove_rule, 36), be_const_closure(remove_rule_closure) },
+ { be_const_key(resolvecmnd, -1), be_const_func(l_resolveCmnd) },
+ { be_const_key(wifi, -1), be_const_func(l_wifi) },
+ { be_const_key(exec_cmd, -1), be_const_closure(exec_cmd_closure) },
+ { be_const_key(settings, 60), be_const_var(9) },
+ { be_const_key(_global_def, -1), be_const_comptr(&be_tasmota_global_struct) },
+ { be_const_key(resp_cmnd_failed, -1), be_const_func(l_respCmndFailed) },
+ { be_const_key(gc, -1), be_const_closure(gc_closure) },
+ { be_const_key(yield, -1), be_const_func(l_yield) },
+ { be_const_key(_drivers, -1), be_const_var(10) },
+ { be_const_key(millis, -1), be_const_func(l_millis) },
+ { be_const_key(kv, -1), be_const_closure(kv_closure) },
};
static be_define_const_map(
be_class_tasmota_map,
- 75
+ 76
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_tasmota,
- 10,
+ 11,
NULL,
Tasmota
);
diff --git a/lib/libesp32/Berry/generate/be_fixed_string.h b/lib/libesp32/Berry/generate/be_fixed_string.h
index eb1e5cf58..9710edd7f 100644
--- a/lib/libesp32/Berry/generate/be_fixed_string.h
+++ b/lib/libesp32/Berry/generate/be_fixed_string.h
@@ -1,20 +1,22 @@
#include "be_constobj.h"
static be_define_const_map_slots(m_libstring_map) {
- { be_const_key(tolower, -1), be_const_func(str_tolower) },
- { be_const_key(count, -1), be_const_func(str_count) },
- { be_const_key(hex, -1), be_const_func(str_i2hex) },
- { be_const_key(split, 5), be_const_func(str_split) },
+ { be_const_key(char, -1), be_const_func(str_char) },
+ { be_const_key(tr, -1), be_const_func(str_tr) },
+ { be_const_key(count, 4), be_const_func(str_count) },
+ { be_const_key(format, 7), be_const_func(str_format) },
+ { be_const_key(escape, -1), be_const_func(str_escape) },
{ be_const_key(byte, -1), be_const_func(str_byte) },
- { be_const_key(char, 6), be_const_func(str_char) },
- { be_const_key(toupper, 1), be_const_func(str_toupper) },
+ { be_const_key(toupper, -1), be_const_func(str_toupper) },
+ { be_const_key(hex, -1), be_const_func(str_i2hex) },
{ be_const_key(find, -1), be_const_func(str_find) },
- { be_const_key(format, -1), be_const_func(str_format) },
+ { be_const_key(split, 1), be_const_func(str_split) },
+ { be_const_key(tolower, -1), be_const_func(str_tolower) },
};
static be_define_const_map(
m_libstring_map,
- 9
+ 11
);
static be_define_const_module(
diff --git a/lib/libesp32/Berry/src/be_solidifylib.c b/lib/libesp32/Berry/src/be_solidifylib.c
index d72e3aff5..1562c3bb6 100644
--- a/lib/libesp32/Berry/src/be_solidifylib.c
+++ b/lib/libesp32/Berry/src/be_solidifylib.c
@@ -25,7 +25,7 @@ extern const bclass be_class_map;
#include
#ifndef INST_BUF_SIZE
-#define INST_BUF_SIZE 96
+#define INST_BUF_SIZE 288
#endif
#define logbuf(...) snprintf(__lbuf, sizeof(__lbuf), __VA_ARGS__)
@@ -115,13 +115,15 @@ static void m_solidify_bvalue(bvm *vm, bvalue * value, const char *classname, co
break;
case BE_STRING:
{
- logfmt("be_nested_string(\"");
- be_writestring(str(var_tostr(value)));
size_t len = strlen(str(var_tostr(value)));
if (len >= 255) {
be_raise(vm, "internal_error", "Strings greater than 255 chars not supported yet");
}
- logfmt("\", %i, %zu)", be_strhash(var_tostr(value)), len >= 255 ? 255 : len);
+ be_pushstring(vm, str(var_tostr(value)));
+ be_toescape(vm, -1, 'u');
+ logfmt("be_nested_string(%s", be_tostring(vm, -1));
+ be_pop(vm, 1);
+ logfmt(", %i, %zu)", be_strhash(var_tostr(value)), len >= 255 ? 255 : len);
}
break;
case BE_CLOSURE:
diff --git a/lib/libesp32/Berry/src/be_strlib.c b/lib/libesp32/Berry/src/be_strlib.c
index 3a079fa22..e82ec3cf2 100644
--- a/lib/libesp32/Berry/src/be_strlib.c
+++ b/lib/libesp32/Berry/src/be_strlib.c
@@ -788,6 +788,53 @@ static int str_toupper(bvm *vm) {
return str_touplower(vm, btrue);
}
+static int str_tr(bvm *vm)
+{
+ if (be_top(vm) == 3 && be_isstring(vm, 1) && be_isstring(vm, 2) && be_isstring(vm, 3)) {
+ const char *p, *s = be_tostring(vm, 1);
+ const char *t1 = be_tostring(vm, 2);
+ const char *t2 = be_tostring(vm, 3);
+ if (strlen(t2) < strlen(t1)) {
+ be_raise(vm, "value_error", "invalid translation pattern");
+ }
+ size_t len = (size_t)be_strlen(vm, 1);
+ char *buf, *q;
+ buf = be_pushbuffer(vm, len);
+ /* convert each char */
+ for (p = s, q = buf; *p != '\0'; ++p, ++q) {
+ const char *p1, *p2;
+ *q = *p; /* default to no change */
+ for (p1=t1, p2=t2; *p1 != '\0'; ++p1, ++p2) {
+ if (*p == *p1) {
+ *q = *p2;
+ break;
+ }
+ }
+ }
+ be_pushnstring(vm, buf, len); /* make escape string from buffer */
+ be_remove(vm, 2); /* remove buffer */
+ be_return(vm);
+ }
+ be_return_nil(vm);
+}
+
+static int str_escape(bvm *vm)
+{
+ int top = be_top(vm);
+ if (top >= 1 && be_isstring(vm, 1)) {
+ int quote = 'u';
+ if (top >= 2 && be_isbool(vm, 2)) {
+ if (be_tobool(vm, 1)) {
+ quote = 'x';
+ }
+ }
+ be_tostring(vm, 1);
+ be_toescape(vm, 1, quote);
+ be_pushvalue(vm, 1);
+ be_return(vm);
+ }
+ be_return_nil(vm);
+}
#if !BE_USE_PRECOMPILED_OBJECT
be_native_module_attr_table(string) {
@@ -800,6 +847,8 @@ be_native_module_attr_table(string) {
be_native_module_function("char", str_char),
be_native_module_function("tolower", str_tolower),
be_native_module_function("toupper", str_toupper),
+ be_native_module_function("tr", str_tr),
+ be_native_module_function("escape", str_escape),
};
be_define_native_module(string, NULL);
@@ -815,6 +864,8 @@ module string (scope: global, depend: BE_USE_STRING_MODULE) {
char, func(str_char)
tolower, func(str_tolower)
toupper, func(str_toupper)
+ tr, func(str_tr)
+ escape, func(str_escape)
}
@const_object_info_end */
#include "../generate/be_fixed_string.h"
diff --git a/lib/libesp32/Zip-readonly-FS/src/ZipReadFS.cpp b/lib/libesp32/Zip-readonly-FS/src/ZipReadFS.cpp
index a7282c128..61e83b683 100644
--- a/lib/libesp32/Zip-readonly-FS/src/ZipReadFS.cpp
+++ b/lib/libesp32/Zip-readonly-FS/src/ZipReadFS.cpp
@@ -371,7 +371,7 @@ bool ZipArchive::parse(void) {
entry.last_mod = dos2unixtime((header.last_mod_date << 16) | header.last_mod_time);
offset += header.size_uncompressed;
- AddLog(LOG_LEVEL_DEBUG, "ZIP: found file '%s' (%i bytes - offset %i) - next entry %i", &fname[0], header.size_uncompressed, entry.file_start, offset);
+ AddLog(LOG_LEVEL_DEBUG_MORE, "ZIP: found file '%s' (%i bytes - offset %i) - next entry %i", &fname[0], header.size_uncompressed, entry.file_start, offset);
}
return true;
diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h
index 432532e6e..f8a78dc96 100644
--- a/tasmota/my_user_config.h
+++ b/tasmota/my_user_config.h
@@ -990,6 +990,7 @@
//#define USE_IBEACON_ESP32
//#define USE_WEBCAM // Add support for webcam
+// #define USE_AUTOCONF // Enable Esp32 autoconf feature, requires USE_BERRY and USE_WEBCLIENT_HTTPS (12KB Flash)
#define USE_BERRY // Enable Berry scripting language
#define USE_BERRY_PYTHON_COMPAT // Enable by default `import python_compat`
#define USE_BERRY_TIMEOUT 4000 // Timeout in ms, will raise an exception if running time exceeds this timeout
@@ -1091,6 +1092,19 @@
#error "Select either USE_RULES or USE_SCRIPT. They can't both be used at the same time"
#endif
+/*********************************************************************************************\
+ * Post-process compile options for Autoconf
+\*********************************************************************************************/
+
+#if defined(USE_AUTOCONF)
+ #ifndef USE_BERRY
+ #define USE_BERRY
+ #endif
+ #ifndef USE_WEBCLIENT_HTTPS
+ #define USE_WEBCLIENT_HTTPS
+ #endif
+#endif // USE_AUTOCONF
+
/*********************************************************************************************\
* Post-process compile options for TLS
\*********************************************************************************************/
diff --git a/tasmota/xdrv_13_display.ino b/tasmota/xdrv_13_display.ino
index da4439f61..bcf545bc5 100755
--- a/tasmota/xdrv_13_display.ino
+++ b/tasmota/xdrv_13_display.ino
@@ -67,7 +67,7 @@ struct MULTI_DISP {
uint8_t used;
} displays[MAX_MULTI_DISPLAYS];
uint8_t cur_display;
-Renderer *Init_uDisplay(const char *desc, int8_t cs);
+Renderer *Init_uDisplay(const char *desc, int8_t cs = -1);
void Set_display(uint8_t index) {
displays[index].display = renderer;
@@ -631,7 +631,7 @@ void DisplayText(void)
srot = Settings->display_rotate;
Settings->display_rotate = rot;
}
- renderer = Init_uDisplay(fdesc, -1);
+ renderer = Init_uDisplay(fdesc);
if (rot >= 0) {
Settings->display_rotate = srot;
}
diff --git a/tasmota/xdrv_27_shutter.ino b/tasmota/xdrv_27_shutter.ino
index 0e1e1e23a..52fba66ff 100644
--- a/tasmota/xdrv_27_shutter.ino
+++ b/tasmota/xdrv_27_shutter.ino
@@ -631,8 +631,12 @@ int32_t ShutterCalculatePosition(uint32_t i)
case SHT_TIME:
case SHT_TIME_UP_DOWN:
case SHT_TIME_GARAGE:
- if (Shutter[i].time <= Shutter[i].venetian_delay && Shutter[i].tilt_config[2] > 0) {
- Shutter[i].tilt_real_pos = (Shutter[i].tilt_start_pos + ((Shutter[i].direction * (int16_t)Shutter[i].time * (Shutter[i].tilt_config[1]-Shutter[i].tilt_config[0])) / Shutter[i].tilt_config[2]));
+ if (Shutter[i].tilt_config[2] > 0) {
+ if (Shutter[i].time <= Shutter[i].venetian_delay) {
+ Shutter[i].tilt_real_pos = (Shutter[i].tilt_start_pos + ((Shutter[i].direction * (int16_t)Shutter[i].time * (Shutter[i].tilt_config[1]-Shutter[i].tilt_config[0])) / Shutter[i].tilt_config[2]));
+ } else {
+ Shutter[i].tilt_real_pos = Shutter[i].direction == 1 ? Shutter[i].tilt_config[1] : Shutter[i].tilt_config[0];
+ }
}
return Shutter[i].start_position + ( (Shutter[i].time - tmin(Shutter[i].venetian_delay+Shutter[i].motordelay, Shutter[i].time)) * (Shutter[i].direction > 0 ? RESOLUTION : -Shutter[i].close_velocity));
break;
diff --git a/tasmota/xdrv_52_0_berry_struct.ino b/tasmota/xdrv_52_0_berry_struct.ino
index 74ae1eee7..1c3991b80 100644
--- a/tasmota/xdrv_52_0_berry_struct.ino
+++ b/tasmota/xdrv_52_0_berry_struct.ino
@@ -21,6 +21,7 @@
#ifdef USE_BERRY
#include
+#include
#define BERRY_CONSOLE_CMD_DELIMITER "\x01"
diff --git a/tasmota/xdrv_52_3_berry_display.ino b/tasmota/xdrv_52_3_berry_display.ino
new file mode 100644
index 000000000..cb5b47846
--- /dev/null
+++ b/tasmota/xdrv_52_3_berry_display.ino
@@ -0,0 +1,63 @@
+/*
+ xdrv_52_3_berry_display.ino - Berry scripting language, native fucnctions
+
+ Copyright (C) 2021 Stephan Hadinger, Berry language by Guan Wenliang https://github.com/Skiars/berry
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+
+#ifdef USE_BERRY
+#ifdef USE_DISPLAY
+
+#include
+
+#ifdef USE_UNIVERSAL_DISPLAY
+Renderer *Init_uDisplay(const char *desc, int8_t cs = -1);
+#endif // USE_UNIVERSAL_DISPLAY
+
+/*********************************************************************************************\
+ * Native functions mapped to Berry functions
+ *
+ * import display
+ * display.start(string) -> comptr or nil if failed
+ *
+\*********************************************************************************************/
+extern "C" {
+
+ int be_disp_start(bvm *vm);
+ int be_disp_start(bvm *vm) {
+#ifdef USE_UNIVERSAL_DISPLAY
+ int32_t argc = be_top(vm); // Get the number of arguments
+ if (argc >= 1 && be_isstring(vm, 1)) {
+ const char * desc = be_tostring(vm, 1);
+ // remove all objects on stack to avoid warnings in subsequent calls to Berry
+ be_pop(vm, argc);
+ Renderer * renderer = Init_uDisplay(desc);
+ if (renderer) {
+ be_pushcomptr(vm, renderer);
+ } else {
+ be_pushnil(vm);
+ }
+ be_return(vm);
+ }
+ be_raise(vm, kTypeError, nullptr);
+#else // USE_UNIVERSAL_DISPLAY
+ be_raise(vm, "internal_error", "universal display driver not present");
+#endif // USE_UNIVERSAL_DISPLAY
+ }
+}
+
+#endif // USE_DISPLAY
+#endif // USE_BERRY
diff --git a/tasmota/xdrv_52_7_berry_embedded.ino b/tasmota/xdrv_52_7_berry_embedded.ino
index 5450de6a9..4d16ced05 100644
--- a/tasmota/xdrv_52_7_berry_embedded.ino
+++ b/tasmota/xdrv_52_7_berry_embedded.ino
@@ -43,6 +43,11 @@ const char berry_prog[] =
"def log(m,l) tasmota.log(m,l) end "
"def load(f) return tasmota.load(f) end "
+#ifdef USE_AUTOCONF
+ // autoconf
+ "import autoconf "
+#endif // USE_AUTOCONF
+
#ifdef USE_LVGL
"import lv "
// create the '_lvgl' global singleton
diff --git a/tasmota/xdrv_52_9_berry.ino b/tasmota/xdrv_52_9_berry.ino
index 61879a761..751dec823 100644
--- a/tasmota/xdrv_52_9_berry.ino
+++ b/tasmota/xdrv_52_9_berry.ino
@@ -241,6 +241,34 @@ int32_t callBerryEventDispatcher(const char *type, const char *cmd, int32_t idx,
return ret;
}
+// call a method in autoconf
+int32_t callBerryAutoconf(const char * method) {
+ int32_t ret = 0;
+ bvm *vm = berry.vm;
+
+ if (nullptr == vm) { return ret; }
+ checkBeTop();
+ be_getglobal(vm, "autoconf");
+ if (!be_isnil(vm, -1)) {
+ be_getmethod(vm, -1, method);
+ if (!be_isnil(vm, -1)) {
+ be_pushvalue(vm, -2);
+ BrTimeoutStart();
+ ret = be_pcall(vm, 1); // 1 arg
+ BrTimeoutReset();
+ if (ret != 0) {
+ BerryDumpErrorAndClear(vm, false); // log in Tasmota console only
+ return ret;
+ }
+ be_pop(vm, 1); // remove instance
+ }
+ be_pop(vm, 1); // remove method
+ }
+ be_pop(vm, 1); // remove instance object
+ checkBeTop();
+ return ret;
+}
+
/*********************************************************************************************\
* VM Observability
\*********************************************************************************************/
@@ -336,6 +364,9 @@ void BerryInit(void) {
AddLog(LOG_LEVEL_INFO, PSTR(D_LOG_BERRY "Berry initialized, RAM used=%u"), callBerryGC());
berry_init_ok = true;
+ // Run 'autoconf.preinit()'
+ callBerryAutoconf("preinit");
+
// Run pre-init
BrLoad("preinit.be"); // run 'preinit.be' if present
} while (0);
@@ -759,6 +790,9 @@ bool Xdrv52(uint8_t function)
// break;
case FUNC_LOOP:
if (!berry.autoexec_done) {
+ // Run 'autoconf.preinit()'
+ callBerryAutoconf("autoexec");
+
BrLoad("autoexec.be"); // run autoexec.be at first tick, so we know all modules are initialized
berry.autoexec_done = true;
}
diff --git a/tasmota/xdrv_54_lvgl.ino b/tasmota/xdrv_54_lvgl.ino
index 9d5855099..c8f533310 100644
--- a/tasmota/xdrv_54_lvgl.ino
+++ b/tasmota/xdrv_54_lvgl.ino
@@ -364,9 +364,6 @@ extern "C" {
* display ecosystem.
************************************************************/
-Renderer *Init_uDisplay(const char *desc, int8_t cs);
-
-
void start_lvgl(const char * uconfig);
void start_lvgl(const char * uconfig) {
@@ -377,7 +374,7 @@ void start_lvgl(const char * uconfig) {
if (!renderer || uconfig) {
#ifdef USE_UNIVERSAL_DISPLAY // TODO - we will probably support only UNIV_DISPLAY
- renderer = Init_uDisplay((char*)uconfig, -1);
+ renderer = Init_uDisplay((char*)uconfig);
if (!renderer) return;
#else
return;
diff --git a/tasmota/xdsp_08_ILI9488_UD.ino b/tasmota/xdsp_08_ILI9488_UD.ino
index 8717397d5..712f2fac3 100644
--- a/tasmota/xdsp_08_ILI9488_UD.ino
+++ b/tasmota/xdsp_08_ILI9488_UD.ino
@@ -26,7 +26,7 @@
bool ili9488_init_done = false;
-Renderer *Init_uDisplay(const char *desc, int8_t cs);
+Renderer *Init_uDisplay(const char *desc, int8_t cs = -1);
void udisp_CheckTouch(void);
/*********************************************************************************************/
diff --git a/tasmota/xdsp_17_universal.ino b/tasmota/xdsp_17_universal.ino
index d8be8b94b..16a886661 100644
--- a/tasmota/xdsp_17_universal.ino
+++ b/tasmota/xdsp_17_universal.ino
@@ -433,7 +433,7 @@ bool Xdsp17(uint8_t function) {
bool result = false;
if (FUNC_DISPLAY_INIT_DRIVER == function) {
- Init_uDisplay(0, -1);
+ Init_uDisplay(nullptr);
}
else if (udisp_init_done && (XDSP_17 == Settings->display_model)) {
switch (function) {