{"id":13802102,"url":"https://github.com/mitchins/micropython-wifimanager","last_synced_at":"2026-06-19T22:30:19.167Z","repository":{"id":50235304,"uuid":"102245600","full_name":"mitchins/micropython-wifimanager","owner":"mitchins","description":"A simple network configuration utility for MicroPython on the ESP-8266 board","archived":false,"fork":false,"pushed_at":"2021-06-01T04:39:00.000Z","size":414,"stargazers_count":59,"open_issues_count":6,"forks_count":12,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-01T15:33:44.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitchins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-03T06:26:26.000Z","updated_at":"2024-01-30T02:01:43.000Z","dependencies_parsed_at":"2022-08-03T06:45:30.095Z","dependency_job_id":null,"html_url":"https://github.com/mitchins/micropython-wifimanager","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchins%2Fmicropython-wifimanager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchins%2Fmicropython-wifimanager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchins%2Fmicropython-wifimanager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchins%2Fmicropython-wifimanager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitchins","download_url":"https://codeload.github.com/mitchins/micropython-wifimanager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219846951,"owners_count":16556418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T00:01:35.917Z","updated_at":"2026-06-19T22:30:19.099Z","avatar_url":"https://github.com/mitchins.png","language":"Python","funding_links":[],"categories":["Libraries"],"sub_categories":["Communications"],"readme":"# micropython-wifimanager\nA simple network configuration utility for MicroPython on boards such as ESP8266 and ESP32.\n\n#### Configuration\n\nSimply upload your JSON file with your networks, the default path is '/networks.json', which is specified in the class property `config_file`.\n\nA sample configuration may look like this:\n\n\t{\n\t\t\"schema\": 2,\n\t\t\"known_networks\": [\n\t\t\t{\n\t\t\t\t\"ssid\": \"User\\u2019s iPhone\",\n\t\t\t\t\"password\": \"Password1\",\n\t\t\t\t\"enables_webrepl\": false\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"ssid\": \"HomeNetwork\",\n\t\t\t\t\"password\": \"Password2\",\n\t\t\t\t\"enables_webrepl\": true\n\t\t\t}\n\t\t],\n\t\t\"access_point\": {\n\t\t\t\"config\": {\n\t\t\t\t\"essid\": \"Micropython-Dev\",\n\t\t\t\t\"channel\": 11,\n\t\t\t\t\"hidden\": false,\n\t\t\t\t\"password\": \"P@55W0rd\"\n\t\t\t},\n\t\t\t\"enables_webrepl\": true,\n\t\t\t\"start_policy\": \"fallback\"\n\t\t}\n\t}\n\n#### Configuration schema\n\n* **schema**: currently this should be `2`\n* **known_networks**: list of networks to connect to, in order of most preferred first\n\t* SSID - the name of the access point\n\t* password - the clear test password to use\n\t* enables_webrepl - a boolean value to indicate if connection to this network desires webrepl being started\n* **access_point**: the details for the access point (AP) of this device\n\t* config - the keys for the AP config, exactly as per the micropython documentation\n\t* enables_weprepl - a boolean value to indicate if ceating this network desires webrepl being started\n\t* start_policy - A policy from the below list to indicate when to enable the AP\n\t\t* 'always' - regardless of the connection to any base station, AP will be started\n\t\t* 'fallback' - the AP will only be started if no network could be connected to\n\t\t* 'never' - The AP will not be started under any condition\n\n#### Simple usage (one shot)\n\nHere's an example of how to use the WifiManager.\n\n\tMicroPython v1.9.4 on 2018-05-11; ESP32 module with ESP32\n\tType \"help()\" for more information.\n\t\u003e\u003e\u003e from wifi_manager import WifiManager\n\t\u003e\u003e\u003e WifiManager.setup_network()\n\tconnecting to network Foo-Network...\n\tWebREPL daemon started on ws://10.1.1.234:8266\n\tStarted webrepl in normal mode\n\tTrue\n\n\n#### Asynchronous usage (event loop)\n\nThe WifiManager can be run asynchronously, via the cooperative scheduling that micropthon has in uasyncio. If you call `WifiManager.start_managing()` as follows, it will ensure that periodically the network status is scanned, and connection will be re-established as per preferences as needed.\n\n\timport uasyncio as asyncio\n\timport logging\n\tfrom wifi_manager import WifiManager\n\n\tlogging.basicConfig(level=logging.WARNING)\n\tWifiManager.start_managing()\n\tasyncio.get_event_loop().run_forever()\n\n\n#### Contribution\n\nFound a bug, or want a feature? open an issue.\n\nIf you want to contribute, create a pull request.\n\n#### System flow\n\n![System flow](./system_flow.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchins%2Fmicropython-wifimanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitchins%2Fmicropython-wifimanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchins%2Fmicropython-wifimanager/lists"}