{"id":20576699,"url":"https://github.com/hobbyquaker/wifi-usb-relay","last_synced_at":"2025-09-21T23:09:21.286Z","repository":{"id":233150081,"uuid":"743095248","full_name":"hobbyquaker/wifi-usb-relay","owner":"hobbyquaker","description":"Simple Wi-Fi relay with USB-C in and USB-A out","archived":false,"fork":false,"pushed_at":"2024-01-14T10:16:16.000Z","size":15537,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T21:45:09.329Z","etag":null,"topics":["esp8266","esphome","iot","relay","smarthome","wifi"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hobbyquaker.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}},"created_at":"2024-01-14T10:12:02.000Z","updated_at":"2024-12-11T11:55:53.000Z","dependencies_parsed_at":"2024-04-14T06:39:40.598Z","dependency_job_id":null,"html_url":"https://github.com/hobbyquaker/wifi-usb-relay","commit_stats":null,"previous_names":["hobbyquaker/wifi-usb-relay"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hobbyquaker/wifi-usb-relay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Fwifi-usb-relay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Fwifi-usb-relay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Fwifi-usb-relay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Fwifi-usb-relay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hobbyquaker","download_url":"https://codeload.github.com/hobbyquaker/wifi-usb-relay/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Fwifi-usb-relay/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276318992,"owners_count":25621652,"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","status":"online","status_checked_at":"2025-09-21T02:00:07.055Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["esp8266","esphome","iot","relay","smarthome","wifi"],"created_at":"2024-11-16T05:46:40.992Z","updated_at":"2025-09-21T23:09:21.238Z","avatar_url":"https://github.com/hobbyquaker.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# USB Relay\n\nSimple 5V 2A Wi-Fi Relay with USB-C in and USB-A out. I'm using this to integrate decorative lights into a \nsmart home environment, perhaps of interest for beginners as simple ESPHome and Fusion360 example project.\n\n![case3.jpg](img%2Fcase3.jpg)\n\n## BOM\n\n* 1x USB-C female breakout\n  https://de.aliexpress.com/item/1005005187670446.html\n* 1x USB-A female breakout\n  https://de.aliexpress.com/item/32983983188.html\n* 1x AMS1117 3.3V regulator module\n  https://de.aliexpress.com/item/1005005911922207.html\n* 1x ESP-01S ESP8266 module\n  https://de.aliexpress.com/item/1005006174109128.html\n* 1x 2x4P female header socket\n  https://www.aliexpress.com/item/1005001781173114.html\n* 1x 5V DC relay\n  https://de.aliexpress.com/item/1005004384333385.html\n* 1x 3x7 double-sided prototyping PCB\n  https://de.aliexpress.com/item/1005003384352824.html\n* 1x 2N7000 N-channel MOSFET\n  https://de.aliexpress.com/item/1005005945696455.html\n* 1x 1N4148 diode\n  https://de.aliexpress.com/item/1005006127068810.html\n* 1x 100k resistor\n* 1x 6x6x15 mini push button\n  https://de.aliexpress.com/item/32912263133.html\n* 4x 2x8 screw\n  https://www.aliexpress.com/item/1005002322813833.html\n* 4x 6x2mm rubber feet\n  https://www.aliexpress.com/item/1005004068119765.html\n\n\n## Schematic\n\n![schematic.jpg](img%2Fschematic.jpg)\n\n\n## PCB\n\n![pcb3.jpg](img%2Fpcb3.jpg)\n![pcb1.jpg](img%2Fpcb1.jpg)\n![pcb2.jpg](img%2Fpcb2.jpg)\n![pcb-wiring.jpg](img%2Fpcb-wiring.jpg)\n\n\n## 3D printed case\n\n![fusion.png](img%2Ffusion.png)\n![case1.jpg](img%2Fcase1.jpg)\n![case2.jpg](img%2Fcase2.jpg)\n\n\n* Fusion 360 Archive: [usb-relay.f3d](cad%2Fusb-relay.f3d)\n \n* [usb-relay-case.stl](cad%2Fusb-relay-case.stl)\n* [usb-relay-lid.stl](cad%2Fusb-relay-lid.stl)\n* [usb-relay-button.stl](cad%2Fusb-relay-button.stl)\n\n\n## ESPHome\n\nFor initial programming, I used this adapter: https://de.aliexpress.com/item/1005003396937959.html\n\n```yaml\nesphome:\n  name: usb-relay-02\n  friendly_name: usb-relay-02\n\nesp8266:\n  board: esp01_1m\n\n# Enable logging\nlogger:\n\n# Enable Home Assistant API\napi:\n\nota:\n  password: \"ef468b5d3eac4c58444d9c30628206c0\"\n\nwifi:\n  ssid: !secret wifi_ssid\n  password: !secret wifi_password\n\n  # Enable fallback hotspot (captive portal) in case wifi connection fails\n  ap:\n    ssid: \"Usb-Relay-02 Fallback Hotspot\"\n    password: \"YR4r1ClyDioP\"\n\ncaptive_portal:\n\nmqtt:\n  broker: mqtt.lan\n\nswitch:\n  - platform: gpio\n    name: \"relay\"\n    id: relay\n    pin: 1\n    inverted: True\n    restore_mode: ALWAYS_OFF\n\nbinary_sensor:\n  - platform: gpio\n    name: button\n    id: button\n    pin:\n      number: 2\n      mode: INPUT_PULLUP\n      inverted: True\n    on_press:\n      then:\n        - switch.toggle: relay\n\n```\n\n## License\n\nThis is free and unencumbered software and data released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to \u003chttps://unlicense.org\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhobbyquaker%2Fwifi-usb-relay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhobbyquaker%2Fwifi-usb-relay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhobbyquaker%2Fwifi-usb-relay/lists"}