{"id":13627842,"url":"https://github.com/rluvaton/electra-smart-js-client","last_synced_at":"2025-04-01T17:47:10.905Z","repository":{"id":57204114,"uuid":"527041307","full_name":"rluvaton/electra-smart-js-client","owner":"rluvaton","description":"Electra Smart Javascript Client","archived":false,"fork":false,"pushed_at":"2022-08-20T22:18:15.000Z","size":343,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-16T13:53:43.389Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/rluvaton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-20T21:15:06.000Z","updated_at":"2022-08-22T15:21:07.000Z","dependencies_parsed_at":"2022-09-17T15:02:50.068Z","dependency_job_id":null,"html_url":"https://github.com/rluvaton/electra-smart-js-client","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rluvaton%2Felectra-smart-js-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rluvaton%2Felectra-smart-js-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rluvaton%2Felectra-smart-js-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rluvaton%2Felectra-smart-js-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rluvaton","download_url":"https://codeload.github.com/rluvaton/electra-smart-js-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246683895,"owners_count":20817340,"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":[],"created_at":"2024-08-01T22:00:39.198Z","updated_at":"2025-04-01T17:47:10.887Z","avatar_url":"https://github.com/rluvaton.png","language":"TypeScript","funding_links":[],"categories":["Projects by main language"],"sub_categories":["typescript"],"readme":"# Electra Smart JS client\n[![npm](https://img.shields.io/npm/v/electra-smart-js-client?style=plastic)](https://www.npmjs.com/package/electra-smart-js-client)\n\nPort of [`yonatanp/electrasmart`](https://github.com/yonatanp/electrasmart) in JS\n\n## Usage\n\n**Get the authentication data**\n\n```bash\nnpx electra-smart-js-client\n\n# This will log { \"imei\": \"\u003cimei\u003e\", \"token\": \"\u003ctoken\u003e\" }\n# Save it for later use\n```\n\n**Use it from Node.js code**\n```js\nimport { Client } from 'electra-smart-js-client';\n\nasync function run() {\n  const client = await new Client({\n    imei: '\u003cimei\u003e', // This is the imei value from the previous step\n    token: '\u003ctoken\u003e', // This is the token value from the previous step\n  });\n\n  const devices = await client.getDevices();\n\n  // Choose the device you want to control\n  const deviceId = devices[0].id;\n\n  // Control it 🔥\n  await client.setMode(deviceId, 'HEAT');\n}\n\nrun().then(console.log).catch(console.error);\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frluvaton%2Felectra-smart-js-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frluvaton%2Felectra-smart-js-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frluvaton%2Felectra-smart-js-client/lists"}