How to use button to enter AP mode? How to change the Name?

I am new on Wled. Wled is a nice project. Thank you for your efforts.

i am using an Wemos D1 mini and have two questions.
How can i use a button to enter the AP mode to configure Wlan Settings?
and
How to Change the name “wled-WLED” to something else?

thank you for your help.

Hi,
In the User Interface menu look for ‘Server description:’ Change that to rename the device.

Sorry I don’t know how to set a button to enter AP mode. If you flash the latest beta of wled with the web flasher v2 you can easily edit your wifi login from the web flasher.

If you are not connecting the device to your wifi and are looking to just connect to the devices built in AP you can change the setting under the wifi settings menu: ‘AP opens:’ By default it should always enable the AP if it can’t connect to a configured wifi network after boot.

1 Like

The only supported feature for WiFi and a button is resetting to AP mode after you have entered network info.

This is what i want. How do i reset to ap mode with button?

Hold it down for >6 seconds.

https://kno.wled.ge/

When i enter the AP ip, i see the standard Screen with color selection. Is it possible to change the long press to short press to reset to ap mode?

Is there no way to come to the initial wlan setup screen ?

Is it possible to change the long press (>6 Seconds) to a short press?

Far as I know, not without compiling your own. What are you trying to accomplish?

Not sure. Check the API documentation. If it’s in there, you would just set that as your short press button action. Seems a bit dangerous though.

The button is hidden. you can press the button only with a needle :slight_smile:

Nothing special. It is for another Person with not much knowing about the technics. i will make it easy for this person.
Compiling is no problem. But where can i find the code for the button press?

Button.cpp

1 Like

Thank you for your answers.

I have found the code in Button.cpp
change it to short press is no problem.

Is there no way to reset to the AP screen seen at the first use of wled?
See picture:

I do not understand the question.

Maybe you can link the button press to the “Factory reset” function. This will erase Wifi settings (and all other settings) and go back to the main page.

1 Like

Does this:

if (buttonReleasedTime - buttonPressedTime > 6000) {clearEEPROM(); reset();}

clear only the Wifi settings or all other wled settings also? I will clear only the wifi settings.

I have added this to my fork if you are interested (button.cpp).

...
    if (b == 0 && dur > 2*WLED_LONG_AP) { //very long press on button 0 (when released)
      WLED_FS.format();
      clearEEPROM();
      doReboot = true;
    } else if (b == 0 && dur > WLED_LONG_AP) { //long press on button 0 (when released)
...
1 Like

thank you.
does this code delete only the wifi settings or the wled settings like presets also?

everything