[GH-ISSUE #435] use public method resetSettings(); #369

Closed
opened 2026-02-28 01:24:58 +03:00 by kerem · 1 comment
Owner

Originally created by @speendo on GitHub (Oct 6, 2017).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/435

I just try to find a solution for issue #120 of the project esp8266_milight_hub, which uses this great project.

The aim is to find a proper solution for the ESP8266 to leave a WiFi network and reconnect to another one.

In my opinion this is a genuine "duty" of a WiFiManager. Therefore I was just about to suggest you to create a wrapper method for WiFi.disconnect().

Checking the code of WiFiManager, I found that such a wrapper method already exists (it is called WiFiManager::resetSettings(), find it here).

However, this method seems to be undocumented. My programmer friends always warn me not to use undocumented methods ;-)

Is it "safe" to use WiFiManager::resetSettings()?

  • If yes, would it be possible to write a line of documentation about it?
  • If no, could you add another public method to reset the WiFi connection?
Originally created by @speendo on GitHub (Oct 6, 2017). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/435 I just try to find a solution for issue [#120](https://github.com/sidoh/esp8266_milight_hub/issues/120) of the project esp8266_milight_hub, which uses this great project. The aim is to find a proper solution for the ESP8266 to leave a WiFi network and reconnect to another one. In my opinion this is a genuine "duty" of a WiFiManager. Therefore I was just about to suggest you to create a wrapper method for `WiFi.disconnect()`. Checking the code of WiFiManager, I found that such a wrapper method already exists (it is called `WiFiManager::resetSettings()`, find it [here](https://github.com/tzapu/WiFiManager/blob/master/WiFiManager.cpp#L335)). However, this method seems to be undocumented. My programmer friends always warn me not to use undocumented methods ;-) Is it "safe" to use `WiFiManager::resetSettings()`? * If yes, would it be possible to write a line of documentation about it? * If no, could you add another public method to reset the WiFi connection?
kerem closed this issue 2026-02-28 01:24:59 +03:00
Author
Owner

@speendo commented on GitHub (Oct 6, 2017):

Oh!

My bad. It is documented in the API reference. It just didn't make it to the README. Sorry.

<!-- gh-comment-id:334705754 --> @speendo commented on GitHub (Oct 6, 2017): Oh! My bad. It is documented in the [API reference](https://github.com/tzapu/WiFiManager/wiki/API-reference#void-wifimanagerresetsettings). It just didn't make it to the [README](https://github.com/tzapu/WiFiManager/blob/master/README.md). Sorry.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#369
No description provided.