{"id":15011940,"url":"https://github.com/sinricpro/esp8266-esp32-sdk","last_synced_at":"2025-07-04T14:33:16.837Z","repository":{"id":37376613,"uuid":"214114856","full_name":"sinricpro/esp8266-esp32-sdk","owner":"sinricpro","description":"Library for https://sinric.pro - simple way to connect your device to Alexa, Google Home, SmartThings and cloud","archived":false,"fork":false,"pushed_at":"2025-04-16T05:31:07.000Z","size":6386,"stargazers_count":247,"open_issues_count":2,"forks_count":131,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-05-23T09:27:45.629Z","etag":null,"topics":["alexa-skill","arduino","esp32","esp8266","google-home","iot","platformio"],"latest_commit_sha":null,"homepage":"https://sinric.pro","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.txt","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":"2019-10-10T07:23:01.000Z","updated_at":"2025-05-01T12:07:06.000Z","dependencies_parsed_at":"2023-10-02T03:52:30.890Z","dependency_job_id":"e4346ff5-9b4d-444a-a1c6-13771fbc50fc","html_url":"https://github.com/sinricpro/esp8266-esp32-sdk","commit_stats":{"total_commits":588,"total_committers":7,"mean_commits":84.0,"dds":0.5289115646258503,"last_synced_commit":"90988075c8a5756b1650e385924bab9a1e9548c3"},"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"purl":"pkg:github/sinricpro/esp8266-esp32-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinricpro%2Fesp8266-esp32-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinricpro%2Fesp8266-esp32-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinricpro%2Fesp8266-esp32-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinricpro%2Fesp8266-esp32-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinricpro","download_url":"https://codeload.github.com/sinricpro/esp8266-esp32-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinricpro%2Fesp8266-esp32-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263557041,"owners_count":23480109,"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":["alexa-skill","arduino","esp32","esp8266","google-home","iot","platformio"],"created_at":"2024-09-24T19:41:55.062Z","updated_at":"2025-07-04T14:33:16.789Z","avatar_url":"https://github.com/sinricpro.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SinricPro (ESP8266 / ESP32 / RP2040)\n[![arduino-library-badge](https://www.ardu-badge.com/badge/SinricPro.svg?)](https://www.arduino.cc/reference/en/libraries/sinricpro) [![PlatformIO Registry](https://badges.registry.platformio.org/packages/sinricpro/library/SinricPro.svg)](https://registry.platformio.org/libraries/sinricpro/SinricPro)\n\n[![Platform ESP8266](https://img.shields.io/badge/Platform-Espressif8266-orange)](#) [![Platform ESP32](https://img.shields.io/badge/Platform-Espressif32-orange)](#)\n[![Raspberry Pi RP2040](https://img.shields.io/badge/Platform-Raspberry_Pi_RP2040-orange)](#)\n\n[![Framework](https://img.shields.io/badge/Framework-Arduino-blue)](https://www.arduino.cc/)\n\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/sinricpro/esp8266-esp32-sdk)](https://github.com/sinricpro/esp8266-esp32-sdk/releases)\n\n[![Build](https://github.com/sinricpro/esp8266-esp32-sdk/actions/workflows/build-esp8266-esp32.yml/badge.svg)](https://github.com/sinricpro/esp8266-esp32-sdk/actions/workflows/build-esp8266-esp32.yml)\n\n[![Build](https://github.com/sinricpro/esp8266-esp32-sdk/actions/workflows/build-rpipicow.yml/badge.svg)](https://github.com/sinricpro/esp8266-esp32-sdk/actions/workflows/build-rpipicow.yml)\n\n[![Discord](https://img.shields.io/badge/discord-%23esp8266--esp32-blue.svg)](https://discord.gg/rq9vcRcSqA) \u003c/br\u003e\n  \n## Installation\n\n### VS Code \u0026 PlatformIO:\n1. Install [VS Code](https://code.visualstudio.com/)  \n2. Install [PlatformIO](https://platformio.org/platformio-ide)  \n3. Create a new Project\n4. Use the [Library Manager](https://docs.platformio.org/en/latest/librarymanager/) to add the library to your project or add `sinricpro/SinricPro` manually to your `lib_deps` in `platformio.ini`.\n\n![sinricpro library manager](https://raw.githubusercontent.com/sinricpro/images/master/platformio-install-sinricpro.png)\n\n### ArduinoIDE\n1. Open Library Manager (*Tools / Manage Libraries*)  \n2. Search for *SinricPro* and click *Install*  \n3. Repeat step 2 for all [dependent libraries](#dependencies)!\n4. Open example in ArduinoIDE (*File / Examples / SinricPro / ...*)  \n\n![ArduinoIDE Library Manager](https://raw.githubusercontent.com/sinricpro/images/master/ArduinoIDE-Library-Manager.png)\n\n---\n\n## Dependencies\n- [ArduinoJson](https://github.com/bblanchon/ArduinoJson) by Benoit Blanchon (minimum Version 7.0.3)\n- [WebSockets](https://github.com/Links2004/arduinoWebSockets) by Markus Sattler (minimum Version 2.4.0)\n\n---\n\n## Full user documentation\nPlease see here for [full user documentation](https://sinricpro.github.io/esp8266-esp32-sdk-documentation/)\n\n---\n\n## Examples\nSee [examples](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples) on GitHub\n\n---\n\n## Usage\n### Include SinricPro-Library (SinricPro.h) and SinricPro-Device-Libraries (eg. SinricProSwitch.h)\n```C++\n#include \u003cSinricPro.h\u003e\n#include \u003cSinricProSwitch.h\u003e\n```\n\n### Define your credentials from SinricPro-Portal (portal.sinric.pro)\n```C++\n#define APP_KEY    \"YOUR-APP-KEY\"    // Should look like \"de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx\"\n#define APP_SECRET \"YOUR-APP-SECRET\" // Should look like \"5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx\"\n#define SWITCH_ID  \"YOUR-DEVICE-ID\"  // Should look like \"5dc1564130xxxxxxxxxxxxxx\"\n```\n\n### Define callback routine(s)\n```C++\nbool onPowerState(const String \u0026deviceId, bool \u0026state) {\n  Serial.printf(\"device %s turned %s\\r\\n\", deviceId.c_str(), state?\"on\":\"off\");\n  return true; // indicate that callback handled correctly\n}\n```\n\n### In setup()\n```C++\n  // create and add a switch to SinricPro\n  SinricProSwitch\u0026 mySwitch = SinricPro[SWITCH_ID];\n  // set callback function\n  mySwitch.onPowerState(onPowerState);\n  // startup SinricPro\n  SinricPro.begin(APP_KEY, APP_SECRET);\n\n```\n\n### In loop()\n```C++\n  SinricPro.handle();\n```\n\n---\n## How to add a device?\nSyntax is  \n```C++\n  DeviceType\u0026 myDevice = SinricPro[DEVICE_ID];\n```\nExample  \n```C++\n  SinricProSwitch\u0026 mySwitch = SinricPro[\"YOUR-SWITCH-ID-HERE\"];\n```\n\n---\n## How to retrieve a device for sending an event?\nSyntax is  \n```C++\n  DeviceType\u0026 myDevice = SinricPro[DEVICE_ID];\n```\nExample \n```C++\n  SinricProDoorbell\u0026 myDoorbell = SinricPro[\"YOUR-DOORBELL-ID-HERE\"];\n  myDoorbell.sendDoorbellEvent();\n```\n\n## How to send a push notification?\n```C++\nSinricProSwitch\u0026 mySwitch = SinricPro[SWITCH_ID];\nmySwitch.sendPushNotification(\"Hello SinricPro!\");\n```\n\n---\n\n## Device Types\n* [Switch](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/Switch)\n* [Dimmable Switch](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/DimSwitch)\n* [Light](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/Light)\n* [TV](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/TV)\n* [Speaker](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/Speaker)\n* [Thermostat](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/Thermostat)\n* [Fan](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/Fan)\n* [Lock](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/Lock)\n* [Doorbell](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/doorbell)\n* [Temperature Sensor](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/temperaturesensor)\n* [Motion Sensor](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/MotionSensor)\n* [Contact Sensor](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/ContactSensor)\n* [Windows Air Conditioner](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/ACUnit)\n* [Blinds](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/Blinds)\n* [Garage Door](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/GarageDoor)\n* [Custom devices](https://help.sinric.pro/pages/custom-templates)\n* [Camera](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/Camera)\n\n### Other\n* [OTA](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/OTAUpdate)\n* [MultiWiFi](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/Settings/MultiWiFi)\n* [Health](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/Health)\n---\n\n## Licensing and Credits\n* The Arduino IDE is developed and maintained by the Arduino team. The IDE is licensed under GPL.\n* [ArduinoJson](https://github.com/bblanchon/ArduinoJson) is licensed under the MIT.\n* [WebSockets](https://github.com/Links2004/arduinoWebSockets) is licensed under the GNU LGPL.\n* The [PlatformIO](https://github.com/platformio) is developed and maintained by the PlatformIO team. The Core is licensed under Apache License 2.0.\n\n## Support for other boards\n[https://github.com/sinricpro/arduino-variants-sdk](https://github.com/sinricpro/arduino-variants-sdk)\n\n## Join the community!\nJoin us on our [Official Discord Server](https://discord.gg/rq9vcRcSqA)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinricpro%2Fesp8266-esp32-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinricpro%2Fesp8266-esp32-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinricpro%2Fesp8266-esp32-sdk/lists"}