esp8266 do not have enough RAM to run the default examples due to NUM_NODE mostly
G2G2G2G opened this issue · 2 comments
edit: well I've solved the issue you can see on the second post, this is a deterrent to newcomers to enigmaIOT because the tutorial assumes esp8266's work and I assume you didn't test them. Due to the methods of switching scan mode to AP mode it uses +30% ram so you need <70% of max ram at compile time, anymore and it is bound to crash quickly.
NUM_NODES = 35 is guaranteed to crash esp8266.
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Unhandled C++ exception: OOM
>>>stack>>>
ctx: sys
sp: 3fffee50 end: 3fffffb0 offset: 0000
3fffee50: 4000050c 3fff79d4 3ffedcb4 00000000
3fffee60: 000000fe 00000000 00000000 00000000
3fffee70: 00000000 00000000 00000000 00000001
3fffee80: 00007fff 00000000 00000000 3fff79d4
3fffee90: 402226fc 40222741 000000f0 40220cbe
3fffeea0: 402226fc 40222741 00000020 40220cdd
3fffeeb0: 00000000 40279592 000000f0 402204d8
3fffeec0: 402226fc 00000000 3fffbf84 40222741
3fffeed0: 402985f0 0000010f 000000ff 0000000d
3fffeee0: 402795ed 00000000 3fff10e8 402796a2
3fffeef0: 0000010f 402793a9 3fff1100 3fff1920
3fffef00: 01f80741 60000600 00000003 00000024
3fffef10: 4027990d 3ffedcbe 4028ea53 3fff01b8
3fffef20: 40292dd9 3fffdcc0 3ffec7c8 3ffec7c8
3fffef30: 40292e1e 3fffdab0 00000000 3fffdcb0
3fffef40: 3fff1940 3fffdab0 00000000 00000004
3fffef50: 40000f49 40000f49 3fffdab0 40000f49
3fffef60: 40000e19 000a8c04 00000000 00000005
3fffef70: 00000000 40105631 000a8c04 00000000
3fffef80: 40105637 00000000 00000000 40100c04
3fffef90: 4010000d 33317453 000a8c04 401000ac
3fffefa0: 40282ae0 3fffef3c 40282a91 3ffffd18
3fffefb0: 3fffffc0 00000000 00000000 feefeffe
3fffefc0: feefeffe feefeffe feefeffe feefeffe
3fffefd0: feefeffe feefeffe feefeffe feefeffe
3fffefe0: feefeffe feefeffe feefeffe feefeffe
3fffeff0: feefeffe feefeffe feefeffe feefeffe
3ffff000: feefeffe feefeffe feefeffe feefeffe
3ffff010: feefeffe feefeffe feefeffe feefeffe
3ffff020: feefeffe feefeffe feefeffe feefeffe
3ffff030: feefeffe feefeffe feefeffe feefeffe
3ffff040: feefeffe feefeffe feefeffe feefeffe
3ffff050: feefeffe feefeffe feefeffe feefeffe
3ffff060: feefeffe feefeffe feefeffe feefeffe
3ffff070: feefeffe feefeffe feefeffe feefeffe
3ffff080: feefeffe feefeffe feefeffe feefeffe
3ffff090: feefeffe feefeffe feefeffe feefeffe
3ffff0a0: feefeffe feefeffe feefeffe feefeffe
3ffff0b0: feefeffe feefeffe feefeffe feefeffe
3ffff0c0: feefeffe feefeffe feefeffe feefeffe
3ffff0d0: feefeffe feefeffe feefeffe feefeffe
3ffff0e0: feefeffe feefeffe feefeffe feefeffe
3ffff0f0: feefeffe feefeffe feefeffe feefeffe
3ffff100: feefeffe feefeffe feefeffe feefeffe
3ffff110: feefeffe feefeffe feefeffe feefeffe
3ffff120: feefeffe feefeffe feefeffe feefeffe
3ffff130: feefeffe feefeffe feefeffe feefeffe
3ffff140: feefeffe feefeffe feefeffe feefeffe
3ffff150: feefeffe feefeffe feefeffe feefeffe
3ffff160: feefeffe feefeffe feefeffe feefeffe
3ffff170: feefeffe feefeffe feefeffe feefeffe
3ffff180: feefeffe feefeffe feefeffe feefeffe
3ffff190: feefeffe feefeffe feefeffe feefeffe
3ffff1a0: feefeffe feefeffe feefeffe feefeffe
3ffff1b0: feefeffe feefeffe feefeffe feefeffe
3ffff1c0: feefeffe feefeffe feefeffe feefeffe
3ffff1d0: feefeffe feefeffe feefeffe feefeffe
3ffff1e0: feefeffe feefeffe feefeffe feefeffe
3ffff1f0: feefeffe feefeffe feefeffe feefeffe
3ffff200: feefeffe feefeffe feefeffe feefeffe
3ffff210: feefeffe feefeffe feefeffe feefeffe
3ffff220: feefeffe feefeffe feefeffe feefeffe
3ffff230: feefeffe feefeffe feefeffe feefeffe
3ffff240: feefeffe feefeffe feefeffe feefeffe
3ffff250: feefeffe feefeffe feefeffe feefeffe
3ffff260: feefeffe feefeffe feefeffe feefeffe
3ffff270: feefeffe feefeffe feefeffe feefeffe
3ffff280: feefeffe feefeffe feefeffe feefeffe
3ffff290: feefeffe feefeffe feefeffe feefeffe
3ffff2a0: feefeffe feefeffe feefeffe feefeffe
3ffff2b0: feefeffe feefeffe feefeffe feefeffe
3ffff2c0: feefeffe feefeffe feefeffe feefeffe
3ffff2d0: feefeffe feefeffe feefeffe feefeffe
3ffff2e0: feefeffe feefeffe feefeffe feefeffe
3ffff2f0: feefeffe feefeffe feefeffe feefeffe
3ffff300: feefeffe feefeffe feefeffe feefeffe
3ffff310: feefeffe feefeffe feefeffe feefeffe
3ffff320: feefeffe feefeffe feefeffe feefeffe
3ffff330: feefeffe feefeffe feefeffe feefeffe
3ffff340: feefeffe feefeffe feefeffe feefeffe
3ffff350: feefeffe feefeffe feefeffe feefeffe
3ffff360: feefeffe feefeffe feefeffe feefeffe
3ffff370: feefeffe feefeffe feefeffe feefeffe
3ffff380: feefeffe feefeffe feefeffe feefeffe
3ffff390: feefeffe feefeffe feefeffe feefeffe
3ffff3a0: feefeffe feefeffe feefeffe feefeffe
3ffff3b0: feefeffe feefeffe feefeffe feefeffe
3ffff3c0: feefeffe feefeffe feefeffe feefeffe
3ffff3d0: feefeffe feefeffe feefeffe feefeffe
3ffff3e0: feefeffe feefeffe feefeffe feefeffe
3ffff3f0: feefeffe feefeffe feefeffe feefeffe
3ffff400: feefeffe feefeffe feefeffe feefeffe
3ffff410: feefeffe feefeffe feefeffe feefeffe
3ffff420: feefeffe feefeffe feefeffe feefeffe
3ffff430: feefeffe feefeffe feefeffe feefeffe
3ffff440: feefeffe feefeffe feefeffe feefeffe
3ffff450: feefeffe feefeffe feefeffe feefeffe
3ffff460: feefeffe feefeffe feefeffe feefeffe
3ffff470: feefeffe feefeffe feefeffe feefeffe
3ffff480: feefeffe feefeffe feefeffe feefeffe
3ffff490: feefeffe feefeffe feefeffe feefeffe
3ffff4a0: feefeffe feefeffe feefeffe feefeffe
3ffff4b0: feefeffe feefeffe feefeffe feefeffe
3ffff4c0: feefeffe feefeffe feefeffe feefeffe
3ffff4d0: feefeffe feefeffe feefeffe feefeffe
3ffff4e0: feefeffe feefeffe feefeffe feefeffe
3ffff4f0: feefeffe feefeffe feefeffe feefeffe
3ffff500: feefeffe feefeffe feefeffe feefeffe
3ffff510: feefeffe feefeffe feefeffe feefeffe
3ffff520: feefeffe feefeffe feefeffe feefeffe
3ffff530: feefeffe feefeffe feefeffe feefeffe
3ffff540: feefeffe feefeffe feefeffe feefeffe
3ffff550: feefeffe feefeffe feefeffe feefeffe
3ffff560: feefeffe feefeffe feefeffe feefeffe
3ffff570: feefeffe feefeffe feefeffe feefeffe
3ffff580: feefeffe feefeffe feefeffe feefeffe
3ffff590: feefeffe feefeffe feefeffe feefeffe
3ffff5a0: feefeffe feefeffe feefeffe feefeffe
3ffff5b0: feefeffe feefeffe feefeffe feefeffe
3ffff5c0: feefeffe feefeffe feefeffe feefeffe
3ffff5d0: feefeffe feefeffe feefeffe feefeffe
3ffff5e0: feefeffe feefeffe feefeffe feefeffe
3ffff5f0: feefeffe feefeffe feefeffe feefeffe
3ffff600: feefeffe feefeffe feefeffe feefeffe
3ffff610: feefeffe feefeffe feefeffe feefeffe
3ffff620: feefeffe feefeffe feefeffe feefeffe
3ffff630: feefeffe feefeffe feefeffe feefeffe
3ffff640: feefeffe feefeffe feefeffe feefeffe
3ffff650: feefeffe feefeffe feefeffe feefeffe
3ffff660: feefeffe feefeffe feefeffe feefeffe
3ffff670: feefeffe feefeffe feefeffe feefeffe
3ffff680: feefeffe feefeffe feefeffe feefeffe
3ffff690: feefeffe feefeffe feefeffe feefeffe
3ffff6a0: feefeffe feefeffe feefeffe feefeffe
3ffff6b0: feefeffe feefeffe feefeffe feefeffe
3ffff6c0: feefeffe feefeffe feefeffe feefeffe
3ffff6d0: feefeffe feefeffe feefeffe feefeffe
3ffff6e0: feefeffe feefeffe feefeffe feefeffe
3ffff6f0: feefeffe feefeffe feefeffe feefeffe
3ffff700: feefeffe feefeffe feefeffe feefeffe
3ffff710: feefeffe feefeffe feefeffe feefeffe
3ffff720: feefeffe feefeffe feefeffe feefeffe
3ffff730: feefeffe feefeffe feefeffe feefeffe
3ffff740: feefeffe feefeffe feefeffe feefeffe
3ffff750: feefeffe feefeffe feefeffe feefeffe
3ffff760: feefeffe feefeffe feefeffe feefeffe
3ffff770: feefeffe feefeffe feefeffe feefeffe
3ffff780: feefeffe feefeffe feefeffe feefeffe
3ffff790: feefeffe feefeffe feefeffe feefeffe
3ffff7a0: feefeffe feefeffe feefeffe feefeffe
3ffff7b0: feefeffe feefeffe feefeffe feefeffe
3ffff7c0: feefeffe feefeffe feefeffe feefeffe
3ffff7d0: feefeffe feefeffe feefeffe feefeffe
3ffff7e0: feefeffe feefeffe feefeffe feefeffe
3ffff7f0: feefeffe feefeffe feefeffe feefeffe
3ffff800: feefeffe feefeffe feefeffe feefeffe
3ffff810: feefeffe feefeffe feefeffe feefeffe
3ffff820: feefeffe feefeffe feefeffe feefeffe
3ffff830: feefeffe feefeffe feefeffe feefeffe
3ffff840: feefeffe feefeffe feefeffe feefeffe
3ffff850: feefeffe feefeffe feefeffe feefeffe
3ffff860: feefeffe feefeffe feefeffe feefeffe
3ffff870: feefeffe feefeffe feefeffe feefeffe
3ffff880: feefeffe feefeffe feefeffe feefeffe
3ffff890: feefeffe feefeffe feefeffe feefeffe
3ffff8a0: feefeffe feefeffe feefeffe feefeffe
3ffff8b0: feefeffe feefeffe feefeffe feefeffe
3ffff8c0: feefeffe feefeffe feefeffe feefeffe
3ffff8d0: feefeffe feefeffe feefeffe feefeffe
3ffff8e0: feefeffe feefeffe feefeffe feefeffe
3ffff8f0: feefeffe feefeffe feefeffe feefeffe
3ffff900: feefeffe feefeffe feefeffe feefeffe
3ffff910: feefeffe feefeffe feefeffe feefeffe
3ffff920: feefeffe feefeffe feefeffe feefeffe
3ffff930: feefeffe feefeffe feefeffe feefeffe
3ffff940: feefeffe feefeffe feefeffe feefeffe
3ffff950: feefeffe feefeffe feefeffe feefeffe
3ffff960: feefeffe feefeffe feefeffe feefeffe
3ffff970: feefeffe feefeffe feefeffe feefeffe
3ffff980: feefeffe feefeffe feefeffe feefeffe
3ffff990: feefeffe feefeffe feefeffe feefeffe
3ffff9a0: feefeffe feefeffe feefeffe feefeffe
3ffff9b0: feefeffe feefeffe feefeffe feefeffe
3ffff9c0: feefeffe feefeffe feefeffe feefeffe
3ffff9d0: feefeffe feefeffe feefeffe feefeffe
3ffff9e0: feefeffe feefeffe feefeffe feefeffe
3ffff9f0: feefeffe feefeffe feefeffe feefeffe
3ffffa00: feefeffe feefeffe feefeffe feefeffe
3ffffa10: feefeffe feefeffe feefeffe feefeffe
3ffffa20: feefeffe feefeffe feefeffe feefeffe
3ffffa30: feefeffe feefeffe feefeffe feefeffe
3ffffa40: feefeffe feefeffe feefeffe feefeffe
3ffffa50: feefeffe feefeffe feefeffe feefeffe
3ffffa60: feefeffe feefeffe feefeffe feefeffe
3ffffa70: feefeffe feefeffe feefeffe feefeffe
3ffffa80: 00000000 400042db feefeffe feefeffe
3ffffa90: 00000009 00000000 00000010 00000000
3ffffaa0: 00000009 00000000 00000010 00000000
3ffffab0: 401003d6 00000001 3fffaf1c 003020c0
3ffffac0: 00000000 80000000 00000000 0000001b
3ffffad0: 00004800 00000000 00004800 3ffe83d0
3ffffae0: 00000000 00000000 0000001f 40100370
3ffffaf0: 3ffffbe1 3ffffbe3 3fffc228 40105d01
3ffffb00: 4000050c 00000000 4023d369 3ffe83d0
3ffffb10: 4020c5cb 00000030 00000008 ffffffff
3ffffb20: 4020c5be 3fff5cf8 3ffffce8 00000000
3ffffb30: 00000001 00000001 0104a8c0 3ffffcdc
3ffffb40: 00ffffff 0104a8c0 67696e45 40237998
3ffffb50: 3fff5cf8 00000010 0104a8c0 00000030
3ffffb60: 40299a15 3ffe83d0 40242208 00000009
3ffffb70: 40294696 3ffffbb0 3fff5cf8 00000003
3ffffb80: 40294696 00000000 00000000 0104a8c0
3ffffb90: 00000010 3ffffce8 00000020 40100c54
3ffffba0: 4020c388 00000000 3fff5cf8 401005b0
3ffffbb0: 40295d01 6404a8c0 4028f46b 00000001
3ffffbc0: ffffffff 00000000 3ffec8a1 00000008
3ffffbd0: 4028f4ba 3fffbf84 3fffbf84 00000000
3ffffbe0: 00000000 00000000 00000020 40100370
3ffffbf0: 000000c0 0000000a 00000000 4010229c
3ffffc00: 3ffec750 4028e57b 3fffbf84 3fff09f0
3ffffc10: 00000000 402779ff 3fff09f0 3fffbf84
3ffffc20: 3ffea46f 4029b7f0 00000000 4021d310
3ffffc30: 3fffbec6 3fff79d4 00000000 00000000
3ffffc40: 3ffea46f 3ffea46f 3fff7caf 40279817
3ffffc50: 3fff10e8 40279410 402226fc 3fff10e8
3ffffc60: 40105e45 00937f39 3fff1218 00000000
3ffffc70: 3fff1920 3fff1218 3ffffcce 40221bd0
3ffffc80: 00000000 0092ecbd 4027b413 3fff11e0
3ffffc90: 3fff1218 402226fc 3fff10e8 3fff5cc8
3ffffca0: 3fff0a74 4027b388 3fff09f0 00000012
3ffffcb0: 40279400 402793d4 3fff0a74 00000012
3ffffcc0: 4027939f 3fff09f0 00000012 4029286e
3ffffcd0: 40279950 3fff09f0 3fff0b6c 402226fc
3ffffce0: 4027937d 3fff0b6c 00000003 3fff0b6c
3ffffcf0: 4027b7a5 3ffffd40 0000010f 3fff0b6c
3ffffd00: 3fff1f78 0000010f 3ffea5f7 40221bd0
3ffffd10: 402226fc 40295475 00000000 00000000
3ffffd20: 00000000 3fff1f78 40220694 3fffefa0
3ffffd30: 3ffffd40 402226fc 3fff79d4 402228a3
3ffffd40: 00000000 00000000 00000000 00000000
3ffffd50: 00000000 00000000 3fff5cc8 4021e4e0
3ffffd60: 00000000 4029a81c 3fff5cc8 4021e504
3ffffd70: 00000004 4029a81c 3fff5cc8 3ffe9971
3ffffd80: 00000000 00000000 3fffb514 4020e66b
3ffffd90: 40295854 3ffffdb0 3fffb514 4020ef73
3ffffda0: 4020f8d2 3fff1f78 3fffb514 4020f8d9
3ffffdb0: 4021d304 3ffea5f6 3fff5cc8 4021e268
3ffffdc0: 3fffb580 00000000 3ffffdf0 4021f4cc
3ffffdd0: 3fff1f78 3ffe8ca0 3ffffdf0 00000001
3ffffde0: 3fff1f78 00000003 3fffb514 4020fab0
3ffffdf0: 00000000 3fffb644 00000000 00000000
3ffffe00: 3fff58fa 00000000 3fff1e38 40208e64
3ffffe10: 00000003 3ffe9971 00000000 000007d0
3ffffe20: 00000064 3fff1fa0 3fff59a0 40208003
3ffffe30: 3fff58fa 3fffb62c 3fffb514 3fffb62c
3ffffe40: 3fff58fa 3fff1fa0 3fff59a0 40215a23
3ffffe50: 4029bd3d feefeffe feefeffe feefeffe
3ffffe60: 00000000 00000000 00000000 00000000
3ffffe70: 00000000 00000000 00000000 00000000
3ffffe80: 3ffffe00 3ffe95cc 3ffe9904 3fffb33c
3ffffe90: 00000004 3ffe98d3 3ffe98cc 3ffe98c1
3ffffea0: 3fffb604 00000021 3ffe988b 3ffe9883
3ffffeb0: 3ffe9876 3fffb31c 00000014 3ffe9840
3ffffec0: 6f720033 65722072 6e696461 3fff1e38
3ffffed0: 3fff58a0 40215c02 3fffb514 40100c54
3ffffee0: 692e5454 3fff5bb4 3fff1f94 3fff58a0
3ffffef0: 3fff1f94 3fff5bb4 3fff1fa0 40215d1a
3fffff00: 3ffea5f8 3fffff10 00000008 00005ba7
3fffff10: 63b8bac1 e85a9b25 7dda032d baf941ab
3fffff20: b0259f2e 8305bfc6 088582b8 54467b70
3fffff30: 00000000 00000001 3fff5cc8 40205e70
3fffff40: 00000000 00000000 00000000 3fff1e38
3fffff50: 3fff58a0 3fff1fa0 00000000 40208afa
3fffff60: 4029bc58 feefeffe feefeffe feefeffe
3fffff70: 40208520 00000000 40235270 4023525c
3fffff80: 40205864 feefeffe 4023530c 402352f0
3fffff90: feefeffe feefeffe feefeffe 3fff5e40
3fffffa0: 3fffdad0 00000000 3fff5e2c 402207bc
<<<stack<<<
last failed alloc call: 40222741(240)
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
last failed alloc caller: 0x40222741
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 3460, room 16
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4
tail 4
chksum 0xc9
csum 0xc9
v000a8c10
~ld
�c$`␃s�'␇l
W [81][H: 4104][GwOutput_mqtt.cpp:159] loadConfig() | /mqtt.json do not exist
W [81][H: 4104][EnigmaIOTGatewayMQTT.ino:418] setup() | Error reading config file
W [85][H: 3296][EnigmaIOTGateway.cpp:678] loadFlashData() | /config.json do not exist
W [94][H: 2696][EnigmaIOTGateway.cpp:687] loadFlashData() | Dummy STA config loaded
*WM: Adding parameter
*WM: netkey
*WM: Adding parameter
*WM: channel
*WM: Adding parameter
*WM: netname
*WM: Adding parameter
*WM:
*WM: Adding parameter
*WM: mqttserver
*WM: Adding parameter
*WM: mqttport
*WM: Adding parameter
*WM: mqttuser
*WM: Adding parameter
*WM: mqttpass
*WM:
*WM: AutoConnect Try No.:
*WM: 0
*WM: Connecting as wifi client...
*WM: Using last saved values, should be faster
*WM: Connection result:
*WM: 1
*WM: AutoConnect Try No.:
*WM: 1
*WM: Connecting as wifi client...
*WM: Using last saved values, should be faster
*WM: Connection result:
*WM: 1
*WM: AutoConnect Try No.:
*WM: 2
*WM: Connecting as wifi client...
*WM: Using last saved values, should be faster
*WM: Connection result:
*WM: 1
*WM: SET AP STA
*WM:
*WM: Configuring access point...
*WM: EnigmaIoTGateway
*WM: AP IP address:
*WM: (IP unset)
*WM: HTTP server started
*WM: About to scan()
*WM: About to scan()
User exception (panic/abort/assert)
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Unhandled C++ exception: OOM
>>>stack>>>
ctx: sys
sp: 3fffee50 end: 3fffffb0 offset: 0000
3fffee50: 4000050c 3fff79d4 3ffee93c 00000000
3fffee60: 000000fe 00000000 00000000 00000000
3fffee70: 00000000 00000000 00000000 00000001
on all esp8266 (have 6 different ones), don't have esp32 to test
OK this is directly related to how you switch from scanning for wifi to being an AP, it uses too much memory on that switch.
This means the ESP8266 can NOT handle the default NUM_NODES that are set, since it is taking up memory by default (static??) it's too much memory, at compile time it needs <70% or the 8266 will crash.
https://github.com/gmag11/EnigmaIOT/blob/master/docs/howto.md
I notice you mention NUM_NODES here but it's probably more important to have a default of like.. 10 nodes, not 35.
Also what params are used in the EnigmaIoTconfig.h and the advanced.h?
//Debug
#ifndef DEBUG_ESP_PORT
#define DEBUG_ESP_PORT Serial ///< @brief Stream to output debug info. It will normally be `Serial`
#endif // DEBUG_ESP_PORT
#ifndef DEBUG_LEVEL
// DON'T ENABLE DEBUG IF YOU CAN ONLY DO OTA UPDATE. YOU MAY BE UNABLE TO DO OTA UPDATE ANYMORE UNTIL YOU FLASH THE NODE THROUGH WIRE
#define DEBUG_LEVEL WARN ///< @brief Possible values VERBOSE, DBG, INFO, WARN, ERROR, NONE
#endif //DEBUG_LEVEL
this doesn't do anything, ERROR, NONE, even commenting it out doesn't change anything at all. It's always on what seems to be "INFO" even though the default is "WARN", and there's no way to change it.
Serial should probably always be disabled when this is being used, so being able to disable it is good..
and where is "SECURE_MQTT" defined? it isn't in the settings, but it's at the top of the .ino examples usually.
thanks
default config:
static const int NUM_NODES = 10;
RAM: [======= ] 65.4% (used 53576 bytes from 81920 bytes)
Flash: [======= ] 65.8% (used 687044 bytes from 1044464 bytes)
removing things: SHOULD BE ABLE TO REMOVE SERIAL DEBUG TOO BUT DOESN'T WORK
the entirety of serial should be disabled which reduces cpu usage massively on esps.
//CONFIG
#define ENABLE_STATUS_MESSAGES 0
static const int NUM_NODES = 10;
#define ENABLE_WEB_API 0
///ADVANCED CONFIG
#define ENABLE_REST_API 0
#define SUPPORT_HA_DISCOVERY 0
RAM: [====== ] 62.4% (used 51124 bytes from 81920 bytes)
Flash: [====== ] 62.9% (used 657396 bytes from 1044464 bytes)
Now you can use the above and add 20 nodes and still be safe:
//CONFIG
#define ENABLE_STATUS_MESSAGES 0
static const int NUM_NODES = 20;
#define ENABLE_WEB_API 0
///ADVANCED CONFIG
#define ENABLE_REST_API 0
#define SUPPORT_HA_DISCOVERY 0
RAM: [======= ] 67.3% (used 55124 bytes from 81920 bytes)
Flash: [====== ] 62.9% (used 657412 bytes from 1044464 bytes)