by stavros · 2y ago · 0 comments
The only thing I'd need that my thing already has is pull-based OTA updates. Right now I just copy a firmware to a folder, and all my sensors around the house automatically update to that firmware via an HTTP server. With ESPhome, I'd have to push the update to each sensor separately, which is tedious when you have tens of them.
I've done pretty much the same, but last I looked there were very few resources (other than reading the code for the ESPHome project) to help on creating custom firmware for a new board with multiple sensors. It seemed easier and faster to simply write the firmware to talk to a simple backend.
I'm also curious about how they get the code for esp32 devices to fit: on a device with 4MB flash, you effectively have a 1MB program limit if you want OTA (which you do). A simple program that does nothing but make calls to the libraries for GPIO, ADC, UART, Wifi, https, https server, interrupts, FreeRTOS, mqtt, nvs, chip info, logging, OTA and functions in the standard library (scanf alone uses 30kb) already takes you over the 1MB limit.
Compiling with all the logging turned off can get you a roughly 800kb program, which is still close to the limits considering that doesn't include program logic.
I'll have to look at this again when I next require some remote monitoring thing.
To be clear, it is not hosted by the ESPHome devices themselves, it's a separate component.
I have a fair number of esp devices with temp probes around the house, and I’ve been meaning to switch to esp home so I have less code to maintain