{"id":23164832,"url":"https://github.com/pedroetb/smart-switch","last_synced_at":"2026-04-16T04:01:18.333Z","repository":{"id":151702702,"uuid":"347416381","full_name":"pedroetb/smart-switch","owner":"pedroetb","description":"Smart switch for AC, based on Arduino","archived":false,"fork":false,"pushed_at":"2021-07-15T17:59:22.000Z","size":127,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-04T21:16:59.499Z","etag":null,"topics":["arduino","clap","esp8266","http","mqtt","nodemcu","relay","timer","wifi"],"latest_commit_sha":null,"homepage":"","language":"C++","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/pedroetb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"pedroetb"}},"created_at":"2021-03-13T16:10:01.000Z","updated_at":"2022-03-06T13:43:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"a80cc837-b179-46ca-a9da-2d85a37d88fb","html_url":"https://github.com/pedroetb/smart-switch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pedroetb/smart-switch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedroetb%2Fsmart-switch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedroetb%2Fsmart-switch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedroetb%2Fsmart-switch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedroetb%2Fsmart-switch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pedroetb","download_url":"https://codeload.github.com/pedroetb/smart-switch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedroetb%2Fsmart-switch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31870516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"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":["arduino","clap","esp8266","http","mqtt","nodemcu","relay","timer","wifi"],"created_at":"2024-12-18T01:13:27.465Z","updated_at":"2026-04-16T04:01:18.286Z","avatar_url":"https://github.com/pedroetb.png","language":"C++","funding_links":["https://github.com/sponsors/pedroetb"],"categories":[],"sub_categories":[],"readme":"# smart-switch\n\nSmart switch for AC, based on Arduino\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![Sponsor](https://img.shields.io/badge/-Sponsor-fafbfc?logo=GitHub%20Sponsors)](https://github.com/sponsors/pedroetb)\n\n## Description\n\nTODO\n\n## HTTP communication\n\nTODO\n\n## MQTT communication\n\nTODO\n\n### MQTT usage examples\n\nUsing default configuration for MQTT, you can interact with smart-switch like this:\n\n```sh\n#Listen output MQTT messages from specific smart-switch\nmosquitto_sub -h \"\u003cbroker\u003e\" -t \"pedroetb/smart-switch/001/output\"\n\n#Listen log MQTT messages from specific smart-switch\nmosquitto_sub -h \"\u003cbroker\u003e\" -t \"pedroetb/smart-switch/001/log\"\n\n#Listen output MQTT messages from any smart-switch\nmosquitto_sub -h \"\u003cbroker\u003e\" -v -t \"pedroetb/smart-switch/+/output\"\n\n#Listen log MQTT messages from any smart-switch\nmosquitto_sub -h \"\u003cbroker\u003e\" -v -t \"pedroetb/smart-switch/+/log\"\n\n#Listen all MQTT messages (input, output and log) from/to any smart-switch\nmosquitto_sub -h \"\u003cbroker\u003e\" -v -t \"pedroetb/smart-switch/#\"\n\n#Send any action (\"/status\" for example) as MQTT message to specific smart-switch\nmosquitto_pub -h \"\u003cbroker\u003e\" -t \"pedroetb/smart-switch/001/input\" -m \"/status\"\n```\n\n## License\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nThis project is released under the [MIT License](LICENSE).\n\n## References\n\n* [BUILD a Smart Switch With an Arduino and a Relay - YouTube](https://www.youtube.com/watch?v=7swG4XVSx50)\n* [NodeMCU, la popular placa de desarrollo con ESP8266](https://www.luisllamas.es/esp8266-nodemcu/)\n* [Turn on and Off a Lamp Clapping Twice, Using Arduino : 4 Steps - Instructables](https://www.instructables.com/Turn-on-and-Off-a-Lamp-Clapping-Twice-Using-Arduin/)\n* [Cómo emplear el ESP8266 o ESP32 como servidor HTTP](https://www.luisllamas.es/como-emplear-el-esp8266-como-servidor/)\n* [Arduino Tutorial: Avoiding the Overflow Issue When Using millis() and micros()](https://www.norwegiancreations.com/2018/10/arduino-tutorial-avoiding-the-overflow-issue-when-using-millis-and-micros/)\n* [ESP8266 Arduino: Software restart - techtutorialsx](https://techtutorialsx.com/2017/12/29/esp8266-arduino-software-restart/)\n* [Instalar un interruptor, conmutador o cruzamiento - Bricolajero](https://bricolajero.com/instalar-un-interruptor-conmutador-o-cruzamiento/)\n* [Detector de cruce por cero con Arduino y optoacoplador H11AA1](https://www.luisllamas.es/arduino-cruce-por-cero-h11aa1/)\n* [pubsubclient/mqtt_large_message.ino at master · knolleary/pubsubclient](https://github.com/knolleary/pubsubclient/blob/master/examples/mqtt_large_message/mqtt_large_message.ino)\n* [Cómo programar el ESP8266 o ESP32 por WiFi con Arduino OTA](https://www.luisllamas.es/como-programar-el-esp8266-por-wifi-con-arduino-ota/)\n* [H11aa1 y Arduino : Midiento la frecuencia de red. - YouTube](https://www.youtube.com/watch?v=7xisoSWYbOA)\n* [Control de Fase con Arduino : Diseño del Cirrcuito. - YouTube](https://www.youtube.com/watch?v=fX3HQqQkMic)\n* [The Evils of Arduino Strings | Majenko's Hardware Hacking Blog](https://hackingmajenkoblog.wordpress.com/2016/02/04/the-evils-of-arduino-strings/)\n* [Memory, memory, always memory !!! – An Esp8266 microcontroller in my Life](https://esp8266life.wordpress.com/2019/01/13/memory-memory-always-memory/)\n* [Optimizing SRAM | Memories of an Arduino | Adafruit Learning System](https://learn.adafruit.com/memories-of-an-arduino/optimizing-sram)\n* [Template Metaprogramming: Compile time loops over class methods | by Niko Savas | Medium](https://medium.com/@savas/template-metaprogramming-compile-time-loops-over-class-methods-a243dc346122)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedroetb%2Fsmart-switch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedroetb%2Fsmart-switch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedroetb%2Fsmart-switch/lists"}