{"action":"closed","issue":{"url":"https://api.github.com/repos/tzapu/WiFiManager/issues/236","repository_url":"https://api.github.com/repos/tzapu/WiFiManager","labels_url":"https://api.github.com/repos/tzapu/WiFiManager/issues/236/labels{/name}","comments_url":"https://api.github.com/repos/tzapu/WiFiManager/issues/236/comments","events_url":"https://api.github.com/repos/tzapu/WiFiManager/issues/236/events","html_url":"https://github.com/tzapu/WiFiManager/issues/236","id":182532683,"number":236,"title":"Wifimanager and ArduinoOTA are not compatible","user":{"login":"H4M3DR","id":13813417,"avatar_url":"https://avatars.githubusercontent.com/u/13813417?v=3","gravatar_id":"","url":"https://api.github.com/users/H4M3DR","html_url":"https://github.com/H4M3DR","followers_url":"https://api.github.com/users/H4M3DR/followers","following_url":"https://api.github.com/users/H4M3DR/following{/other_user}","gists_url":"https://api.github.com/users/H4M3DR/gists{/gist_id}","starred_url":"https://api.github.com/users/H4M3DR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/H4M3DR/subscriptions","organizations_url":"https://api.github.com/users/H4M3DR/orgs","repos_url":"https://api.github.com/users/H4M3DR/repos","events_url":"https://api.github.com/users/H4M3DR/events{/privacy}","received_events_url":"https://api.github.com/users/H4M3DR/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-12T13:57:00Z","updated_at":"2016-11-03T10:07:20Z","closed_at":"2016-11-03T10:07:20Z","body":"This is my code, it seems that arduinoOTA clears saved data from wifimanager and always starting in ap mode.\n\n`#include <WiFiManager.h>\n# include <ESP8266WiFi.h>\n# include <DNSServer.h>\n# include <ESP8266WebServer.h>\n# include <ESP8266mDNS.h>\n# include <WiFiUdp.h>\n# include <ArduinoOTA.h>\n\nvoid setup() {\n  Serial.begin(9600);\n  delay(10);\n\n  WiFiManager wifiManager;\n  wifiManager.autoConnect(\"Hamed\");\n  Serial.print(\"\\nConnect\\n\");\n\n   // Port defaults to 8266\n   // ArduinoOTA.setPort(8266);\n\n   // Hostname defaults to esp8266-[ChipID]\n   ArduinoOTA.setHostname(\"myesp8266\");\n\n   // No authentication by default\n   // ArduinoOTA.setPassword((const char *)\"123\");\n\n   ArduinoOTA.onStart([]() {\n     Serial.println(\"Start\");\n   });\n   ArduinoOTA.onEnd([]() {\n     Serial.println(\"\\nEnd\");\n   });\n   ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {\n     Serial.printf(\"Progress: %u%%\\r\", (progress / (total / 100)));\n   });\n   ArduinoOTA.onError([](ota_error_t error) {\n     Serial.printf(\"Error[%u]: \", error);\n     if (error == OTA_AUTH_ERROR) Serial.println(\"Auth Failed\");\n     else if (error == OTA_BEGIN_ERROR) Serial.println(\"Begin Failed\");\n     else if (error == OTA_CONNECT_ERROR) Serial.println(\"Connect Failed\");\n     else if (error == OTA_RECEIVE_ERROR) Serial.println(\"Receive Failed\");\n     else if (error == OTA_END_ERROR) Serial.println(\"End Failed\");\n   });\n   ArduinoOTA.begin();\n   Serial.println(\"Ready\");\n   Serial.print(\"IP address: \");\n   Serial.println(WiFi.localIP());\n\n}\n\nvoid loop() {\n   ArduinoOTA.handle();\n}`\n"}}
{"actor":{"display_login":"tzapu"}}