{"id":20485957,"url":"https://github.com/sinricpro/nodejs-sdk","last_synced_at":"2026-01-07T04:21:43.201Z","repository":{"id":35130915,"uuid":"210128675","full_name":"sinricpro/nodejs-sdk","owner":"sinricpro","description":"Nodejs library for https://sinric.pro","archived":false,"fork":false,"pushed_at":"2024-06-19T08:45:33.000Z","size":344,"stargazers_count":11,"open_issues_count":3,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-13T15:13:48.527Z","etag":null,"topics":["sinricpro"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/sinricpro.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2019-09-22T10:27:24.000Z","updated_at":"2024-02-14T19:09:14.000Z","dependencies_parsed_at":"2024-06-21T03:53:35.119Z","dependency_job_id":"b3039163-5351-439d-b53f-ac4daf4784b4","html_url":"https://github.com/sinricpro/nodejs-sdk","commit_stats":{"total_commits":107,"total_committers":9,"mean_commits":11.88888888888889,"dds":0.514018691588785,"last_synced_commit":"f4afe187294f6c55a832c6676d778e056a499816"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinricpro%2Fnodejs-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinricpro%2Fnodejs-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinricpro%2Fnodejs-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinricpro%2Fnodejs-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinricpro","download_url":"https://codeload.github.com/sinricpro/nodejs-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248732488,"owners_count":21152852,"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":["sinricpro"],"created_at":"2024-11-15T16:34:28.235Z","updated_at":"2025-12-29T13:44:12.066Z","avatar_url":"https://github.com/sinricpro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SinricPro SDK for Node.js \u0026 TypeScript\r\n\r\n[![npm version](https://badge.fury.io/js/sinricpro.svg)](https://www.npmjs.com/package/sinricpro)\r\n[![License](https://img.shields.io/badge/License-CC%20BY--SA%204.0-blue.svg)](LICENSE)\r\n\r\nOfficial SinricPro SDK for Node.js and TypeScript. Control your IoT devices with Alexa and Google Home.\r\n\r\n**🎯 Features:**\r\n- ✅ Full TypeScript support with strong typing\r\n- ✅ Modern async/await API\r\n- ✅ WebSocket with automatic reconnection\r\n- ✅ HMAC-SHA256 authentication\r\n- ✅ Event rate limiting\r\n- ✅ Multiple device types (Switch, Light, Thermostat, etc.)\r\n- ✅ Comprehensive error handling\r\n- ✅ Unit tested\r\n\r\n---\r\n\r\n## 📦 Installation\r\n\r\n```bash\r\nnpm install sinricpro\r\n```\r\n\r\nOr with yarn:\r\n```bash\r\nyarn add sinricpro\r\n```\r\n\r\n---\r\n\r\n## 🚀 Quick Start\r\n\r\n### 1. Get Your Credentials\r\n\r\n1. Sign up at [sinric.pro](https://sinric.pro)\r\n2. Create a new device (e.g., \"Switch\")\r\n3. Copy your credentials:\r\n   - `APP_KEY`\r\n   - `APP_SECRET`\r\n   - `DEVICE_ID`\r\n\r\n### 2. Create a Simple Switch\r\n\r\n```typescript\r\nimport SinricPro from 'sinricpro';\r\nimport { SinricProSwitch } from 'sinricpro/devices';\r\n\r\nconst config = {\r\n  appKey: 'YOUR-APP-KEY',\r\n  appSecret: 'YOUR-APP-SECRET',\r\n};\r\n\r\nasync function main() {\r\n  // Create a switch device\r\n  const mySwitch = SinricProSwitch('YOUR-DEVICE-ID');\r\n\r\n  // Handle power state changes from Alexa/Google Home\r\n  mySwitch.onPowerState(async (deviceId, state) =\u003e {\r\n    console.log(`Device turned ${state ? 'ON' : 'OFF'}`);\r\n    // Control your hardware here\r\n    return true; // Return true if successful\r\n  });\r\n\r\n  // Add device to SinricPro\r\n  SinricPro.add(mySwitch);\r\n\r\n  // Connection events\r\n  SinricPro.onConnected(() =\u003e console.log('Connected!'));\r\n  SinricPro.onDisconnected(() =\u003e console.log('Disconnected!'));\r\n\r\n  // Initialize SDK\r\n  await SinricPro.begin(config);\r\n\r\n  // Send events when state changes locally\r\n  setTimeout(async () =\u003e {\r\n    await mySwitch.sendPowerStateEvent(true);\r\n  }, 5000);\r\n}\r\n\r\nmain().catch(console.error);\r\n```\r\n\r\n### 3. Run Your App\r\n\r\n```bash\r\nts-node app.ts\r\n```\r\n\r\n### 4. Control with Voice\r\n\r\n- \"Alexa, turn on Switch\"\r\n- \"OK Google, turn off Switch\"\r\n\r\n---\r\n\r\n## 🤝 Contributing\r\n\r\nContributions welcome! Please:\r\n\r\n1. Fork the repository\r\n2. Create a feature branch\r\n3. Add tests for new features\r\n4. Submit a pull request\r\n\r\n---\r\n\r\n## 📄 License\r\n\r\nThis project is licensed under CC-BY-SA-4.0.\r\n\r\n---\r\n\r\n## 🔗 Links\r\n\r\n- **Website:** [sinric.pro](https://sinric.pro)\r\n- **Documentation:** [help.sinric.pro](https://help.sinric.pro)\r\n- **GitHub:** [github.com/sinricpro](https://github.com/sinricpro)\r\n- **Support:** [community.sinric.pro](https://community.sinric.pro)\r\n\r\n---\r\n\r\n## 💬 Support\r\n\r\n- **Issues:** [GitHub Issues](https://github.com/sinricpro/nodejs-sdk/issues)\r\n- **Community:** [SinricPro Community](https://community.sinric.pro)\r\n- **Email:** support@sinric.pro\r\n\r\n---\r\n\r\n**Made with ❤️ by the SinricPro team**\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinricpro%2Fnodejs-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinricpro%2Fnodejs-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinricpro%2Fnodejs-sdk/lists"}