https://github.com/pedrominatel/esp8266-nodemcu-websetup
With this solution we have possibility to connect to wifi network and save the ssid and pass. If we try to connect to another wifi then script get in AP mode if connection could not be established and AP serve the webpage from local network to connect with browser or smartphone and adjust and pick new wifi that will be stored in lc file.
Now is time to try to put code in my lua scripts...
Faramon