Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please add timer to Wifi hotspot #56

Open
tkoeberl opened this issue Dec 15, 2016 · 6 comments
Open

please add timer to Wifi hotspot #56

tkoeberl opened this issue Dec 15, 2016 · 6 comments

Comments

@tkoeberl
Copy link

Hi,
after a power failure the access point is slower than the ESP's. The ESP's power up in hotspot mode.
Can you please add the functionality to reset the ESP after X minutes if it is in hotspot mode?

thanks,
-thomas

@prikril
Copy link

prikril commented Dec 15, 2016

Here is a quick and dirty hack (UNTESTED) for you, restarting the ESP after 5 minutes.
Add these lines at the end of "servernode.lua":

TMR_AUTORESTART_ID = 1
AUTORESTART_IN_MINUTES = 5
AUTORESTART_TIMER_ENABLED = true
tmr.alarm(TMR_AUTORESTART_ID, AUTORESTART_IN_MINUTES*60*1000, tmr.ALARM_SINGLE, function()
  if(AUTORESTART_TIMER_ENABLED == true) then
    node.restart()
  end
end)

Please test it only on one ESP first.

@tkoeberl
Copy link
Author

cool, this should go into the sources.

@prikril
Copy link

prikril commented Dec 15, 2016

So it worked?

@tkoeberl
Copy link
Author

Sorry, dont have time to test it. end of year in IT business.

@prikril
Copy link

prikril commented Dec 15, 2016

ok, no problem.

@tkoeberl
Copy link
Author

Hi, its working, thanks.

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

No branches or pull requests

2 participants