Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Wifi connector class #20

Closed
wants to merge 1 commit into from
Closed

Adding Wifi connector class #20

wants to merge 1 commit into from

Conversation

bram2202
Copy link

Fixes a bug that when the wifi connection drops out you need do reset the board to regain a wifi connection.
This is due to the fact that the wifi connection is made in the main setup and never checked again.

This commit fixes that by:

  • Move wifi functions to its own class.
  • Adding wifi handler to main loop to check wifi status and reconnect.

- Move wifi functions to its class.
- Adding wifi handler to check wifi and reconnect
@jantenhove
Copy link
Owner

Thanks for the pull request. I will review and test it.

@lgespee
Copy link

lgespee commented Mar 29, 2019

This is one of the main issues I'm experiencing.
Our inverter is just a tad too far from the WiFi access point for a stable connection. Unplugging the ESP has too be done weekly.

@bram2202
Copy link
Author

Hi, did you, by any chance, had the time to review and test this PR?

@jantenhove
Copy link
Owner

I did test it. Without your Wificonnector class the GoodWeLogger automatically reconnects, which is what an ESP8266 does by default. I don't really see any need for a separate class.
If your ESP does not automatically reconnects, it might be related to a bug in the SDK: esp8266/Arduino#4161. I suggest upgrading to the latest SDK.

@jantenhove
Copy link
Owner

@bram2202 @lgespee
Can you test with a later version of the ESP SDK if this is resolved?

I observed similair disconnects a while back, but after upgrading the SDK, I didn't come across it anymore.

@jantenhove
Copy link
Owner

In the latest commits an extra check is added which will auto restart the ESP if the Wifi is lost for more than 30 seconds (and the ESP can't auto reconnect within that time for whatever reason).

@jantenhove jantenhove closed this Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants