Skip to content

Latest commit

 

History

History
68 lines (49 loc) · 1.65 KB

README.md

File metadata and controls

68 lines (49 loc) · 1.65 KB

Samsung TV remote interface

js-standard-style

dependencies Status devDependencies Status

This module can communicate with old Samsung TVs over the network.

Installation

npm install --save samsung-tv-remote-interface

Optional (keys to send to the TV):

npm install --save samsung-tv-remote-interface-keys

Quickstart

Build a new client:

const SamsungTVClient = require('samsung-tv-remote-interface')
const client = new SamsungTVClient()

Import keys (if installed):

const keys = require('samsung-tv-remote-interface-keys')

Use client:

client
  // connect to TV
  .connect('TVs IP address')
  // authenticate
  .then(() => client.authenticate('Your IP', 'Your UUID', 'Your Controller name'))
  // volume down
  .then(() => client.sendMessageByKey(keys.KEY_VOLDOWN))
  // volume up
  .then(() => client.sendMessageByKey(keys.KEY_VOLUP))

Catch errors:

client
  .catch(error => {
    // do something with error
  })

Special thanks

To the guy who made this website.