This module can communicate with old Samsung TVs over the network.
npm install --save samsung-tv-remote-interface
Optional (keys to send to the TV):
npm install --save samsung-tv-remote-interface-keys
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
})
To the guy who made this website.