by harry247 on 12/19/24, 7:25 PM with 25 comments
by InkCanon on 12/22/24, 1:02 PM
1) In the worst case you're transmitting one packet for each connection, this requires you to send two handshake packets. The TX time alone cannot be more than a few milliseconds per packet. Once every 5-15 minutes is negligible
2) MQTT uses TCP by default, unless you use one of its variants
3) Leaving RX on is inevitable if you want real time connection, this is likely a far larger draw than the handshake
4) You could also configure the keep alive tcp connection value on the server and reuse the same connection
by ElectRabbit on 12/22/24, 12:33 PM
I've build a solar station with an ESP32 using LoRa module. Even that wasn't much fun as I was forced to keep in light or even deep sleep as often as possible.
An option would be to use a Nordic NRF or STM32WB and use the BLE long range mode.
by floating-io on 12/22/24, 11:23 AM
That said, were you using TLS? I'd be curious to know how that impacts power consumption during HTTP calls.
by airbreather on 12/22/24, 12:30 PM
If you use ESP-NOW then you can wake up send msg and sleep again in 35ms.
It's a layer 2 protocol.
by archi42 on 12/22/24, 11:57 AM
Did you try reusing the http connection (one per ping)? How about putting all data in a single API call and let the server handle that?
Did you try compression? Not sure if compression makes sense, but a simple+fast compression like gzip could also be worth a try to reduce the actual bytes to put on the air; especially if your data is very verbose or repetitive. (Do that before connecting to wifi, even if that means not using http's compression).
I suppose you're talking http, not https. The latter will of course use much more energy.
Using UDP and the ensuring TCP-like qualities seems like a last resort solution.
Sorry if I misread your article and the suggestion were tried or are not feasible for you.
by harry247 on 12/19/24, 7:25 PM
Hope you all enjoy!
by KennyBlanken on 12/22/24, 1:28 PM
The whole thing smells like a scam.
by timonoko on 12/22/24, 2:32 PM
Undesirable thing is that I have left faucet running and the sewer stays too hot/cold for half an hour.
by amelius on 12/22/24, 11:14 AM
Everybody implementing their own protocol over UDP seems highly undesirable.
by thijsb on 12/22/24, 2:07 PM
by sschueller on 12/22/24, 11:23 AM