Skip to content

Conversation

@hmbacher
Copy link
Contributor

@hmbacher hmbacher commented Aug 29, 2025

Hello :)

Currently in lib/framework/WiFiSettingsService.h the read() method creates an invalid structured JSON representation of WifiSettings, what leads to inconsistent read/update operations, especially if you intend to use static IP configuration.

The issue is, that within the for loop, while iterating through the networks, the network's properties are written to the JSON root level instead of to the network's particular array item. As a consequence, the resulting JSON missmatches the expected structure by the front end and the network settings properties cannot be visualized correctly.
The same effect should apply to persisting the settings file to the flash FS.

Independent from the bugfix:
I find the WiFi Station settings dialog somewhat unintuitive when using multiple network configurations. I found it difficult to understand how the respective configuration is loaded into the fields at the bottom of the dialog and how the "Add/Update Network" and "Apply Settings" buttons work.
Therefore, I changed the layout slightly and implemented a separate edit dialog (modal), which I think simplifies usage.
If there's interest, I could create a PR for that as well.

@theelims theelims merged commit 428e088 into theelims:main Oct 8, 2025
@theelims
Copy link
Owner

theelims commented Oct 8, 2025

@hmbacher I was just looking through your fork and the changes you did to the WiFi Station page. I am not particular happy with my solution. It works, but as you noted is cumbersome to use. I would be very interested in a PR with your changes.

I would also appreciate all the other small fixes and improvements you did as a PR.

@hmbacher hmbacher deleted the fixing branch October 9, 2025 05:31
@hmbacher
Copy link
Contributor Author

@theelims, thanks for the feedback! Sure, I will create a PR the next days.

@theelims
Copy link
Owner

@hmbacher Thanks! Your support is highly appreciated.

What is the reason for the delayed WiFi reconnect in your code?

@hmbacher
Copy link
Contributor Author

@theelims, I created the PR and explained the delayed WiFi reconnect there!

JuergenLeber pushed a commit to JuergenLeber/ESP32-sveltekit that referenced this pull request Nov 2, 2025
* Fixing JSON representation of WifiSettings
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.

2 participants