Skip to content

More issues with Wifi AutoAP #158

@S57PNX

Description

@S57PNX

In #144 we fixed the return from AutoAP mode to Wifi client mode. Unfortunately this uncovered a new issue that was hidden before: when AutoAP stops due to timeout, it correctly tries to connect to Wifi client and after this fails, it will immediately start AutoAP again.

On a site without wifi, this means that AutoAP will be constantly on. It will timeout but restart immediately. This is convenient but wastes electricity on solar systems.

My expectation is that AutoAP is only tried once after reboot - when it times out and there is no wifi present, it should remain off and save power while checking if wifi gets back. If there is no wifi and you need to service the gate, you need to reboot it to get into AutoAP mode.

In my mind the logic should be:

  1. after reboot, try to connect to wifi
  2. if wifi is not present, start AutoAP one time only until timeout
  3. after timeout, check if wifi is available
  4. if no wifi, wait 15 minutes and go to 3.

This logic needs another wifi check loop and some refactoring of the code, which is a bit too much for me at this late hour in the evening. Better ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions