{"id":19389782,"url":"https://github.com/toxblh/samsung-tv-control","last_synced_at":"2025-04-09T16:15:34.167Z","repository":{"id":33966500,"uuid":"159747321","full_name":"Toxblh/samsung-tv-control","owner":"Toxblh","description":"📺 Remote control your TV via JS!","archived":false,"fork":false,"pushed_at":"2023-12-23T00:35:07.000Z","size":1755,"stargazers_count":188,"open_issues_count":20,"forks_count":41,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-09T16:15:29.586Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://toxblh.github.io/samsung-tv-control/","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/Toxblh.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},"funding":{"issuehunt":"Toxblh","patreon":"toxblh","ko_fi":"toxblh","custom":"https://www.paypal.me/toxblh"}},"created_at":"2018-11-30T00:50:15.000Z","updated_at":"2025-03-24T12:06:04.000Z","dependencies_parsed_at":"2023-12-23T01:58:18.624Z","dependency_job_id":null,"html_url":"https://github.com/Toxblh/samsung-tv-control","commit_stats":null,"previous_names":["toxblh/samsung-tv-remote"],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toxblh%2Fsamsung-tv-control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toxblh%2Fsamsung-tv-control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toxblh%2Fsamsung-tv-control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toxblh%2Fsamsung-tv-control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Toxblh","download_url":"https://codeload.github.com/Toxblh/samsung-tv-control/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065282,"owners_count":21041872,"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-11-10T10:17:24.642Z","updated_at":"2025-04-09T16:15:34.134Z","avatar_url":"https://github.com/Toxblh.png","language":"TypeScript","funding_links":["https://issuehunt.io/r/Toxblh","https://patreon.com/toxblh","https://ko-fi.com/toxblh","https://www.paypal.me/toxblh","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=WUAAG2HH58WE4","https://www.patreon.com/toxblh"],"categories":[],"sub_categories":[],"readme":"## 📺 Library for remote control Samsung TV in your NodeJS application.\n\n_Tested with Samsung UE43NU7400 and UN55NU7100_\n\n[![Build Status](https://travis-ci.org/Toxblh/samsung-tv-control.svg?branch=master)](https://travis-ci.org/Toxblh/samsung-tv-control)\n[![codecov](https://codecov.io/gh/Toxblh/samsung-tv-control/branch/master/graph/badge.svg)](https://codecov.io/gh/Toxblh/samsung-tv-control)\n[![Latest Stable Version](https://img.shields.io/npm/v/samsung-tv-control.svg)](https://www.npmjs.com/package/samsung-tv-control)\n[![Downloads total](https://img.shields.io/npm/dt/samsung-tv-control.svg)](https://www.npmjs.com/package/samsung-tv-control)\n[![Downloads month](https://img.shields.io/npm/dm/samsung-tv-control.svg)](https://www.npmjs.com/package/samsung-tv-control)\n[![License](https://img.shields.io/github/license/Toxblh/samsung-tv-control)](https://www.npmjs.com/package/samsung-tv-control) [![Paypal Donate](https://img.shields.io/badge/paypal-donate-blue.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=WUAAG2HH58WE4) [![Patreon](https://img.shields.io/badge/patreon-support-blue.svg)](https://www.patreon.com/toxblh)\n\n## [📖 Documentation](https://toxblh.github.io/samsung-tv-control/)\n\n## Installation\n\nRequires Node v9 or above.\n\n`npm install samsung-tv-control --save`\n\n## \u003cimg src=\"http://nodered.org/node-red-icon.png\" height=\"32px\" /\u003e NODE-RED\n\nAlso you can use the lib in your Node-RED https://github.com/Toxblh/node-red-contrib-samsung-tv-control\n\n## Usage\n\nYou can try [example code](example/index.js)\n\n```js\n// import Samsung, { APPS, KEYS } from 'samsung-tv-control'\nconst { Samsung, KEYS, APPS } = require('samsung-tv-control')\n\nconst config = {\n  debug: true, // Default: false\n  ip: '192.168.1.2',\n  mac: '123456789ABC',\n  nameApp: 'NodeJS-Test', // Default: NodeJS\n  port: 8001, // Default: 8002\n  token: '12345678',\n}\n\nconst control = new Samsung(config)\n\ncontrol.turnOn()\ncontrol\n  .isAvailable()\n  .then(() =\u003e {\n    // Get token for API\n    control.getToken((token) =\u003e {\n      console.info('# Response getToken:', token)\n    })\n\n    // Send key to TV\n    control.sendKey(KEYS.KEY_HOME, function (err, res) {\n      if (err) {\n        throw new Error(err)\n      } else {\n        console.log(res)\n      }\n    })\n\n    // Get all installed apps from TV\n    control.getAppsFromTV((err, res) =\u003e {\n      if (!err) {\n        console.log('# Response getAppsFromTV', res)\n      }\n    })\n\n    // Get app icon by iconPath which you can get from getAppsFromTV\n    control.getAppIcon(\n      `/opt/share/webappservice/apps_icon/FirstScreen/${APPS.YouTube}/250x250.png`,\n      (err, res) =\u003e {\n        if (!err) {\n          console.log('# Response getAppIcon', res)\n        }\n      },\n    )\n\n    // Open app by appId which you can get from getAppsFromTV\n    control.openApp(APPS.YouTube, (err, res) =\u003e {\n      if (!err) {\n        console.log('# Response openApp', res)\n      }\n    })\n\n    // Control will keep connection for next messages in 1 minute\n    // If you would like to close it immediately, you can use `closeConnection()`\n    control.closeConnection()\n  })\n  .catch((e) =\u003e console.error(e))\n```\n\n## Commands List\n\nAll commands you can find [here](src/keys.ts)\n\nAll popular apps you can find [here](src/apps.ts)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoxblh%2Fsamsung-tv-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoxblh%2Fsamsung-tv-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoxblh%2Fsamsung-tv-control/lists"}