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

evse.cpp: fixing reconnect after wifi disconnect #32

Merged
merged 3 commits into from
Jul 7, 2022
Merged

evse.cpp: fixing reconnect after wifi disconnect #32

merged 3 commits into from
Jul 7, 2022

Conversation

dingo35
Copy link

@dingo35 dingo35 commented Jul 3, 2022

This fix makes the SmartEVSE wifi reconnect withing 15-20 seconds after disconnecting, even after a "strange" disconnect (e.g. temporary signal loss).
EDIT: removed my remark on clean disconnects.

@deqw
Copy link

deqw commented Jul 3, 2022

A "clean" wifi-disconnect was never a problem (e.g. when rebooting your router), that is probably why this problem was only bothering people with bad wifi - signals ...

Your assumption is not correct.

@dingo35 dingo35 mentioned this pull request Jul 3, 2022
@koen-serneels
Copy link
Collaborator

koen-serneels commented Jul 4, 2022

If we can get a verification that this indeed makes it reconnect after a strange disconnect, then we can merge this PR as it seems to be the cleanest imho. Some questions though

  • Unless we fully understand, isn't it better to leave the setAutoReconnect in place as well? That's what the manual says, so maybe it still covers other situations
  • Is it possible for someone facing these issues (I don't have any) to add a short addition here ESP32 reconnect when connection lost alanswx/ESPAsyncWiFiManager#92 with the circumstances in which it happens etc and that the setAutoReconnect does not work oposed to the reconnect? I'm curious to their response, because it would be better fixed in the library than using these workarounds

@koen-serneels koen-serneels mentioned this pull request Jul 4, 2022
@dingo35
Copy link
Author

dingo35 commented Jul 4, 2022 via email

@koen-serneels
Copy link
Collaborator

koen-serneels commented Jul 4, 2022

As I understand, set AutoReconnect does only work with MultiWiFi

Ok, fair enough

EDIT: By the way the library you are referring to is NOT the one we are using! We are using https://github.com/khoih-prog/ESPAsync_WiFiManager (note the underscore!!!)

I followed the link in your code comment with this PR:
image

Why are you refering to this library then for?

@dingo35
Copy link
Author

dingo35 commented Jul 4, 2022 via email

@koen-serneels koen-serneels merged commit 6fe77be into serkri:release/v1.4.0 Jul 7, 2022
@dingo35 dingo35 deleted the 141-fixwifi-reconnect branch July 7, 2022 11:36
k-janssens added a commit that referenced this pull request Aug 26, 2022
* Add Inverted Eastron kWh meter (#20)

Co-authored-by: Hans Dingemans <[email protected]>

* Read and display EV meter currents and use them to limit power to MaxCircuit (#21)

Co-authored-by: Hans Dingemans <[email protected]>

* Wifi debugging (#23)

* Add RemoteDebug for debugging over wifi

* Minimal code adaptions for debugging over wifi

* Add instructions for debugging over wifi

* Correct the default = production release

* Add useful debugging comment

Co-authored-by: Hans Dingemans <[email protected]>

* Code improvement3 (#24)

* evse.cpp: fixing reconnect after wifi disconnect (#32)

* evse.cpp: fixing reconnect after wifi disconnect

* evse.cpp: only reconnect when in normal wifi mode

* evse.cpp: improve wifi for weak signals

Co-authored-by: dingo35 <[email protected]>

* README.md: update docs with added functionality in 1.4.0 (#30)

* README.md: update docs with added functionality in 1.4.0

* README.md: wifi disconnect no longer known bug

Co-authored-by: dingo35 <[email protected]>

* evse.h: put compiletime in debug version string (#36)

Co-authored-by: dingo35 <[email protected]>

* index.html: make it pass validation of html checker + small layout change (#38)

Co-authored-by: dingo35 <[email protected]>

* modbus.cpp: add debug messages for sent packets (#41)

Co-authored-by: dingo35 <[email protected]>

* evse.cpp: fix modbus overload when loadbalance disabled (#40)

* evse.cpp: fix modbus overload when loadbalance disabled

* evse.cpp: More elegant solution for incrementing ModbusRequest

Co-authored-by: dingo35 <[email protected]>

* evse.cpp, evse.h: comment out unused ChargeTimer (#37)

* evse.cpp, evse.h: comment out unused ChargeTimer

* evse.h, evse.cpp: remove unused ChargeTimer

Co-authored-by: dingo35 <[email protected]>

* evse.cpp: Fix compiler warning (#44)

Co-authored-by: dingo35 <[email protected]>

* evse.h, OneWire.cpp: introduce FAKE_RFID for debugging without an RFI… (#45)

* evse.h, OneWire.cpp: introduce FAKE_RFID for debugging without an RFID reader

* evse.h: extend comments on how to use FAKE_RFID

Co-authored-by: dingo35 <[email protected]>

* evse.cpp, evse.h: read imported and exported energy from mainsmeter+e… (#39)

* evse.cpp, evse.h: read imported and exported energy from mainsmeter+evmeter and feed them to the API

* evse.cpp: Fix modbus bug

* evse.h: Undo debug settings

Co-authored-by: dingo35 <[email protected]>

* evse.cpp: improve PP pin debug message (#59)

Co-authored-by: dingo35 <[email protected]>

* evse.cpp: fix meter config bug when switching modes (#60)

Co-authored-by: dingo35 <[email protected]>

* Release/v1.4.0 merge (#52)

* Pipeline build for release branches

* Increased 'safety' temperature thressholds to 70 (#48)

* Features/increased temp safety menu (#49)

* Added max temp menu item

* Added max temp menu item

* Added EV Meter information

* Added EV meter details on status page

* Added EV meter details on status page

* Refactored API textual booleans into real booleans

* Hide EV/BATT widget by default

Co-authored-by: Koen Serneels <[email protected]>

Co-authored-by: dingo35 <[email protected]>
Co-authored-by: Hans Dingemans <[email protected]>
Co-authored-by: Koen Serneels <[email protected]>
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