Skip to content

Enhance loop() to be more resilient #161

Open
@brentru

Description

@brentru

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions