openshwprojects / OpenBK7231T_App

Open source firmware (Tasmota/Esphome replacement) for BK7231T, BK7231N, BL2028N, T34, XR809, W800/W801, W600/W601 and BL602
https://openbekeniot.github.io/webapp/devicesList.html
1.33k stars 226 forks source link

simple addition to allow clear text passwords for WiFi #1245

Closed MaxineMuster closed 2 weeks ago

MaxineMuster commented 1 month ago

As requested here:

https://www.elektroda.com/rtvforum/topic4055720.html

openshwprojects commented 1 month ago

Thx, can you show a screenshot of how it works?

MaxineMuster commented 1 month ago

sure, here is a screenshot: Bildschirmfoto vom 2024-05-22 19-08-21

This was just a quick proof of concept - sorry, I just now entered the link to the forum request for this.

If it might make its way in the release, let me check if/how to reduce the size - the "onclick" code is almost identical on SSID and SSID2 (on the other hand, we might just "comment out" SSID2 until it's working?)

And there was another idea while looking at it: Why sending the WiFi password to the client anyway (its visible in HTML code)? Wouldn't it be better to only send back a changed PW from the client to OBK and only checking on the device, if it's changed? Would mean to disable the fields until a password is entered - so it will not be in the form if there was no entry. Even better would be a second PW field, to repeat the PW, so it could be disabled until both passwords match - of course not necessary if using clear text passwords ;-)...

[Edit]: At least for this version, I think it won't be possible to really save code: the overhead of introducing a JS function to save during calls will not make it significantly shorter (at least for my tries).

openshwprojects commented 2 weeks ago

After consulting with @DeDaMrAzR , I've decided to give it a chance. If you have any futher mods, please open separate PRs, thanks!

openshwprojects commented 2 weeks ago

In future, you can try to optimize this PR change by reusing C string instead of adding it twice

github-actions[bot] commented 2 weeks ago

:tada: This PR is included in version 1.17.611 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: