{"id":35656191,"url":"https://github.com/sinricpro/esp-idf","last_synced_at":"2026-01-29T03:02:49.698Z","repository":{"id":325893077,"uuid":"846874000","full_name":"sinricpro/esp-idf","owner":"sinricpro","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-12T01:31:19.000Z","size":604,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-12T05:50:50.863Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sinricpro.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-24T07:33:39.000Z","updated_at":"2026-01-12T01:26:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sinricpro/esp-idf","commit_stats":null,"previous_names":["sinricpro/esp-idf"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sinricpro/esp-idf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinricpro%2Fesp-idf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinricpro%2Fesp-idf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinricpro%2Fesp-idf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinricpro%2Fesp-idf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinricpro","download_url":"https://codeload.github.com/sinricpro/esp-idf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinricpro%2Fesp-idf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28861654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T22:56:21.783Z","status":"online","status_checked_at":"2026-01-29T02:00:06.714Z","response_time":59,"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":[],"created_at":"2026-01-05T15:56:51.480Z","updated_at":"2026-01-29T03:02:49.691Z","avatar_url":"https://github.com/sinricpro.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SinricPro ESP-IDF Component\n\n[![Platform](https://img.shields.io/badge/platform-ESP--IDF-blue.svg)](https://docs.espressif.com/projects/esp-idf/)\n[![ESP-IDF](https://img.shields.io/badge/ESP--IDF-v4.4%2B%20%7C%20v5.x-green.svg)](https://github.com/espressif/esp-idf)\n[![License](https://img.shields.io/badge/license-CC%20BY--SA%204.0-orange.svg)](LICENSE)\n[![Build Status](https://github.com/sinricpro/esp-idf/workflows/Build%20and%20Test/badge.svg)](https://github.com/sinricpro/esp-idf/actions)\n[![Examples](https://img.shields.io/badge/examples-13-brightgreen.svg)](examples/)\n\nOfficial ESP-IDF component for [SinricPro](https://sinric.pro) - Control your ESP32 IoT devices with Alexa and Google Home.\n\n## Features\n\n- ✅ **Voice Control** - Works with Alexa and Google Home\n- ✅ **Real-time** - WebSocket-based bidirectional communication\n- ✅ **Secure** - HMAC-SHA256 message signatures\n- ✅ **Reliable** - Auto-reconnection and heartbeat monitoring\n- ✅ **Event-driven** - ESP event loop integration\n- ✅ **Type Safe** - Full C API with optional C++ wrappers\n- ✅ **Configurable** - Kconfig integration\n- ✅ **Cross-Platform** - ESP-IDF v4.4+ and v5.x support\n\n## Supported Devices\n\nAll devices below have complete API support and working examples:\n\n### Simple Devices\n- ✅ **Switch** - Basic on/off control with physical button\n- ✅ **Motion Sensor** - PIR motion detection\n- ✅ **Contact Sensor** - Door/window reed switch detection\n\n### Lighting\n- ✅ **Smart Light** - RGB color, brightness, color temperature (2200-7000K)\n- ✅ **DimSwitch** - Dimmable switch with brightness control (0-100%)\n\n### Climate Control\n- ✅ **Thermostat** - HVAC control with AUTO/COOL/HEAT/ECO/OFF modes\n- ✅ **Fan** - Variable speed control (0-100%)\n- ✅ **Temperature Sensor** - DHT22/DHT11 temperature and humidity\n\n### Security \u0026 Access\n- ✅ **Lock** - Servo-based lock/unlock control\n- ✅ **Garage Door** - Relay control with position sensors\n\n### Home Automation\n- ✅ **Blinds** - Motorized blinds/curtains with position control (0-100%)\n\n### Media Devices\n- ✅ **TV** - Volume, mute, media control, input selection, channels\n- ✅ **Speaker** - Volume, mute, media control, equalizer, modes\n\n### Additional Devices (API Only)\n- ✅ Air Quality Sensor - PM1, PM2.5, PM10 measurements\n- ✅ Power Sensor - Voltage, current, power monitoring\n- ✅ Window AC - Air conditioner with fan speed and temperature\n\n## Requirements\n\n- ESP-IDF v4.4 or higher. Tested on ESP-IDF 6.1\n- ESP32, ESP32-S2, ESP32-S3, ESP32-C3, or ESP32-C6\n- SinricPro account ([sign up free](https://sinric.pro))\n\n## Installation\n\n### Method 1: ESP Component Registry (Recommended)\n\nAdd to your project's `idf_component.yml`:\n\n```yaml\ndependencies:\n  sinricpro/esp-idf: \"^1.1.2\"\n```\n\n### Method 2: Manual Installation\n\n```bash\ncd your_project/components\ngit clone https://github.com/sinricpro/esp-idf.git sinricpro\n```\n\nOr\n\n```bash\nidf.py add-dependency \"sinricpro/esp-idf^1.1.2\"\n```\n\nView at: https://components.espressif.com/components/sinricpro/esp-idf\n\n## Examples\n\nThe component includes **13 complete working examples** demonstrating all device types and features:\n\n| Example | Description | Complexity | Hardware |\n|---------|-------------|------------|----------|\n| [Switch](examples/switch/) | Basic on/off control | ⭐ Simple | LED, Button |\n| [Light](examples/light/) | RGB LED with color \u0026 brightness | ⭐⭐⭐ Complex | RGB LED, PWM |\n| [DimSwitch](examples/dimswitch/) | Dimmable light control | ⭐⭐ Medium | LED, PWM |\n| [Motion Sensor](examples/motion_sensor/) | PIR motion detection | ⭐ Simple | PIR sensor |\n| [Contact Sensor](examples/contact_sensor/) | Door/window detection | ⭐ Simple | Reed switch |\n| [Temperature Sensor](examples/temperature_sensor/) | Temp \u0026 humidity monitoring | ⭐⭐ Medium | DHT22/DHT11 |\n| [Thermostat](examples/thermostat/) | HVAC climate control | ⭐⭐⭐ Complex | Relays, DHT22 |\n| [Lock](examples/lock/) | Smart lock control | ⭐⭐ Medium | Servo motor |\n| [Garage Door](examples/garage_door/) | Garage door automation | ⭐⭐⭐ Complex | Relay, Reed switches |\n| [Fan](examples/fan/) | Variable speed fan | ⭐⭐ Medium | DC motor, PWM |\n| [Blinds](examples/blinds/) | Motorized blinds/curtains | ⭐⭐⭐ Complex | DC motor, L298N |\n| [TV](examples/tv/) | Media control \u0026 channels | ⭐⭐⭐ Complex | Simulated/IR |\n| [Speaker](examples/speaker/) | Audio control \u0026 equalizer | ⭐⭐⭐ Complex | Simulated |\n\nEach example includes:\n- Complete working code\n- Wiring diagrams\n- Voice command examples\n- Hardware requirements\n- Step-by-step setup guide\n \n## Quick Start\n\n### 1. Get SinricPro Credentials\n\n1. Sign up at [sinric.pro](https://sinric.pro)\n2. Create a new Switch device\n3. Note your `APP_KEY`, `APP_SECRET`, and `DEVICE_ID`\n\n### 2. Minimal Example\n\n```c\n#include \"sinricpro.h\"\n#include \"sinricpro_switch.h\"\n\n#define DEVICE_ID      \"YOUR_DEVICE_ID\"\n#define APP_KEY        \"YOUR_APP_KEY\"\n#define APP_SECRET     \"YOUR_APP_SECRET\"\n\n/* PowerState callback */\nstatic bool on_power_state(const char *device_id, bool *state, void *user_data)\n{\n    printf(\"Device %s\\n\", *state ? \"ON\" : \"OFF\");\n    gpio_set_level(GPIO_NUM_2, *state);  /* Control LED */\n    return true;  /* Return true for success */\n}\n\nvoid app_main(void)\n{\n    /* Initialize WiFi (code omitted for brevity) */\n\n    /* Configure SinricPro */\n    sinricpro_config_t config = {\n        .app_key = APP_KEY,\n        .app_secret = APP_SECRET,\n        .auto_reconnect = true,\n    };\n\n    /* Initialize */\n    sinricpro_init(\u0026config);\n\n    /* Create switch device */\n    sinricpro_device_handle_t my_switch = sinricpro_switch_create(DEVICE_ID);\n\n    /* Register callback */\n    sinricpro_switch_on_power_state(my_switch, on_power_state, NULL);\n\n    /* Start */\n    sinricpro_start();\n\n    /* Send event (e.g., button press) */\n    sinricpro_switch_send_power_state_event(my_switch, true,\n                                             SINRICPRO_CAUSE_PHYSICAL_INTERACTION);\n}\n```\n\n### 3. Build and Flash\n\n```bash\nidf.py build\nidf.py flash monitor\n```\n\n### Reporting Issues\n- Check [existing issues](https://github.com/sinricpro/esp-idf/issues)\n- Include ESP-IDF version, chip type, and example name\n- Provide minimal reproduction code\n \n## Support\n\n- **Documentation**: [help.sinric.pro](https://help.sinric.pro)\n- **Community**: [Discord](https://discord.gg/W5299EgB59) - Get help from the community\n- **Issues**: [GitHub Issues](https://github.com/sinricpro/esp-idf/issues) - Report bugs or request features\n- **Email**: support@sinric.pro - Direct support\n- **Examples**: All examples include detailed README files with troubleshooting\n\n## Related Projects\n\n- [SinricPro Arduino SDK](https://github.com/sinricpro/esp8266-esp32-sdk)\n- [SinricPro Python SDK](https://github.com/sinricpro/python-sdk)\n- [SinricPro Node.js SDK](https://github.com/sinricpro/nodejs-sdk)\n\n\n---\n\nMade with ❤️ by the SinricPro Team\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinricpro%2Fesp-idf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinricpro%2Fesp-idf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinricpro%2Fesp-idf/lists"}