I’m putting together an e-Ink dashboard and am looking to have the wake period be as efficient as possible. Dashboard might be a generous description, the only thing that the display does is show information.
I have a few questions about battery life/power usage, specifically in terms of fetching information from Home Assistant.
Is there a difference between MQTT and the API in terms of power usage when retrieving information?
and
Is there a difference in power usage if all the attributes of one home assistant sensor (for the API) or all the topics of a parent topic (for MQTT) are retrieved in one request, or grabbing six different sensors.
To be clearer about the second one, if I create a synthetic sensor by cobbling different readings as attributes for one sensor to be consumed through the API, will that use less power on the side of the ESP32?
Not sure about the power difference but you are going to want to use mqtt if you are putting the device to sleep. The API does not play nice with deep sleep.
OK, I’ve implemented the fast_connect and static IP (also reserved on my router).
Is there something I can read that explains what goes awry when using the API and deep sleep? Perhaps I’m missing something, but I haven’t noticed anything amiss.
Is the idea that because the sensors aren’t available during sleep it is better to have the messages published to MQTT so that they persist while the ESP is sleeping?
No - I think it’s purely about the setup time of the API connection vs MQTT. If you have time you can do some testing for us - but I vaguely remember watching a Youtube video having done all that before I set up my battery powered devices.