AP mode slow web interface

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

AP mode slow web interface

#1 Post by rayE » 04 Feb 2019, 02:16

Hi All,
I thought I would share this as it may be useful to some. I have had many problems in the past with configuring wifi settings whilst the unit is in AP mode. I have experienced very sluggish behaviour of the AP web interface and also the unit reconnecting to a pre-configured network without warning, all this making configuring a new wifi network a real PITA. I have tried many different builds and all seem to behave similar.

All the units I have have a fixed IP address whilst on the wifi network and this seems to be the cause of the problems whist in AP mode. Here are the rules im now using on an SONOFF POW to overcome the problem. I can manually enter AP mode with a long press of the button.

It would also be nice to have the following in future Mega builds
1. An on the fly method to turn off SOME Tasks/devices before entering AP mode as this also increases the AP web interface response time.
2. An event to signify the unit is in AP or STN mode.

Code: Select all

//***On Boot SONOFF POW***
On System#Boot do    	                              
   GPIO,12,1                                         //Turn on Red LED
   timerSet,2,0                                      //Disable timer 2 (pulse LED)                                                   
endon

//***WiFi Connected***
on WiFi#Connected do
   GPIO,15,1                                         //Turn on Blue LED 
   GPIO,12,1                                         //Turn on Red LED 
   timerSet,2,0                                     //Disable timer 2 (pulse LED) 
endon

//***WiFi Disconnected***
on WiFi#Disconnected do
    GPIO,15,0                                        //Turn off Blue LED   
endon


//***Set to AP mode with a 5 second key press***
on switch#switch=10 do
    //Long press from state 1-->0
    wifiSSID A                                       //Change Primary SSID
    ip 0.0.0.0                                       //Change static IP
    WifiAPMode                                    //Force into AP mode  
    GPIO,15,0                                      //Turn off Blue LED 
    GPIO,12,1                                       //Turn on Red LED
    timerSet,2,2                                    //Timer 2 (pulse LED)
    save                                            //Save settings to flash
endon

//Toggle red LED to signify AP mode:
On Rules#Timer=2 do 
    Pulse,12,1,700                                   //Pulse red LED on pin 12 
    timerSet,2,2                                     //Repeat after 1 seconds
endon

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: AP mode slow web interface

#2 Post by grovkillen » 04 Feb 2019, 05:44

TaskDisable,<tasknumber>,<1/0> you mean? Yes that is something we're planning on adding.

https://github.com/letscontrolit/ESPEasy/issues/791

Please go to the GitHub page and add your vote by referencing this thread to the GitHub issue.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: AP mode slow web interface

#3 Post by rayE » 04 Feb 2019, 05:53

TaskDisable,<tasknumber>,<1/0> you mean? Yes that is something we're planning on adding.
Yes, exactly!

Post Reply

Who is online

Users browsing this forum: No registered users and 39 guests