{"id":13802099,"url":"https://github.com/oliver-joos/wlan-relays","last_synced_at":"2026-01-16T14:37:52.055Z","repository":{"id":165339713,"uuid":"640681551","full_name":"oliver-joos/wlan-relays","owner":"oliver-joos","description":"Very simple HTTP server written in MicroPython for switching ESP32 pins and connected relays via WLAN","archived":false,"fork":false,"pushed_at":"2025-06-03T23:12:36.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T03:30:52.010Z","etag":null,"topics":["iot-device","micropython"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oliver-joos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-05-14T21:57:20.000Z","updated_at":"2025-06-03T23:12:37.000Z","dependencies_parsed_at":"2024-01-07T21:53:21.028Z","dependency_job_id":"0e162dff-598c-4ab6-8cb3-b799211edfc1","html_url":"https://github.com/oliver-joos/wlan-relays","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oliver-joos/wlan-relays","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliver-joos%2Fwlan-relays","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliver-joos%2Fwlan-relays/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliver-joos%2Fwlan-relays/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliver-joos%2Fwlan-relays/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oliver-joos","download_url":"https://codeload.github.com/oliver-joos/wlan-relays/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliver-joos%2Fwlan-relays/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["iot-device","micropython"],"created_at":"2024-08-04T00:01:35.839Z","updated_at":"2026-01-16T14:37:52.041Z","avatar_url":"https://github.com/oliver-joos.png","language":"Python","funding_links":[],"categories":["Libraries"],"sub_categories":["Communications"],"readme":"# WLAN Relays\n\nThis repository contains a very simple HTTP server written in\n[MicroPython](https://micropython.org/) for controlling pins of an ESP32 board.\nThese pins can be connected to solid state relays to switch lamps for example.\n\n## Client Example\n\nThe board will start in access-point mode. This means it provides its own WLAN\nand you have to connect your computer or phone to it first. In this mode, the\nboard always has the **IP address 192.168.4.1**.\n\nSet pin D22 to low using the HTTP client **curl**:\n\n```shell\ncurl -v -m 3 -X POST http://192.168.4.1:7005 --data '{\"pin22\": false}'\n```\n\nYou can connect the board to your existing WLAN by entering your WLAN SSID and\npassword into ``secrets.py``. In this mode, your router assigns a new IP address\nto the board, which is then displayed in the web interface of most routers.\n\n## The Hardware\n\n**ESP32 DevKit V1** boards have WLAN hardware built-in and run with 5V and\nonly 50mA idle or 130mA while transmitting. Pinouts of common ESP32 boards are\n[here](https://randomnerdtutorials.com/esp32-pinout-reference-gpios/).\n\nA few hundred watts AC can be switched with a **5V DC AC solid state relay**.\nSome of these can be controlled directly by 3.3V output pins. During power-up\nthe ESP32 pins are inputs (have high impedance but 3.3V). To keep relays off\nuntil the pins are actively controlled as outputs you can use\n**Low Level Trigger variants** (\u003e1V ⇒ off, \u003c1V ⇒ on).\n\n### Additional hints\n\n* To reset a ESP32 DevKit V1 board press **button \"EN\"**\n* To suppress boot messages pull-down **Pin D15 to GND** with a 10k resistor\n  (helps to avoid problems with terminal tools)\n* Pins \u003e=34 are **inputs only!** (no output on D34, D35)\n\n## The Software\n\nThe following tutorial works on a Linux Mint 21.x or similar Debian-based Linux\nlike Ubuntu. You can run Linux Mint directly from a Live USB stick without\ninstalling it on your computer.\n\nInstall the **ESP-IDF 5.0.4** build tools (**only needed once!**):\n\n```shell\nsudo apt update\nsudo apt install git wget flex bison gperf python3 python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0\nsudo apt remove brltty                  # stop brltty from stealing /dev/ttyUSBx\n\nmkdir -p ~/esp \u0026\u0026 cd ~/esp\ngit clone -b v5.0.4 --recursive https://github.com/espressif/esp-idf.git\ncd esp-idf\n./install.sh esp32\n\nsudo adduser $USER dialout              # allow access to USB serial devices\n# ... and then logout and login again!\n```\n\nDownload this project and prepare MicroPython for ESP32 (**only needed once!**):\n\n```shell\nmkdir -p ~/git \u0026\u0026 cd ~/git\ngit clone https://github.com/oliver-joos/wlan-relays.git\ncd wlan-relays\ngit submodule update --init micropython/\n\nmake -C micropython/mpy-cross/\nmake -C micropython/ports/esp32/ submodules\n```\n\nSetup your terminal (**needed once per session!**):\n\n```shell\nsource ~/esp/esp-idf/export.sh\nexport ESPPORT=/dev/ttyUSB0             # or /dev/ttyACM0 for CH9102X USB ICs\nexport ESPBAUD=921600\n```\n\nBuild and deploy the MicroPython firmware image:\n\n```shell\nmake -C micropython/ports/esp32/ clean  # only after changes in micropython/\nmake -C micropython/ports/esp32/ -j all\n\nmake -C micropython/ports/esp32/ PORT=$ESPPORT erase  # only for empty boards\nmake -C micropython/ports/esp32/ PORT=$ESPPORT deploy\n```\n\nCopy Python files to your board (**overwrites existing files!**):\n\n```shell\n./micropython/tools/mpremote/mpremote.py fs cp *.py :/\n```\n\nNow press the reset button on your board!\n\nTo see log messages or soft-reset the board you can use the MicroPython REPL interface:\n\n```shell\n./micropython/tools/mpremote/mpremote.py    # connect to REPL\n\n# press Ctrl+C to abort the application\n# press Ctrl+D to soft-reset the system\n# press Ctrl+X to exit the mpremote tool\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliver-joos%2Fwlan-relays","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foliver-joos%2Fwlan-relays","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliver-joos%2Fwlan-relays/lists"}