Open
Description
The loop()
method seems to cause a lot of confusion regarding its purpose, invocation, and operation. I was discussing with @dhalbert how to improve this and have some ideas...
This issue proposes:
- We create a new method (
network_loop()
. This method handles:- WiFi network connectivity (are we connected prior to polling? What do we do if the WiFi is disconnected during the
while True
) - MQTT broker connectivity (are we still connected to the broker, prior to calling
loop()
- MQTT network
loop()
polling - Handling failures within a MQTT
loop()
call
- WiFi network connectivity (are we connected prior to polling? What do we do if the WiFi is disconnected during the