{"action":"created","issue":{"url":"https://api.github.com/repos/tzapu/WiFiManager/issues/154","repository_url":"https://api.github.com/repos/tzapu/WiFiManager","labels_url":"https://api.github.com/repos/tzapu/WiFiManager/issues/154/labels{/name}","comments_url":"https://api.github.com/repos/tzapu/WiFiManager/issues/154/comments","events_url":"https://api.github.com/repos/tzapu/WiFiManager/issues/154/events","html_url":"https://github.com/tzapu/WiFiManager/issues/154","id":148992632,"number":154,"title":"How do you effectively prevent going into config mode if the connection fails?","user":{"login":"domingosl","id":2782026,"avatar_url":"https://avatars.githubusercontent.com/u/2782026?v=3","gravatar_id":"","url":"https://api.github.com/users/domingosl","html_url":"https://github.com/domingosl","followers_url":"https://api.github.com/users/domingosl/followers","following_url":"https://api.github.com/users/domingosl/following{/other_user}","gists_url":"https://api.github.com/users/domingosl/gists{/gist_id}","starred_url":"https://api.github.com/users/domingosl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domingosl/subscriptions","organizations_url":"https://api.github.com/users/domingosl/orgs","repos_url":"https://api.github.com/users/domingosl/repos","events_url":"https://api.github.com/users/domingosl/events{/privacy}","received_events_url":"https://api.github.com/users/domingosl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-04-17T20:20:20Z","updated_at":"2016-07-13T09:38:19Z","closed_at":null,"body":"Upon calling .autoConnect() there is no difference in the way the code behave if there were or not a previous stored credentials.\r\n\r\nIf there was not previous successful connection (no wifi credential were register or incorrect ones) its ok to go in config mode, BUT, if there was a previous successful connection it will be a good idea to keep trying to connect to the stored ssid at least several times before going into config mode.\r\n\r\nThe scenario is this:\r\n1. You setup wifiManager in the setup part of the code\r\n2. run autoConnect and it fails\r\n3. Config mode runs\r\n4. The user inputs the wifi credentials\r\n5. The ESP connects\r\n6. In the loop you constantly check wifi.status\r\n7. If the connection is lost (maybe someone resets the router) the ESP should try to reconnect to the stored wifi for at least 5 minutes before returning to config mode.\r\n\r\nThis is I think a very common scenario, can anyone provide some guide about how to approach this problem?\r\n"},"comment":{"url":"https://api.github.com/repos/tzapu/WiFiManager/issues/comments/232306640","html_url":"https://github.com/tzapu/WiFiManager/issues/154#issuecomment-232306640","issue_url":"https://api.github.com/repos/tzapu/WiFiManager/issues/154","id":232306640,"user":{"login":"kiralikbeyin","id":10079333,"avatar_url":"https://avatars.githubusercontent.com/u/10079333?v=3","gravatar_id":"","url":"https://api.github.com/users/kiralikbeyin","html_url":"https://github.com/kiralikbeyin","followers_url":"https://api.github.com/users/kiralikbeyin/followers","following_url":"https://api.github.com/users/kiralikbeyin/following{/other_user}","gists_url":"https://api.github.com/users/kiralikbeyin/gists{/gist_id}","starred_url":"https://api.github.com/users/kiralikbeyin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiralikbeyin/subscriptions","organizations_url":"https://api.github.com/users/kiralikbeyin/orgs","repos_url":"https://api.github.com/users/kiralikbeyin/repos","events_url":"https://api.github.com/users/kiralikbeyin/events{/privacy}","received_events_url":"https://api.github.com/users/kiralikbeyin/received_events","type":"User","site_admin":false},"created_at":"2016-07-13T09:38:19Z","updated_at":"2016-07-13T09:38:19Z","body":"I tried example;\r\n```\r\n\r\n*WM: AP IP address: \r\n*WM: 192.168.4.1\r\n*WM: HTTP server started\r\n*WM: Request redirected to captive portal\r\n*WM: Handle root\r\n*WM: Request redirected to captive portal\r\n*WM: Handle root\r\n*WM: Request redirected to captive portal\r\n*WM: Handle root\r\n*WM: Handle root\r\nNot connected to WiFi but continuing anyway.\r\nAfter waiting 66.87 secs in setup() connection result is 1\r\nfailed to connect, finishing setup anyway\r\n0.0.0.0\r\n5ccf7f138d7c\r\nHTTP server started\r\nhandleFileRead: /\r\nhandleFileRead: /css/titatoggle-dist.css\r\nhandleFileRead: /js/jquery.js\r\nhandleFileRead: /css/ok.css\r\nhandleFileRead: /\r\n\r\n```\r\n\r\nMy own http server and portal are trying to work together so i don't get a page on 192.168.4.1\r\n\r\n**How to kill portal and serve my own page?**\r\n\r\n@scropion86 Yesterday i tried IR lib but my remotes are UNKNOWN, do you have any success with UNKNOWN devices rx&tx ?\r\nCan you share your code?\r\n\r\nThanks.\r\n\r\n\r\n"}}
{"actor":{"display_login":"kiralikbeyin"}}