Could not allocate memory for JSON document! Overflowed largest free heap block: 8 bytes
The easy fix is to remove the web_server: line, but I like to see the device on my dashboard- Visit. Is there any other way to reduce the memory footprint of this device?
With web_server:
RAM: [==== ] 40.8% (used 33436 bytes from 81920 bytes)
Flash: [==== ] 42.0% (used 429869 bytes from 1023984 bytes)
Without web_server:
RAM: [==== ] 38.2% (used 31320 bytes from 81920 bytes)
Flash: [==== ] 36.4% (used 373147 bytes from 1023984 bytes)
Every component that you use requires memory. Remove a component and it will use less memory. The web server is a good start (I don’t use it on any of my ESPs), but you can also remove other components.
One option ( that you probably won’t like) is to replace ESP module with one with more memory (4M)…
Or, if module has external memory chip and you’re good with soldering: . replace 1M memory chip with 4M one . Chip marking is W25Q32FWSIG, they are cheap on aliexpress, ebay…
If I really need the “Visit” option, I’ll just replace the switch module itself. I can’t think of anything I can see or do in the “Visit” page that I can’t do from a Lovelace entities card.